org.springframework.webflow.engine
Class ActionState
java.lang.Object
org.springframework.webflow.core.AnnotatedObject
org.springframework.webflow.engine.State
org.springframework.webflow.engine.TransitionableState
org.springframework.webflow.engine.ActionState
- All Implemented Interfaces:
- Annotated, StateDefinition, TransitionableStateDefinition
public class ActionState
- extends TransitionableState
A transitionable state that executes one or more actions when entered. When the action(s) are executed this state
responds to their result(s) to decide what state to transition to next.
If more than one action is configured they are executed in an ordered chain until one returns a result event that
matches a state transition out of this state. This is a form of the Chain of Responsibility (CoR) pattern.
The result of an action's execution is typically the criteria for a transition out of this state. Additional
information in the current RequestContext
may also be tested as part of custom transitional criteria,
allowing for sophisticated transition expressions that reason on contextual state.
- Author:
- Keith Donald, Erwin Vervaet
- See Also:
Action
Methods inherited from class org.springframework.webflow.engine.State |
enter, equals, getEntryActionList, getExceptionHandlerSet, getFlow, getId, getOwner, handleException, hashCode, isStartState, isViewState, toString |
ActionState
public ActionState(Flow flow,
String id)
throws IllegalArgumentException
- Creates a new action state.
- Parameters:
flow
- the owning flowid
- the state identifier (must be unique to the flow)
- Throws:
IllegalArgumentException
- when this state cannot be added to given flow, e.g. beasue the id is not unique- See Also:
getActionList()
getActionList
public ActionList getActionList()
- Returns the list of actions executable by this action state. The returned list is mutable.
- Returns:
- the state action list
getRequiredTransition
public Transition getRequiredTransition(RequestContext context)
throws NoMatchingTransitionException
- Description copied from class:
TransitionableState
- Get a transition in this state for given flow execution request context. Throws and exception when there is no
corresponding transition.
- Overrides:
getRequiredTransition
in class TransitionableState
- Throws:
NoMatchingTransitionException
- when a matching transition cannot be found