Micro Focus Content Manager SDK 9.4
HP.HPTRIM.SDK.CommandDef Class Reference

CommandDef : This class encapsulates a command that can be executed against a TRIM base objects. It can be used to determine if a command is enabled for an object, and there are also some localised command string and icons that can be useful. More...

Inheritance diagram for HP.HPTRIM.SDK.CommandDef:
HP.HPTRIM.SDK.MenuItem HP.HPTRIM.SDK.TrimSDKObject

Public Member Functions

 CommandDef (CommandIds commandId, Database forDatabase)
 Construct a new CommandDef object based on the TRIM::taskIds enumeration, specifying a TRIM database that can be used for any custom captioning More...
 
bool IsAvailableTagged (BaseObjectTypes forObjectType)
 Indicates whether the currently logged in user has permission to execute this command against an object of the specified type. If the function returns false, the ErrorMessage property will contain an informational message indicating why the task is unavailable. More...
 
bool IsAvailable (BaseObjectTypes forObjectType)
 Indicates whether the currently logged in user has permission to execute this command against an object of the specified type. If the function returns false, the ErrorMessage property will contain an informational message indicating why the task is unavailable. More...
 
bool IsEnabled (TrimMainObject currentObjectContext)
 Indicates whether the command execution is enabled for the specified object. If the function returns false, the ErrorMessage property will contain an informational message indicating why the task is unavailable. More...
 
bool IsEnabled (BaseObjectTypes forListsOfObjectType)
 Indicates whether the command execution is enabled when no specified object, but you are working with a list of the specified object types. Typically this will return false unless the NeedsAnObject property is false. If the function returns false, the ErrorMessage property will contain an informational message indicating why the task is unavailable. More...
 
bool IsEnabled (TrimMainObjectSearch forList, TrimMainObject withObjectSelected)
 Indicates whether the command execution is enabled when processing a list with the specified objected selected. You can specify a null value for withObjectSelected if no item has been selected. More...
 
bool IsEnabled (TrimChildObject currentObjectContext)
 Indicates whether the command execution is enabled for the specified child object. If the function returns false, the ErrorMessage property will contain an informational message indicating why the task is unavailable. More...
 
bool IsEnabled (TrimChildObjectList currentObjectListContext)
 Indicates whether the command execution is enabled for a child list, when no specified child object is selected. Typically this will return false unless the NeedsAnObject property is false. If the function returns false, the ErrorMessage property will contain an informational message indicating why the task is unavailable. More...
 
bool IsEnabled (TrimChildObjectList currentObjectListContext, TrimChildObject currentSelectedChild)
 Indicates whether the command execution is enabled for a child list, with the specified child object selected (can be NULL) If the function returns false, the ErrorMessage property will contain an informational message indicating why the task is unavailable. More...
 
string GetMenuEntryString (BaseObjectTypes forObjectType)
 Gets a menu string used when applying the command to the specified object type More...
 
string GetTooltip (BaseObjectTypes forObjectType)
 Gets a tooltip string when applying the command to the specified object type More...
 
string GetStatusBarMessage (BaseObjectTypes forObjectType)
 Gets a status bar message string when applying the command to the specified object type More...
 
- Public Member Functions inherited from HP.HPTRIM.SDK.TrimSDKObject
 TrimSDKObject ()
 

Static Public Member Functions

static CommandDefList GetAllCommands (BaseObjectTypes forObjectType, Database forDatabase)
 Constructs an array of all command definitions for the nominated object type. More...
 

Properties

override MenuItem.MenuItemTypes MenuItemType [get]
 
CommandIds CommandId [get]
 Gets the commandId enum value for this CommandDef object More...
 
override Icons Icon [get]
 Gets the identifier of the TRIM icon associated with this command. More...
 
bool NeedsAnObject [get]
 Gets a boolean value indicating whether this command must have an object for it to be executed. More...
 
bool IsNavigationCommand [get]
 Indicates if this command is a navigation command, which basically means a new set of items will be generated as a result More...
 
bool IsListCommand [get]
 Gets a boolean value indicating whether this command that is executed by a list More...
 
CommandRefreshTypes RefreshStyle [get]
 Gets a crtCommandRefreshTypes enum value indicating the type of UI refresh that may be required after the command has executed More...
 
- Properties inherited from HP.HPTRIM.SDK.MenuItem
virtual MenuItem.MenuItemTypes MenuItemType [get]
 
virtual Icons Icon [get]
 Gets the identifier of the TRIM icon associated with this command. More...
 
- Properties inherited from HP.HPTRIM.SDK.TrimSDKObject
string ErrorMessage [get]
 All TRIM SDK objects have an ErrorMessage property which can be used to examine any error that may have occurred in the most recent method call. More...
 
TrimException Error [get]
 All TRIM SDK objects have an Error property which can be used to examine any error that may have occurred in the most recent method call. More...
 

Additional Inherited Members

- Public Types inherited from HP.HPTRIM.SDK.MenuItem
enum  MenuItemTypes { MenuItemTypes.MenuItemCommand, MenuItemTypes.MenuItemPopup, MenuItemTypes.MenuItemCustomPopup, MenuItemTypes.MenuItemSeparator }
 

Detailed Description

CommandDef : This class encapsulates a command that can be executed against a TRIM base objects. It can be used to determine if a command is enabled for an object, and there are also some localised command string and icons that can be useful.

Constructor & Destructor Documentation

HP.HPTRIM.SDK.CommandDef.CommandDef ( CommandIds  commandId,
Database  forDatabase 
)

Construct a new CommandDef object based on the TRIM::taskIds enumeration, specifying a TRIM database that can be used for any custom captioning

Member Function Documentation

static CommandDefList HP.HPTRIM.SDK.CommandDef.GetAllCommands ( BaseObjectTypes  forObjectType,
Database  forDatabase 
)
static

Constructs an array of all command definitions for the nominated object type.

string HP.HPTRIM.SDK.CommandDef.GetMenuEntryString ( BaseObjectTypes  forObjectType)

Gets a menu string used when applying the command to the specified object type

string HP.HPTRIM.SDK.CommandDef.GetStatusBarMessage ( BaseObjectTypes  forObjectType)

Gets a status bar message string when applying the command to the specified object type

string HP.HPTRIM.SDK.CommandDef.GetTooltip ( BaseObjectTypes  forObjectType)

Gets a tooltip string when applying the command to the specified object type

bool HP.HPTRIM.SDK.CommandDef.IsAvailable ( BaseObjectTypes  forObjectType)

Indicates whether the currently logged in user has permission to execute this command against an object of the specified type. If the function returns false, the ErrorMessage property will contain an informational message indicating why the task is unavailable.

bool HP.HPTRIM.SDK.CommandDef.IsAvailableTagged ( BaseObjectTypes  forObjectType)

Indicates whether the currently logged in user has permission to execute this command against an object of the specified type. If the function returns false, the ErrorMessage property will contain an informational message indicating why the task is unavailable.

bool HP.HPTRIM.SDK.CommandDef.IsEnabled ( TrimMainObject  currentObjectContext)

Indicates whether the command execution is enabled for the specified object. If the function returns false, the ErrorMessage property will contain an informational message indicating why the task is unavailable.

bool HP.HPTRIM.SDK.CommandDef.IsEnabled ( BaseObjectTypes  forListsOfObjectType)

Indicates whether the command execution is enabled when no specified object, but you are working with a list of the specified object types. Typically this will return false unless the NeedsAnObject property is false. If the function returns false, the ErrorMessage property will contain an informational message indicating why the task is unavailable.

bool HP.HPTRIM.SDK.CommandDef.IsEnabled ( TrimMainObjectSearch  forList,
TrimMainObject  withObjectSelected 
)

Indicates whether the command execution is enabled when processing a list with the specified objected selected. You can specify a null value for withObjectSelected if no item has been selected.

bool HP.HPTRIM.SDK.CommandDef.IsEnabled ( TrimChildObject  currentObjectContext)

Indicates whether the command execution is enabled for the specified child object. If the function returns false, the ErrorMessage property will contain an informational message indicating why the task is unavailable.

bool HP.HPTRIM.SDK.CommandDef.IsEnabled ( TrimChildObjectList  currentObjectListContext)

Indicates whether the command execution is enabled for a child list, when no specified child object is selected. Typically this will return false unless the NeedsAnObject property is false. If the function returns false, the ErrorMessage property will contain an informational message indicating why the task is unavailable.

bool HP.HPTRIM.SDK.CommandDef.IsEnabled ( TrimChildObjectList  currentObjectListContext,
TrimChildObject  currentSelectedChild 
)

Indicates whether the command execution is enabled for a child list, with the specified child object selected (can be NULL) If the function returns false, the ErrorMessage property will contain an informational message indicating why the task is unavailable.

Property Documentation

CommandIds HP.HPTRIM.SDK.CommandDef.CommandId
get

Gets the commandId enum value for this CommandDef object

override Icons HP.HPTRIM.SDK.CommandDef.Icon
get

Gets the identifier of the TRIM icon associated with this command.

bool HP.HPTRIM.SDK.CommandDef.IsListCommand
get

Gets a boolean value indicating whether this command that is executed by a list

bool HP.HPTRIM.SDK.CommandDef.IsNavigationCommand
get

Indicates if this command is a navigation command, which basically means a new set of items will be generated as a result

override MenuItem.MenuItemTypes HP.HPTRIM.SDK.CommandDef.MenuItemType
get
bool HP.HPTRIM.SDK.CommandDef.NeedsAnObject
get

Gets a boolean value indicating whether this command must have an object for it to be executed.

CommandRefreshTypes HP.HPTRIM.SDK.CommandDef.RefreshStyle
get

Gets a crtCommandRefreshTypes enum value indicating the type of UI refresh that may be required after the command has executed