Package lib.aide
Record Class JsonContentAction.RejectContent
java.lang.Object
java.lang.Record
lib.aide.JsonContentAction.RejectContent
- Record Components:
originalJson
- the original JSON before transformationrule
- the rule that caused the rejection
- All Implemented Interfaces:
JsonContentAction.ExecuteResult
- Enclosing class:
JsonContentAction
public static record JsonContentAction.RejectContent(Map<String,Object> originalJson, JsonContentAction.RejectActionRule rule)
extends Record
implements JsonContentAction.ExecuteResult
RejectContent represents a case where a rejection occurred and the JSON was transformed.
-
Constructor Summary
ConstructorDescriptionRejectContent
(Map<String, Object> originalJson, JsonContentAction.RejectActionRule rule) Creates an instance of aRejectContent
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theoriginalJson
record component.rule()
Returns the value of therule
record component.final String
toString()
Returns a string representation of this record class.Transforms the given JSON using the transformations defined in the rejection rule.
-
Constructor Details
-
RejectContent
Creates an instance of aRejectContent
record class.- Parameters:
originalJson
- the value for theoriginalJson
record componentrule
- the value for therule
record component
-
-
Method Details
-
transformed
public Map<String,Object> transformed(Map<String, Object> targetJson, Map<String, Object> spelVariables) Transforms the given JSON using the transformations defined in the rejection rule.- Parameters:
targetJson
- the target JSON to be transformedspelVariables
- additional variables for use in SpEL expressions- Returns:
- the transformed JSON
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
originalJson
Returns the value of theoriginalJson
record component.- Returns:
- the value of the
originalJson
record component
-
rule
Returns the value of therule
record component.- Returns:
- the value of the
rule
record component
-