org.eclipse.wst.server.core
Class TaskModel

java.lang.Object
  extended byorg.eclipse.wst.server.core.TaskModel

public class TaskModel
extends java.lang.Object

A task model represents a model that can be shared between multiple tasks in a common workflow.

The task model contains information about the overall task flow and allows tasks to store and retreive data. Its usage allows mutliple tasks to be chained together and share data from the output of one task to the input of another.

Since:
1.0

Field Summary
static java.lang.String TASK_LAUNCH_MODE
          Task model id for a launch mode.
static java.lang.String TASK_MODULES
          Task model id for an array of modules.
static java.lang.String TASK_RUNTIME
          Task model id for an IRuntime.
static java.lang.String TASK_SERVER
          Task model id for an IServer.
 
Constructor Summary
TaskModel()
           
 
Method Summary
 java.lang.Object getObject(java.lang.String id)
          Returns the object in the task model with the given id.
 void putObject(java.lang.String id, java.lang.Object obj)
          Put an object into the task model with the given id.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TASK_RUNTIME

public static final java.lang.String TASK_RUNTIME
Task model id for an IRuntime.

See Also:
getObject(String), putObject(String, Object), Constant Field Values

TASK_SERVER

public static final java.lang.String TASK_SERVER
Task model id for an IServer.

See Also:
getObject(String), putObject(String, Object), Constant Field Values

TASK_MODULES

public static final java.lang.String TASK_MODULES
Task model id for an array of modules. The value is a List containing IModule[] arrays.

See Also:
getObject(String), putObject(String, Object), Constant Field Values

TASK_LAUNCH_MODE

public static final java.lang.String TASK_LAUNCH_MODE
Task model id for a launch mode.

See Also:
getObject(String), putObject(String, Object), Constant Field Values
Constructor Detail

TaskModel

public TaskModel()
Method Detail

getObject

public java.lang.Object getObject(java.lang.String id)
Returns the object in the task model with the given id.

The id can be any of the predefined ids within TaskModel, or any other key to retreive task-specific data.

Parameters:
id - an id for the object
Returns:
the object with the given id, or null if no object could be found with that id

putObject

public void putObject(java.lang.String id,
                      java.lang.Object obj)
Put an object into the task model with the given id.

The id can be any of the predefined ids within TaskModel, or any other key to store task-specific data.

Parameters:
id - the id to associate the object with
obj - an object, or null to reset (clear) the id