Record Class MailInvitation

java.lang.Object
java.lang.Record
org.exoplatform.caldav.model.MailInvitation
Record Components:
username - the user who asked, the only person the landing acts for
attendeeAddress - the user's own mailbox address, possibly null
method - the iTIP method, upper-cased: REQUEST, PUBLISH, CANCEL…; null when the object names none
uid - the UID the reader showed
sequence - the SEQUENCE the reader read, 0 when the message carries none
response - the answer, as agenda holds it; null to add or remove the event without answering
icalendar - the message's iCalendar object, as received
fromOrganizer - whether the reader established that the mail is from the event's organiser (its From is the ORGANIZER's address alone): without it, a copy the user holds is never changed or removed

public record MailInvitation(String username, String attendeeAddress, String method, String uid, int sequence, org.exoplatform.agenda.constant.EventAttendeeResponse response, String icalendar, boolean fromOrganizer) extends Record
A calendar invitation a user wants in their calendar — answered, added as it is, or removed because its organiser cancelled it — as this add-on lands it (EXO-90848). This add-on's own words for what the mail reader hands over, so that nothing but the one bean conditional on the reader names a type of the reader's: a bean whose signature did would make this whole add-on fail to boot on a server without the mail reader installed, since Spring introspects every method of every bean it creates.

The object is the sender's. The only person a landing acts for is username, in their own calendar; the attendee address is that same user's mailbox, the one the organiser invited.

  • Field Details

  • Constructor Details

    • MailInvitation

      public MailInvitation(String username, String attendeeAddress, String method, String uid, int sequence, org.exoplatform.agenda.constant.EventAttendeeResponse response, String icalendar, boolean fromOrganizer)
      Refuses an invitation missing what the landing needs.
      Parameters:
      username - the user
      attendeeAddress - their mailbox address
      method - the iTIP method
      uid - the event's UID
      sequence - the SEQUENCE
      response - the answer, or null
      icalendar - the object
      fromOrganizer - whether the mail is from the event's organiser
      Throws:
      IllegalArgumentException - without a user, a UID or an object, or with an answer that is none
  • Method Details

    • isCancellation

      public boolean isCancellation()
      Whether the message is the organiser calling the event off.
      Returns:
      true for a CANCEL
    • 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.
    • username

      public String username()
      Returns the value of the username record component.
      Returns:
      the value of the username record component
    • attendeeAddress

      public String attendeeAddress()
      Returns the value of the attendeeAddress record component.
      Returns:
      the value of the attendeeAddress record component
    • method

      public String method()
      Returns the value of the method record component.
      Returns:
      the value of the method record component
    • uid

      public String uid()
      Returns the value of the uid record component.
      Returns:
      the value of the uid record component
    • sequence

      public int sequence()
      Returns the value of the sequence record component.
      Returns:
      the value of the sequence record component
    • response

      public org.exoplatform.agenda.constant.EventAttendeeResponse response()
      Returns the value of the response record component.
      Returns:
      the value of the response record component
    • icalendar

      public String icalendar()
      Returns the value of the icalendar record component.
      Returns:
      the value of the icalendar record component
    • fromOrganizer

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