Package lib.aide
Class JsonContentAction.Builder
java.lang.Object
lib.aide.JsonContentAction.Builder
- Enclosing class:
JsonContentAction
Builder pattern for creating
JsonContentAction
instances.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds theJsonContentAction
instance with the defined rules.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.withReject
(String ifJsonPathFound, List<JsonContentAction.InjectJson> injects, String description, Map<String, Object> elaboration) Adds a reject action rule using a string-based JSONPath.
-
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 matchinjects
- the list of transformations to applydescription
- a description of the ruleelaboration
- 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 matchinjects
- the list of transformations to applydescription
- a description of the ruleelaboration
- additional context or details for the rule- Returns:
- the builder instance for method chaining
-
build
Builds theJsonContentAction
instance with the defined rules.- Returns:
- the
JsonContentAction
instance
-