Enum Class Config.Scope

java.lang.Object
java.lang.Enum<Config.Scope>
org.forgerock.openam.annotations.sm.Config.Scope
All Implemented Interfaces:
Serializable, Comparable<Config.Scope>, java.lang.constant.Constable
Enclosing class:
Config

public static enum Config.Scope extends Enum<Config.Scope>
The types of visibility available for a service.
  • Enum Constant Details

    • SERVICE

      public static final Config.Scope SERVICE
      This scope is a special scope only to be used for defining services. It does not define service configuration, but rather acts as a container for service configuration which is intended to then hold GLOBAL, REALM or REALM_AND_GLOBAL configuration definitions.
    • REALM_AND_GLOBAL

      public static final Config.Scope REALM_AND_GLOBAL
      This scope means the service can be created at the Global level and at the Realm level.

      Note: To the question of why not introduce a Set/Array of Scopes to capture this concept, the reason was that Config was supported API by this point and it was deemed simpler to introduce a new enumeration to capture this concept.

    • GLOBAL

      public static final Config.Scope GLOBAL
      This scope means the service definition applies at the Global level of AM.
    • REALM

      public static final Config.Scope REALM
      This scope means the service will be defined at the Realm level of AM.
    • IDENTITY

      public static final Config.Scope IDENTITY
      This scope means the service will be defined in a service assignable.
  • Method Details

    • values

      public static Config.Scope[] 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 Config.Scope 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
    • executeForScope

      public void executeForScope(Config.Scope scope, Runnable runnable)
      Execute the provided runnable if the scope matches the current scope.
      Parameters:
      scope - the scope to check against.
      runnable - the runnable to execute.