com.ibm.as400.opnav
Interface TasksManager


public interface TasksManager

The interface for adding tasks to a task view for a system component. A TasksManager implementation provides lists of tasks to a user interface, without knowing or caring how the user interface is implemented. It is also responsible for performing the tasks requested by the user.

User interface assumptions:

Implementation assumptions:

Since:
v5r1m0
See Also:
TaskDescriptor

Field Summary
static int CASCADING_TASKS
          Indicates that cascading tasks are requested.
static int CUSTOM_TASKS
          Indicates that custom tasks are requested.
static int RELATED_TASKS
          Indicates that related tasks are requested.
 
Method Summary
 void initialize(ObjectName objectName)
          Identifies the object with which a system component may wish to associate one or more tasks.
 TaskDescriptor[] queryTasks(int flags, java.lang.String verb)
          Returns a list of tasks which are applicable to the specified object.
 void taskSelected(int task, java.awt.Frame owner)
          Informs the TasksManager implementation that a particular task has been selected by the user.
 

Field Detail

CUSTOM_TASKS

public static final int CUSTOM_TASKS
Indicates that custom tasks are requested. These are tasks actually featured on the taskpad by the system component.

CASCADING_TASKS

public static final int CASCADING_TASKS
Indicates that cascading tasks are requested. These are tasks featured in a group of tasks defined by another component.

RELATED_TASKS

public static final int RELATED_TASKS
Indicates that related tasks are requested. These tasks link to online help which describe how to perform tasks which are not actually featured on the taskpad.
Method Detail

initialize

public void initialize(ObjectName objectName)
Identifies the object with which a system component may wish to associate one or more tasks. This method is called immediately after this object is instantiated.
Parameters:
objectNames - an object name.
Since:
v5r1m0
See Also:
ObjectName

queryTasks

public TaskDescriptor[] queryTasks(int flags,
                                   java.lang.String verb)
Returns a list of tasks which are applicable to the specified object. This method is called when the user interface needs to display the available tasks on the taskpad.
Parameters:
flags - constants which indicates the type of tasks requested.
verb - A language-independent verb which identifies the main task to which this TasksManager should add cascading tasks. If the CASCADING_TASKS flag is not set this parameter will be null.
Returns:
An array of task descriptors, each of which describes one task. If no tasks are defined by the component, queryTasks should return null or an array of zero elements.
Since:
v5r1m0
See Also:
TaskDescriptor

taskSelected

public void taskSelected(int task,
                         java.awt.Frame owner)
Informs the TasksManager implementation that a particular task has been selected by the user. The implementation should respond to the request by displaying a UI panel that lets the user perform the designated task.
Parameters:
task - the identifier of the task specified in the TaskDescriptor that was returned by queryTasks.
owner - the frame to be specified as the owner of any dialog panels that are displayed. This frame should be passed to any UIServices methods that require a frame.
Since:
v5r1m0
See Also:
UIServices