Record Class ObservedQuirk

java.lang.Object
java.lang.Record
org.exoplatform.caldav.model.ObservedQuirk
Record Components:
quirkId - identifier of the ServerQuirk that describes this behaviour, or null when nothing in the catalogue does — in which case the drawer describes it generically by its property name, so an incomplete catalogue never blocks an administrator
properties - the property names the sweep saw diverge and this entry covers — several when a catalogue entry names a family, exactly one when nothing describes it
direction - which way the behaviour points. The catalogue entry's own direction when one describes it, so a family whose members were seen pointing different ways still reads as the one behaviour it is; the observed direction otherwise
effect - whether ticking it changes what eXo notices or what eXo writes into copies on this server — the drawer says which, because they are not the same kind of decision. ServerQuirkEffect.TOLERATE for anything the catalogue does not describe: an entry nobody has written a rule for can only ever relax a comparison
count - how many times it has been seen — a rolling tally, deliberately approximate: it answers "is this what this server always does or did it happen once", and nothing finer
excused - whether the server's stored lists cover it today, which is what the checkbox shows
patterns - the property-name patterns ticking it writes into the server's list — the catalogue entry's own family when one describes it, the observed property alone otherwise

public record ObservedQuirk(String quirkId, List<String> properties, ServerQuirkDirection direction, ServerQuirkEffect effect, long count, boolean excused, List<String> patterns) extends Record
One thing a server has actually been seen doing to the copies eXo pushes to it, with how often, and whether an administrator has excused it.

This is what the drawer offers instead of a text field of property names: the administrator ticks from evidence the sweep gathered rather than from a log line they had to find and a name they had to type correctly.

One entry per behaviour, not per property. A catalogue entry can cover a family — X-MICROSOFT-* and X-MOZ-* are one sentence about one server habit — and a live BlueMind account produced three of those markers, which rendered as three identical checkboxes each saying "seen once". They are one decision, so they are one entry, and its count is the sum of what each property contributed. A behaviour the catalogue does not describe is its own entry per property, because there each property genuinely is a separate thing the server does.

  • Constructor Details

    • ObservedQuirk

      public ObservedQuirk(String quirkId, List<String> properties, ServerQuirkDirection direction, ServerQuirkEffect effect, long count, boolean excused, List<String> patterns)
      Creates an instance of a ObservedQuirk record class.
      Parameters:
      quirkId - the value for the quirkId record component
      properties - the value for the properties record component
      direction - the value for the direction record component
      effect - the value for the effect record component
      count - the value for the count record component
      excused - the value for the excused record component
      patterns - the value for the patterns record component
  • Method Details

    • property

      public String property()
      The property name this entry is described by when nothing in the catalogue describes it — the one the drawer's generic wording renders.
      Returns:
      the first property covered, or null when there is none
    • 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.
    • quirkId

      public String quirkId()
      Returns the value of the quirkId record component.
      Returns:
      the value of the quirkId record component
    • properties

      public List<String> properties()
      Returns the value of the properties record component.
      Returns:
      the value of the properties record component
    • direction

      public ServerQuirkDirection direction()
      Returns the value of the direction record component.
      Returns:
      the value of the direction record component
    • effect

      public ServerQuirkEffect effect()
      Returns the value of the effect record component.
      Returns:
      the value of the effect record component
    • count

      public long count()
      Returns the value of the count record component.
      Returns:
      the value of the count record component
    • excused

      public boolean excused()
      Returns the value of the excused record component.
      Returns:
      the value of the excused record component
    • patterns

      public List<String> patterns()
      Returns the value of the patterns record component.
      Returns:
      the value of the patterns record component