Enum Class ActorAuthority

java.lang.Object
java.lang.Enum<ActorAuthority>
de.gustavblass.fsu.fmi.roombooking.model.actor.ActorAuthority
All Implemented Interfaces:
Serializable, Comparable<ActorAuthority>, Constable

public enum ActorAuthority extends Enum<ActorAuthority> implements Comparable<ActorAuthority>

Represents the level of privilege granted to an Actor.

  • Enum Constant Details

    • IT_ADMINISTRATION

      public static final ActorAuthority IT_ADMINISTRATION
      Highest level of trust and permissions. Actors with this authority are permitted to use all features of the application.
    • FACULTY_ADMINISTRATION

      public static final ActorAuthority FACULTY_ADMINISTRATION
      Actors with this authority are permitted to act in the name of lower-authority Actors, e.g. create, modify, delete Reservations for them or even create new Actors (with a lower authority).
    • PRIVILEGED

      public static final ActorAuthority PRIVILEGED
      Actors with this authority are generally preferred in Reservation conflicts. Other than that, there are no privileges.
    • REGULAR

      public static final ActorAuthority REGULAR
      Actors with this authority have no privileges.
  • Field Details

    • name

      public final String name
  • Constructor Details

    • ActorAuthority

      private ActorAuthority(@NonNull @NonNull String name)
  • Method Details

    • values

      public static ActorAuthority[] 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 ActorAuthority 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
    • ofName

      @Contract(pure=true) @NonNull public static @NonNull Optional<ActorAuthority> ofName(String name)
      Converts the given label to the matching enum value.
      Parameters:
      name - A String suspected to be an enum value.
      Returns:
      The corresponding enum value if the given label matches one.