net.jspcontrols.wizard.impl
Class WizardTransition

java.lang.Object
  extended bynet.jspcontrols.wizard.impl.WizardTransition
All Implemented Interfaces:
IWizardTransition

public abstract class WizardTransition
extends java.lang.Object
implements IWizardTransition

Represents a state transition. In Easy Wizard a transition is an object, it can refer to its source and target states, and can validate itself. When wizard controller moves from one state to another, it iterates through transitions of current state, and validates each of them in order of their weight. The first valid transition is used to change the state.


Field Summary
protected  java.lang.String name
          Human-readable name of this transition, or null if not set.
protected  IWizardStep source
          Source node of this edge, never null.
protected  IWizardStep target
          Target state for this transition, never null.
protected  IWizard wizard
          Owner wizard object, reference used to access common business fields
 
Constructor Summary
WizardTransition(IWizard owner, java.lang.String name, IWizardStep target)
          Constructs an transition.
 
Method Summary
 java.lang.String getName()
          Returns transition name
 IWizardStep getSource()
          Returns source state for this transition
 IWizardStep getTarget()
          Returns target state of this transition
 IWizard getWizard()
          Returns owner wizard object
 void setSource(IWizardStep value)
          Sets source state for this 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.IWizardTransition
validate
 

Field Detail

name

protected java.lang.String name
Human-readable name of this transition, or null if not set. Contrary to the state name, the transition name is optional.


source

protected IWizardStep source
Source node of this edge, never null.


target

protected IWizardStep target
Target state for this transition, never null.


wizard

protected IWizard wizard
Owner wizard object, reference used to access common business fields

Constructor Detail

WizardTransition

public WizardTransition(IWizard owner,
                        java.lang.String name,
                        IWizardStep target)
Constructs an transition. Source state will be set automatically after this transition is added as outgoing to a state.

Parameters:
owner - owner wizard object
name - transition name
target - transition target
Method Detail

getName

public java.lang.String getName()
Returns transition name

Specified by:
getName in interface IWizardTransition
Returns:
transition name

getSource

public IWizardStep getSource()
Returns source state for this transition

Specified by:
getSource in interface IWizardTransition
Returns:
source state for this transition

getTarget

public IWizardStep getTarget()
Returns target state of this transition

Specified by:
getTarget in interface IWizardTransition
Returns:
target state of this transition

getWizard

public IWizard getWizard()
Returns owner wizard object

Specified by:
getWizard in interface IWizardTransition
Returns:
owner wizard object

setSource

public void setSource(IWizardStep value)
Sets source state for this transition; used by wizard controller

Specified by:
setSource in interface IWizardTransition
Parameters:
value - source state for this transition