org.apache.shale.dialog.basic.model
Interface State

All Known Subinterfaces:
ActionState, EndState, SubdialogState, ViewState
All Known Implementing Classes:
AbstractState, ActionStateImpl, EndStateImpl, SubdialogStateImpl, ViewStateImpl

public interface State

A State is an executable entity, within the scope of an owning Dialog. Execution of a State returns a logical outcome (represented as a String), which is used to select the next State to be executed, via a Transition.

Specialized subinterfaces of State are defined for the standard execution entity types that are supported, including:

Since:
1.0.4

Method Summary
 Transition findTransition(String outcome)
          Return the Transition for the specified logical outcome, if any; otherwise, return null.
 Dialog getDialog()
          Return the Dialog that owns this State.
 String getName()
          Return the identifier of this State, which must be unique among the States owned by the same Dialog.
 Iterator getTransitionOutcomes()
          Return an Iterator over the logical outcomes of local Transitions for this State.
 

Method Detail

getDialog

Dialog getDialog()

Return the Dialog that owns this State.

Returns:
The Dialog this State belongs to

getName

String getName()

Return the identifier of this State, which must be unique among the States owned by the same Dialog.

Returns:
The identifier for this State

getTransitionOutcomes

Iterator getTransitionOutcomes()

Return an Iterator over the logical outcomes of local Transitions for this State. If there are no such Transitions, an empty Iterator is returned.

Returns:
An Iterator over the logical outcomes of local Transitions for this State

findTransition

Transition findTransition(String outcome)

Return the Transition for the specified logical outcome, if any; otherwise, return null.

Parameters:
outcome - Logical outcome for which to return a Transition
Returns:
The Transition for the specified outcome, may be null


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.