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().


Variable Index

 o performKey
The key used when setting the data into the WizardState on the task.perform() method.
 o performValue
The value to set into the WizardState on the task.perform() method.
 o reverseKey
The key used when setting the data into the WizardState on the task.reverse() method.
 o reverseValue
The value to set into the WizardState on the task.reverse() method.

Constructor Index

 o DataTask(String, Object)
Creates a DataTask object that will set the specified data on the perform method call.
 o DataTask(String, Object, String, Object)
Creates a DataTask object that will set one set of data on perform() and the other set on reverse()

Method Index

 o addRuntimeResources(Vector)
Add the runtime class requirements to the specified vector.
 o perform()
Perform the decorated Task.
 o reverse()
Reverse the Task.

Variables

 o performKey
 protected String performKey
The key used when setting the data into the WizardState on the task.perform() method.

 o performValue
 protected Object performValue
The value to set into the WizardState on the task.perform() method.

 o reverseKey
 protected String reverseKey
The key used when setting the data into the WizardState on the task.reverse() method.

 o reverseValue
 protected Object reverseValue
The value to set into the WizardState on the task.reverse() method.

Constructors

 o 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.
 o 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.

Methods

 o perform
 public void perform()
Perform the decorated Task.

Overrides:
perform in class Task
 o reverse
 public void reverse()
Reverse the Task.

Overrides:
reverse in class Task
 o 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