com.tivoli.twg.engine
Class TWGConTask

java.lang.Object
  extended bycom.tivoli.twg.engine.TWGConObject
      extended bycom.tivoli.twg.engine.TWGConTask

public class TWGConTask
extends TWGConObject

Console object used to shadow the state of a TWGTask object in the Director server.


Field Summary
 
Fields inherited from class com.tivoli.twg.engine.TWGConObject
INVALID_OBJECT_ID
 
Constructor Summary
TWGConTask(long obj_id)
          Constructor for TWGConTask with given object ID
 
Method Summary
static java.util.Enumeration AllConTasks()
           
 boolean checkPrivileges(StringValueSet checkSet)
          Check to see if the specified set of privileges is adequate for using this TWGTask.
 void Delete()
          Destructor for TWGConTask: remove task from hash table
 java.util.Enumeration getAllSubtasks()
           
 int getClientTaskCount(TWGConManagedObject cmo)
          Get the number of client tasks that would be started for a specific TWGConManagedObject based on its MOF.
 TWGSubtask getDoubleClickSubtask()
          Get the TWGSubtask object for this TWGConTask's double click action.
 java.util.Vector getDragDropMultiSubtasks()
          Get a vector of TWGSubtask objects for this TWGConTask's multi drag drop action.
 java.util.Vector getDragDropSubtasks()
          Get a vector of TWGSubtask objects for this TWGConTask's drag drop action.
 java.util.Vector getFilterIconSubtasks()
          Get a vector of all TWGSubtask objects for filter icons' context menus.
static java.util.Vector getFilterPaneSubtasks()
          Get a vector of all TWGSubtask objects for filter pane's context menu.
 java.util.Vector getGroupCategoryIconSubtasks()
          Get a vector of all TWGSubtask objects for group category icons' context menus.
 java.lang.String getGuiClass()
          Get the name of the GUI class for this TWGConTask.
 java.lang.String getGuiParms()
          Get the parmameters to be passed to the GUI class for this TWGConTask.
 java.lang.String getHelpTopicsMapping()
          Get the help topics mapping file name.
 java.lang.String getID()
          Get the task ID for this TWGConTask.
 javax.swing.ImageIcon getImage(int index)
          Get one of the icons for this TWGConTask.
 javax.swing.ImageIcon getImage(int index, boolean enabled)
          Get one of the icons for this TWGConTask.
 int getImageCount()
          Get the number of images in this TWGConTask's image set.
 java.lang.String getImageName(int index)
          Get the name of one of the icons for this TWGConTask.
static java.util.Vector getMainMenuSubtasks()
          Get a vector of all TWGSubtask objects for the console's main menu.
 java.lang.String getName()
          Get the name of this object to use as it's icon label.
 java.util.Vector getObjectIconSubtasks()
          Get a vector of TWGSubtask objects for this TWGConTask when an object specifies it as one of its tasks.
static java.util.Vector getObjectPaneSubtasks()
          Get a vector of all TWGSubtask objects for object pane's context menu.
 TWGConTask getParent()
          Get the parent task for this TWGConTask.
 java.lang.String[] getPrivileges()
          Get the list of privilege token names required to be able to use this subtask.
 TWGSubtask getSubtask(java.lang.String ID)
          Get a TWGSubtask object for one of this TWGConTask's subtasks.
 int getSubtaskCount()
          Get the number of subtasks defined for this TWGConTask.
static TWGConTask getTask(java.lang.String taskID)
          Get a TWGConTask based on its task ID.
 java.util.Vector getTaskCategoryIconSubtasks()
          Get a vector of all TWGSubtask objects for task category icons' context menus.
 byte[] getTaskData()
          Get the data for this task.
 java.util.Vector getTaskIconSubtasks()
          Get a vector of TWGSubtask objects for this TWGConTask's task icon context menu.
static java.util.Vector getTaskPaneSubtasks()
          Get a vector of all TWGSubtask objects for task pane's context menu.
 TWGSubtask getToolbarSubtask()
          Get the TWGSubtask object for this TWGConTask's toolbar action.
static java.util.Vector getToolbarSubtasks()
          Get a vector of all TWGSubtask objects for the console's toolbar.
 boolean hasClientRequiredSubtask()
          Determine if this task has any subtasks that are flagged as requiring a client (i.e.
 boolean isDisabled()
          Test to see if task is disabled
 boolean isDisabledSubtask(java.lang.String subid)
          Test to see if subtask is disabled
 boolean isHidden()
          Test to see if task should be hidden
 boolean isToolbar()
          Determine if this task should be shown as an icon on the toolbar.
 boolean isUnrestricted()
          Determine if this task is unrestricted to users.
 boolean showTaskIcon()
          Determine if this task should be shown as an icon in the task pane.
 java.lang.String toString()
          Obtain a string representation of this TWGConTask.
 void UpdateUsingShadowRecord(byte[] rec, int rec_off, int rec_len)
          Update object using shadow record created by the the engine object which is matched with this class.
 
Methods inherited from class com.tivoli.twg.engine.TWGConObject
AllObjects, AllObjects, DeleteObjects, DeregisterListener, FindObject, getBaseClassName, LookUpShadowClass, ObjectID, ProcessUpdateRequest, RegisterListener, SetObjectID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TWGConTask

public TWGConTask(long obj_id)
           throws DuplicateObjectIDException
Constructor for TWGConTask with given object ID

Parameters:
obj_id - - object ID of console object
Throws:
DuplicateObjectIDException - if ID is duplicate of existing object ID
Method Detail

UpdateUsingShadowRecord

public void UpdateUsingShadowRecord(byte[] rec,
                                    int rec_off,
                                    int rec_len)
                             throws TWGConObjectUpdateException
Update object using shadow record created by the the engine object which is matched with this class.

Specified by:
UpdateUsingShadowRecord in class TWGConObject
Parameters:
rec - - byte array containing opaque representation of shadowed attributes
rec_off - - offset of start of shadow record in byte array
rec_len - - length of shadow record within byte array
Throws:
TWGConObjectUpdateException - if error during update

Delete

public void Delete()
Destructor for TWGConTask: remove task from hash table

Overrides:
Delete in class TWGConObject

getTask

public static TWGConTask getTask(java.lang.String taskID)
Get a TWGConTask based on its task ID.

Parameters:
taskID - string containing the ID of the task to retrieve.
Returns:
the TWGConTask object with the specified task ID, or null if one does not exist.

toString

public java.lang.String toString()
Obtain a string representation of this TWGConTask.

Overrides:
toString in class TWGConObject
Returns:
A string representation of this TWGConTask.

getID

public final java.lang.String getID()
Get the task ID for this TWGConTask.

Returns:
the task ID string.

getParent

public TWGConTask getParent()
Get the parent task for this TWGConTask.

Returns:
the TWGConTask that is the parent or null if it is not set.

getName

public final java.lang.String getName()
Get the name of this object to use as it's icon label.

Returns:
the string name

showTaskIcon

public final boolean showTaskIcon()
Determine if this task should be shown as an icon in the task pane. If it's title is an empty string, then it will not be shown.

Returns:
a boolean

isToolbar

public final boolean isToolbar()
Determine if this task should be shown as an icon on the toolbar.

Returns:
a boolean

getGuiClass

public java.lang.String getGuiClass()
Get the name of the GUI class for this TWGConTask.

Returns:
the string containing the name of the GUI class, or null if this task is non-interactive.

getGuiParms

public java.lang.String getGuiParms()
Get the parmameters to be passed to the GUI class for this TWGConTask.

Returns:
the parameter string for the GUI

getHelpTopicsMapping

public final java.lang.String getHelpTopicsMapping()
Get the help topics mapping file name.


getImageCount

public int getImageCount()
Get the number of images in this TWGConTask's image set.

Returns:
the number of images for this TWGConTask.

getImageName

public java.lang.String getImageName(int index)
Get the name of one of the icons for this TWGConTask. Use the constants defined in TWGTaskConstants as values for the index.

Parameters:
index - the index of the image name to return
Returns:
a string containing an image name, or null if there is no index for the specified index.

getImage

public javax.swing.ImageIcon getImage(int index,
                                      boolean enabled)
Get one of the icons for this TWGConTask. Use the constants defined in TWGTaskConstants as values for the index.

Parameters:
index - the index of the image to return
enabled - - True if task image is rendered enabled, false if task image is rendered disabled (opaque).
Returns:
an ImageIcon object

getImage

public javax.swing.ImageIcon getImage(int index)
Get one of the icons for this TWGConTask. Use the constants defined in TWGTaskConstants as values for the index.

Parameters:
index - the index of the image to return
Returns:
an ImageIcon object

getSubtaskCount

public int getSubtaskCount()
Get the number of subtasks defined for this TWGConTask.

Returns:
the number of subtasks defined for this TWGConTask

getSubtask

public TWGSubtask getSubtask(java.lang.String ID)
Get a TWGSubtask object for one of this TWGConTask's subtasks.

Parameters:
ID - the String ID of the subtask
Returns:
a TWGSubtask object or null if not found.
See Also:
TWGSubtask

getDoubleClickSubtask

public TWGSubtask getDoubleClickSubtask()
Get the TWGSubtask object for this TWGConTask's double click action.

Returns:
a TWGSubtask object or null if no double click subtask is defined.

getToolbarSubtask

public TWGSubtask getToolbarSubtask()
Get the TWGSubtask object for this TWGConTask's toolbar action.

Returns:
a TWGSubtask object or null if no toolbar subtask is defined.

getDragDropSubtasks

public java.util.Vector getDragDropSubtasks()
Get a vector of TWGSubtask objects for this TWGConTask's drag drop action.

Returns:
a Vector of TWGSubtask objects (the vector will be empty if none are defined for this action.

getDragDropMultiSubtasks

public java.util.Vector getDragDropMultiSubtasks()
Get a vector of TWGSubtask objects for this TWGConTask's multi drag drop action.

Returns:
a Vector of TWGSubtask objects (the vector will be empty if none are defined for this action.

getTaskIconSubtasks

public java.util.Vector getTaskIconSubtasks()
Get a vector of TWGSubtask objects for this TWGConTask's task icon context menu.

Returns:
a Vector of TWGSubtask objects (the vector will be empty if none are defined for this action.

getObjectIconSubtasks

public java.util.Vector getObjectIconSubtasks()
Get a vector of TWGSubtask objects for this TWGConTask when an object specifies it as one of its tasks.

Returns:
a Vector of TWGSubtask objects (the vector will be empty if none are defined for this action.

getMainMenuSubtasks

public static java.util.Vector getMainMenuSubtasks()
Get a vector of all TWGSubtask objects for the console's main menu.

Returns:
a Vector of TWGSubtask objects (the vector will be empty if none are defined for this action.

getToolbarSubtasks

public static java.util.Vector getToolbarSubtasks()
Get a vector of all TWGSubtask objects for the console's toolbar.

Returns:
a Vector of TWGSubtask objects (the vector will be empty if none are defined for this action.

getTaskPaneSubtasks

public static java.util.Vector getTaskPaneSubtasks()
Get a vector of all TWGSubtask objects for task pane's context menu.

Returns:
a Vector of TWGSubtask objects (the vector will be empty if none are defined for this action.

getObjectPaneSubtasks

public static java.util.Vector getObjectPaneSubtasks()
Get a vector of all TWGSubtask objects for object pane's context menu.

Returns:
a Vector of TWGSubtask objects (the vector will be empty if none are defined for this action.

getFilterIconSubtasks

public java.util.Vector getFilterIconSubtasks()
Get a vector of all TWGSubtask objects for filter icons' context menus.

Returns:
a Vector of TWGSubtask objects (the vector will be empty if none are defined for this action.

getFilterPaneSubtasks

public static java.util.Vector getFilterPaneSubtasks()
Get a vector of all TWGSubtask objects for filter pane's context menu.

Returns:
a Vector of TWGSubtask objects (the vector will be empty if none are defined for this action.

getGroupCategoryIconSubtasks

public java.util.Vector getGroupCategoryIconSubtasks()
Get a vector of all TWGSubtask objects for group category icons' context menus.

Returns:
a Vector of TWGSubtask objects (the vector will be empty if none are defined for this action.

getTaskCategoryIconSubtasks

public java.util.Vector getTaskCategoryIconSubtasks()
Get a vector of all TWGSubtask objects for task category icons' context menus.

Returns:
a Vector of TWGSubtask objects (the vector will be empty if none are defined for this action.

getTaskData

public final byte[] getTaskData()
Get 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.

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

AllConTasks

public static java.util.Enumeration AllConTasks()

getAllSubtasks

public java.util.Enumeration getAllSubtasks()

isUnrestricted

public boolean isUnrestricted()
Determine if this task is unrestricted to users.

Returns:
true for unrestricted, false can be restricted based on user's access rights.

isDisabled

public final boolean isDisabled()
Test to see if task is disabled


isHidden

public final boolean isHidden()
Test to see if task should be hidden


isDisabledSubtask

public final boolean isDisabledSubtask(java.lang.String subid)
Test to see if subtask is disabled

Parameters:
subid - - subtask ID

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.

getClientTaskCount

public int getClientTaskCount(TWGConManagedObject cmo)
Get the number of client tasks that would be started for a specific TWGConManagedObject based on its MOF.

Parameters:
cmo - the TWGConManagedObject to report
Returns:
the number of client tasks that would be started during task activation

hasClientRequiredSubtask

public boolean hasClientRequiredSubtask()
Determine if this task has any subtasks that are flagged as requiring a client (i.e. subtask.isClientRequired() returns true)

Returns:
true if any of the subtasks would return true for isClientRequired() false if none of them will