Record Class HiddenCalendar

java.lang.Object
java.lang.Record
org.exoplatform.caldav.model.HiddenCalendar
Record Components:
id - the binding to lift
name - what the server calls the collection today
shared - true for a calendar somebody shared with the user, false for one of their own they deleted here
ownerDisplayName - how to name whoever shared it, or null

public record HiddenCalendar(long id, String name, boolean shared, String ownerDisplayName) extends Record
A calendar the user hid, and the handle to show it again.

Carries the binding's id rather than the collection's path, deliberately: a path travelling through a browser is something a caller could change, and what it would then name is another collection on the same account. An id is looked up and checked against whose it is before anything happens.

Two kinds since EXO-90239, told apart by shared. A calendar the user deleted here while keeping it on their account comes back at the next synchronisation, materialised afresh. A calendar shared with them that they chose not to see comes back under the remote calendars the moment its record is dropped, and is named with whoever shared it when that can be told — the same owner the calendar list shows, resolved the same way; null when nobody can be named, and always null for a deleted calendar of the user's own.

  • Constructor Summary

    Constructors
    Constructor
    Description
    HiddenCalendar(long id, String name)
    A calendar of the user's own, deleted here and kept on their account — the only kind there was before shares could be hidden, kept so that a caller building one by hand never describes a share by accident.
    HiddenCalendar(long id, String name, boolean shared, String ownerDisplayName)
    Creates an instance of a HiddenCalendar record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    long
    id()
    Returns the value of the id record component.
    Returns the value of the name record component.
    Returns the value of the ownerDisplayName record component.
    boolean
    Returns the value of the shared record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • HiddenCalendar

      public HiddenCalendar(long id, String name)
      A calendar of the user's own, deleted here and kept on their account — the only kind there was before shares could be hidden, kept so that a caller building one by hand never describes a share by accident.
      Parameters:
      id - the binding to lift
      name - what the server calls the collection today
    • HiddenCalendar

      public HiddenCalendar(long id, String name, boolean shared, String ownerDisplayName)
      Creates an instance of a HiddenCalendar record class.
      Parameters:
      id - the value for the id record component
      name - the value for the name record component
      shared - the value for the shared record component
      ownerDisplayName - the value for the ownerDisplayName 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • id

      public long id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • shared

      public boolean shared()
      Returns the value of the shared record component.
      Returns:
      the value of the shared record component
    • ownerDisplayName

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