Class SuperPipe

  • All Implemented Interfaces:
    Pipe

    public abstract class SuperPipe
    extends BasePipe
    Pipe that outputs a configured set of pipes output, managing for them what is their outputs, and bindings
    • Field Detail

      • sleep

        protected long sleep
      • subpipes

        protected List<Pipe> subpipes
    • Constructor Detail

      • SuperPipe

        public SuperPipe​(Plumber plumber,
                         org.apache.sling.api.resource.Resource resource,
                         PipeBindings upperBindings)
        Pipe Constructor
        Parameters:
        plumber - plumber
        resource - configuration resource
        upperBindings - already set bindings, can be null
    • Method Detail

      • buildChildren

        public abstract void buildChildren()
        build the subpipes pipes list
      • computeSubpipesOutput

        protected abstract Iterator<org.apache.sling.api.resource.Resource> computeSubpipesOutput()
        Returns:
        output of this super pipe's subpipes
      • computeOutput

        protected Iterator<org.apache.sling.api.resource.Resource> computeOutput()
        Overrides:
        computeOutput in class BasePipe
        Returns:
        outputs of the pipe, as an iterator of resources
      • getFirstPipe

        protected Pipe getFirstPipe()
        Return the first pipe in the container
        Returns:
        first pipe of the container
      • getLastPipe

        protected Pipe getLastPipe()
        Return the last pipe in the container
        Returns:
        pipe in the last position of the container's pipes
      • getPreviousPipe

        public Pipe getPreviousPipe​(Pipe pipe)
        Return the previous pipe of the given child pipe
        Parameters:
        pipe - child pipe of this parent
        Returns:
        previous pipe if any
      • modifiesContent

        public boolean modifiesContent()
        Description copied from interface: Pipe
        returns true if that pipe modifies content during its execution
        Specified by:
        modifiesContent in interface Pipe
        Overrides:
        modifiesContent in class BasePipe
        Returns:
        true for write / false for read
      • before

        public void before()
        Description copied from interface: Pipe
        to be executed before output is retrieved
        Specified by:
        before in interface Pipe
        Overrides:
        before in class BasePipe
      • after

        public void after()
        Description copied from interface: Pipe
        to be executed before output is retrieved
        Specified by:
        after in interface Pipe
        Overrides:
        after in class BasePipe