| java.lang.Object org.springframework.webflow.engine.AnnotatedObject org.springframework.webflow.engine.Transition
Transition | public class Transition extends AnnotatedObject implements TransitionDefinition(Code) | | A path from one
TransitionableState state to another
State state .
When executed a transition takes a flow execution from its current state,
called the source state, to another state, called the target
state. A transition may become eligible for execution on the occurence
of an
Event from within a transitionable source state.
When an event occurs within this transition's source
TransitionableState the determination of the eligibility of
this transition is made by a TransitionCriteria object called
the matching criteria. If the matching criteria returns
true this transition is marked eligible for execution for that
event.
Determination as to whether an eligible transition should be allowed to
execute is made by a TransitionCriteria object called the
execution criteria. If the execution criteria test fails this
transition will roll back and reenter its source state. If the
execution criteria test succeeds this transition will execute and take the
flow to the transition's target state.
The target state of this transition is typically specified at configuration
time in a static manner. If the target state of this transition needs to be
calculated in a dynamic fashion at runtime configure a
TargetStateResolver that supports such calculations.
See Also: TransitionableState See Also: TransitionCriteria See Also: TargetStateResolver author: Keith Donald author: Erwin Vervaet |
Field Summary | |
final protected Log | logger Logger, for use in subclasses. |
Constructor Summary | |
public | Transition(TargetStateResolver targetStateResolver) Create a new transition that always matches and always executes,
transitioning to the target state calculated by the provided
targetStateResolver. | public | Transition(TransitionCriteria matchingCriteria, TargetStateResolver targetStateResolver) Create a new transition that matches on the specified criteria,
transitioning to the target state calculated by the provided
targetStateResolver. |
logger | final protected Log logger(Code) | | Logger, for use in subclasses.
|
Transition | public Transition(TransitionCriteria matchingCriteria, TargetStateResolver targetStateResolver)(Code) | | Create a new transition that matches on the specified criteria,
transitioning to the target state calculated by the provided
targetStateResolver.
Parameters: matchingCriteria - the criteria for matching this transition Parameters: targetStateResolver - the resolver of the target state of thistransition See Also: Transition.setExecutionCriteria(TransitionCriteria) |
canExecute | public boolean canExecute(RequestContext context)(Code) | | Checks if this transition can complete its execution or should be rolled
back, given the state of the flow execution request context.
Parameters: context - the flow execution request context true if this transition can complete execution, false if itshould roll back |
getExecutionCriteria | public TransitionCriteria getExecutionCriteria()(Code) | | Returns the criteria that determine whether or not this transition, once
matched, should complete execution or should roll back.
the transition execution criteria |
getMatchingCriteria | public TransitionCriteria getMatchingCriteria()(Code) | | Returns the criteria that determine whether or not this transition
matches as eligible for execution.
the transition matching criteria |
getTargetStateResolver | public TargetStateResolver getTargetStateResolver()(Code) | | Returns this transition's target state resolver.
|
matches | public boolean matches(RequestContext context)(Code) | | Checks if this transition is elligible for execution given the state of
the provided flow execution request context.
Parameters: context - the flow execution request context true if this transition should execute, false otherwise |
setExecutionCriteria | public void setExecutionCriteria(TransitionCriteria executionCriteria)(Code) | | Set the criteria that determine whether or not this transition, once
matched, should complete execution or should roll back.
Parameters: executionCriteria - the transition execution criteria |
setMatchingCriteria | public void setMatchingCriteria(TransitionCriteria matchingCriteria)(Code) | | Set the criteria that determine whether or not this transition matches as
eligible for execution.
Parameters: matchingCriteria - the transition matching criteria |
setTargetStateResolver | public void setTargetStateResolver(TargetStateResolver targetStateResolver)(Code) | | Set this transition's target state resolver, to calculate what state to
transition to when this transition is executed.
Parameters: targetStateResolver - the target state resolver |
|
|