org.apache.agila.services.task
Interface TaskService

All Known Implementing Classes:
AbstractTaskService, TaskServiceImpl, TaskServiceImpl, TaskServiceImpl

public interface TaskService

Manages tasks for users

Version:
$Id: $
Author:
Geir Magnusson Jr.

Method Summary
 TaskID assignTask(TokenID tokenID, java.lang.String message, UserID userID, java.util.Date due)
          assigns a new task to a given user
 TaskID[] assignTaskToActors(TokenID tokenID, java.lang.String message, Actor[] actor, java.util.Date due)
          Assigns a new task to a given abstract named Actor.
 TaskID assignTaskToTeam(TokenID tokenID, java.lang.String message, GroupID groupID, java.util.Date due)
          Assigns a new task to a given group of users.
 Renderer getRendererForTask(TaskID taskID, java.lang.Class rendererType)
           
 ResponseHandler getResponseHandlerForTask(TaskID taskID, java.lang.Class handlerType)
           
 Task getTaskByID(TaskID taskID)
          gets a task object by id
 java.util.List getTasksForGroups(GroupID[] groupIDs, int status)
          Returns a list of tasks for the groups in which a user belongs.
 java.util.List getTasksForInstance(InstanceID instanceID, int status)
          Returns a list of tasks for the given workflow instance which are at the specified status
 java.util.List getTasksForUser(UserID userID, int status)
          returns a list of tasks for a user
 boolean lockTaskForUser(TaskID taskID, UserID userID)
          Attempts to lock the given task for the user, to take ownership of the task if noone else has locked it yet.
 void setTaskStatus(TaskID taskID, int status)
          sets the status of a test
 int setTaskStatusForInstance(InstanceID instanceID, int oldStatus, int newStatus)
          Updates the status of all tasks of the oldStatus on the given workflow instance to the newStatus.
 void unlockTaskForUser(TaskID taskID, UserID userID)
          Unlocks the task for the given user so that its given back to the team for another user to complete.
 

Method Detail

assignTask

TaskID assignTask(TokenID tokenID,
                  java.lang.String message,
                  UserID userID,
                  java.util.Date due)
assigns a new task to a given user

Parameters:
tokenID -
message -
userID -
due -
Returns:

assignTaskToTeam

TaskID assignTaskToTeam(TokenID tokenID,
                        java.lang.String message,
                        GroupID groupID,
                        java.util.Date due)
Assigns a new task to a given group of users. A user must then lock the task to assign it to themselves as an individual, or they can unlock it to put it back into the pool for another group member to complete.

Parameters:
tokenID -
message -
groupID -
due -
Returns:

assignTaskToActors

TaskID[] assignTaskToActors(TokenID tokenID,
                            java.lang.String message,
                            Actor[] actor,
                            java.util.Date due)
Assigns a new task to a given abstract named Actor. The service uses its configured ActorResolver to resolve the abstract actor to one or more users or groups.

Parameters:
tokenID -
message -
actor -
due -
Returns:

getTasksForUser

java.util.List getTasksForUser(UserID userID,
                               int status)
returns a list of tasks for a user

Parameters:
userID -
Returns:

getTasksForGroups

java.util.List getTasksForGroups(GroupID[] groupIDs,
                                 int status)
Returns a list of tasks for the groups in which a user belongs. The definitions of the groups is outside of the scope of Agila.

Parameters:
groupIDs -
Returns:

getTasksForInstance

java.util.List getTasksForInstance(InstanceID instanceID,
                                   int status)
Returns a list of tasks for the given workflow instance which are at the specified status


setTaskStatusForInstance

int setTaskStatusForInstance(InstanceID instanceID,
                             int oldStatus,
                             int newStatus)
Updates the status of all tasks of the oldStatus on the given workflow instance to the newStatus. This method can be used to cancel/complete all open tasks, or re-open all complete tasks etc.

Parameters:
instanceID -
oldStatus - the current status of the tasks
newStatus - the new status of the tasks
Returns:
the number of rows updated

lockTaskForUser

boolean lockTaskForUser(TaskID taskID,
                        UserID userID)
Attempts to lock the given task for the user, to take ownership of the task if noone else has locked it yet.

Parameters:
taskID -
userID -
Returns:
true if the task was locked or false if another user has already locked it.

unlockTaskForUser

void unlockTaskForUser(TaskID taskID,
                       UserID userID)
Unlocks the task for the given user so that its given back to the team for another user to complete.

Parameters:
taskID -
userID -

setTaskStatus

void setTaskStatus(TaskID taskID,
                   int status)
sets the status of a test

Parameters:
taskID -
status -

getTaskByID

Task getTaskByID(TaskID taskID)
gets a task object by id

Parameters:
taskID -
Returns:

getRendererForTask

Renderer getRendererForTask(TaskID taskID,
                            java.lang.Class rendererType)

getResponseHandlerForTask

ResponseHandler getResponseHandlerForTask(TaskID taskID,
                                          java.lang.Class handlerType)


Copyright © 2004-2005 The Apache Software Foundation. All Rights Reserved.