Record Class SensitivePath

java.lang.Object
java.lang.Record
com.babelqueue.schema.SensitivePath
Record Components:
path - the dotted path to the marked property ("" for a root mark)
category - the optional category string, or ""

public record SensitivePath(String path, String category) extends Record
One property marked x-gdpr-sensitive (ADR-0030), located by its dotted path from the schema root. Array element schemas use the "field[]" segment (matching the validator / babelqueue-registry compat convention); a mark on the root schema itself is the empty path "". category is the optional "x-gdpr-sensitive": "<category>" string (e.g. "email"), or "" when the keyword was the boolean true.

It is the value-level counterpart to babelqueue-registry's inventory: the Gdpr helpers use these paths to locate the leaves they must encrypt on produce and decrypt on consume. The Java mirror of the Go schema.SensitivePath.

  • Constructor Details

    • SensitivePath

      public SensitivePath(String path, String category)
      Creates an instance of a SensitivePath record class.
      Parameters:
      path - the value for the path record component
      category - the value for the category record component
  • Method Details

    • 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.
    • path

      public String path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • category

      public String category()
      Returns the value of the category record component.
      Returns:
      the value of the category record component