org.bibeault.frontman
Enum ScopedContext

java.lang.Object
  extended by java.lang.Enum<ScopedContext>
      extended by org.bibeault.frontman.ScopedContext
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ScopedContext>

public enum ScopedContext
extends java.lang.Enum<ScopedContext>

Enumeration modeling the four context scopes.


Enum Constant Summary
APPLICATION
           
PAGE
           
REQUEST
           
SESSION
           
 
Method Summary
 int toValue()
          Returns the corresponding numeric value for this context as defined by javax.servlet.jsp.PageContext.
static ScopedContext valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ScopedContext valueOfCaseInsensitive(java.lang.String name)
          Case-insensitive variant of the valueOf() method.
static ScopedContext[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PAGE

public static final ScopedContext PAGE

REQUEST

public static final ScopedContext REQUEST

SESSION

public static final ScopedContext SESSION

APPLICATION

public static final ScopedContext APPLICATION
Method Detail

values

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

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static ScopedContext valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

toValue

public int toValue()
Returns the corresponding numeric value for this context as defined by javax.servlet.jsp.PageContext.

Returns:
the scope's numeric value

valueOfCaseInsensitive

public static ScopedContext valueOfCaseInsensitive(java.lang.String name)
Case-insensitive variant of the valueOf() method.

Parameters:
name - the name of the enum in any case
Returns:
the corresponding enum