public class TaskAPI extends BaseAPI
| Constructor and Description |
|---|
TaskAPI(ResourceFactory resourceFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
assignTask(int taskId,
int responsible)
Assigns the task to another user.
|
void |
completeTask(int taskId)
Mark the given task as completed.
|
int |
createTask(TaskCreate task,
boolean silent)
Creates a new task with no reference to other objects.
|
int |
createTaskWithReference(TaskCreate task,
Reference reference,
boolean silent)
Creates a new task with a reference to the given object.
|
TasksByDue |
getActiveTasks()
Returns the active tasks of the user.
|
TasksByDue |
getAssignedActiveTasks()
Returns the tasks that the user has assigned to another user.
|
List<Task> |
getCompletedTasks()
Returns the tasks that is completed and where the active user is
responsible.
|
Task |
getTask(int taskId)
Returns the task with the given id.
|
List<Task> |
getTasksWithReference(Reference reference)
Gets a list of tasks with a reference to the given object.
|
void |
incompleteTask(int taskId)
Mark the completed task as no longer being completed.
|
void |
updateDueDate(int taskId,
org.joda.time.LocalDate dueDate)
Updates the due date of the task to the given value
|
void |
updatePrivate(int taskId,
boolean priv)
Update the private flag on the given task.
|
void |
updateText(int taskId,
String text)
Updates the text of the task.
|
getResourceFactorypublic TaskAPI(ResourceFactory resourceFactory)
public Task getTask(int taskId)
taskId - The id of the task to retrievepublic void assignTask(int taskId,
int responsible)
taskId - The id of the task to assignresponsible - The id of the user the task should be assigned topublic void completeTask(int taskId)
taskId - The id of the task to nark as completepublic void incompleteTask(int taskId)
taskId - The id of the task to mark as incompletepublic void updateDueDate(int taskId,
org.joda.time.LocalDate dueDate)
taskId - The id of the taskdueDate - The new due date of the taskpublic void updatePrivate(int taskId,
boolean priv)
taskId - The id of the taskpriv - true if the task should be private,
false otherwisepublic void updateText(int taskId,
String text)
taskId - The id of the tasktext - The new text of the taskpublic int createTask(TaskCreate task, boolean silent)
task - The data of the task to be createdpublic int createTaskWithReference(TaskCreate task, Reference reference, boolean silent)
task - The data of the task to be createdreference - The reference to the object the task should be attached topublic List<Task> getTasksWithReference(Reference reference)
reference - The object on which to return taskspublic TasksByDue getActiveTasks()
public TasksByDue getAssignedActiveTasks()
Copyright © 2014. All Rights Reserved.