Record Class IcsMerger.AnswerRewrite

java.lang.Object
java.lang.Record
org.exoplatform.caldav.ics.IcsMerger.AnswerRewrite
Record Components:
attendeeNamed - whether any address offered matched a line on the object
document - the object to write back, or null when nothing moved
Enclosing class:
IcsMerger

public static record IcsMerger.AnswerRewrite(boolean attendeeNamed, String document) extends Record
What an attempted answer rewrite found.

The two reasons nothing is written are told apart on purpose, because they are not the same event at all. An object that already carries the answer is the ordinary idempotent case. An object that does not name the attendee while eXo holds a mapping saying it is that user's copy is an inconsistency worth saying out loud — it is exactly the state that made this propagation do nothing, silently, on a live rig.

  • Constructor Details

    • AnswerRewrite

      public AnswerRewrite(boolean attendeeNamed, String document)
      Creates an instance of a AnswerRewrite record class.
      Parameters:
      attendeeNamed - the value for the attendeeNamed record component
      document - the value for the document record component
  • Method Details

    • hasChange

      public boolean hasChange()
      Whether there is something to write.
      Returns:
      true when the answer moved and the document must be sent
    • 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.
    • attendeeNamed

      public boolean attendeeNamed()
      Returns the value of the attendeeNamed record component.
      Returns:
      the value of the attendeeNamed record component
    • document

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