org.apache.shale.dialog
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:


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.


getName

String getName()

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


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.


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


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