Package io.wcm.caravan.pipeline
Class JsonPipelineActions
- java.lang.Object
-
- io.wcm.caravan.pipeline.JsonPipelineActions
-
@ProviderType public final class JsonPipelineActions extends Object
Default implementations ofJsonPipelineAction
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JsonPipelineAction
applyFunction(String functionId, rx.functions.Func1<JsonPipelineOutput,JsonPipelineOutput> function)
Applies a custom function on theJsonPipelineOutput
of this pipeline.static JsonPipelineAction
simpleTransformation(String transformationId, rx.functions.Func1<com.fasterxml.jackson.databind.JsonNode,com.fasterxml.jackson.databind.JsonNode> transformation)
Applies a custom transformation on theJsonNode
(e.g.
-
-
-
Method Detail
-
simpleTransformation
public static JsonPipelineAction simpleTransformation(String transformationId, rx.functions.Func1<com.fasterxml.jackson.databind.JsonNode,com.fasterxml.jackson.databind.JsonNode> transformation)
Applies a custom transformation on theJsonNode
(e.g. a HAL representation) of actual pipeline, specifying a function as transformation mechanism. Function receivesJsonNode
as parameter, which transformation should be applied and returns a newJsonNode
with the transformation result.- Parameters:
transformationId
- an unique id of the actual transformationtransformation
- a function that provides transformation algorithm- Returns:
- a new action that will emit the result of the transformation
-
applyFunction
public static JsonPipelineAction applyFunction(String functionId, rx.functions.Func1<JsonPipelineOutput,JsonPipelineOutput> function)
Applies a custom function on theJsonPipelineOutput
of this pipeline. Function receives theJsonPipelineOutput
of actual JSON pipeline as parameter, which should be handled, and returns a new or the sameJsonPipelineOutput
as the action result.- Parameters:
functionId
- an unique id of the actual actionfunction
- a function that provides action algorithm- Returns:
- a new action that will emit the result of the applied function
-
-