Package org.apache.sling.pipes
Class SuperPipe
- java.lang.Object
-
- org.apache.sling.pipes.BasePipe
-
- org.apache.sling.pipes.SuperPipe
-
-
Field Summary
Fields Modifier and Type Field Description static StringPN_SLEEPSleep time, in ms, after each resource returnedprotected longsleepprotected List<Pipe>subpipes-
Fields inherited from class org.apache.sling.pipes.BasePipe
afterHook, beforeHook, bindingProviders, bindings, distributionAgent, DRYRUN_EXPR, DRYRUN_KEY, EMPTY_ITERATOR, IGNORED_NODES, IGNORED_PROPERTIES, parent, plumber, PN_AFTERHOOK, PN_BEFOREHOOK, PN_STATUS, PN_STATUS_MODIFIED, properties, READ_ONLY, resolver, resource, RESOURCE_TYPE, RT_PREFIX, SLASH, STATUS_FINISHED, STATUS_STARTED
-
-
Constructor Summary
Constructors Constructor Description SuperPipe(Plumber plumber, org.apache.sling.api.resource.Resource resource, PipeBindings upperBindings)Pipe Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidafter()to be executed before output is retrievedvoidbefore()to be executed before output is retrievedabstract voidbuildChildren()build the subpipes pipes listprotected Iterator<org.apache.sling.api.resource.Resource>computeOutput()protected abstract Iterator<org.apache.sling.api.resource.Resource>computeSubpipesOutput()protected PipegetFirstPipe()Return the first pipe in the containerprotected PipegetLastPipe()Return the last pipe in the containerPipegetPreviousPipe(Pipe pipe)Return the previous pipe of the given child pipebooleanmodifiesContent()returns true if that pipe modifies content during its execution-
Methods inherited from class org.apache.sling.pipes.BasePipe
getBindings, getComputedPath, getConfiguration, getDistributionAgent, getExpr, getInput, getName, getOutput, getOutputBinding, getParent, getPath, getPreviousPipe, getPreviousResource, getRawExpression, getRawPath, getResource, isDryRun, isRootPath, provideAdditionalBindings, setParent, toString
-
-
-
-
Field Detail
-
PN_SLEEP
public static final String PN_SLEEP
Sleep time, in ms, after each resource returned- See Also:
- Constant Field Values
-
sleep
protected long sleep
-
-
Constructor Detail
-
SuperPipe
public SuperPipe(Plumber plumber, org.apache.sling.api.resource.Resource resource, PipeBindings upperBindings)
Pipe Constructor- Parameters:
plumber- plumberresource- configuration resourceupperBindings- 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:
computeOutputin classBasePipe- 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:Pipereturns true if that pipe modifies content during its execution- Specified by:
modifiesContentin interfacePipe- Overrides:
modifiesContentin classBasePipe- Returns:
- true for write / false for read
-
before
public void before()
Description copied from interface:Pipeto be executed before output is retrieved
-
-