org.cagrid.installer.tasks
Class ConditionalTask

java.lang.Object
  extended by org.cagrid.installer.tasks.ConditionalTask
All Implemented Interfaces:
Task, Condition

public class ConditionalTask
extends java.lang.Object
implements Condition, Task

Author:
Joshua Phillips

Constructor Summary
ConditionalTask(Task task)
           
ConditionalTask(Task task, Condition condition)
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
           
 boolean evaluate(WizardModel model)
          Called to determine when the path being added using BranchingPath.addBranch(org.pietschy.wizard.models.Path, org.pietschy.wizard.models.Condition) should be traversed.
 java.lang.Object execute(CaGridInstallerModel model)
           
 java.lang.String getDescription()
           
 int getLastStep()
           
 java.lang.String getName()
           
 int getStepCount()
           
 boolean isAbortOnError()
           
 void setLastStep(int lastStep)
           
 void setStepCount(int count)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConditionalTask

public ConditionalTask(Task task)

ConditionalTask

public ConditionalTask(Task task,
                       Condition condition)
Method Detail

evaluate

public boolean evaluate(WizardModel model)
Description copied from interface: Condition
Called to determine when the path being added using BranchingPath.addBranch(org.pietschy.wizard.models.Path, org.pietschy.wizard.models.Condition) should be traversed. The selector is passed the current WizardModel to assist with the decision.

Specified by:
evaluate in interface Condition
Parameters:
model - the WizardModel the condition should use.
Returns:
true if the .

execute

public java.lang.Object execute(CaGridInstallerModel model)
                         throws java.lang.Exception
Specified by:
execute in interface Task
Throws:
java.lang.Exception

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface Task

getName

public java.lang.String getName()
Specified by:
getName in interface Task

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Specified by:
addPropertyChangeListener in interface Task

getLastStep

public int getLastStep()
Specified by:
getLastStep in interface Task

getStepCount

public int getStepCount()
Specified by:
getStepCount in interface Task

setLastStep

public void setLastStep(int lastStep)
Specified by:
setLastStep in interface Task

setStepCount

public void setStepCount(int count)
Specified by:
setStepCount in interface Task

isAbortOnError

public boolean isAbortOnError()
Specified by:
isAbortOnError in interface Task