Micro Focus Content Manager SDK 10.1
TRIM.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 TRIM.SDK.CommandDef:
TRIM.SDK.MenuItem TRIM.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 TRIM.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 TRIM.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 TRIM.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 TRIM.SDK.MenuItem
enum class  MenuItemTypes { MenuItemCommand , MenuItemPopup , MenuItemCustomPopup , 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

◆ CommandDef()

TRIM.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

◆ GetAllCommands()

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

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

◆ GetMenuEntryString()

string TRIM.SDK.CommandDef.GetMenuEntryString ( BaseObjectTypes  forObjectType)

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

◆ GetStatusBarMessage()

string TRIM.SDK.CommandDef.GetStatusBarMessage ( BaseObjectTypes  forObjectType)

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

◆ GetTooltip()

string TRIM.SDK.CommandDef.GetTooltip ( BaseObjectTypes  forObjectType)

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

◆ IsAvailable()

bool TRIM.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.

◆ IsAvailableTagged()

bool TRIM.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.

◆ IsEnabled() [1/6]

bool TRIM.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.

◆ IsEnabled() [2/6]

bool TRIM.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.

◆ IsEnabled() [3/6]

bool TRIM.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.

◆ IsEnabled() [4/6]

bool TRIM.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.

◆ IsEnabled() [5/6]

bool TRIM.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.

◆ IsEnabled() [6/6]

bool TRIM.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.

Property Documentation

◆ CommandId

CommandIds TRIM.SDK.CommandDef.CommandId
get

Gets the commandId enum value for this CommandDef object

◆ Icon

override Icons TRIM.SDK.CommandDef.Icon
get

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

◆ IsListCommand

bool TRIM.SDK.CommandDef.IsListCommand
get

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

◆ IsNavigationCommand

bool TRIM.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

◆ MenuItemType

override MenuItem.MenuItemTypes TRIM.SDK.CommandDef.MenuItemType
get

◆ NeedsAnObject

bool TRIM.SDK.CommandDef.NeedsAnObject
get

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

◆ RefreshStyle

CommandRefreshTypes TRIM.SDK.CommandDef.RefreshStyle
get

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