com.ibm.as400.opnav
Class TaskDescriptor

java.lang.Object
  |
  +--com.ibm.as400.opnav.TaskDescriptor

public class TaskDescriptor
extends java.lang.Object

A data entity which describes a task associated with a system component that a user may choose to perform. A TaskDescriptor provides the name of the task, information on how it should be presented, and an identifier which is passed to the component when a user requests that a task be performed.

A TaskDescriptor may serve to identify a group of logically related subtasks. For example, a CREATE task may have associated subtasks which identify the types of objects the user may create. The subtasks are displayed as having a logical relationship to the main task, usually displayed as a list under the main task.

Since:
v5r1m0
See Also:
TasksManager

Constructor Summary
TaskDescriptor(int ID)
          Constructs a task descriptor.
 
Method Summary
 java.lang.String getDescription()
          Returns the task's description.
 javax.swing.Icon getIcon()
          Returns the task's icon.
 int getID()
          Returns the task's identifier.
 java.lang.String getName()
          Returns the task's name.
 TaskDescriptor[] getSubtasks()
          Returns the task's subtasks.
 java.lang.String getVerb()
          Returns the task's verb.
 boolean isEnabled()
          Indicates whether the task is enabled.
 void setDescription(java.lang.String description)
          Sets the task's description.
 void setEnabled(boolean enabled)
          Enables or disables the task.
 void setIcon(java.lang.String icon)
          Sets the task's icon.
 void setID(int ID)
          Sets the task's identifier.
 void setName(java.lang.String name)
          Sets the task's name.
 void setSubtasks(TaskDescriptor[] subtasks)
          Sets the task's subtasks.
 void setVerb(java.lang.String verb)
          Sets the task's verb.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TaskDescriptor

public TaskDescriptor(int ID)
Constructs a task descriptor. After instantiating a task descriptor, a TasksManager implementation should use the settor methods to completely describe the task.
Parameters:
ID - the identifier which will be used to determine what task the user has requested.
Since:
v5r1m0
Method Detail

getName

public java.lang.String getName()
Returns the task's name.
Returns:
the name in a form suitable for displaying to the user.
Since:
v5r1m0
See Also:
setName(java.lang.String)

setName

public void setName(java.lang.String name)
Sets the task's name.
Parameters:
name - the name in a form suitable for displaying to the user.
Since:
v5r1m0
See Also:
getName()

getDescription

public java.lang.String getDescription()
Returns the task's description.
Returns:
the description string in a form suitable for displaying as hover help.
Since:
v5r1m0
See Also:
setDescription(java.lang.String)

setDescription

public void setDescription(java.lang.String description)
Sets the task's description.
Parameters:
description - the description string in a form suitable for displaying as hover help.
Since:
v5r1m0
See Also:
getDescription()

getVerb

public java.lang.String getVerb()
Returns the task's verb.
Returns:
the verb string which identifies the task. This string is never displayed to the user and should not be translated.
Since:
v5r1m0
See Also:
setVerb(java.lang.String)

setVerb

public void setVerb(java.lang.String verb)
Sets the task's verb.
Parameters:
verb - the verb string which identifies the task. This string is never displayed to the user and should not be translated.
Since:
v5r1m0
See Also:
getVerb()

getIcon

public javax.swing.Icon getIcon()
Returns the task's icon.
Returns:
the icon associated with the task.
Since:
v5r1m0
See Also:
setIcon(java.lang.String)

setIcon

public void setIcon(java.lang.String icon)
Sets the task's icon.
Parameters:
String - the qualified path and name of the icon associated with the task. Note: file paths must NOT begin with a leading slash and must be of the format "xxx/yyy/zzz/aaa.gif"
Since:
v5r1m0
See Also:
getIcon()

isEnabled

public boolean isEnabled()
Indicates whether the task is enabled. An enabled task is one that may be selected by the user.
Returns:
true if the task is enabled; false otherwise.
Since:
v5r1m0
See Also:
setEnabled(boolean)

setEnabled

public void setEnabled(boolean enabled)
Enables or disables the task. An enabled task is one that may be selected by the user.
Parameters:
enabled - true if the task should enabled; false otherwise.
Since:
v5r1m0
See Also:
isEnabled()

getID

public int getID()
Returns the task's identifier.
Returns:
the identifier which will be used to determine what task the user has requested.
Since:
v5r1m0
See Also:
setID(int)

setID

public void setID(int ID)
Sets the task's identifier.
Parameters:
ID - the identifier which will be used to determine what task the user has requested.
Since:
v5r1m0
See Also:
getID()

getSubtasks

public TaskDescriptor[] getSubtasks()
Returns the task's subtasks. See the class description.
Returns:
the array of TaskDescriptors which identify this task group's subtasks.
Since:
v5r1m0
See Also:
setSubtasks(com.ibm.as400.opnav.TaskDescriptor[])

setSubtasks

public void setSubtasks(TaskDescriptor[] subtasks)
Sets the task's subtasks. See the class description.
Parameters:
subtasks - the array of TaskDescriptors which identify this task group's subtasks.
Since:
v5r1m0
See Also:
getSubtasks()

toString

public java.lang.String toString()
Returns a string representation of the object.
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.
Since:
v5r1m0