@ProviderType
public interface Plumber
Modifier and Type | Field and Description |
---|---|
static String |
RESOURCE_TYPE |
Modifier and Type | Method and Description |
---|---|
ExecutionResult |
execute(org.apache.sling.api.resource.ResourceResolver resolver,
Pipe pipe,
Map bindings,
OutputWriter writer,
boolean save)
Executes a given pipe
|
ExecutionResult |
execute(org.apache.sling.api.resource.ResourceResolver resolver,
String path,
Map 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 bindings)
executes in a background thread
|
org.apache.sling.event.jobs.Job |
executeAsync(String path,
Map bindings)
executes in a background thread
|
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
|
Map |
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
|
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
|
static final String RESOURCE_TYPE
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 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 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 bindings, OutputWriter writer, boolean save) throws Exception
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
Exception
- in case execution failsExecutionResult execute(org.apache.sling.api.resource.ResourceResolver resolver, Pipe pipe, Map bindings, OutputWriter writer, boolean save) throws Exception
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
Exception
- in case execution failsvoid 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 getServiceUser()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.