Spring Web Flow

org.springframework.webflow.engine
Class ActionList

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

public class ActionList
extends java.lang.Object
implements java.lang.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:
Flow.getStartActionList(), Flow.getEndActionList(), State.getEntryActionList(), ActionState.getActionList(), TransitionableState.getExitActionList(), ViewState.getRenderActionList()

Constructor Summary
ActionList()
           
 
Method Summary
 boolean add(Action action)
          Add an action to this list.
 boolean addAll(Action... actions)
          Add a collection of actions to this list.
 boolean contains(Action action)
          Tests if the action is in this list.
 void execute(RequestContext context)
          Executes the actions contained within this action list.
 Action get(int index)
          Returns the action in this list at the provided index.
 AnnotatedAction getAnnotated(int index)
          Returns the action in this list at the provided index, exposing it as an annotated action.
 java.util.Iterator<Action> iterator()
          Returns an iterator over this action list.
 boolean remove(Action action)
          Remove the action instance from this list.
 int size()
          Returns the size of this action list.
 AnnotatedAction[] toAnnotatedArray()
          Returns the list of actions in this list as a typed annotated action array.
 Action[] toArray()
          Convert this list to a typed action array.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActionList

public ActionList()
Method Detail

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 java.lang.IndexOutOfBoundsException
Returns the action in this list at the provided index.

Parameters:
index - the action index
Returns:
the action the action
Throws:
java.lang.IndexOutOfBoundsException

getAnnotated

public AnnotatedAction getAnnotated(int index)
                             throws java.lang.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:
java.lang.IndexOutOfBoundsException

iterator

public java.util.Iterator<Action> iterator()
Returns an iterator over this action list.

Specified by:
iterator in interface java.lang.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object

Spring Web Flow