edu.cmu.hcii.calo.model.Task Class Reference

Inherits edu.cmu.hcii.calo.model.TasklikeObject.

Inheritance diagram for edu.cmu.hcii.calo.model.Task:

Inheritance graph
[legend]
Collaboration diagram for edu.cmu.hcii.calo.model.Task:

Collaboration graph
[legend]
List of all members.

Detailed Description

An abstract superclass for tasks and subtasks.

Author:
Brian Ellis


Public Member Functions

 Task (String name, boolean caloAdded)
 Constructs an Task with a name.
boolean addTag (String o)
 Adds the given tag to this task.
void clearTags ()
 Removes all tags from this task.
int countTags ()
 Counts the number of tags associated with this task.
Calendar getDueDate ()
 Accessor method for dueDate.
String getDueDateString ()
 Returns the due date of this Task as an intelligently formatted string.
String getName ()
 Accessor method for name.
PendingState getPendingState ()
 Accessor method for pendingState.
double getPriority ()
 Accessor method for priority.
Project getProject ()
 Accessor method for project.
ResourceList getResources ()
 Accessor method for resources.
Set< String > getTags ()
 Accessor method for tags.
boolean isComplete ()
 Accessor method for isComplete.
boolean isStarred ()
 Accessor method for isStarred.
boolean removeTag (Object o)
 Removes the given tag from this task.
void setComplete (boolean isComplete)
 Setter method for isComplete.
void setDueDate (Calendar dueDate)
 Setter method for dueDate.
void setName (String name)
 Setter method for name.
void setPendingState (PendingState pendingState)
 Setter method for pendingState.
void setPriority (double priority)
 Setter method for priority.
void setProject (Project project)
 Setter method for project.
void setResources (ResourceList resources)
 Setter method for resources.
void setStarred (boolean isStarred)
 Setter method for isStarred.
String toString ()
 Returns a (partial) string representation of this task.
Calendar getDateCompleted ()
 Returns the date and time this Task was most recently marked as completed, or null if it has never been marked as completed.
void setDateCompleted (Calendar dateCompleted)
 Sets the completed date of this task to the given value.

Private Attributes

String name
 The name or title of the task.
boolean isComplete
 True if the task is marked as completed, false otherwise.
Calendar dateCompleted
 The date and time the task was most recently marked as complete, or null if it has not been.
boolean isStarred
 True if the task is starred, false otherwise.
HashSet< String > tags
 The set of tags associated with this task.
Calendar dueDate
 The date on which this task is due, or null if the task has no due date.
Project project
 The project with which this task is associated, if any.
double priority
 The priority value for this task.
PendingState pendingState
 The pending state of the task.
ResourceList resources
 The list of Resources associated with this task.

Static Private Attributes

static final long serialVersionUID = 894751782165268552L
 To prevent serialization collisions.

Classes

class  SmartDueDateFormatter
 Pseudointelligently formats a given date as a due date string based on its proximity to the current date and time. More...


Constructor & Destructor Documentation

edu.cmu.hcii.calo.model.Task.Task ( String  name,
boolean  caloAdded 
)

Constructs an Task with a name.

Parameters:
name the name of this task
caloAdded whether or not this task was AI added


Member Function Documentation

boolean edu.cmu.hcii.calo.model.Task.addTag ( String  o  ) 

Adds the given tag to this task.

Parameters:
o the tag to add
Returns:
true if the tag was not already associated with the task (and is now), false otherwise.s
See also:
java.util.Set.add(java.lang.Object)

void edu.cmu.hcii.calo.model.Task.clearTags (  ) 

Removes all tags from this task.

See also:
java.util.Set.clear()

int edu.cmu.hcii.calo.model.Task.countTags (  ) 

Counts the number of tags associated with this task.

Returns:
the number of tags associated with the task
See also:
java.util.Set.size()

Calendar edu.cmu.hcii.calo.model.Task.getDueDate (  ) 

Accessor method for dueDate.

Tasks can have no set due date (this is in fact the default), in which case this method returns null.

Returns:
the value of dueDate

String edu.cmu.hcii.calo.model.Task.getDueDateString (  ) 

Returns the due date of this Task as an intelligently formatted string.

Returns:
the string representation of the due date

String edu.cmu.hcii.calo.model.Task.getName (  ) 

Accessor method for name.

Returns:
the value of name

PendingState edu.cmu.hcii.calo.model.Task.getPendingState (  ) 

Accessor method for pendingState.

Returns:
the value of pendingState

double edu.cmu.hcii.calo.model.Task.getPriority (  )  [virtual]

Accessor method for priority.

Returns:
the value of priority

Implements edu.cmu.hcii.calo.model.PrioritizedObject.

Project edu.cmu.hcii.calo.model.Task.getProject (  ) 

Accessor method for project.

Returns:
the value of project

ResourceList edu.cmu.hcii.calo.model.Task.getResources (  ) 

Accessor method for resources.

Returns:
the value of resources

Set<String> edu.cmu.hcii.calo.model.Task.getTags (  ) 

Accessor method for tags.

Returns:
the value of tags

boolean edu.cmu.hcii.calo.model.Task.isComplete (  ) 

Accessor method for isComplete.

Returns:
the value of isComplete

boolean edu.cmu.hcii.calo.model.Task.isStarred (  ) 

Accessor method for isStarred.

Returns:
the value of isStarred

boolean edu.cmu.hcii.calo.model.Task.removeTag ( Object  o  ) 

Removes the given tag from this task.

Parameters:
o the tag to remove
Returns:
true if the tag was previously associated with the task (and is no longer), false otherwise
See also:
java.util.Set.remove(java.lang.Object)

void edu.cmu.hcii.calo.model.Task.setComplete ( boolean  isComplete  ) 

Setter method for isComplete.

Parameters:
isComplete the isComplete to set

void edu.cmu.hcii.calo.model.Task.setDueDate ( Calendar  dueDate  ) 

Setter method for dueDate.

Pass to null to indicate that this task has no set due date.

Parameters:
dueDate the dueDate to set, or null for no due date

void edu.cmu.hcii.calo.model.Task.setName ( String  name  ) 

Setter method for name.

Parameters:
name the name to set

void edu.cmu.hcii.calo.model.Task.setPendingState ( PendingState  pendingState  ) 

Setter method for pendingState.

Parameters:
pendingState the pendingState to set

void edu.cmu.hcii.calo.model.Task.setPriority ( double  priority  ) 

Setter method for priority.

Parameters:
priority the priority to set

void edu.cmu.hcii.calo.model.Task.setProject ( Project  project  ) 

Setter method for project.

Parameters:
project the project to set

void edu.cmu.hcii.calo.model.Task.setResources ( ResourceList  resources  ) 

Setter method for resources.

Parameters:
resources the resources to set

void edu.cmu.hcii.calo.model.Task.setStarred ( boolean  isStarred  ) 

Setter method for isStarred.

Parameters:
isStarred the isStarred to set

String edu.cmu.hcii.calo.model.Task.toString (  ) 

Returns a (partial) string representation of this task.

Useful only for debugging.

Calendar edu.cmu.hcii.calo.model.Task.getDateCompleted (  ) 

Returns the date and time this Task was most recently marked as completed, or null if it has never been marked as completed.

Note:
This method may return a non-null value even if the task is not currently marked as complete, so be sure to check isComplete() before assuming a non-null response means the task is complete.
Returns:
the date and time this task was completed

void edu.cmu.hcii.calo.model.Task.setDateCompleted ( Calendar  dateCompleted  ) 

Sets the completed date of this task to the given value.

Parameters:
dateCompleted the date and time this task was completed


Member Data Documentation

final long edu.cmu.hcii.calo.model.Task.serialVersionUID = 894751782165268552L [static, private]

To prevent serialization collisions.

String edu.cmu.hcii.calo.model.Task.name [private]

The name or title of the task.

boolean edu.cmu.hcii.calo.model.Task.isComplete [private]

True if the task is marked as completed, false otherwise.

Calendar edu.cmu.hcii.calo.model.Task.dateCompleted [private]

The date and time the task was most recently marked as complete, or null if it has not been.

boolean edu.cmu.hcii.calo.model.Task.isStarred [private]

True if the task is starred, false otherwise.

HashSet<String> edu.cmu.hcii.calo.model.Task.tags [private]

The set of tags associated with this task.

Calendar edu.cmu.hcii.calo.model.Task.dueDate [private]

The date on which this task is due, or null if the task has no due date.

Project edu.cmu.hcii.calo.model.Task.project [private]

The project with which this task is associated, if any.

double edu.cmu.hcii.calo.model.Task.priority [private]

The priority value for this task.

This value influences the task's sort order.

PendingState edu.cmu.hcii.calo.model.Task.pendingState [private]

The pending state of the task.

If the task is not marked as pending, the PendingState object's isPending() method will return false. Otherwise, it will return true and more information about the pending state of the task can be found by querying this object.

ResourceList edu.cmu.hcii.calo.model.Task.resources [private]

The list of Resources associated with this task.


The documentation for this class was generated from the following file:
Generated on Mon Aug 13 15:06:17 2007 for CALO by  doxygen 1.5.2