Package lib.aide

Record Class JsonContentAction.RejectContent

java.lang.Object
java.lang.Record
lib.aide.JsonContentAction.RejectContent
Record Components:
originalJson - the original JSON before transformation
rule - 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 Details

  • 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 transformed
      spelVariables - additional variables for use in SpEL expressions
      Returns:
      the transformed JSON
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • originalJson

      public Map<String,Object> originalJson()
      Returns the value of the originalJson record component.
      Returns:
      the value of the originalJson record component
    • rule

      Returns the value of the rule record component.
      Returns:
      the value of the rule record component