java.lang.Object
org.eclipse.birt.core.ui.frameworks.taskwizard.TasksManager

public class TasksManager extends Object
  • Method Details

    • instance

      public static TasksManager instance()
      This method returns the instance of TasksManager. If an instance does not exist, one is created.
      Returns:
      Singleton instance of TasksManager
    • registerTask

      public void registerTask(String sTaskID, ITask task) throws IllegalArgumentException
      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 registered
      task - 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

      public void deregisterTask(String sTaskID) throws IllegalArgumentException
      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 wizard
      sTasks - A comma separated list of TaskIDs that specify tasks to be automatically added to the wizard on invocation
      sPosition - A TaskID before which the above list of tasks should be inserted in the wizard
      Throws:
      IllegalArgumentException - if WizardID is null
    • getTask

      public ITask getTask(String sTaskID)
      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

      public String[] getTasksForWizard(String sWizardID)
      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

      public boolean isRegistered(String sTaskID)
      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

      public void addRegistrationListener(IRegistrationListener listener)
      Adds a listener to be notified of registration events.
      Parameters:
      listener - Instance of IRegistrationListener that should be notified on events
    • removeRegistrationListener

      public void removeRegistrationListener(IRegistrationListener listener)
      Removes a registered listener. This listener will no longer recieve notification of registration events.
      Parameters:
      listener - Instance of IRegistrationListener that should be removed