lacam.management
Class TaskManager

java.lang.Object
  extended bylacam.management.TaskManager

public class TaskManager
extends java.lang.Object

Manages the task library of the system. All task descriptors are stored here.

Author:
Dimitrij Zub

Constructor Summary
TaskManager()
           
 
Method Summary
static TaskDescriptor addTask(org.w3c.dom.Node task_node, java.lang.String plugin)
          Adds a task described by the task_node to the library
static TaskDescriptor getCurrentTask()
           
static TaskDescriptor getTaskDescriptor(java.lang.String id)
           
static javax.swing.tree.TreeModel getTreeModelInstance()
           
static boolean hasTask(TaskDescriptor task)
           
static void runTask(TaskDescriptor task)
          Starts a task if possible.
static void updateTasksSet()
          Updates the task library silently
static void updateTasksSetVerbose()
          Updates the task library while showing the progress to the user
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskManager

public TaskManager()
Method Detail

updateTasksSet

public static void updateTasksSet()
Updates the task library silently


updateTasksSetVerbose

public static void updateTasksSetVerbose()
Updates the task library while showing the progress to the user


runTask

public static void runTask(TaskDescriptor task)
Starts a task if possible. This method only allows 1 task at a time, if there will be no use or any othe conflict management in feature this methode can be updates to support running multiple tasks simultaneously

Parameters:
task - The task to start

getCurrentTask

public static TaskDescriptor getCurrentTask()
Returns:
The currently active task

getTreeModelInstance

public static javax.swing.tree.TreeModel getTreeModelInstance()
Returns:
The TreeModel instance representing the current tasks
See Also:
TaskLibraryContainer

addTask

public static TaskDescriptor addTask(org.w3c.dom.Node task_node,
                                     java.lang.String plugin)
Adds a task described by the task_node to the library

Parameters:
task_node - The document snippet containing all necessary data about the task
plugin - The plugin the task is linked to
Returns:
The TaskDescriptor created from the task_node

getTaskDescriptor

public static TaskDescriptor getTaskDescriptor(java.lang.String id)
Parameters:
id - The id of the task to look for
Returns:
The TaskDescriptor identified by the id

hasTask

public static boolean hasTask(TaskDescriptor task)
Parameters:
task - The TaskDescriptor to look for
Returns:
true if found, else false