All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.wizards.tasks.DataTask
java.lang.Object
|
+----com.sun.wizards.core.Task
|
+----com.sun.wizards.tasks.DataTask
- public class DataTask
- extends Task
- implements Serializable
The DataTask is a decorated Task that sets a key/value pair into
the WizardState as its Task. You might use this in a Sequence to
notify other Sequences of a certain condition. For example, if you
want to set the key/value pair ["Wizards are Good", "True"] during
a sequence, then you would add this DataTask to a Sequence within
the WizardState:
DataTask myTask = new DataTask("Wizards are Good", "True");
And, upon encountering this Task, the data will be set.
You can optionally include data to be set during a reverse()
sequence by supplying it to the other constructor:
DataTask myOtherTask = new DataTask("Wizards are Good", "True", "Wizards are Bad", "False");
This will set ["Wizards are Good", "True"] during a perform(),
and ["Wizards are Bad", "False"] during a reverse().
-
performKey
-
The key used when setting the data into the WizardState on the
task.perform() method.
-
performValue
- The value to set into the WizardState on the task.perform() method.
-
reverseKey
-
The key used when setting the data into the WizardState on the
task.reverse() method.
-
reverseValue
- The value to set into the WizardState on the task.reverse() method.
-
DataTask(String, Object)
- Creates a DataTask object that will set the specified data
on the perform method call.
-
DataTask(String, Object, String, Object)
- Creates a DataTask object that will set one set of data
on perform() and the other set on reverse()
-
addRuntimeResources(Vector)
-
Add the runtime class requirements to the specified vector.
-
perform()
- Perform the decorated Task.
-
reverse()
- Reverse the Task.
performKey
protected String performKey
- The key used when setting the data into the WizardState on the
task.perform() method.
performValue
protected Object performValue
- The value to set into the WizardState on the task.perform() method.
reverseKey
protected String reverseKey
- The key used when setting the data into the WizardState on the
task.reverse() method.
reverseValue
protected Object reverseValue
- The value to set into the WizardState on the task.reverse() method.
DataTask
public DataTask(String performKey,
Object performValue)
- Creates a DataTask object that will set the specified data
on the perform method call.
- Parameters:
- performKey - The key to use to set data on perform.
- performValue - The data to set on perform.
DataTask
public DataTask(String performKey,
Object performValue,
String reverseKey,
Object reverseValue)
- Creates a DataTask object that will set one set of data
on perform() and the other set on reverse()
- Parameters:
- performKey - The key to use to set data on perform.
- performValue - The data to set on perform.
- reverseKey - The key to use to set data on reverse.
- reverseValue - The data to set on reverse.
perform
public void perform()
- Perform the decorated Task.
- Overrides:
- perform in class Task
reverse
public void reverse()
- Reverse the Task.
- Overrides:
- reverse in class Task
addRuntimeResources
public void addRuntimeResources(Vector resourceVector)
- Add the runtime class requirements to the specified vector.
- Parameters:
- resourceVector - The vector containing all runtime resources
for this wizard.
- Overrides:
- addRuntimeResources in class Task
All Packages Class Hierarchy This Package Previous Next Index