Class icm.action.Action
Extends
ecm.model.Action.
Provides the base class for IBM Case Manager actions.
Defined in: <icm/action/Action.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
Field Summary
Field Attributes | Field Name and Description |
---|---|
The properties that are configured for the action.
|
|
The menu where the action is configured.
|
|
The resource bundle that contains the action strings that are globalized
for solution in which the action is being used.
|
|
The title of the action.
|
|
The page widget where the action is configured.
|
Method Summary
Method Attributes | Method Name and Description |
---|---|
broadcastEvent(eventName, payload)
Method to send out broadcast event
|
|
canPerformAction(repository, itemList, listType, teamspace, resultSet)
Returns true if the action can be performed with the specified repository and items.
|
|
cleanActionContext(ctx)
Cleans the array object of the context type.
|
|
<static> |
icm.action.Action.create(menu, args)
Creates an instance of this action.
|
execute()
Executes the action.
|
|
getActionContext(ctx)
Returns an array object of the context type.
|
|
getArgument(arg)
Returns the value of a specified property for this action.
|
|
Returns the values of all properties for this action.
|
|
Returns a callback function.
|
|
Returns the page widget from which the action is running.
|
|
init()
Initializes the parameters or configurations as required for this action.
|
|
isCM8()
return true if solution is integrated with CM8 content server.
|
|
isEnabled(repository, listType, items, teamspace, resultSet)
Returns true if this action is enabled for the specified repository, list type, and items.
|
|
isGlobalEnabled(resultSet, items)
Returns a boolean value indicating whether this action is enabled at the global scope
|
|
isVisible(repository, items)
Returns true if this action should be visible for the specified repository and items.
|
|
<static> |
icm.action.Action.perform(menuOrWidget, actionId, actionContext, callback)
Performs the specified action.
|
performAction(repository, itemList, callback, teamspace, resultSet, parameterMap)
Performs the action on the given repository and selected items.
|
|
This optional method is called after the execute method.
|
|
Optional method will be called before the execute method inside of the performAction method.
|
|
publishEvent(eventName, payload)
Publishes the specified event.
|
|
Refreshes the status of the actions that are configured for the specific page widget or target component.
|
|
setActionContext(ctx, obj)
Seta the array object of the context type.
|
|
setEnabled(enabled)
Enables or disables all instances of this action or the instances of this action for a
specific widget or specific target component.
|
|
setVisible(visible)
Shows or hides either all instances of this action or the instances of this action for a
specific widget or specific target component.
|
|
showConfirmationDialog(InstructMessage, ConfirmationMessag, errors, next, skip)
Displays a confirmation dialog box.
|
|
showErrDialog(message_topic, errors)
Displays an error dialog box.
|
Field Detail
arguments
The properties that are configured for the action.
menu
The menu where the action is configured.
resourceBundle
The resource bundle that contains the action strings that are globalized
for solution in which the action is being used.
title
The title of the action.
widget
The page widget where the action is configured.
Method Detail
broadcastEvent(eventName, payload)
Method to send out broadcast event
- Parameters:
- {string} eventName
- event name
- {object} payload
- payload for the event
canPerformAction(repository, itemList, listType, teamspace, resultSet)
Returns true if the action can be performed with the specified repository and items.
- Parameters:
- repository
- An ecm.model.Repository object.
- itemList
- An array of ecm.model.Item objects or derivations of Item object.
- listType
- A string that indicates the type of objects in the items list.
- teamspace
- An ecm.model.Teamspace object. This parameter can be null.
- resultSet
- An ecm.model.ResultSet object. This parameter can be null.
cleanActionContext(ctx)
Cleans the array object of the context type.
- Parameters:
- {array} ctx
- The context type.
<static> icm.action.Action.create(menu, args)
Creates an instance of this action.
- Parameters:
- menu
- The object that represents the menu or page widget for which the action instance is being created. If an object cannot be passed in this parameter, the identifier of the page widget can be used.
- args
- the parameter to specify which action to be created. The args.runtimeClass parameter provides the name of action class that is to be created. The other properties in the args parameter are used as constructor parameters for the action.
- Returns:
- instance of the action to be created.
execute()
Executes the action. This method is called after the preExecute method inside
of the performAction method.
getActionContext(ctx)
Returns an array object of the context type.
- Parameters:
- {string} ctx
- The context type.
- Returns:
- The array object of the context type.
getArgument(arg)
Returns the value of a specified property for this action.
- Parameters:
- {string} arg
- property name
getArguments()
Returns the values of all properties for this action.
getCallback()
Returns a callback function.
The callback function is called after the action is executed.
- Returns:
- The callback function
getWidget()
Returns the page widget from which the action is running.
- Returns:
- The page widget
init()
Initializes the parameters or configurations as required for this action.
isCM8()
return true if solution is integrated with CM8 content server.
isEnabled(repository, listType, items, teamspace, resultSet)
Returns true if this action is enabled for the specified repository, list type, and items.
- Parameters:
- repository
- An ecm.model.Repository object.
- listType
- A string that indicates the type of object in the items list.
- items
- An array of ecm.model.Item objects or derivations of Item object.
- teamspace
- An ecm.model.Teamspace object (can be null).
- resultSet
- An ecm.model.ResultSet object (can be null)
isGlobalEnabled(resultSet, items)
Returns a boolean value indicating whether this action is enabled at the global scope
- Parameters:
- resultSet
- A ecm.moidel.ResultSet object
- items
- A array of ecm.model.Item objects or derivations if Item object
isVisible(repository, items)
Returns true if this action should be visible for the specified repository and items.
- Parameters:
- repository
- An ecm.model.Repository object.
- items
- An array of ecm.model.Item objects or derivations of Item object.
<static> icm.action.Action.perform(menuOrWidget, actionId, actionContext, callback)
Performs the specified action.
- Parameters:
- menuOrWidget
- An object that represents the menu or page widget where the action is being performed. If an object cannot be passed in this parameter, the identifier of the page widget can be used.
- actionId
- The identifier of the action definition.
- actionContext
- The context in which the action is to be performed. This parameter is used when the menuOrWidget parameter is passed with a widget object or widget ID,.
- callback
- A callback function that is to be run after the action is performed.
performAction(repository, itemList, callback, teamspace, resultSet, parameterMap)
Performs the action on the given repository and selected items.
Note: By default, it calls the following methods in sequence:
- preExecute
- execute
- postExecute
- Parameters:
- repository
- A ecm.model.Repository object
- itemList
- An array of ecm.model.Item objects or derivations of Item object
- callback
- A callback function to be called after the action has been performed
- teamspace
- A ecm.model.Teamspace object. This parameter can be null.
- resultSet
- A ecm.model.ResultSet object. This parameter can be null.
- parameterMap
- An array of extra parameters to be passed to the action. This parameter can be null.
postExecute()
This optional method is called after the execute method.
preExecute()
Optional method will be called before the execute method inside of the performAction method.
publishEvent(eventName, payload)
Publishes the specified event.
- Parameters:
- {string} eventName
- The name of the event that is to be published.
- {object} payload
- The payload of the event that is to be published.
refreshMenus()
Refreshes the status of the actions that are configured for the specific page widget or target component.
setActionContext(ctx, obj)
Seta the array object of the context type.
- Parameters:
- {array} ctx
- The context type.
- {object} obj
- The context object that is to be set.
setEnabled(enabled)
Enables or disables all instances of this action or the instances of this action for a
specific widget or specific target component.
- Parameters:
- enabled
- A flag that is set to true to enable the action or to false to disable the action.
setVisible(visible)
Shows or hides either all instances of this action or the instances of this action for a
specific widget or specific target component.
- Parameters:
- visible
- A flag that is set to true to show the action or to false to hide the action.
showConfirmationDialog(InstructMessage, ConfirmationMessag, errors, next, skip)
Displays a confirmation dialog box.
- Parameters:
- {string} InstructMessage
- An instruction message that is displayed as the last line in the confirmation dialog box.
- {string} ConfirmationMessag
- The confirmation message that is displayed as the first line in the confirmation dialog box.
- {array} errors
- The error message that is displayed as the middle lines in the confirmation dialog box.
A sample payload is: [[false, {message: "show the message"}]] - {function} next
- The function that is to be called if the user clicks the Discard button.
- {function} skip
- The function that is to be called if the user clicks the Cancel button.
showErrDialog(message_topic, errors)
Displays an error dialog box.
- Parameters:
- {string} message_topic
- The prefix of the set of strings that are related to the error messages. These strings are stored in the resourceBundle object.
- {array} errors
- The error messages that are displayed in the middle lines of the dialog box.
A sample payload is: [[false, {message: "show the message"}]]
Licensed Materials - Property of IBM (©) Copyright IBM Corp. 2013. All Rights Reserved.