Record Class CalendarHome

java.lang.Object
java.lang.Record
org.exoplatform.caldav.client.CalendarHome
Record Components:
principal - the current-user-principal as a server-absolute raw path, or null when the implementer names none — a fake, a server spoken to by href alone; the HTTP client throws instead, because an account whose server will not say who it is has nothing to discover from
href - the calendar home's server-absolute raw path, never null

public record CalendarHome(String principal, String href) extends Record
What one discovery walk answers: who the authenticated user is on the server, and where that user's calendars live.

The two travel together because the listing that follows needs both. The home is where the collections are read from; the principal is what a collection's DAV:owner is compared against to tell the user's own calendars from one a colleague shared with them (EXO-90235). Answering them from one walk rather than two keeps the principal PROPFIND from being paid twice on every pass, and keeps the two facts from coming out of two different conversations with the server.

  • Constructor Details

    • CalendarHome

      public CalendarHome(String principal, String href)
      Creates an instance of a CalendarHome record class.
      Parameters:
      principal - the value for the principal record component
      href - the value for the href 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.
    • principal

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

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