Package org.apache.sling.pipes

## Class SuperPipe

- java.lang.Object
- - org.apache.sling.pipes.BasePipe
  - - org.apache.sling.pipes.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 Summary

Fields
`static String` `PN_SLEEP` Sleep time, in ms, after each resource returned
`protected long` `sleep`
`protected 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`

### Fields inherited from interface org.apache.sling.pipes.Pipe

`NN_CONF, PN_DISTRIBUTION_AGENT, PN_EXPR, PN_NAME, PN_PATH`

### Constructor Summary

Constructors
`SuperPipe​(Plumber plumber, org.apache.sling.api.resource.Resource resource, PipeBindings upperBindings)` Pipe Constructor

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`void` `after()` to be executed before output is retrieved
`void` `before()` to be executed before output is retrieved
`abstract void` `buildChildren()` build the subpipes pipes list
`protected Iterator<org.apache.sling.api.resource.Resource>` `computeOutput()`
`protected abstract Iterator<org.apache.sling.api.resource.Resource>` `computeSubpipesOutput()`
`protected Pipe` `getFirstPipe()` Return the first pipe in the container
`protected Pipe` `getLastPipe()` Return the last pipe in the container
`Pipe` `getPreviousPipe​(Pipe pipe)` Return the previous pipe of the given child pipe
`boolean` `modifiesContent()` 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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### 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

#### 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`