@ProviderType
public interface Plumber
Modifier and Type | Method and Description |
---|---|
boolean |
allowAdditionalScripts() |
Object |
evaluate(String expr,
Bindings bindings)
evaluates a given expression with internal embedded engine
|
ExecutionResult |
execute(org.apache.sling.api.resource.ResourceResolver resolver,
Pipe pipe,
Map<String,Object> bindings,
OutputWriter writer,
boolean save)
Executes a given pipe
|
ExecutionResult |
execute(org.apache.sling.api.resource.ResourceResolver resolver,
String path,
Map<String,Object> bindings,
OutputWriter writer,
boolean save)
Executes a pipe at a certain path
|
org.apache.sling.event.jobs.Job |
executeAsync(org.apache.sling.api.resource.ResourceResolver resolver,
String path,
Map<String,Object> bindings)
executes in a background thread
|
org.apache.sling.event.jobs.Job |
executeAsync(String path,
Map<String,Object> bindings)
executes in a background thread
|
String |
generateUniquePath() |
Map<String,Object> |
getBindingsFromRequest(org.apache.sling.api.SlingHttpServletRequest request,
boolean writeAllowed)
Extract pipe bindings from the request
|
Map |
getContextAwareConfigurationMap(org.apache.sling.api.resource.Resource currentResource) |
Pipe |
getPipe(org.apache.sling.api.resource.Resource resource)
Instantiate a pipe from the given resource and returns it
|
Pipe |
getPipe(org.apache.sling.api.resource.Resource resource,
PipeBindings upperBindings)
Instantiate a pipe from the given resource and returns it
|
@Nullable org.apache.sling.api.resource.Resource |
getReferencedResource(org.apache.sling.api.resource.Resource referrer,
String reference) |
Map<String,Object> |
getServiceUser() |
String |
getStatus(org.apache.sling.api.resource.Resource pipeResource)
status of the pipe
|
boolean |
isRunning(org.apache.sling.api.resource.Resource pipeResource)
returns true if the pipe is considered to be running
|
boolean |
isTypeRegistered(String type)
returns wether or not a pipe type is registered
|
void |
markWithJcrLastModified(@NotNull Pipe pipe,
@NotNull org.apache.sling.api.resource.Resource resource)
marks a given resource as updated
|
PipeBuilder |
newPipe(org.apache.sling.api.resource.ResourceResolver resolver)
Provides a builder helping quickly build and execute a pipe
|
void |
registerPipe(String type,
Class<? extends BasePipe> pipeClass)
Registers
|
Pipe getPipe(org.apache.sling.api.resource.Resource resource)
resource
- configuration resourcePipe getPipe(org.apache.sling.api.resource.Resource resource, PipeBindings upperBindings)
resource
- configuration resourceupperBindings
- already set binding we want to initiate our pipe withorg.apache.sling.event.jobs.Job executeAsync(org.apache.sling.api.resource.ResourceResolver resolver, String path, Map<String,Object> bindings)
resolver
- resolver used for registering the execution (id will be checked against the configuration)path
- path of the pipe to executebindings
- additional bindings to use when executingorg.apache.sling.event.jobs.Job executeAsync(String path, Map<String,Object> bindings)
path
- path of the pipe to executebindings
- additional bindings to use when executingExecutionResult execute(org.apache.sling.api.resource.ResourceResolver resolver, String path, Map<String,Object> bindings, OutputWriter writer, boolean save)
resolver
- resource resolver with which pipe will be executedpath
- path of a valid pipe configurationbindings
- bindings to add to the execution of the pipe, can be nullwriter
- output of the pipesave
- in case that pipe writes anything, wether the plumber should save changes or notExecutionResult
ExecutionResult execute(org.apache.sling.api.resource.ResourceResolver resolver, Pipe pipe, Map<String,Object> bindings, OutputWriter writer, boolean save)
resolver
- resource resolver with which pipe will be executedpipe
- pipe to executebindings
- bindings to add to the execution of the pipe, can be nullwriter
- output of the pipesave
- in case that pipe writes anything, wether the plumber should save changes or notExecutionResult
void registerPipe(String type, Class<? extends BasePipe> pipeClass)
type
- resource type of the pipe to registerpipeClass
- class of the pipe to registerboolean isTypeRegistered(String type)
type
- resource type testedString getStatus(org.apache.sling.api.resource.Resource pipeResource)
pipeResource
- resource corresponding to the pipePipeBuilder newPipe(org.apache.sling.api.resource.ResourceResolver resolver)
resolver
- resource resolver that will be used for building the pipeboolean isRunning(org.apache.sling.api.resource.Resource pipeResource)
pipeResource
- resource corresponding to the pipeMap<String,Object> getBindingsFromRequest(org.apache.sling.api.SlingHttpServletRequest request, boolean writeAllowed) throws IOException
request
- from where to extract bindingswriteAllowed
- should we consider this execution is about to modify contentIOException
- in case something turns wrong with an input streamMap<String,Object> getServiceUser()
Map getContextAwareConfigurationMap(org.apache.sling.api.resource.Resource currentResource)
currentResource
- @Nullable @Nullable org.apache.sling.api.resource.Resource getReferencedResource(org.apache.sling.api.resource.Resource referrer, String reference)
referrer
- resource from which is made the fetchreference
- reference we are searching a resource for (assuming this is *not* a full path already)void markWithJcrLastModified(@NotNull @NotNull Pipe pipe, @NotNull @NotNull org.apache.sling.api.resource.Resource resource)
resource
- resource to markString generateUniquePath()
Object evaluate(String expr, Bindings bindings)
expr
- expression to evaluatebindings
- context bindingsboolean allowAdditionalScripts()
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.