public interface TaskService
| Modifier and Type | Method and Description |
|---|---|
Task |
claim(String id,
String userName)
Claim an existing task.
|
Task |
complete(String taskId)
Set task to completed.
|
Task |
createTask(Task task)
Create a task by a task object.
|
TaskQuery |
createTaskQuery()
This method provides a query builder for quering the database.
|
Task |
getTaskById(String taskId)
Get the details of a task.
|
List<DueWorkbasketCounter> |
getTaskCountByWorkbasketAndDaysInPastAndState(long daysInPast,
List<TaskState> states) |
List<TaskStateCounter> |
getTaskCountForState(List<TaskState> states)
This method counts all tasks with a given state.
|
long |
getTaskCountForWorkbasketByDaysInPastAndState(String workbasketId,
long daysInPast,
List<TaskState> states)
Count all Tasks in a given workbasket with daysInPast as Days from today in
the past and a specific state.
|
List<Task> |
getTasksByWorkbasketIdAndState(String workbasketId,
TaskState taskState)
Getting a list of all Tasks which got matching workbasketIds and states.
|
List<TaskSummary> |
getTaskSummariesByWorkbasketId(String workbasketId)
Getting a short summary of all tasks in a specific workbasket.
|
Task |
setTaskRead(String taskId,
boolean isRead)
Marks a task as read.
|
Task |
transfer(String taskId,
String workbasketId)
Transfer task to another workbasket.
|
Task claim(String id, String userName) throws TaskNotFoundException
id - task iduserName - user who claims the taskTaskNotFoundException - TODOTask complete(String taskId) throws TaskNotFoundException
taskId - the task idTaskNotFoundException - TODOTask createTask(Task task) throws NotAuthorizedException, WorkbasketNotFoundException, ClassificationNotFoundException
task - TODONotAuthorizedException - TODOWorkbasketNotFoundException - TODOClassificationNotFoundException - TODOTask getTaskById(String taskId) throws TaskNotFoundException
taskId - the id of the taskTaskNotFoundException - TODOList<TaskStateCounter> getTaskCountForState(List<TaskState> states)
states - the countable statesTaskStateCounterlong getTaskCountForWorkbasketByDaysInPastAndState(String workbasketId, long daysInPast, List<TaskState> states)
workbasketId - TODOdaysInPast - TODOstates - TODOList<DueWorkbasketCounter> getTaskCountByWorkbasketAndDaysInPastAndState(long daysInPast, List<TaskState> states)
Task transfer(String taskId, String workbasketId) throws TaskNotFoundException, WorkbasketNotFoundException, NotAuthorizedException
taskId - TODOworkbasketId - TODOTaskNotFoundException - TODOWorkbasketNotFoundException - TODONotAuthorizedException - TODOTask setTaskRead(String taskId, boolean isRead) throws TaskNotFoundException
taskId - the id of the task to be updatedisRead - the new status of the read flag.TaskNotFoundException - TODOTaskQuery createTaskQuery()
TaskQueryList<Task> getTasksByWorkbasketIdAndState(String workbasketId, TaskState taskState) throws WorkbasketNotFoundException, NotAuthorizedException, Exception
workbasketId - where the tasks need to be in.taskState - which is required for the request,WorkbasketNotFoundException - if the workbasketId can´t be resolved to a existing workbasket.NotAuthorizedException - if the current user got no rights for reading on this workbasket.Exception - if no result can be found by @{link TaskMapper}.List<TaskSummary> getTaskSummariesByWorkbasketId(String workbasketId) throws WorkbasketNotFoundException
workbasketId - ID of workbasket where tasks are located.WorkbasketNotFoundException - if a Workbasket can´t be located.Copyright © 2017. All rights reserved.