Class JsonPipelineActions

    • 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 the JsonNode (e.g. a HAL representation) of actual pipeline, specifying a function as transformation mechanism. Function receives JsonNode as parameter, which transformation should be applied and returns a new JsonNode with the transformation result.
        Parameters:
        transformationId - an unique id of the actual transformation
        transformation - 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 the JsonPipelineOutput of this pipeline. Function receives the JsonPipelineOutput of actual JSON pipeline as parameter, which should be handled, and returns a new or the same JsonPipelineOutput as the action result.
        Parameters:
        functionId - an unique id of the actual action
        function - a function that provides action algorithm
        Returns:
        a new action that will emit the result of the applied function