Enum EScope

  • All Implemented Interfaces:
    Serializable, Comparable<EScope>

    public enum EScope
    extends Enum<EScope>
    This enumeration defines all the possible non-web scopes including some utility methods on it.
    Author:
    Philip Helger
    • Enum Constant Detail

      • GLOBAL

        public static final EScope GLOBAL
        The global scope.
      • SESSION

        public static final EScope SESSION
        The session scope
      • REQUEST

        public static final EScope REQUEST
        The request scope.
    • Method Detail

      • values

        public static EScope[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (EScope c : EScope.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static EScope valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null
      • getScope

        @Nullable
        public IScope getScope​(boolean bCreateIfNotExisting)
      • getScope

        @Nullable
        public static IScope getScope​(@Nonnull
                                      EScope eScope,
                                      boolean bCreateIfNotExisting)
        Resolve the currently matching scope of the given EScope value.
        Parameters:
        eScope - The scope to resolve to a real scope.
        bCreateIfNotExisting - if false and the scope is not existing, null will be returned. This parameter is only used in application scopes.
        Returns:
        The matching IScope or null if bCreateIfNotExisting is false and no scope is present
        Throws:
        IllegalArgumentException - If an illegal enumeration value is passed.