Class ecm.model.TaskManager
Extends
ecm.model._ModelObject.
Represents the task manager service in IBM Content Navigator. It holds all related task manager
information and functionalities.
Defined in: <ecm\model\TaskManager.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
Field Summary
Field Attributes | Field Name and Description |
---|---|
An array of ecm.model.AsyncTaskType objects for this task manager.
|
|
A boolean that indicates whether the task manager service is enabled or not.
|
|
Constant values for various schedule modes in ECM TaskManager.
|
|
The taskmanager's service URL.
|
|
The layout configuration for the IBM Content Navigator task pane.
|
|
Holds information about the security roles of the task manager.
|
|
Constant values for the various task status in ECM TaskManager.
|
- Fields borrowed from class ecm.model._ModelObject:
- categorization, id, isRecurring, name, nameFilter, pane, status, type, userId
Method Summary
Method Attributes | Method Name and Description |
---|---|
getAsyncTaskType(id)
Return the ecm.model.AsyncTaskType that matches the appropriate id.
|
|
Return an array of different categorizations for all the AsyncTaskType registered.
|
|
initialize(response)
Initially initializes the task manager with values from the desktop.
|
|
Returns true if the current user is a task admin.
|
|
Returns true if the current user is a task auditor.
|
|
Returns true if the current user is a task user.
|
|
logoff()
Disconnects from the server and clears any login-sensitive cache
|
|
onAsyncTaskItemAdded(response)
Event invoked when an async task has been added.
|
|
onAsyncTaskItemDeleted(task)
Event invoked when an async task has been deleted.
|
|
onAsyncTaskItemOpened(task)
Event invoked when an async task has been opened.
|
|
Event invoked when the async task pane is refreshed.
|
|
retrieveAsyncTasks(parameters, callback)
Retrieves all asynchronous tasks in the ECM TaskManager.
|
|
scheduleAsyncTask(schedule, handlerClassName, parameters, data, callback, categorization, errorback)
Schedules an asynchronous task by using the provided ecm.model.AsyncTaskSchedule, class name, and
other parameters.
|
Field Detail
asyncTaskTypes
An array of ecm.model.AsyncTaskType objects for this task manager.
- Since:
- 2.0.3
isEnabled
A boolean that indicates whether the task manager service is enabled or not.
- Since:
- 2.0.3
ScheduleMode
Constant values for various schedule modes in ECM TaskManager.
- "0" - Single. This means the task will only run once.
- "1" - FixedIntervalSchedule. This means the task will reoccur on a fixed interval.
- "4" - CalendarSchedule. This means the task will reoccur based on a calendar schedule.
- Since:
- 2.0.3
serviceURL
The taskmanager's service URL.
taskPaneLayoutConfiguration
The layout configuration for the IBM Content Navigator task pane. You can override this to customize the
widgets that appear in various parts of the task pane.
- Since:
- 2.0.3
taskSecurityRoles
Holds information about the security roles of the task manager. It will list whether the current user is a
- Task Admin - full administrative abilities to create and delete any tasks in the system.
- Task User - ability to only see or delete tasks that the current user created only.
- Task Auditor - ability to create and retrieve audit information of each task.
TaskStatus
Constant values for the various task status in ECM TaskManager.
- Since:
- 2.0.3
Method Detail
getAsyncTaskType(id)
Return the ecm.model.AsyncTaskType that matches the appropriate id.
- Parameters:
- id
- The id of the ecm.model.AsyncTaskType to return. This id is usually the classHandlerName of the custom task created or the type attribute on ecm.model.AsyncTask.
- Since:
- 2.0.3
getCategorizations()
Return an array of different categorizations for all the AsyncTaskType registered. Categorizations can be
used to show different categorizations of task types. For more information, read about it in
ecm.model.AsyncTaskType.
- Since:
- 2.0.3
initialize(response)
Initially initializes the task manager with values from the desktop.
- Parameters:
- response
isTaskAdmin()
Returns true if the current user is a task admin. This will return false until login.
isTaskAuditor()
Returns true if the current user is a task auditor. This will return false until login.
isTaskUser()
Returns true if the current user is a task user. This will return false until login.
logoff()
Disconnects from the server and clears any login-sensitive cache
onAsyncTaskItemAdded(response)
Event invoked when an async task has been added.
- Parameters:
- response
onAsyncTaskItemDeleted(task)
Event invoked when an async task has been deleted.
- Parameters:
- task
onAsyncTaskItemOpened(task)
Event invoked when an async task has been opened.
- Parameters:
- task
onAsyncTasksRefreshed()
Event invoked when the async task pane is refreshed.
- Since:
- 2.0.3
retrieveAsyncTasks(parameters, callback)
Retrieves all asynchronous tasks in the ECM TaskManager. Users can filter the amount of tasks returned by
providing the following parameters:
- userId - Returns only tasks created by this user.
- taskType - Returns only tasks with the given class handler's name. The class handler name can be obtained from the ecm.model.AsyncTaskType.classHandlerName. You can string multiple class handler names together separated by commas.
- taskStatus - Returns only tasks with the given task status. The task's status values can be obtained
from
TaskStatus
constant values specified in this TaskManager model object. - isRecurring - Returns only tasks that are recurring.
- parent - Returns tasks with the given parent categorization. The categorization can be obtained from the ecm.model.AsyncTaskType.categorization.
- nameFilter - Returns only tasks with names that match this given name filter.
- Parameters:
- parameters
- The parameters to be passed in as part of the requestParams for the request.
- callback
- The callback when the request completes.
scheduleAsyncTask(schedule, handlerClassName, parameters, data, callback, categorization, errorback)
Schedules an asynchronous task by using the provided ecm.model.AsyncTaskSchedule, class name, and
other parameters. Any items in parameter or data will be appended to the ecm.model.AsyncTask and pass
along to the ECM TaskManager. Plugin writers that create custom tasks can then retrieve these parameters
within the task's taskInfo JSON object under "specificTaskRequest".
- Parameters:
- schedule
- A ecm.model.AsyncTaskSchedule object that contains all the scheduling information. It is usually obtained by using the ecm.widget.taskManager.AsyncTaskSchedulerPane and calling AsyncTaskSchedulerPane.get("schedule") or CalendarSchedulerPane.get("schedule").
- handlerClassName
- The handlerClassName of the task that will be scheduled. This is typically the full class path of the task that will be executed.
- parameters
- The parameters to be passed in as part of the requestParams for the request. These parameters will be appended to "specificTaskRequest" and will be part of the task's taskInfo object.
- data
- The data parameters to be passed in as part of the requestBody for the request.
- callback
- The callback when the request completes.
- categorization
- The categorization for this asynchronous task.
- errorback
- Since:
- 2.0.3.6 A callback invoked when there is a problem scheduling the task.