org.pietschy.wizard.models
Class AbstractPath

java.lang.Object
  extended by org.pietschy.wizard.models.AbstractPath
All Implemented Interfaces:
Path
Direct Known Subclasses:
BranchingPath, SimplePath

public abstract class AbstractPath
extends java.lang.Object
implements Path

Paths represent a sequence of WizardSteps.


Constructor Summary
protected AbstractPath()
           
 
Method Summary
abstract  void acceptVisitor(PathVisitor visitor)
           
 void addStep(WizardStep step)
          Adds a wizard step to this path.
 boolean contains(WizardStep step)
           
 WizardStep firstStep()
           
protected abstract  Path getNextPath(MultiPathModel model)
          Gets the path that will follow this one.
 java.util.ArrayList getSteps()
           
 boolean isFirstStep(WizardStep step)
          Checks if the specified step is the first step in the path.
 boolean isLastStep(WizardStep step)
          Checks if the specified step is the last step in the path.
 WizardStep lastStep()
           
 WizardStep nextStep(WizardStep currentStep)
           
 WizardStep previousStep(WizardStep currentStep)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPath

protected AbstractPath()
Method Detail

getNextPath

protected abstract Path getNextPath(MultiPathModel model)
Gets the path that will follow this one.

Returns:
the next path.

addStep

public void addStep(WizardStep step)
Description copied from interface: Path
Adds a wizard step to this path. Paths must contain at least one step, and the steps will be traversed in the order they are added.

Specified by:
addStep in interface Path
Parameters:
step - the next WizardStep in the path.

firstStep

public WizardStep firstStep()
Specified by:
firstStep in interface Path

nextStep

public WizardStep nextStep(WizardStep currentStep)
Specified by:
nextStep in interface Path

previousStep

public WizardStep previousStep(WizardStep currentStep)
Specified by:
previousStep in interface Path

lastStep

public WizardStep lastStep()
Specified by:
lastStep in interface Path

isFirstStep

public boolean isFirstStep(WizardStep step)
Description copied from interface: Path
Checks if the specified step is the first step in the path.

Specified by:
isFirstStep in interface Path
Parameters:
step - the step to check
Returns:
true if the step is the first in the path, false otherwise.

isLastStep

public boolean isLastStep(WizardStep step)
Description copied from interface: Path
Checks if the specified step is the last step in the path.

Specified by:
isLastStep in interface Path
Parameters:
step - the step to check
Returns:
true if the step is the last in the path, false otherwise.

getSteps

public java.util.ArrayList getSteps()
Specified by:
getSteps in interface Path

contains

public boolean contains(WizardStep step)
Specified by:
contains in interface Path

acceptVisitor

public abstract void acceptVisitor(PathVisitor visitor)
Specified by:
acceptVisitor in interface Path