Record Class RedisTicketDocument

java.lang.Object
java.lang.Record
org.apereo.cas.ticket.registry.RedisTicketDocument
All Implemented Interfaces:
Serializable

public record RedisTicketDocument(String json, String ticketId, String type, String principal, String prefix, String service, String attributes) extends Record implements Serializable
Since:
5.1.0
See Also:
  • Field Details

    • FIELD_NAME_JSON

      public static final String FIELD_NAME_JSON
      Field name to hold ticket json data.
      See Also:
    • FIELD_NAME_TYPE

      public static final String FIELD_NAME_TYPE
      Field name to hold ticket type.
      See Also:
    • FIELD_NAME_ID

      public static final String FIELD_NAME_ID
      Field name to hold ticket id.
      See Also:
    • FIELD_NAME_PREFIX

      public static final String FIELD_NAME_PREFIX
      Field name to hold ticket prefix.
      See Also:
    • FIELD_NAME_PRINCIPAL

      public static final String FIELD_NAME_PRINCIPAL
      Field name to hold the principal id.
      See Also:
    • FIELD_NAME_SERVICE

      public static final String FIELD_NAME_SERVICE
      Field name to hold the service/application URL, if any.
      See Also:
    • FIELD_NAME_ATTRIBUTES

      public static final String FIELD_NAME_ATTRIBUTES
      Field name to hold the principal/authentication attribute names.
      See Also:
  • Constructor Details

    • RedisTicketDocument

      public RedisTicketDocument(String json, String ticketId, String type, String principal, String prefix, String service, String attributes)
      Creates an instance of a RedisTicketDocument record class.
      Parameters:
      json - the value for the json record component
      ticketId - the value for the ticketId record component
      type - the value for the type record component
      principal - the value for the principal record component
      prefix - the value for the prefix record component
      service - the value for the service record component
      attributes - the value for the attributes record component
  • Method Details

    • from

      public static RedisTicketDocument from(Map<String,String> document)
      From document map to redis document.
      Parameters:
      document - the document
      Returns:
      the redis ticket document
    • builder

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

      public String json()
      Returns the value of the json record component.
      Returns:
      the value of the json record component
    • ticketId

      public String ticketId()
      Returns the value of the ticketId record component.
      Returns:
      the value of the ticketId record component
    • type

      public String type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • principal

      public String principal()
      Returns the value of the principal record component.
      Returns:
      the value of the principal record component
    • prefix

      public String prefix()
      Returns the value of the prefix record component.
      Returns:
      the value of the prefix record component
    • service

      public String service()
      Returns the value of the service record component.
      Returns:
      the value of the service record component
    • attributes

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