net.sf.doolin.gui.wizard.rule
Class SequenceWizardRules<B>

java.lang.Object
  extended by net.sf.doolin.gui.wizard.rule.AbstractWizardRules<B>
      extended by net.sf.doolin.gui.wizard.rule.SequenceWizardRules<B>
Type Parameters:
B -
All Implemented Interfaces:
WizardRules<B>

public class SequenceWizardRules<B>
extends AbstractWizardRules<B>

Simple wizard navigation rule that just follows a fixed sequence of views.

Author:
Damien Coraboeuf

Constructor Summary
SequenceWizardRules()
           
 
Method Summary
 boolean canFinish(String currentViewId, B model)
          The wizard can be finished if the current view is the last one.
 String getNext(String currentViewId, B model)
          The wizard can be navigated to the next view if there is at least one view before the end of the sequence.
 void setSequence(List<String> sequence)
          Sets the sequence of views
 
Methods inherited from class net.sf.doolin.gui.wizard.rule.AbstractWizardRules
getTransitionAction, setTransitionActions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceWizardRules

public SequenceWizardRules()
Method Detail

canFinish

public boolean canFinish(String currentViewId,
                         B model)
The wizard can be finished if the current view is the last one.

Parameters:
currentViewId - Current view name
model - Wizard bean
Returns:
true if the wizard can be finished

getNext

public String getNext(String currentViewId,
                      B model)
The wizard can be navigated to the next view if there is at least one view before the end of the sequence.

Parameters:
currentViewId - Current view name
model - Wizard bean
Returns:
Name of the next view or null

setSequence

public void setSequence(List<String> sequence)
Sets the sequence of views

Parameters:
sequence - List of view names


Copyright © 2011. All Rights Reserved.