Enum Class ScopeType
- All Implemented Interfaces:
Serializable
,Comparable<ScopeType>
,Constable
An enumeration of the core scope types of Spring Web Flow. Provides easy access to each scope by type using
getScope(RequestContext)
.
A "scope" defines a data structure for storing custom user attributes within a flow execution. Different scope types have different semantics in terms of how long attributes placed in those scope maps remain valid.
- Author:
- Keith Donald, Erwin Vervaet
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe "conversation" scope type.The "flash" scope type.The "flow" scope type.The "request" scope type.The "view" scope type. -
Method Summary
Modifier and TypeMethodDescriptionabstract MutableAttributeMap<Object>
getScope
(RequestContext context) Accessor that returns the mutable attribute map for this scope type for a given flow execution request context.Class<?>
getType()
static ScopeType
Returns the enum constant of this class with the specified name.static ScopeType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
REQUEST
The "request" scope type. Attributes placed in request scope exist for the life of the current request into the flow execution. When the request ends any attributes in request scope go out of scope. -
FLASH
The "flash" scope type. Attributes placed in flash scope exist through the life of the current request and until the next view rendering. After the view renders, flash scope is cleared.Flash scope is typically used to store messages that should be preserved until after the next view renders.
-
VIEW
The "view" scope type. Attributes placed in view scope exist through the life of the current view state and until the view state exits in a subsequent request.View scope is typically used to store view model objects manipulated over a series of Ajax requests.
-
FLOW
The "flow" scope type. Attributes placed in flow scope exist through the life of an executing flow session, representing an instance a singleflow definition
. When the flow session ends any data in flow scope goes out of scope. -
CONVERSATION
The "conversation" scope type. Attributes placed in conversation scope are shared by all flow sessions started within a flow execution and live for the life of the entire flow execution (representing a single logical user conversation). When the governing execution ends, any data in conversation scope goes out of scope.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getType
-
getScope
Accessor that returns the mutable attribute map for this scope type for a given flow execution request context.- Parameters:
context
- the context representing an executing request- Returns:
- the scope map of this type for that request, allowing attributes to be accessed and set
-