net.incongru.taskman
Interface TaskMan

All Known Implementing Classes:
HibernatedTaskMan

public interface TaskMan

The TaskMan implementations are responsible for storing and retrieving tasks. They're basically DAOs.

Version:
$Revision: $
Author:
greg, $Author: $ (last edit)

Method Summary
 void addVariable(TaskInstance task, java.lang.String name, java.lang.Object value)
           
 void assign(TaskInstance task, Assignee assignee)
           
 void cancel(TaskInstance task)
           
 TaskDef deployTaskDef(TaskDefParser taskDefParser, boolean forceEvenIfSame)
          Since a deployed TaskDef is by nature incomplete (doesn't have an id, versionId, nor deploymentDate), we here pass a TaskDefParser instance, which will somehow load our TaskDef definition (from an xml file for instance), and pass it on for actual deployment.
 java.util.List<TaskInstance> findRemainingTasks()
          For scheduler: find tasks which are due and not finished.
 java.util.List<TaskInstance> getPendingTasksByAssignee(Assignee assignee)
          Retrieves the pending tasks assigned to an assignee (or a group/pool of actors TODO ?), so that a specific actor can see what tasks he could do if he's bored.
 java.util.List<TaskInstance> getPendingTasksByReporterId(java.lang.String actorId)
          Retrieves the pending tasks assigned to this specific actor.
 TaskInstance getTaskById(java.lang.String taskId)
           
 java.util.List<TaskInstance> getTasksByAssignee(Assignee assignee)
          Retrieves all the tasks assigned to an assignee (or a group/pool of actors TODO ?).
 java.util.List<TaskInstance> getTasksByReporterId(java.lang.String actorId)
          Retrieves the tasks assigned to this specific actor.
 TaskInstance newTaskInstance(java.lang.String taskDefName, java.lang.String reporterId, java.lang.String taskId, java.lang.String taskName, java.lang.String taskDesc)
          Creates a new instance of a given task definition (the last deployed TaskDef with the given name), reported by the given userid, assigns it a specific id, name and description.
 void start(TaskInstance task)
           
 void stop(TaskInstance task)
           
 

Method Detail

deployTaskDef

TaskDef deployTaskDef(TaskDefParser taskDefParser,
                      boolean forceEvenIfSame)
Since a deployed TaskDef is by nature incomplete (doesn't have an id, versionId, nor deploymentDate), we here pass a TaskDefParser instance, which will somehow load our TaskDef definition (from an xml file for instance), and pass it on for actual deployment.

Parameters:
forceEvenIfSame - if false, the TaskDef will not be deployed if it is same as the latest deployed TaskDef with that name
See Also:
TaskDef.isSameAs(net.incongru.taskman.def.TaskDef)

getTaskById

TaskInstance getTaskById(java.lang.String taskId)

getTasksByReporterId

java.util.List<TaskInstance> getTasksByReporterId(java.lang.String actorId)
Retrieves the tasks assigned to this specific actor.


getPendingTasksByReporterId

java.util.List<TaskInstance> getPendingTasksByReporterId(java.lang.String actorId)
Retrieves the pending tasks assigned to this specific actor.


getTasksByAssignee

java.util.List<TaskInstance> getTasksByAssignee(Assignee assignee)
Retrieves all the tasks assigned to an assignee (or a group/pool of actors TODO ?).


getPendingTasksByAssignee

java.util.List<TaskInstance> getPendingTasksByAssignee(Assignee assignee)
Retrieves the pending tasks assigned to an assignee (or a group/pool of actors TODO ?), so that a specific actor can see what tasks he could do if he's bored.


newTaskInstance

TaskInstance newTaskInstance(java.lang.String taskDefName,
                             java.lang.String reporterId,
                             java.lang.String taskId,
                             java.lang.String taskName,
                             java.lang.String taskDesc)
Creates a new instance of a given task definition (the last deployed TaskDef with the given name), reported by the given userid, assigns it a specific id, name and description. Any of these last 3 parameters can be null, in which case they get a default value. (a generated id, null and null, respectively)


assign

void assign(TaskInstance task,
            Assignee assignee)

start

void start(TaskInstance task)

cancel

void cancel(TaskInstance task)

stop

void stop(TaskInstance task)

addVariable

void addVariable(TaskInstance task,
                 java.lang.String name,
                 java.lang.Object value)
See Also:
TaskInstance.getVariableNames()

findRemainingTasks

java.util.List<TaskInstance> findRemainingTasks()
For scheduler: find tasks which are due and not finished. Should then probably keep track of the last reminder ?



Copyright © 2004-2007. All Rights Reserved.