com.tivoli.twg.engine
Class TWGSubtask

java.lang.Object
  extended bycom.tivoli.twg.engine.TWGSubtask

public class TWGSubtask
extends java.lang.Object

This class is a container to hold information about a task's subtasks. It holds information like the subtask's label and which GUI actions are to activate a subtask (i.e. double-clicking, drag/drop, etc.). The primary way that TWGSubtask instances are created is by TWGDefaultTask while it is processing a properties file.


Method Summary
 boolean checkPrivileges(StringValueSet checkSet)
          Check to see if the specified set of privileges is adequate for using this TWGTask.
 TWGConTask getConTask()
          Get the task that owns this subtask.
 java.lang.String getID()
          Get the ID of this subtask,
 long getJobID()
          Get the ID of the job if this subtask is supposed to be activated via the scheduler.
 TWGTaskMenuList getMenu()
          Get the menu object for this subtask.
 java.lang.String getName()
          Get the name of this subtask.
 java.lang.String[] getPrivileges()
          Get the list of privilege token names required to be able to use this subtask.
 byte[] getSubtaskData()
          Get the data for this subtask.
 TWGTask getTask()
          Get the task that owns this subtask.
 int getToolbarWeight()
          Get the sorting weight factor for the toolbar icon.
 boolean hasServer()
          Determine if this subtask has a server portion.
 boolean isCheckClients()
          Determine if this subtask wants the clients checked for tasks.
 boolean isClientRequired()
          Determin if this subtask requires a client service in order to bind the task to a managed object
 boolean isDisabled()
          Is this subtask disabled, either directly or through inheritence from its parent?
 boolean isDoubleClick()
          Determine if this subtask is the double click action for this task.
 boolean isDragDrop()
          Determine if this subtask is the drag/drop (multi or single) action for this task.
 boolean isDragDropMulti()
          Determine if this subtask is the multi-target drag/drop action for this task.
 boolean isDragDropSingle()
          Determine if this subtask is the single-target drag/drop action for this task.
 boolean isFilterIconMenu()
          Determine if this subtask's menu should be displayed on a filter's context menu.
 boolean isFilterPaneMenu()
          Determine if this subtask's menu should be be displayed on the filter pane's context menu.
 boolean isGroupCategoryIconMenu()
          Determine if this subtask's menu should be displayed on a group category's context menu.
 boolean isInteractive()
          Determine if this subtask is interactive.
 boolean isMainMenu()
          Determine if this subtask's menu should be displayed on the console's main menu.
 boolean isManagedObjectSupported(TWGConManagedObject cmo)
          Determine if the specified managed object can be a target for this subtask.
 boolean isManagedObjectSupported(TWGManagedObject mo)
          Determine if the specified managed object can be a target for this subtask.
 boolean isMultiTargeted()
          Determine if this subtask is multi-targeted.
 boolean isNewCategoryTask()
          Determine if this subtask is the request for a new category
 boolean isObjectIconMenu()
          Determine if this subtask's menu should be displayed on an object's context menu.
 boolean isObjectPaneMenu()
          Determine if this subtask's menu should be displayed on the object pane's context menu.
 boolean isScheduled()
          Determine if this subtask is supposed to be activated via the scheduler.
 boolean isSingleTargeted()
          Determine if this subtask is single targeted.
 boolean isStartClients()
          Determine if this subtask wants the client tasks automatically started.
 boolean isTargeted()
          Determine if this subtask is single or multi-targeted.
 boolean isTaskCategoryIconMenu()
          Determine if this subtask's menu should be displayed on a task category's context menu.
 boolean isTaskIconMenu()
          Determine if this subtask's menu should be displayed on the task icon's context menu.
 boolean isTaskPaneMenu()
          Determine if this subtask's menu to should displayed on the task pane's context menu.
 boolean isToolbar()
          Determine if this subtask is the toolbar action for this task.
 boolean isToolbarMenu()
          Determine if this subtask's menu to should displayed on the console's toolbar
 void setCheckClients(boolean flag)
          Set this subtask to check for client tasks.
 void setClientRequired(boolean flag)
          Set this subtask to require a client in order to bind to a task
 void setDoubleClick(boolean flag)
          Set the double click flag for this subtask.
 void setDragDrop(boolean flag)
          Set the drag/drop flag for this subtask.
 void setDragDropMulti(boolean flag)
          Set the drag/drop multi flag for this subtask.
 void setFilterIconMenu(boolean flag)
          Set this subtask's menu to be displayed on a filter's context menu.
 void setFilterPaneMenu(boolean flag)
          Set this subtask's menu to be displayed on the filter pane's context menu.
 void setGroupCategoryIconMenu(boolean flag)
          Set this subtask's menu to be displayed on a group category's context menu.
 void setIgnoreClients()
          Clear this subtask's client flags so that it neither checks nor starts client subtasks.
 void setInteractive(boolean flag)
          Set this subtask's interactive flag.
 void setMainMenu(boolean flag)
          Set this subtask's menu to be displayed on the console's main menu.
 void setMultiTargeted(boolean flag)
          Set this subtask to be multi-targeted.
 void setNewCategoryTask(boolean flag)
          Set flag indicating this subtask is the new category request subtask.
 void setObjectIconMenu(boolean flag)
          Set this subtask's menu to be displayed on an object's context menu.
 void setObjectPaneMenu(boolean flag)
          Set this subtask's menu to be displayed on the object pane's context menu.
 void setPrivileges(java.lang.String[] privNames, boolean reset)
          Set the list of privilege token names required to be able to use this subtask.
 void setScheduled(boolean flag)
          Set this subtask's scheduled flag.
 void setServer(boolean flag)
          Set this subtask's server flag.
 void setSingleTargeted(boolean flag)
          Set this subtask to be single-targeted.
 void setStartClients(boolean flag)
          Set this subtask to start the client tasks.
 void setSubtaskData(byte[] subtaskData)
          Set the data for this task.
 void setTaskCategoryIconMenu(boolean flag)
          Set this subtask's menu to be displayed on a task category's context menu.
 void setTaskIconMenu(boolean flag)
          Set this subtask's menu to be displayed on the task icon's context menu.
 void setTaskPaneMenu(boolean flag)
          Set this subtask's menu to be displayed on the task pane's context menu.
 void setToolbarMenu(boolean flag)
          Set this subtask's menu to be displayed on the console's toolbar
 void setToolbarWeight(int weight)
          Set the toolbar flag for this subtask.
 java.lang.String toString()
          Get a string representation of this subtask.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public java.lang.String toString()
Get a string representation of this subtask.

Returns:
A string representation of this subtask

getTask

public final TWGTask getTask()
Get the task that owns this subtask. This version is used by the engine.

Returns:
a TWGTask object.

getConTask

public final TWGConTask getConTask()
Get the task that owns this subtask. This version is used by the console.

Returns:
a TWGConTask object.

isDisabled

public final boolean isDisabled()
Is this subtask disabled, either directly or through inheritence from its parent?

Returns:
true is the subtask is disabled, false otherwise

getID

public final java.lang.String getID()
Get the ID of this subtask,

Returns:
the String that is this subtask's ID

getJobID

public final long getJobID()
Get the ID of the job if this subtask is supposed to be activated via the scheduler.

Returns:
long job ID to invoke or 0 if not to be run via scheduler.

getSubtaskData

public final byte[] getSubtaskData()
Get the data for this subtask. This field is for task implementors to have a place to stash subtask related data that will be held persistently. TWGSubtask does absolutely nothing with this data except for providing accessor methods, handling saving and restoring the data to make it persistent and shadowing it up to the console.

Returns:
a byte array containing the task's data or null if it has never been set

setSubtaskData

public final void setSubtaskData(byte[] subtaskData)
Set the data for this task. This field is for task implementors to have a place to stash task related data that will be held persistently. TWGTask does absolutely nothing with this data except for providing accessor methods, handling saving and restoring the data to make it persistent and shadowing it up to the console.

NOTE: save() must be called in order for the task's data to actually be placed into persistent storage.

ALSO NOTE: this method only affects persistent storage this TWGSubtask is instantiated in the engine. If this TWGSubtask is in the console and you want to affect persistent storage then you must use a TWGSetAttributeCommand.


getMenu

public final TWGTaskMenuList getMenu()
Get the menu object for this subtask.

Returns:
a TWGTaskMenuList object.

setSingleTargeted

public final void setSingleTargeted(boolean flag)
Set this subtask to be single-targeted.


setMultiTargeted

public final void setMultiTargeted(boolean flag)
Set this subtask to be multi-targeted.


setInteractive

public final void setInteractive(boolean flag)
Set this subtask's interactive flag.


setServer

public final void setServer(boolean flag)
Set this subtask's server flag.


setScheduled

public final void setScheduled(boolean flag)
Set this subtask's scheduled flag.


setNewCategoryTask

public final void setNewCategoryTask(boolean flag)
Set flag indicating this subtask is the new category request subtask.


setIgnoreClients

public final void setIgnoreClients()
Clear this subtask's client flags so that it neither checks nor starts client subtasks.


setCheckClients

public final void setCheckClients(boolean flag)
Set this subtask to check for client tasks.


setStartClients

public final void setStartClients(boolean flag)
Set this subtask to start the client tasks.


setClientRequired

public final void setClientRequired(boolean flag)
Set this subtask to require a client in order to bind to a task


setDoubleClick

public final void setDoubleClick(boolean flag)
Set the double click flag for this subtask.


setToolbarWeight

public final void setToolbarWeight(int weight)
Set the toolbar flag for this subtask.


setDragDrop

public final void setDragDrop(boolean flag)
Set the drag/drop flag for this subtask.


setDragDropMulti

public final void setDragDropMulti(boolean flag)
Set the drag/drop multi flag for this subtask.


setMainMenu

public final void setMainMenu(boolean flag)
Set this subtask's menu to be displayed on the console's main menu.


setToolbarMenu

public final void setToolbarMenu(boolean flag)
Set this subtask's menu to be displayed on the console's toolbar


setTaskIconMenu

public final void setTaskIconMenu(boolean flag)
Set this subtask's menu to be displayed on the task icon's context menu.


setTaskPaneMenu

public final void setTaskPaneMenu(boolean flag)
Set this subtask's menu to be displayed on the task pane's context menu.


setObjectIconMenu

public final void setObjectIconMenu(boolean flag)
Set this subtask's menu to be displayed on an object's context menu.


setObjectPaneMenu

public final void setObjectPaneMenu(boolean flag)
Set this subtask's menu to be displayed on the object pane's context menu.


setFilterIconMenu

public final void setFilterIconMenu(boolean flag)
Set this subtask's menu to be displayed on a filter's context menu.


setFilterPaneMenu

public final void setFilterPaneMenu(boolean flag)
Set this subtask's menu to be displayed on the filter pane's context menu.


setGroupCategoryIconMenu

public final void setGroupCategoryIconMenu(boolean flag)
Set this subtask's menu to be displayed on a group category's context menu.


setTaskCategoryIconMenu

public final void setTaskCategoryIconMenu(boolean flag)
Set this subtask's menu to be displayed on a task category's context menu.


isSingleTargeted

public final boolean isSingleTargeted()
Determine if this subtask is single targeted.

Returns:
true if this subtask is a single targeted subtask

isMultiTargeted

public final boolean isMultiTargeted()
Determine if this subtask is multi-targeted.

Returns:
true if this subtask is a multi-targeted subtask

isTargeted

public final boolean isTargeted()
Determine if this subtask is single or multi-targeted.

Returns:
true if this subtask is single or multi-targeted

isInteractive

public final boolean isInteractive()
Determine if this subtask is interactive.

Returns:
true if this subtask is interactive

hasServer

public final boolean hasServer()
Determine if this subtask has a server portion.

Returns:
true if this subtask has a server portion

isScheduled

public final boolean isScheduled()
Determine if this subtask is supposed to be activated via the scheduler.

Returns:
true if this subtask should be activated via the scheduler

isNewCategoryTask

public final boolean isNewCategoryTask()
Determine if this subtask is the request for a new category

Returns:
true if this subtask is the new category request subtask

isCheckClients

public final boolean isCheckClients()
Determine if this subtask wants the clients checked for tasks.

Returns:
true if this subtask wants the clients checked for tasks

isStartClients

public final boolean isStartClients()
Determine if this subtask wants the client tasks automatically started.

Returns:
true if this subtask wants the client tasks automatically started

isClientRequired

public final boolean isClientRequired()
Determin if this subtask requires a client service in order to bind the task to a managed object

Returns:
true if a client service is required

isDoubleClick

public final boolean isDoubleClick()
Determine if this subtask is the double click action for this task.

Returns:
true if this subtask is the default action for double click on this task

isToolbar

public final boolean isToolbar()
Determine if this subtask is the toolbar action for this task.

Returns:
true if this subtask is the default action for this task on a toolbar

getToolbarWeight

public final int getToolbarWeight()
Get the sorting weight factor for the toolbar icon.

Returns:
an integer

isDragDrop

public final boolean isDragDrop()
Determine if this subtask is the drag/drop (multi or single) action for this task.

Returns:
true if this subtask is the default action for any drag/drop with this task

isDragDropSingle

public final boolean isDragDropSingle()
Determine if this subtask is the single-target drag/drop action for this task.

Returns:
true if this subtask is the default action for multiple drag/drop with this task

isDragDropMulti

public final boolean isDragDropMulti()
Determine if this subtask is the multi-target drag/drop action for this task.

Returns:
true if this subtask is the default action for multiple drag/drop with this task

isMainMenu

public final boolean isMainMenu()
Determine if this subtask's menu should be displayed on the console's main menu.

Returns:
a boolean

isToolbarMenu

public final boolean isToolbarMenu()
Determine if this subtask's menu to should displayed on the console's toolbar

Returns:
a boolean

isTaskIconMenu

public final boolean isTaskIconMenu()
Determine if this subtask's menu should be displayed on the task icon's context menu.

Returns:
a boolean

isTaskPaneMenu

public final boolean isTaskPaneMenu()
Determine if this subtask's menu to should displayed on the task pane's context menu.

Returns:
a boolean

isObjectIconMenu

public final boolean isObjectIconMenu()
Determine if this subtask's menu should be displayed on an object's context menu.

Returns:
a boolean

isObjectPaneMenu

public final boolean isObjectPaneMenu()
Determine if this subtask's menu should be displayed on the object pane's context menu.

Returns:
a boolean

isFilterIconMenu

public final boolean isFilterIconMenu()
Determine if this subtask's menu should be displayed on a filter's context menu.

Returns:
a boolean

isFilterPaneMenu

public final boolean isFilterPaneMenu()
Determine if this subtask's menu should be be displayed on the filter pane's context menu.

Returns:
a boolean

isGroupCategoryIconMenu

public final boolean isGroupCategoryIconMenu()
Determine if this subtask's menu should be displayed on a group category's context menu.

Returns:
a boolean

isTaskCategoryIconMenu

public final boolean isTaskCategoryIconMenu()
Determine if this subtask's menu should be displayed on a task category's context menu.

Returns:
a boolean

setPrivileges

public void setPrivileges(java.lang.String[] privNames,
                          boolean reset)
Set the list of privilege token names required to be able to use this subtask.

Parameters:
reset - true if existing list should be reset before adding false if new list should simple be added to existing list

getPrivileges

public final java.lang.String[] getPrivileges()
Get the list of privilege token names required to be able to use this subtask.

Returns:
String[] array of privilege token names, can be 0 length

checkPrivileges

public boolean checkPrivileges(StringValueSet checkSet)
Check to see if the specified set of privileges is adequate for using this TWGTask.

Returns:
true if the privilege set is adequate for using this task false if the privilege set does not contain all the privilege tokens required for using this subtask.

getName

public final java.lang.String getName()
Get the name of this subtask. Used by the console when dealing with this subtask (launching/confirming).

Returns:
the String that represents this subtask's name

isManagedObjectSupported

public final boolean isManagedObjectSupported(TWGConManagedObject cmo)
Determine if the specified managed object can be a target for this subtask. This version is intended to be called from the console since it accepts a TWGConManagedObject and assumes that the task this subtask is pointing to is a TWGConTask.

Parameters:
cmo - the TWGConManagedObject to check against this subtask
Returns:
boolean

isManagedObjectSupported

public final boolean isManagedObjectSupported(TWGManagedObject mo)
Determine if the specified managed object can be a target for this subtask. This version is intended to be called from the engine since it accepts a TWGManagedObject and assumes that the task this subtask is pointing to is a TWGTask.

Returns:
boolean