Spring Web Flow

org.springframework.webflow.engine.support
Class TransitionCriteriaChain

java.lang.Object
  extended by org.springframework.webflow.engine.support.TransitionCriteriaChain
All Implemented Interfaces:
TransitionCriteria

public class TransitionCriteriaChain
extends java.lang.Object
implements TransitionCriteria

An ordered chain of TransitionCriteria. Iterates over each element in the chain, continues until one returns false or the list is exhausted. So in effect it will do a logical AND between the contained criteria.

Author:
Keith Donald

Constructor Summary
TransitionCriteriaChain()
          Creates an initially empty transition criteria chain.
TransitionCriteriaChain(TransitionCriteria... criteria)
          Creates a transition criteria chain with the specified criteria.
 
Method Summary
 TransitionCriteriaChain add(TransitionCriteria criteria)
          Add given criteria object to the end of the chain.
static TransitionCriteria criteriaChainFor(Action... actions)
          Create a transition criteria chain chaining given list of actions.
 boolean test(RequestContext context)
          Check if the transition should fire based on the given flow execution request context.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TransitionCriteriaChain

public TransitionCriteriaChain()
Creates an initially empty transition criteria chain.

See Also:
add(TransitionCriteria)

TransitionCriteriaChain

public TransitionCriteriaChain(TransitionCriteria... criteria)
Creates a transition criteria chain with the specified criteria.

Parameters:
criteria - the criteria
Method Detail

add

public TransitionCriteriaChain add(TransitionCriteria criteria)
Add given criteria object to the end of the chain.

Parameters:
criteria - the criteria
Returns:
this object, so multiple criteria can be added in a single statement

test

public boolean test(RequestContext context)
Description copied from interface: TransitionCriteria
Check if the transition should fire based on the given flow execution request context.

Specified by:
test in interface TransitionCriteria
Parameters:
context - the flow execution request context
Returns:
true if the transition should fire, false otherwise

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

criteriaChainFor

public static TransitionCriteria criteriaChainFor(Action... actions)
Create a transition criteria chain chaining given list of actions.

Parameters:
actions - the actions (and their execution properties) to chain together

Spring Web Flow