Class ActionList

java.lang.Object
org.springframework.webflow.engine.ActionList
All Implemented Interfaces:
Iterable<Action>

public class ActionList extends Object implements Iterable<Action>
An ordered, typed list of actions, mainly for use internally by flow artifacts that can execute groups of actions.
Author:
Keith Donald
See Also:
  • Constructor Details

    • ActionList

      public ActionList()
  • Method Details

    • add

      public boolean add(Action action)
      Add an action to this list.
      Parameters:
      action - the action to add
      Returns:
      true if this list's contents changed as a result of the add operation
    • addAll

      public boolean addAll(Action... actions)
      Add a collection of actions to this list.
      Parameters:
      actions - the actions to add
      Returns:
      true if this list's contents changed as a result of the add operation
    • contains

      public boolean contains(Action action)
      Tests if the action is in this list.
      Parameters:
      action - the action
      Returns:
      true if the action is contained in this list, false otherwise
    • remove

      public boolean remove(Action action)
      Remove the action instance from this list.
      Parameters:
      action - the action to add
      Returns:
      true if this list's contents changed as a result of the remove operation
    • size

      public int size()
      Returns the size of this action list.
      Returns:
      the action list size.
    • get

      public Action get(int index) throws IndexOutOfBoundsException
      Returns the action in this list at the provided index.
      Parameters:
      index - the action index
      Returns:
      the action the action
      Throws:
      IndexOutOfBoundsException
    • getAnnotated

      public AnnotatedAction getAnnotated(int index) throws IndexOutOfBoundsException
      Returns the action in this list at the provided index, exposing it as an annotated action. This allows clients to access specific properties about a target action instance if they exist.
      Returns:
      the action, as an annotated action
      Throws:
      IndexOutOfBoundsException
    • iterator

      public Iterator<Action> iterator()
      Returns an iterator over this action list.
      Specified by:
      iterator in interface Iterable<Action>
    • toArray

      public Action[] toArray()
      Convert this list to a typed action array.
      Returns:
      the action list, as a typed array
    • toAnnotatedArray

      public AnnotatedAction[] toAnnotatedArray()
      Returns the list of actions in this list as a typed annotated action array. This is a convenience method allowing clients to access properties about an action if they exist.
      Returns:
      the annotated action list, as a typed array
    • execute

      public void execute(RequestContext context)
      Executes the actions contained within this action list. Simply iterates over each action and calls execute. Action result events are ignored.
      Parameters:
      context - the action execution request context
    • toString

      public String toString()
      Overrides:
      toString in class Object