net.sf.doolin.gui.wizard.rule.condition
Class ConditionWizardRules<B>
java.lang.Object
net.sf.doolin.gui.wizard.rule.AbstractWizardRules<B>
net.sf.doolin.gui.wizard.rule.condition.ConditionWizardRules<B>
- Type Parameters:
B - Type of bean for the wizard
- All Implemented Interfaces:
- WizardRules<B>
public class ConditionWizardRules<B>
- extends AbstractWizardRules<B>
Wizard rule based on a list of conditions. Each view is associated with a
list of individual wizard rules to be evaluated.
- Author:
- Damien Coraboeuf
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConditionWizardRules
public ConditionWizardRules()
canFinish
public boolean canFinish(String currentViewId,
B model)
- Checks if the wizard can be finished. Each available rule for the current
view is evaluated and if at least one of them returns
WizardRule.FINISH, the wizard can be finished.
- Parameters:
currentViewId - Current view namemodel - Wizard bean
- Returns:
true if the wizard can be finished
getNext
public String getNext(String currentViewId,
B model)
- Checks if the wizard can be navigated to the next view. The next view is
the result of the first available rule that is evaluated to
true .
- Parameters:
currentViewId - Current view namemodel - Wizard bean
- Returns:
- Name of the next view or
null
setRules
public void setRules(Map<String,List<WizardRule>> rules)
- Sets the list of rules, indexed by view names.
- Parameters:
rules - Map of rules per view name
Copyright © 2011. All Rights Reserved.