Package org.apache.sling.pipes
Interface Pipe
-
- All Known Implementing Classes:
AbstractExpressionSlingQueryPipe,AbstractInputStreamPipe,AbstractSlingQueryPipe,BasePipe,ChildrenPipe,ClosestPipe,CsvPipe,FindPipe,JsonPipe,ParentPipe,ParentsPipe,RegexpPipe,SiblingsPipe,SuperPipe
@ConsumerType public interface PipePipe interface
-
-
Field Summary
Fields Modifier and Type Field Description static StringNN_CONFNode name for the pipe's configurationstatic StringPN_DISTRIBUTION_AGENTDistribution agent (for distributing output resources)static StringPN_EXPRexpression of the pipe, usage depends on the pipe implementationstatic StringPN_NAMEName of the pipestatic StringPN_PATHresource's path associated to the path, usage depends on the pipe implementation
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidafter()to be executed before output is retrievedvoidbefore()to be executed before output is retrievedPipeBindingsgetBindings()returns the pipe's bindingsStringgetDistributionAgent()Get Distribution agent@Nullable org.apache.sling.api.resource.ResourcegetInput()Get pipe current's resource *before* next execution, meaning either the configured resource, either previous' pipe output resourceStringgetName()Return the name of that pipeIterator<org.apache.sling.api.resource.Resource>getOutput()Executes the pipe, can be contained in a parent or notObjectgetOutputBinding()returns the binding output used in container pipe's expressionSuperPipegetParent()org.apache.sling.api.resource.ResourcegetResource()get the pipe configuration resourcebooleanisDryRun()returns true if that pipe is set not to write contentbooleanmodifiesContent()returns true if that pipe modifies content during its executionvoidsetParent(SuperPipe pipe)sets the parent pipe this pipe is referred by
-
-
-
Field Detail
-
PN_NAME
static final String PN_NAME
Name of the pipe- See Also:
- Constant Field Values
-
PN_EXPR
static final String PN_EXPR
expression of the pipe, usage depends on the pipe implementation- See Also:
- Constant Field Values
-
PN_PATH
static final String PN_PATH
resource's path associated to the path, usage depends on the pipe implementation- See Also:
- Constant Field Values
-
NN_CONF
static final String NN_CONF
Node name for the pipe's configuration- See Also:
- Constant Field Values
-
PN_DISTRIBUTION_AGENT
static final String PN_DISTRIBUTION_AGENT
Distribution agent (for distributing output resources)- See Also:
- Constant Field Values
-
-
Method Detail
-
modifiesContent
boolean modifiesContent()
returns true if that pipe modifies content during its execution- Returns:
- true for write / false for read
-
isDryRun
boolean isDryRun()
returns true if that pipe is set not to write content- Returns:
- true if dry run, false otherwise
-
getName
String getName()
Return the name of that pipe- Returns:
- name of the pipe
-
setParent
void setParent(SuperPipe pipe)
sets the parent pipe this pipe is referred by- Parameters:
pipe- referrer that refers to this instance
-
getParent
SuperPipe getParent()
- Returns:
- pipe's parent (can be null)
-
getInput
@Nullable @Nullable org.apache.sling.api.resource.Resource getInput()
Get pipe current's resource *before* next execution, meaning either the configured resource, either previous' pipe output resource- Returns:
- input, configured or previous pipe
-
getResource
org.apache.sling.api.resource.Resource getResource()
get the pipe configuration resource- Returns:
- Pipe configruation root resource
-
getOutputBinding
Object getOutputBinding()
returns the binding output used in container pipe's expression- Returns:
- object, either value map or something else, that will be used in nashorn for computing expressions
-
getBindings
PipeBindings getBindings()
returns the pipe's bindings- Returns:
- PipeBindings instance containing all bindings of that pipe
-
getOutput
Iterator<org.apache.sling.api.resource.Resource> getOutput()
Executes the pipe, can be contained in a parent or not- Returns:
- iterator of resource resulting from execution of this pipe
-
before
void before()
to be executed before output is retrieved
-
after
void after()
to be executed before output is retrieved
-
getDistributionAgent
String getDistributionAgent()
Get Distribution agent- Returns:
- configured distribution agent
-
-