Record Class CalendarShares

java.lang.Object
java.lang.Record
org.exoplatform.caldav.model.CalendarShares
Record Components:
calendarId - the agenda calendar the collection belongs to
sharees - one entry per principal the list grants something to, in the order the server lists them
subscriptionRequired - whether a colleague sees the calendar only after subscribing to it on the server itself, as on BlueMind
meetingCopies - whether the calendar is also where eXo writes the copies of the user's eXo meetings, so that a colleague it is shared with sees those meetings too

public record CalendarShares(long calendarId, List<CalendarShares.CalendarSharee> sharees, boolean subscriptionRequired, boolean meetingCopies) extends Record
Who an eXo personal calendar is shared with on its CalDAV server, as the server's access control list says at the moment of asking (EXO-90253).

Never stored: the list belongs to the server, and anybody with another client can change it. Every answer is a fresh read.

  • Constructor Details

    • CalendarShares

      public CalendarShares(long calendarId, List<CalendarShares.CalendarSharee> sharees)
      Shares on a server where a grant is visible to the colleague at once.
      Parameters:
      calendarId - the agenda calendar
      sharees - the sharees
    • CalendarShares

      public CalendarShares(long calendarId, List<CalendarShares.CalendarSharee> sharees, boolean subscriptionRequired)
      Shares of a calendar holding no copies of the user's eXo meetings.
      Parameters:
      calendarId - the agenda calendar
      sharees - the sharees
      subscriptionRequired - whether a colleague must subscribe on the server
    • CalendarShares

      public CalendarShares(long calendarId, List<CalendarShares.CalendarSharee> sharees, boolean subscriptionRequired, boolean meetingCopies)
      Creates an instance of a CalendarShares record class.
      Parameters:
      calendarId - the value for the calendarId record component
      sharees - the value for the sharees record component
      subscriptionRequired - the value for the subscriptionRequired record component
      meetingCopies - the value for the meetingCopies record component
  • Method Details

    • withMeetingCopies

      public CalendarShares withMeetingCopies(boolean holdsMeetingCopies)
      The same shares, saying whether the calendar also holds the copies of the user's eXo meetings.
      Parameters:
      holdsMeetingCopies - whether eXo writes the meeting copies into it
      Returns:
      the shares with that flag
    • 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.
    • calendarId

      public long calendarId()
      Returns the value of the calendarId record component.
      Returns:
      the value of the calendarId record component
    • sharees

      Returns the value of the sharees record component.
      Returns:
      the value of the sharees record component
    • subscriptionRequired

      public boolean subscriptionRequired()
      Returns the value of the subscriptionRequired record component.
      Returns:
      the value of the subscriptionRequired record component
    • meetingCopies

      public boolean meetingCopies()
      Returns the value of the meetingCopies record component.
      Returns:
      the value of the meetingCopies record component