com.strangelight.servlets.TaskMaster
Class Task

java.lang.Object
  |
  +--com.strangelight.servlets.TaskMaster.Task

public class Task
extends java.lang.Object

Task encapsulates a single "task", which can contain multiple subtasks.


Constructor Summary
protected Task(org.w3c.dom.Node node, TaskTree tree)
          Creates a Task, including any contained sub-Tasks, from an XML Node.
  Task(TaskTree tree)
          Creates a new, empty Task object.
 
Method Summary
protected  void finalize()
           
 java.lang.String get_details()
          Gets a detailed description of this Task.
 java.lang.String get_id()
          Gets the unique key associated with this Task.
 java.util.List get_subTasks()
          Gets this Task's subtasks as a List of Tasks.
 Task get_superTask()
          Gets this Task's super-Task.
 java.util.List get_superTasks()
          Gets this Task's direct supertasks as a List of Tasks.
 java.lang.String get_title()
          Gets the title (short textual description) of this Task.
 TaskTree getTree()
          Get the TaskTree to which this Task belongs.
 void remove()
          Removes this Task from the Task tree.
 void set_details(java.lang.String details)
          Sets the detailed description of this Task.
 Task set_superTask(Task new_superTask)
          Makes this Task a sub-Task of another.
 void set_title(java.lang.String new_title)
          Sets the title (short textual description) of this Task.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Task

protected Task(org.w3c.dom.Node node,
               TaskTree tree)
Creates a Task, including any contained sub-Tasks, from an XML Node. The Node can be either a Document or an Element.


Task

public Task(TaskTree tree)
Creates a new, empty Task object. This Task object is not part of the Task heirarchy until it is inserted there (e.g. with set_superTask(Task) ).

Method Detail

getTree

public TaskTree getTree()
Get the TaskTree to which this Task belongs.


finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object

get_id

public java.lang.String get_id()
Gets the unique key associated with this Task. (Unique keys are auto-generated whenever Task objects are created.)

Returns:
the unique key associated with this Task. E.g. get_id() might return "bc07fe50".

get_title

public java.lang.String get_title()
Gets the title (short textual description) of this Task.


set_title

public void set_title(java.lang.String new_title)
Sets the title (short textual description) of this Task.


set_superTask

public Task set_superTask(Task new_superTask)
Makes this Task a sub-Task of another.

Parameters:
new_superTask - this Task's new super-Task, or null to make this Task a "root" task.
Returns:
this Task's old super-Task (or null if it didn't have one).

get_superTask

public Task get_superTask()
Gets this Task's super-Task.

Returns:
this Task's super-Task (or null if it doesn't have one).

remove

public void remove()
Removes this Task from the Task tree.

Note that attempting to remove the root Task will generate a RuntimeException.


get_subTasks

public java.util.List get_subTasks()
Gets this Task's subtasks as a List of Tasks.


get_superTasks

public java.util.List get_superTasks()
Gets this Task's direct supertasks as a List of Tasks.


get_details

public java.lang.String get_details()
Gets a detailed description of this Task.


set_details

public void set_details(java.lang.String details)
Sets the detailed description of this Task.