Record Class MirrorPassReport

java.lang.Object
java.lang.Record
org.exoplatform.caldav.service.MirrorPassReport
Record Components:
userIdentityId - identity of the user the pass ran for
username - the login of that user, or null when it could not be resolved
fullName - the display name of that user, or null when it could not be resolved
at - when the pass ended
verification - what the comparison of the copies found and repaired
relocation - what the move of the copies to a new destination did — a deferred one on the ordinary pass, which owes no move at all

public record MirrorPassReport(long userIdentityId, String username, String fullName, Date at, org.exoplatform.caldav.model.MirrorVerification verification, MirrorRelocation relocation) extends Record

What the last pass over one user's copies found and moved.

The two tallies together, never one of them: the destination setting of EXO-89762 is applied by a relocation and then judged by a verification, and an administrator asking "did my change take effect" is asking about both. Split across two screens they would be two facts nobody joins up.

Why this exists at all. Before it, the only way to know whether a change of destination had landed was to read the server log — which puts the measurement gate this add-on asks for ("choose the account's main calendar only once copies synchronise cleanly on this server") behind a permission no product owner has. A tally on screen is what turns "measured" into something the person who has to make the decision can check.

  • Constructor Details

    • MirrorPassReport

      public MirrorPassReport(long userIdentityId, String username, String fullName, Date at, org.exoplatform.caldav.model.MirrorVerification verification, MirrorRelocation relocation)
      Creates an instance of a MirrorPassReport record class.
      Parameters:
      userIdentityId - the value for the userIdentityId record component
      username - the value for the username record component
      fullName - the value for the fullName record component
      at - the value for the at record component
      verification - the value for the verification record component
      relocation - the value for the relocation record component
  • Method Details

    • named

      public MirrorPassReport named(String resolvedUsername, String resolvedFullName)
      The same report, with the identity of its user filled in.

      Resolved when the report is READ rather than when it is recorded: the pass runs on every synchronisation of every connected account, the screen is opened by an administrator once in a while, and a lookup per pass would be a cost paid forever for a fact almost nobody looks at.

      Parameters:
      resolvedUsername - the login, or null
      resolvedFullName - the display name, or null
      Returns:
      a copy carrying the identity
    • relocated

      public boolean relocated()
      Whether this pass actually moved copies between calendars.

      The ordinary pass owes no move, so its relocation is deferred and every count is zero; saying "0 moved" on those would bury the accounts where a destination change is genuinely still working itself out.

      Returns:
      true when the pass tried to move at least one copy
    • 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.
    • userIdentityId

      public long userIdentityId()
      Returns the value of the userIdentityId record component.
      Returns:
      the value of the userIdentityId record component
    • username

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

      public String fullName()
      Returns the value of the fullName record component.
      Returns:
      the value of the fullName record component
    • at

      public Date at()
      Returns the value of the at record component.
      Returns:
      the value of the at record component
    • verification

      public org.exoplatform.caldav.model.MirrorVerification verification()
      Returns the value of the verification record component.
      Returns:
      the value of the verification record component
    • relocation

      public MirrorRelocation relocation()
      Returns the value of the relocation record component.
      Returns:
      the value of the relocation record component