org.jboss.seam
Enum ScopeType

java.lang.Object
  extended by java.lang.Enum<ScopeType>
      extended by org.jboss.seam.ScopeType
All Implemented Interfaces:
Serializable, Comparable<ScopeType>

public enum ScopeType
extends Enum<ScopeType>

The scopes defined by Seam.

Author:
Thomas Heute

Enum Constant Summary
APPLICATION
          The application context (Servlet context.)
BUSINESS_PROCESS
          The business process context.
CONVERSATION
          The conversation context.
EVENT
          The event (request) context.
METHOD
          The method context.
PAGE
          The page context.
SESSION
          The session context.
STATELESS
          The stateless pseudo-context.
UNSPECIFIED
          Indicates that the scope is implied.
 
Method Summary
 Context getContext()
           
 String getPrefix()
           
 boolean isContextActive()
           
static ScopeType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ScopeType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

STATELESS

public static final ScopeType STATELESS
The stateless pseudo-context.


METHOD

public static final ScopeType METHOD
The method context. Each call to a session bean or JavaBean component puts a new method context onto the stack of method contexts associated with the current thread. The context is destroyed (and the stack popped) when the method returns.


EVENT

public static final ScopeType EVENT
The event (request) context. Spans a server request, from restore view to render response.


PAGE

public static final ScopeType PAGE
The page context. Begins during the invoke application phase prior to rendering a page, and lasts until the end of any invoke application phase of a faces request originating from that page. Non-faces requests do not propagate the page scope.


CONVERSATION

public static final ScopeType CONVERSATION
The conversation context. Spans multiple requests from the same browser window, demarcated by @Begin and @End methods. A conversation context is propagated by any faces request, or by any request that specifies a conversation id as a request parameter. The conversation context is not available during the restore view phase.


SESSION

public static final ScopeType SESSION
The session context. (A servlet login session.)


APPLICATION

public static final ScopeType APPLICATION
The application context (Servlet context.)


BUSINESS_PROCESS

public static final ScopeType BUSINESS_PROCESS
The business process context. Spans multiple conversations with multiple users, demarcated by the start and end states of the business process definition.


UNSPECIFIED

public static final ScopeType UNSPECIFIED
Indicates that the scope is implied.

Method Detail

values

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

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

valueOf

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

isContextActive

public boolean isContextActive()

getContext

public Context getContext()
Returns:
the Context object for this scope

getPrefix

public String getPrefix()