org.davesag.tasktracker
Class TaskTrackerEntry

java.lang.Object
  |
  +--org.pronoic.cos.core.CosEntryTemplate
        |
        +--org.pronoic.cos.entry.CosEntry
              |
              +--org.davesag.tasktracker.TaskTrackerEntry
All Implemented Interfaces:
Archivable, Cloneable, CosEntryInterface, Distributable, Entry, Serializable

public class TaskTrackerEntry
extends CosEntry
implements Archivable

A TaskTrackerEntry is unique shared CosEntry that describes a single task.

    Tasks follow the following lifecycle.
  1. They are created and entered by someone.
  2. Then they are either accepeted by someone, or ASSIGNED to someone.
  3. Then they may be COMPLETED. Alternatively they may be PUT on hold, pending some external input/advice/clarification, in which case they must be reset to ASSIGNED when not on hold.
  4. If COMPLETED the task must be tested using a supplied test descritpion
  5. That test may pass or fail.
  6. either way the task is passed back to the original creator for a decision.
  7. the creator may re-open the task and assign it to someone else, or mark it as done.

This TaskTrackerEntry is created using the CosConnector Interface by a client application. It will take advantage of the services of an Archivist and will take advantage of a Federator if available. Right now however the archive and extract methods are only there for debugging purposes, and do not do any actual archving when collected by an Archivist.

when making a template for matching a retreival, you should use the null constructor then set the properties you want to match against directly. only use the setters and getters when you are actually manipulating an actual TaskTrackerEntry.

See Also:
CosConnector, Serialized Form

Field Summary
static String EMPTY_STRING
          the empty string
 String mBlurb
          a fuller description of the task.
 String mCategory
          the category for this task.
 String mCurrentOwner
          the username of the person who is looking after the task.
 Vector mDependencies
          the a Vector of unique ids of task this task is dependent on.
 Date mEtc
          Estimated time of completion.
 Date mFinalised
          record the date the task was signed off.
 String mManager
          the username of the person who reported the task.
 Vector mMessages
          a user can add a message to a task.
 String mName
          the short name of this task.
 Vector mPastOwners
          a vector of previous people who had a hand in this task.
 Integer mPriority
          the priority of this task.
 String mProjectName
          All tasks can be part of a project.
 Long mReplaces
          the unique id of the task this task replaces.
 Vector mSeeAlso
          the a Vector of unique ids of tasks this task somehow relates to.
 Integer mStatus
          the status of this task.
 String mSubCategory
          the sub category for this task.
 Integer mTaskNumber
          a User Supplied task number.
 String mTestDescription
          an informal description of the test a tester needs to do to test this task.
 Integer mUrgency
          the urgency of this task.
static String[] PRIORITIES
          priorities from 1 (very high) to 5 (very low)
static String[] STATES
          priorities from 1 (very high) to 5 (very low)
static int STATUS_ACCEPTED
          a person has accepted the task.
static int STATUS_ASSIGNED
          the task has been assigned to someone.
static int STATUS_COMPLETED
          a person thinks they have fixed their task.
static int STATUS_DONE
          the task is done with.
static int STATUS_OPEN
          the task has not yet been assigned to anyone.
static int STATUS_TESTED
          a tester has tested the fixed task and the test passed.
static String[] URGENCIES
          urgencies from 1 (very very urgent) to 5 (low)
 
Fields inherited from class org.pronoic.cos.entry.CosEntry
mAppContext, mCreated, mCreationEnsembleName, mLastModified
 
Fields inherited from class org.pronoic.cos.core.CosEntryTemplate
mEntryVersionNumber, mUniqueServiceEntryId
 
Constructor Summary
TaskTrackerEntry()
          default constructor to satisfy an entry or make a template for matching.
TaskTrackerEntry(String projectname, String name, Integer priority, String category, String blurb, String message, String user)
          use this constuctor when actually creating an entry.
 
Method Summary
 void accepted(Date etc)
          when you accept a job you must estimate how logn it will take until the job is done.
 void addMessage(String mess)
          you need to be able to add ad-hoc notes to the task.
 boolean archive(SpaceConnectable spconn, Connection jdbcconn)
          Method that is used as the core serve method inside the Karen service which takes an object, and requires it to archive itself.
 void assignToOwner(String owner)
          you need to be able to pass control on to some other user.
 void done()
          as the manager of a task, you must hit a button in a GUI somewhere that calls done It is responsible for settting the status of the task to STATUS_DONE and setting the Finalised Date.
 boolean extract(SpaceConnectable spconn, Connection jdbcconn)
          Method to bootstrap entries of a given class from the SQL database.
 String getCategory()
          returns the task's category.
 String getCurrentOwner()
          getCurrentOwner should be used if mStatus is STATUS_ASSIGNED to see who the current owner is.
 String getManager()
          getManager should be used to return the name of the manager.
 String getName()
          returns the name
 String getProjectName()
          returns the project name
 Integer getStatus()
          returns the the status.
 void setBlurb(String b)
          describe the task.
 void setCategory(String c)
          categorize the task.
 void setName(String name)
          sets the name of the task.
 void setPriority(Integer p)
          sets an arbitrary priority of the task.
 void setProjectName(String projectname)
          sets the project name of the task.
 void setStatus(Integer s)
          setStatus sets the Status of the task.
 void setTestDescription(String td)
          describe how to test the task.
 void setUrgency(Integer u)
          sets an arbitrary urgency for the task.
 
Methods inherited from class org.pronoic.cos.entry.CosEntry
created, getAppContext, getCreationEnsembleName, makeNullTemplate, setAppContext, setCreationEnsembleName, updated
 
Methods inherited from class org.pronoic.cos.core.CosEntryTemplate
clone, getUniqueServiceEntryId, getVersion, incrementVersion, setUniqueServiceEntryId
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.pronoic.cos.entry.CosEntryInterface
created, getAppContext, getCreationEnsembleName, getUniqueServiceEntryId, getVersion, incrementVersion, makeNullTemplate, setAppContext, setCreationEnsembleName, setUniqueServiceEntryId, updated
 

Field Detail

EMPTY_STRING

public static final String EMPTY_STRING
the empty string

STATUS_OPEN

public static final int STATUS_OPEN
the task has not yet been assigned to anyone.

STATUS_ASSIGNED

public static final int STATUS_ASSIGNED
the task has been assigned to someone. use getCurrentOwner() to see who it has been assigned to.

STATUS_ACCEPTED

public static final int STATUS_ACCEPTED
a person has accepted the task.

STATUS_COMPLETED

public static final int STATUS_COMPLETED
a person thinks they have fixed their task.

STATUS_TESTED

public static final int STATUS_TESTED
a tester has tested the fixed task and the test passed.

STATUS_DONE

public static final int STATUS_DONE
the task is done with.

STATES

public static final String[] STATES
priorities from 1 (very high) to 5 (very low)

PRIORITIES

public static final String[] PRIORITIES
priorities from 1 (very high) to 5 (very low)

URGENCIES

public static final String[] URGENCIES
urgencies from 1 (very very urgent) to 5 (low)

mProjectName

public String mProjectName
All tasks can be part of a project. This is the name of the project.

mTaskNumber

public Integer mTaskNumber
a User Supplied task number. This number is not guaranteed to be unique within a project although it aught to be. It most certainly is not going to be unique between multiple projects.

mReplaces

public Long mReplaces
the unique id of the task this task replaces. It can be null Note that users should never be required to enter the full unique id of a task. The GUI should deal with that for the user. NOTE this is only here for future development. It's not used in the V1 release.

mDependencies

public Vector mDependencies
the a Vector of unique ids of task this task is dependent on. Note that users should never be required to enter the full unique id of a task. The GUI should deal with that for the user. NOTE this is only here for future development. It's not used in the V1 release.

mSeeAlso

public Vector mSeeAlso
the a Vector of unique ids of tasks this task somehow relates to. Note that users should never be required to enter the full unique id of a task. The GUI should deal with that for the user. NOTE this is only here for future development. It's not used in the V1 release.

mName

public String mName
the short name of this task.

mPriority

public Integer mPriority
the priority of this task. see PRIORITIES. Note: This may become an automagically set field based on acombination of Urgency, Severity and Imperative. We'll dream up some formular in excel :-)

mUrgency

public Integer mUrgency
the urgency of this task. 1 (yesterday) to 5 (at your leisure)

mCategory

public String mCategory
the category for this task. unconstrained string right now.

mSubCategory

public String mSubCategory
the sub category for this task. unconstrained string right now.

mStatus

public Integer mStatus
the status of this task. constrained according to the static STATUS_* above.
See Also:
setStatus(java.lang.Integer)

mCurrentOwner

public String mCurrentOwner
the username of the person who is looking after the task.

mManager

public String mManager
the username of the person who reported the task.

mPastOwners

public Vector mPastOwners
a vector of previous people who had a hand in this task.

mBlurb

public String mBlurb
a fuller description of the task.

mTestDescription

public String mTestDescription
an informal description of the test a tester needs to do to test this task.

mMessages

public Vector mMessages
a user can add a message to a task.

mFinalised

public Date mFinalised
record the date the task was signed off.

mEtc

public Date mEtc
Estimated time of completion. when does the tasks's owner think they'll have the task completed
Constructor Detail

TaskTrackerEntry

public TaskTrackerEntry()
default constructor to satisfy an entry or make a template for matching.

TaskTrackerEntry

public TaskTrackerEntry(String projectname,
                        String name,
                        Integer priority,
                        String category,
                        String blurb,
                        String message,
                        String user)
use this constuctor when actually creating an entry. This constructor should ultimately be extended to allow the creation of the fuller Task spec.
Parameters:
name - A short name for this task.
priority - A priority number for this task. 1 (high) to 5 (low).
category - An arbitrary category name for this task.
blurb - A concise description of this task.
message - An introductory message for this task.
user - Who is reporting this task anyway?.
Method Detail

done

public void done()
as the manager of a task, you must hit a button in a GUI somewhere that calls done It is responsible for settting the status of the task to STATUS_DONE and setting the Finalised Date.

accepted

public void accepted(Date etc)
when you accept a job you must estimate how logn it will take until the job is done.
Parameters:
etc - - Estimated Time until Completion.

assignToOwner

public void assignToOwner(String owner)
you need to be able to pass control on to some other user.
Parameters:
owner - the new owner - note: does no owner existence checking as yet.

addMessage

public void addMessage(String mess)
you need to be able to add ad-hoc notes to the task.
Parameters:
owner - the new owner - note: does no owner existence checking as yet.

setProjectName

public void setProjectName(String projectname)
sets the project name of the task.
Parameters:
name - the short name of this task.

setName

public void setName(String name)
sets the name of the task. this can be updated at any time as the task has a unique id.
Parameters:
name - the short name of this task.

setPriority

public void setPriority(Integer p)
sets an arbitrary priority of the task. Priorities should usually rate from 1 (high) to 5 (low). many task trackers go the other way around but it is the view of this package that a priority 1 task should be more important than a priority 5 task.
Parameters:
p - the priority number of this task.

setUrgency

public void setUrgency(Integer u)
sets an arbitrary urgency for the task. Urgencies should usually rate from 1 (high) to 5 (low). many task trackers go the other way around but it is the view of this package that an urgency 1 task should be more important than an urgency 5 task.
Parameters:
u - the priority number of this task.

setCategory

public void setCategory(String c)
categorize the task.
Parameters:
c - the task's category.

setBlurb

public void setBlurb(String b)
describe the task.
Parameters:
b - the descrition of this task.

setTestDescription

public void setTestDescription(String td)
describe how to test the task.
Parameters:
b - the descrition of this task's test procedure.

setStatus

public void setStatus(Integer s)
setStatus sets the Status of the task.

getProjectName

public String getProjectName()
returns the project name
Returns:
The name of the task's project.

getName

public String getName()
returns the name
Returns:
The name of the task

getStatus

public Integer getStatus()
returns the the status.
Returns:
The status of this task as an Integer.

getCategory

public String getCategory()
returns the task's category.
Returns:
The status of this task as an Integer.

getCurrentOwner

public String getCurrentOwner()
getCurrentOwner should be used if mStatus is STATUS_ASSIGNED to see who the current owner is.
Returns:
String the current owner.

getManager

public String getManager()
getManager should be used to return the name of the manager.
Returns:
String the managers name.

archive

public boolean archive(SpaceConnectable spconn,
                       Connection jdbcconn)
                throws CriticalObjectStoreException
Method that is used as the core serve method inside the Karen service which takes an object, and requires it to archive itself. Right now this just returns true.
Specified by:
archive in interface Archivable
Parameters:
spconn - A space connector that implements the SpaceConnectable Interface that is a wrapper to a Javaspace.
jdbcconn - A connection to the database
Returns:
true always right now while in development.
Throws:
CriticalObjectStoreException - if the space has gone bad.

extract

public boolean extract(SpaceConnectable spconn,
                       Connection jdbcconn)
                throws CriticalObjectStoreException
Method to bootstrap entries of a given class from the SQL database. Currently, this is done on a class basis (i.e. this method will bootstrap an entire class). Thus, while it should be static, interfaces dont allow static methods. Just return true for now while testing.
Specified by:
extract in interface Archivable
Parameters:
spconn - A space connector that implements the SpaceConnectable Interface that is a wrapper to a Javaspace.
jdbcconn - A connection to the database
Returns:
true if it extracted okay, false if not.
Throws:
CriticalObjectStoreException - if the space has gone bad.


tasktracker API version 0.1 pre-release Copyright © 2002 Dave Sag. Released under the BSD Licence.