Record Class LoadedSchema
java.lang.Object
java.lang.Record
com.bonitasoft.processbuilder.records.LoadedSchema
- Record Components:
validator- The executable JSON Schema object used for validation.titles- The map associating internal pointers (e.g., /allOf/0) to user-friendly component names.targetSchemaName- The name of the schema component being validated (e.g., "Category").jsonInput- The raw JSON content string being validated.
public record LoadedSchema(com.github.fge.jsonschema.main.JsonSchema validator, Map<String,String> titles, String targetSchemaName, String jsonInput)
extends Record
Record representing a fully loaded and prepared JSON Schema used for validation.
This record holds the executable schema validator, a map of component titles for error reporting, the target schema's name, and the raw JSON input.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thejsonInputrecord component.Returns the value of thetargetSchemaNamerecord component.titles()Accessor method for the map of titles.final StringtoString()Returns a string representation of this record class.com.github.fge.jsonschema.main.JsonSchemaReturns the value of thevalidatorrecord component.
-
Constructor Details
-
LoadedSchema
public LoadedSchema(com.github.fge.jsonschema.main.JsonSchema validator, Map<String, String> titles, String targetSchemaName, String jsonInput) Compact Canonical Constructor.Implements defensive copying for the mutable
titlesmap to ensure the record's immutability upon construction (correctsEI_EXPOSE_REP2in the constructor).- Parameters:
validator- The executable JSON Schema object used for validation.titles- The map associating internal pointers (e.g., /allOf/0) to user-friendly component names.targetSchemaName- The name of the schema component being validated (e.g., "Category").jsonInput- The raw JSON content string being validated.
-
-
Method Details
-
titles
Accessor method for the map of titles.Overrides the default accessor to return an unmodifiable view of the internal map, preventing external code from mutating the record's internal state (corrects
EI_EXPOSE_REP2in the getter).- Returns:
- An unmodifiable view of the component titles map.
-
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). -
validator
public com.github.fge.jsonschema.main.JsonSchema validator()Returns the value of thevalidatorrecord component.- Returns:
- the value of the
validatorrecord component
-
targetSchemaName
Returns the value of thetargetSchemaNamerecord component.- Returns:
- the value of the
targetSchemaNamerecord component
-
jsonInput
Returns the value of thejsonInputrecord component.- Returns:
- the value of the
jsonInputrecord component
-