Enum Class AvailabilityDisclosure

java.lang.Object
java.lang.Enum<AvailabilityDisclosure>
org.exoplatform.agenda.constant.AvailabilityDisclosure
All Implemented Interfaces:
Serializable, Comparable<AvailabilityDisclosure>, Constable

public enum AvailabilityDisclosure extends Enum<AvailabilityDisclosure>
What actually happened when one user's busy time was asked for on behalf of another — the per-user status of a busy-time read.

This enum exists so that an empty list can never stand for anything but "nothing was in the way". It is the same distinction Optional.empty() carries inside AgendaAvailabilityServiceImpl.readBusyBlocksIfDisclosed (EXO-89844) and that {events, failed} carries between a connector and a view (EXO-89843), made explicit for one user at a time so that a screen can name whom it could not check.

Only DISCLOSED carries blocks. The other two carry none, and a caller that renders them the way it renders "disclosed, and the list was empty" turns a person who withheld their calendar into a person who is free.

  • Enum Constant Details

    • DISCLOSED

      public static final AvailabilityDisclosure DISCLOSED
      A calendar was read. The blocks are what it holds over the window, which may legitimately be none: this — and only this — is the answer "they have nothing on".
    • NOT_DISCLOSED

      public static final AvailabilityDisclosure NOT_DISCLOSED
      Nothing was read, because this user's busy time is not disclosed to the asking user. A choice, not an incident: the calendar ACL did not open it and the target's own sharing setting did not widen it.
    • FAILED

      public static final AvailabilityDisclosure FAILED
      Nothing was read, because the read broke. A failure, not a choice, and not an answer: the same user asked again a minute later may well be disclosed.
  • Method Details

    • values

      public static AvailabilityDisclosure[] 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 AvailabilityDisclosure 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
    • getValue

      public String getValue()
      Returns the token this constant is exchanged as over REST. It is the lower-case, underscored spelling rather than Enum.name() so that not_disclosed is spelt the one way it is already spelt in the MCP conflicts payload (EXO-89841) — one vocabulary for one idea.
      Returns:
      the exchanged token, never null