Enum Class CalendarShareLevel

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

public enum CalendarShareLevel extends Enum<CalendarShareLevel>
What a colleague may do with a calendar its owner shared with them (EXO-90378).

Two levels, and only two: the owner picks one per colleague, and every write path asks this one value. VIEW is the level of EXO-90357 and the default of every share, existing rows included — the column was added with it as its default, so nothing an owner shared before this feature changes hands.

The level says nothing about the calendar itself: an EDIT colleague writes events in the calendar and nothing more. Renaming, recolouring, deleting, publishing, sharing on and levelling anyone stay the owner's, at every level — see Utils.checkAclByCalendarOwner, Utils.canPublishCalendar and AgendaCalendarShareServiceImpl.getOwnedCalendar, none of which this enum reaches.

  • Enum Constant Details

    • VIEW

      public static final CalendarShareLevel VIEW
      The colleague reads the calendar and its events, and nothing else: no creation, no change, no deletion, no reminder of their own. A private event is busy time for them (EventAccess.SHARED).
    • EDIT

      public static final CalendarShareLevel EDIT
      The colleague creates, changes and deletes events in the owner's calendar as the owner would, sees private events in full and may set their own reminders on them (EventAccess.SHARED_EDIT). They may not move an event out of the calendar — the event is the owner's — nor touch the calendar itself.
  • Method Details

    • values

      public static CalendarShareLevel[] 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 CalendarShareLevel 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 CalendarShareLevel of(String name)
      The level a stored or transmitted name stands for, VIEW for anything that is not a level this version knows. Reading an unknown name as the lower level is the same rule the whole share code follows: what cannot be established grants nothing.
      Parameters:
      name - the name of a level, may be null or blank
      Returns:
      the level, never null