org.roscopeco.janno.views.jsp
Enum ContainerScope

java.lang.Object
  extended by java.lang.Enum<ContainerScope>
      extended by org.roscopeco.janno.views.jsp.ContainerScope
All Implemented Interfaces:
Serializable, Comparable<ContainerScope>

public enum ContainerScope
extends Enum<ContainerScope>

Constant enum with the request-line container scopes. This enum also provides convenience methods to obtain the scoped container from a JSP context.

Version:
$Revision: 1.1 $ $Date: 2005/08/27 20:37:38 $
Author:
Ross Bamford (rosco<at>roscopeco.co.uk)

Enum Constant Summary
APPLICATION
           
REQUEST
           
SESSION
           
 
Method Summary
 PicoContainer getFrom(JspContext ctx)
          Convenience method that returns the scoped container represented by a given scope.
 String key()
           
static ContainerScope valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ContainerScope[] 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

APPLICATION

public static final ContainerScope APPLICATION

SESSION

public static final ContainerScope SESSION

REQUEST

public static final ContainerScope REQUEST
Method Detail

values

public static final ContainerScope[] 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(ContainerScope c : ContainerScope.values())
        System.out.println(c);

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

valueOf

public static ContainerScope 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

key

public String key()

getFrom

public PicoContainer getFrom(JspContext ctx)
Convenience method that returns the scoped container represented by a given scope.

Parameters:
ctx -
Returns:


Copyright © 2005 Roscopeco Open Technologies. All Rights Reserved.