Modifier and Type | Field and Description |
---|---|
protected static Pattern |
ADD_PATCH |
protected static Pattern |
MULTI |
static String |
RESOURCE_TYPE |
afterHook, beforeHook, bindingProviders, bindings, distributionAgent, DRYRUN_EXPR, DRYRUN_KEY, dryRunObject, EMPTY_ITERATOR, IGNORED_PROPERTIES, parent, plumber, PN_AFTERHOOK, PN_BEFOREHOOK, PN_STATUS, PN_STATUS_MODIFIED, properties, READ_ONLY, resolver, resource, RT_PREFIX, SLASH, STATUS_FINISHED, STATUS_STARTED
Constructor and Description |
---|
WritePipe(Plumber plumber,
org.apache.sling.api.resource.Resource resource,
PipeBindings upperBindings)
public constructor
|
Modifier and Type | Method and Description |
---|---|
protected Iterator<org.apache.sling.api.resource.Resource> |
computeOutput() |
protected Object |
computeValue(org.apache.sling.api.resource.Resource resource,
String key,
Object expression)
convert the configured string value (can be an expression) in a value that can be written in a resource.
|
protected Object |
computeValue(org.apache.sling.api.resource.Resource resource,
String key,
String expression)
convert the configured string value (can be an expression) in a value that can be written in a resource.
|
boolean |
modifiesContent()
returns true if that pipe modifies content during its execution
|
after, before, getBindings, getComputedPath, getConfiguration, getDistributionAgent, getExpr, getInput, getName, getOutput, getOutputBinding, getParent, getPath, getPreviousPipe, getPreviousResource, getRawExpression, getRawPath, getResource, isDryRun, isRootPath, provideAdditionalBindings, setParent, toString
public static final String RESOURCE_TYPE
protected static final Pattern ADD_PATCH
protected static final Pattern MULTI
public WritePipe(Plumber plumber, org.apache.sling.api.resource.Resource resource, PipeBindings upperBindings) throws Exception
plumber
- plumber instanceresource
- configuration resourceupperBindings
- super pipe's bindingsException
- bad configuration handlingprotected Object computeValue(org.apache.sling.api.resource.Resource resource, String key, String expression) throws ScriptException
+[value]
in which case value
is added to the MV propertyresource
- resource to which value will be writtenkey
- property to which value will be writtenexpression
- configured value to writeScriptException
- in case value computation went wrongprotected Object computeValue(org.apache.sling.api.resource.Resource resource, String key, Object expression) throws ScriptException
+[value]
in which case value
is added to the MV propertyresource
- resource to which value will be writtenkey
- property to which value will be writtenexpression
- configured value to writeScriptException
- in case value computation went wrongpublic boolean modifiesContent()
Pipe
modifiesContent
in interface Pipe
modifiesContent
in class BasePipe
protected Iterator<org.apache.sling.api.resource.Resource> computeOutput() throws Exception
computeOutput
in class BasePipe
ScriptException
- if any exception has occuredException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.