net.jspcontrols.wizard.intf
Interface IWizardStep

All Known Implementing Classes:
WizardStep

public interface IWizardStep

Represents a state of a wizard Finite State Machine (FSM).

A base state contains common navigation methods, a concrete state also contains setters/getters for domain data, relevant to this state.


Method Summary
 void addOutgoingTransition(IWizardTransition value)
          Adds an outgoing transition.
 IWizardTransition getIncomingTransition()
          Returns the incoming transition, was used to get to this state.
 IWizardTransition getOutgoingTransition()
          Selects a transition which will be used to move forward from from this state.
 IWizardTransition[] getOutgoingTransitions()
          Returns array of outgoing transitions for this state.
 java.lang.String getStateName()
          Returns the name of this state.
 IWizard getWizard()
          Returns the wizard, which contains this state as part of the wizard sequence.
 boolean isCheckpoint()
          Returns true if this state has been marked as checkpoint.
 boolean isStateInPath()
          Verifies that this state is included in the path to the current state.
 void resetBooleans()
          Instructs the state to clear all its boolean properties.
 void setIncomingTransition(IWizardTransition value)
          Sets the incoming transition.
 

Method Detail

addOutgoingTransition

public void addOutgoingTransition(IWizardTransition value)
Adds an outgoing transition. Order in which transitions are added to a state, defines their weight (or rank). Transition added to a state first, has the highest weight. Transitions are validated during forward traversal in order of their weight, and the first valid transition is chosen for state change.

Parameters:
value - outgoing transition

getIncomingTransition

public IWizardTransition getIncomingTransition()
Returns the incoming transition, was used to get to this state.

Returns:
incoming transition

getOutgoingTransition

public IWizardTransition getOutgoingTransition()
Selects a transition which will be used to move forward from from this state.

All outgoing transitions are validated in the order of their weight. The first valid transition is chosen.

Returns:
a valid outgoing edge or null if no valid edges found

getOutgoingTransitions

public IWizardTransition[] getOutgoingTransitions()
Returns array of outgoing transitions for this state. The transitions are weighed according to the order in which they were added to this state.

Returns:
array of outgoing transitions

getStateName

public java.lang.String getStateName()
Returns the name of this state. Each state must have a unique name..

Returns:
state name

getWizard

public IWizard getWizard()
Returns the wizard, which contains this state as part of the wizard sequence.

Returns:
wizard which owns this node

isCheckpoint

public boolean isCheckpoint()
Returns true if this state has been marked as checkpoint. This means that a wizard cannot return back from this state.

Returns:
true if this state is a checkpoint

isStateInPath

public boolean isStateInPath()
Verifies that this state is included in the path to the current state.

Returns:
true if this state is present in the actual path to the current state, but is not a current state itself; false otherwise.

resetBooleans

public void resetBooleans()
Instructs the state to clear all its boolean properties. Usually called before the properties are about to be set.

The reason for this method is that browsers/HTTP do not notify server about cleared checkboxes or radiobuttons. So, these values should be cleared before they are set with client values.

This method is not used in JSF.


setIncomingTransition

public void setIncomingTransition(IWizardTransition value)
Sets the incoming transition. Used during forward traversal to mark the way through the wizard. The incoming transition is used for backward traversal.

Parameters:
value - incoming transition