Class ResourceCheck

  • All Implemented Interfaces:
    Task<FlowContext>

    public final class ResourceCheck
    extends Object
    implements Task<FlowContext>
    Function which checks whether a given resource exists. Pushes 200 onto the context stack if it exists, 404 otherwise.
    • Method Detail

      • apply

        public elemental2.promise.Promise<FlowContext> apply​(FlowContext context)
        Description copied from interface: Task
        Executes the task.
        Specified by:
        apply in interface Task<FlowContext>
        Parameters:
        context - the context shared between tasks
        Returns:
        a promise containing the shared context