com.acsinet_solutions.cetia4.controller
Enum Scope

java.lang.Object
  extended by java.lang.Enum<Scope>
      extended by com.acsinet_solutions.cetia4.controller.Scope
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Scope>

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

Attribute scopes that represent the places where attributes may be stored.

Author:
Santiago Arriaga
See Also:
RequestContext.setAttribute(Scope,String,Object), RequestContext.getAttribute(Scope,String), RequestContext.removeAttribute(Scope,String)

Enum Constant Summary
APPLICATION_SCOPE
          Standard application scope
COMPONENT_SCOPE
          Special component scope that equals portlet session scope in portlet environments.
PAGE_SCOPE
          Standard page scope
REQUEST_SCOPE
          Standard request scope
SESSION_SCOPE
          Standard session scope
 
Method Summary
static Scope valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Scope[] 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_SCOPE

public static final Scope APPLICATION_SCOPE
Standard application scope


SESSION_SCOPE

public static final Scope SESSION_SCOPE
Standard session scope


COMPONENT_SCOPE

public static final Scope COMPONENT_SCOPE
Special component scope that equals portlet session scope in portlet environments. In servlet environments it is equal to session. This may change, if needed, a component only session request may be implemented for REST servlets, that may work similar to what is currently provided for portlets, so if a session scope wide is desired, better use session scope.

Portlet implementations are still not provided in this version of the framework, because there are currently no portlet implementations for J2EE 1.4 / J2SE 5.0. Previous versions of the framework did provide that support, and it will be integrated also here when the porlet API evolves so it can be used in these versions ( Portlet 2.0 is currently in early stages of development ). In this implementation, real portlet scoped attributes are copied under request scope before calling view, so they can be called using standard EL and JSP facilities with no need to use portlet-specific tags and API.


REQUEST_SCOPE

public static final Scope REQUEST_SCOPE
Standard request scope


PAGE_SCOPE

public static final Scope PAGE_SCOPE
Standard page scope

Method Detail

values

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

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

valueOf

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