Enum Class MirrorTargetKind

java.lang.Object
java.lang.Enum<MirrorTargetKind>
org.exoplatform.caldav.model.MirrorTargetKind
All Implemented Interfaces:
Serializable, Comparable<MirrorTargetKind>, Constable

public enum MirrorTargetKind extends Enum<MirrorTargetKind>

Where an administrator wants the meeting copies of a server to land.

One decision per registration, because it is a property of the calendar estate behind that server and of nothing else: a deployment can connect a BlueMind whose users live in one shared main calendar and a Stalwart whose users each keep a calendar per project, and want a different answer for each.

Both values name a destination eXo can work out on its own, without asking anybody: this feature's value is passive, and a destination that needed an action from each user before their copies started flowing would serve nobody who never performed it.

  • Enum Constant Details

    • DEDICATED_CALENDAR

      public static final MirrorTargetKind DEDICATED_CALENDAR
      A calendar of eXo's own, created on the account under the derived exo-meetings path. The default, and what every deployment did before this setting existed.
    • MAIN_CALENDAR

      public static final MirrorTargetKind MAIN_CALENDAR
      The calendar the account itself calls its default — the one a client files an invitation into when nobody says otherwise.

      Discovered by asking, never by guessing: the scheduling inbox names it (schedule-default-calendar-URL, RFC 6638), and the answer is only believed once the collection has been seen in the account's own home listing. A server that names none leaves this unresolved rather than letting eXo pick a calendar for somebody.

  • Method Details

    • values

      public static MirrorTargetKind[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MirrorTargetKind valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • of

      public static MirrorTargetKind of(String stored)
      Reads a stored value into a kind, tolerating anything a database can hold.

      Never throws. The column is written by this code and by a Liquibase default, so an unexpected value means somebody edited the row by hand or a later version wrote a name this one does not know — and the safe reading of both is the behaviour every deployment already had.

      This tolerance is what retires a kind without a data migration. USER_CHOICE was a third value of this enum (EXO-89760) and was withdrawn (EXO-89793); rows written while it existed still carry the string, and they read as DEDICATED_CALENDAR here. Mapping the column as a String rather than @Enumerated is what makes that a degraded setting instead of an unreadable registration — a throw on read would take down every account resolving through that server, not merely misplace its copies.

      Parameters:
      stored - the value read from the registration row, may be null or blank
      Returns:
      the kind it names, or DEDICATED_CALENDAR when it names none