lacam.container
Class TaskDescriptor

java.lang.Object
  extended bylacam.container.TaskDescriptor
All Implemented Interfaces:
java.lang.Runnable

public class TaskDescriptor
extends java.lang.Object
implements java.lang.Runnable

Represents a Task in the system. Also manages the tasks execution.

Author:
Dimitrij Zub

Constructor Summary
TaskDescriptor(org.w3c.dom.Node task_doc, java.lang.String plugin_name)
          Creates a new TaskDescriptor from the given document fragment and the given plugin name.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getAuthor()
           
 java.lang.String getDescription()
           
 org.w3c.dom.Node getDocumentFragment()
           
 java.lang.String getHotkey()
           
 java.lang.String getIconPath()
          This method returns the plain representation of the icon path, which describes which icons should be used for the path's steps during creation.
 java.lang.String getId()
           
 java.lang.String getLinkPath()
          This method returns the plain representation of the linking path, where linking path indicates how to link this task to the main menu.
 java.lang.String getLocalizedDescription()
           
 java.lang.String getLocalizedHotkey()
           
 java.lang.String getLocalizedIconPath()
           
 java.lang.String getLocalizedLinkPath()
           
 java.lang.String getLocalizedName()
           
 java.lang.String getName()
           
 java.lang.String getPlugin()
           
 ProcessDescriptor getStep(int step)
           
 int getStepCount()
           
 int indexOf(java.lang.Object o)
           
 void interrupt()
          Deprecated.  
 void invoke()
          Starts the task.
 void run()
          Activates the data processing thread.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TaskDescriptor

public TaskDescriptor(org.w3c.dom.Node task_doc,
                      java.lang.String plugin_name)
Creates a new TaskDescriptor from the given document fragment and the given plugin name.

Parameters:
task_doc - The document fragment describing the task
plugin_name - The plugin name where the task was found
Method Detail

invoke

public void invoke()
Starts the task.


interrupt

public void interrupt()
Deprecated.  

Interrupts the task. This method should never bee used from inside a task. Throw an AbortProcessException instead.


run

public void run()
Activates the data processing thread.

Specified by:
run in interface java.lang.Runnable
See Also:
invoke(), Runnable.run()

getAuthor

public java.lang.String getAuthor()
Returns:
The tasks author.

getDescription

public java.lang.String getDescription()
Returns:
The tasks description.

getName

public java.lang.String getName()
Returns:
The tasks name.

getPlugin

public java.lang.String getPlugin()
Returns:
The plugin holding the task.

getStep

public ProcessDescriptor getStep(int step)
Returns:
the ProcessDescriptor for the step

getStepCount

public int getStepCount()
Returns:
The amount of steps in the task.

getLinkPath

public java.lang.String getLinkPath()
This method returns the plain representation of the linking path, where linking path indicates how to link this task to the main menu.

Returns:
The whole link path, which has neither been localized nor processed.

getLocalizedLinkPath

public java.lang.String getLocalizedLinkPath()
Returns:
The localized and processed linking path.
See Also:
getLinkPath()

getIconPath

public java.lang.String getIconPath()
This method returns the plain representation of the icon path, which describes which icons should be used for the path's steps during creation.

Returns:
The whole icon path, which has neither been localized nor processed.

getLocalizedIconPath

public java.lang.String getLocalizedIconPath()
Returns:
The localized icon path of this task.
See Also:
getIconPath()

getLocalizedDescription

public java.lang.String getLocalizedDescription()
Returns:
The localized description of this task.

getLocalizedName

public java.lang.String getLocalizedName()
Returns:
The localized name of this task.

getHotkey

public java.lang.String getHotkey()
Returns:
The plain representation of the accelerator to use, if task has been linked to the main menu.

getLocalizedHotkey

public java.lang.String getLocalizedHotkey()
Returns:
The localized representation of the accelerator.
See Also:
getHotkey()

getId

public java.lang.String getId()
Returns:
The tasks id (which should be, but doesn't need to be, the timestamp of creation)

getDocumentFragment

public org.w3c.dom.Node getDocumentFragment()
Returns:
The fragment this task was created from.

indexOf

public int indexOf(java.lang.Object o)
Returns:
The index of the ProcessDescriptor (should be the corresponding workflow step)

equals

public boolean equals(java.lang.Object o)

toString

public java.lang.String toString()