java.lang.Objectnet.jspcontrols.wizard.impl.WizardStep
Represents a state of a wizard Finite State Machine (FSM). Contains common navigation methods. Derived concrete state should also contain setters/getters for domain data, relevant to this state.
| Field Summary | |
protected IWizardTransition |
incomingTransition
Incoming transition. |
protected java.lang.String |
stateName
The name of this state |
protected IWizard |
wizard
Master wizard object; this reference can be used to access common data defined in the wizard object itself. |
| Constructor Summary | |
WizardStep(IWizard owner,
java.lang.String name)
Constructs the state, sets a name and stores a reference to the owner wizard object. |
|
| Method Summary | |
void |
addOutgoingTransition(IWizardTransition value)
Adds an outgoing transition. |
static boolean |
checkTraverseBack(IWizardStep startState,
IWizardStep searchState)
Verifies if a state is included in the path to the current state |
IWizardTransition |
getIncomingTransition()
Returns incoming transition for this state, used during actual wizard traversal |
IWizardTransition |
getOutgoingTransition()
Returns a transition which will be chosen if a "next" command is selected for this node. |
IWizardTransition[] |
getOutgoingTransitions()
Returns array of outgoing transitions in the same order in which they were added by addOutgoingTransition() method. |
java.lang.String |
getStateName()
Returns the state name |
IWizard |
getWizard()
Returns master wizard object |
boolean |
isCheckpoint()
Returns true if this state is marked as checkpoint |
boolean |
isStateInPath()
Verifies that this state is included in the path to the current state (the current state is past this state). |
void |
setCheckpoint(boolean checkpoint)
Sets this state as checkpoint. |
void |
setIncomingTransition(IWizardTransition value)
Sets incoming transition, used by wizard controller. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.jspcontrols.wizard.intf.IWizardStep |
resetBooleans |
| Field Detail |
protected IWizardTransition incomingTransition
protected java.lang.String stateName
protected IWizard wizard
| Constructor Detail |
public WizardStep(IWizard owner,
java.lang.String name)
owner - owner wizard object, cannot be nullname - name of this state, cannot be null, must be unique within
the wizard| Method Detail |
public void addOutgoingTransition(IWizardTransition value)
addOutgoingTransition in interface IWizardStepvalue - outgoing transition
public static boolean checkTraverseBack(IWizardStep startState,
IWizardStep searchState)
startState - the state where to start backward traversalsearchState - the state which we are looking for in the
travseral path
public IWizardTransition getIncomingTransition()
getIncomingTransition in interface IWizardSteppublic IWizardTransition getOutgoingTransition()
getOutgoingTransition in interface IWizardSteppublic IWizardTransition[] getOutgoingTransitions()
getOutgoingTransitions in interface IWizardSteppublic java.lang.String getStateName()
getStateName in interface IWizardSteppublic IWizard getWizard()
getWizard in interface IWizardSteppublic boolean isCheckpoint()
isCheckpoint in interface IWizardSteppublic boolean isStateInPath()
isStateInPath in interface IWizardSteppublic void setCheckpoint(boolean checkpoint)
checkpoint - true if this state should be marked as checkpointpublic void setIncomingTransition(IWizardTransition value)
setIncomingTransition in interface IWizardStepvalue - incoming transition