Class ActionTransitionCriteria

java.lang.Object
org.springframework.webflow.engine.support.ActionTransitionCriteria
All Implemented Interfaces:
TransitionCriteria

public class ActionTransitionCriteria extends Object implements TransitionCriteria
A transition criteria that will execute an action when tested and return true if the action's result is equal to the 'trueEventId', false otherwise.

This effectively adapts an Action to a TransitionCriteria.

Author:
Keith Donald, Erwin Vervaet
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create action transition criteria delegating to the specified action.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Action
    Returns the action wrapped by this object.
    Returns the action result eventIds that should cause this criteria to return true (it will return false otherwise).
    void
    setTrueEventIds(String... trueEventIds)
    Sets the action result eventIds that should cause this precondition to return true (it will return false otherwise).
    boolean
    Check if the transition should fire based on the given flow execution request context.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ActionTransitionCriteria

      public ActionTransitionCriteria(Action action)
      Create action transition criteria delegating to the specified action.
      Parameters:
      action - the action
  • Method Details

    • getTrueEventIds

      public String[] getTrueEventIds()
      Returns the action result eventIds that should cause this criteria to return true (it will return false otherwise). Defaults to "success".
    • setTrueEventIds

      public void setTrueEventIds(String... trueEventIds)
      Sets the action result eventIds that should cause this precondition to return true (it will return false otherwise).
      Parameters:
      trueEventIds - the true result event IDs
    • getAction

      protected Action getAction()
      Returns the action wrapped by this object.
      Returns:
      the action
    • 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