org.bibeault.jrjournal.jsp
Class ScopedContext

java.lang.Object
  extended byorg.bibeault.jrjournal.jsp.ScopedContext

public class ScopedContext
extends java.lang.Object

Type-safe enumeration associating the names of the various scoped contexts with their values (as defined by PageContext) and vice versa.

Author:
Bear Bibeault

Field Summary
static ScopedContext APPLICATION
           
static ScopedContext PAGE
           
static ScopedContext REQUEST
           
static java.lang.String SCOPE_NAME_APPLICATION
           
static java.lang.String SCOPE_NAME_PAGE
           
static java.lang.String SCOPE_NAME_REQUEST
           
static java.lang.String SCOPE_NAME_SESSION
           
static ScopedContext SESSION
           
 
Method Summary
static ScopedContext getInstance(int value)
          Obtains the scoped context instance defined with the passed value.
static ScopedContext getInstance(java.lang.String name)
          Obtains the scoped context instance defined with the passed name.
 java.lang.String getName()
           
 int getValue()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCOPE_NAME_PAGE

public static final java.lang.String SCOPE_NAME_PAGE
See Also:
Constant Field Values

SCOPE_NAME_REQUEST

public static final java.lang.String SCOPE_NAME_REQUEST
See Also:
Constant Field Values

SCOPE_NAME_SESSION

public static final java.lang.String SCOPE_NAME_SESSION
See Also:
Constant Field Values

SCOPE_NAME_APPLICATION

public static final java.lang.String SCOPE_NAME_APPLICATION
See Also:
Constant Field Values

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

getName

public java.lang.String getName()

getValue

public int getValue()

getInstance

public static ScopedContext getInstance(java.lang.String name)
Obtains the scoped context instance defined with the passed name.

Parameters:
name - the name of the scoped context to return
Returns:
the named scoped context, or null if none exists

getInstance

public static ScopedContext getInstance(int value)
Obtains the scoped context instance defined with the passed value.

Parameters:
value - the value of the scoped context to return
Returns:
the scoped context with the passed value, or null if none exists