Package io.wcm.caravan.pipeline
Interface JsonPipelineAction
-
@ConsumerType public interface JsonPipelineAction
A JSON pipeline action aids in specifying of custom operations, which could be applied onJsonPipelineOutput
. Each action must called asynchronously as an element of JSON pipeline chain and could be added to the chain viaJsonPipeline.applyAction(JsonPipelineAction)
. Action will be executed only as soon as the previous step result of the chain is available. A JSON pipeline action could be implemented in multiple cases, when the necessary operation is not present directly in the declared methods ofJsonPipeline
. The most usual cases of custom action implementation are - a custom transformation of the pipeline output is required. SeeJsonPipelineActions.simpleTransformation(String, Func1)
; - modification of existing or creation of a new pipeline output uses data, which require an access to an external data source. A call for such data could be implemented in the JSON pipeline action. Each implementation of JSON pipeline action must guarantee an identifier, provided bygetId()
. The identifier must be constant (non modifiable) per each new class instance, even if the pipeline output is changed. SeeJsonPipelineActions
for existing implementations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description rx.Observable<JsonPipelineOutput>
execute(JsonPipelineOutput previousStepOutput, JsonPipelineContext pipelineContext)
Provides a subscription to the JSON pipeline output with the the results of this action.String
getId()
Provides an unique identifier of this actions, which must be guaranteed by the implementation to be constant during the whole lifetime of the action instance.
-
-
-
Method Detail
-
getId
String getId()
Provides an unique identifier of this actions, which must be guaranteed by the implementation to be constant during the whole lifetime of the action instance.- Returns:
- unique identifier of this action
-
execute
rx.Observable<JsonPipelineOutput> execute(JsonPipelineOutput previousStepOutput, JsonPipelineContext pipelineContext)
Provides a subscription to the JSON pipeline output with the the results of this action.- Parameters:
previousStepOutput
- a JSON pipeline output provided after pipeline has executed previous stepspipelineContext
- the context of theJsonPipeline
instance- Returns:
- a subscription the result JSON pipeline output
-
-