Package lib.aide

Class JsonContentAction.Builder

java.lang.Object
lib.aide.JsonContentAction.Builder
Enclosing class:
JsonContentAction

public static class JsonContentAction.Builder extends Object
Builder pattern for creating JsonContentAction instances.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • withReject

      public JsonContentAction.Builder withReject(com.jayway.jsonpath.JsonPath ifJsonPathFound, List<JsonContentAction.InjectJson> injects, String description, Map<String,Object> elaboration)
      Adds a reject action rule that defines a condition and a transformation to apply when the condition is met.
      Parameters:
      ifJsonPathFound - the JSONPath condition to match
      injects - the list of transformations to apply
      description - a description of the rule
      elaboration - additional context or details for the rule
      Returns:
      the builder instance for method chaining
    • withReject

      public JsonContentAction.Builder withReject(String ifJsonPathFound, List<JsonContentAction.InjectJson> injects, String description, Map<String,Object> elaboration)
      Adds a reject action rule using a string-based JSONPath.
      Parameters:
      ifJsonPathFound - the string-based JSONPath condition to match
      injects - the list of transformations to apply
      description - a description of the rule
      elaboration - additional context or details for the rule
      Returns:
      the builder instance for method chaining
    • build

      public JsonContentAction build()
      Builds the JsonContentAction instance with the defined rules.
      Returns:
      the JsonContentAction instance