Enum Class EventVisibility

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

public enum EventVisibility extends Enum<EventVisibility>
Whether an event's content may be read outside eXo (EXO-90322).

This is not free/busy. EventAvailability says whether an event takes the user's time; this says whether what the event is may be shown. The two travel together in the form because they answer the two halves of the same question, and they are honoured in two different places.

Where it is honoured: at every boundary a reader crosses only because the calendar was shared. A PRIVATE event is published as a busy block — its time, and the word "Busy" — by CalendarFeedIcsWriter, through AgendaCalendarLinkServiceImpl.isPrivate; and since EXO-90357 it is rendered the same way, masked, to a colleague who reads the calendar through a share (EventAccess.SHARED). For everyone who could read the calendar before sharing existed — its owner, the members of its space, the invitees — it changes nothing.

The constants are stored by ordinal (the column is a SMALLINT, as AVAILABILITY is), so their order is the storage format: a new value goes at the end, and none is ever removed or reordered.

  • Enum Constant Details

    • DEFAULT

      public static final EventVisibility DEFAULT
      Inherit. There is nothing to inherit from yet — agenda models no per-calendar visibility — so this resolves to "not masked", which is what every event did before EXO-90322 and therefore what every existing row means. It is ordinal 0 on purpose: the changeset backfills the column with 0, so no stored event changes meaning.

      Whether a per-calendar default is worth having is the PO's call; the day it exists, this constant is where it is read.

    • PUBLIC

      public static final EventVisibility PUBLIC
      The event's content may be published in full — the same treatment DEFAULT gets today, stated rather than inherited.
    • PRIVATE

      public static final EventVisibility PRIVATE
      Only the fact that the time is taken may leave eXo. A published feed shows a busy block with no title, description, location or attendee.
  • Method Details

    • values

      public static EventVisibility[] 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 EventVisibility 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