Record Class IcsJudgement

java.lang.Object
java.lang.Record
org.exoplatform.caldav.ics.IcsJudgement
Record Components:
verdict - what was concluded
detail - what diverged, or why nothing could be concluded; null when the two objects state the same thing
divergences - what this server was seen doing to the copy, one entry per property — including the ones its administrator has already excused, so a ticked quirk goes on being shown with its count instead of vanishing from the list it was ticked in. Never null; empty when nothing could be concluded

public record IcsJudgement(IcsJudgement.Verdict verdict, String detail, List<org.exoplatform.caldav.model.IcsDivergence> divergences) extends Record
What comparing a copy against the object eXo would write concluded.

Its own type rather than a nested one, since EXO-89771 gave it a third component: it is the comparison's whole public surface, three readers depend on it — the mirror pass, the recording of what a server does, and the tests — and IcsEquivalence is at the size where a separable concept belongs beside it rather than inside it.

Three answers, not two. DIFFERENT and EQUIVALENT are the judgements; UNJUDGEABLE is what comes back when eXo's own render cannot be read as a calendar object holding one event. That is a defect on eXo's side, never evidence about the user's calendar, and the caller leaves the copy alone rather than overwriting it on the strength of one.

  • Constructor Details

    • IcsJudgement

      public IcsJudgement(IcsJudgement.Verdict conclusion, String explanation)
      A judgement that says nothing about the server's own behaviour — the two objects agree, or eXo could not read one of them.
      Parameters:
      conclusion - what was concluded
      explanation - what diverged, or why nothing could be concluded
    • IcsJudgement

      public IcsJudgement(IcsJudgement.Verdict verdict, String detail, List<org.exoplatform.caldav.model.IcsDivergence> divergences)
      Creates an instance of a IcsJudgement record class.
      Parameters:
      verdict - the value for the verdict record component
      detail - the value for the detail record component
      divergences - the value for the divergences record component
  • Method Details

    • different

      public boolean different()
      Returns:
      whether the server's copy is not what eXo would write
    • 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.
    • verdict

      public IcsJudgement.Verdict verdict()
      Returns the value of the verdict record component.
      Returns:
      the value of the verdict record component
    • detail

      public String detail()
      Returns the value of the detail record component.
      Returns:
      the value of the detail record component
    • divergences

      public List<org.exoplatform.caldav.model.IcsDivergence> divergences()
      Returns the value of the divergences record component.
      Returns:
      the value of the divergences record component