Class TasksManager
java.lang.Object
org.eclipse.birt.core.ui.frameworks.taskwizard.TasksManager
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddRegistrationListener(IRegistrationListener listener) Adds a listener to be notified of registration events.voidderegisterTask(String sTaskID) This method removes a registered task from the TasksManager.Returns the ITask instance registered with the specified ID.String[]getTasksForWizard(String sWizardID) Returns the tasks (in the correct order) registered for use with the specified wizard.static TasksManagerinstance()This method returns the instance of TasksManager.booleanisRegistered(String sTaskID) Returns whether or not a task has been registered with the specified ID.voidregisterTask(String sTaskID, ITask task) This method registers a task with the TasksManager.voidregisterWizard(String sWizardID, String sTasks, String sPosition) This method registers a wizard with the TasksManager.voidRemoves a registered listener.
-
Method Details
-
instance
This method returns the instance of TasksManager. If an instance does not exist, one is created.- Returns:
- Singleton instance of TasksManager
-
registerTask
This method registers a task with the TasksManager. It throws an exception if the task ID is already in use or if the ITask instance is null.- Parameters:
sTaskID- The unique identifier with which the task is to be registeredtask- The ITask instance that represents the Wizard UI for the task- Throws:
IllegalArgumentException- if taskID is not unique or if task argument is null
-
deregisterTask
This method removes a registered task from the TasksManager. It throws an exception if the task ID is not found.- Parameters:
sTaskID- The unique identifier of the task that is to be deregistered- Throws:
IllegalArgumentException- if task with specified ID is not registered
-
registerWizard
public void registerWizard(String sWizardID, String sTasks, String sPosition) throws IllegalArgumentException This method registers a wizard with the TasksManager. It throws an exception if the WizardID instance is null.- Parameters:
sWizardID- The unique identifier of the wizardsTasks- A comma separated list of TaskIDs that specify tasks to be automatically added to the wizard on invocationsPosition- A TaskID before which the above list of tasks should be inserted in the wizard- Throws:
IllegalArgumentException- if WizardID is null
-
getTask
Returns the ITask instance registered with the specified ID.- Parameters:
sTaskID- The ID uniquely identifying the task to be obtained- Returns:
- the task currently registered with the specified ID
-
getTasksForWizard
Returns the tasks (in the correct order) registered for use with the specified wizard. If a wizard with such an ID has not been registered, an empty array is returned.- Parameters:
sWizardID- The ID uniquely identifying the wizard whose tasks are to be returned- Returns:
- an array of task IDs currently registered for use with the specified wizard
-
isRegistered
Returns whether or not a task has been registered with the specified ID. This can be used to determine if an ID being used for a task is actually unique before attempting to register it.- Parameters:
sTaskID- The ID which is to be checked.- Returns:
- true if there exists a task registered with the specified ID, false otherwise
-
addRegistrationListener
Adds a listener to be notified of registration events.- Parameters:
listener- Instance of IRegistrationListener that should be notified on events
-
removeRegistrationListener
Removes a registered listener. This listener will no longer recieve notification of registration events.- Parameters:
listener- Instance of IRegistrationListener that should be removed
-