Package com.comalatech.workflow
Interface TaskService
public interface TaskService
Provide services for manipulating the content's tasks. Note that for retrieving tasks you have to use the
StateService
- Since:
- 1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionassignTask(com.atlassian.confluence.core.ContentEntityObject content, String taskId, String assignee, String comment) Assigns the given taskassignTask(com.atlassian.confluence.core.ContentEntityObject content, String taskId, String assignee, String comment, Date dueDate) Assigns the given taskcompleteTask(com.atlassian.confluence.core.ContentEntityObject content, String taskId, String comment) Completes the given task.completeTask(com.atlassian.confluence.core.ContentEntityObject content, String taskId, String outcome, String comment) Deprecated.createTask(com.atlassian.confluence.core.ContentEntityObject content, String taskName, String assignee, String comment) Create a task on the content in the current State.createTask(com.atlassian.confluence.core.ContentEntityObject content, String taskName, String assignee, String comment, Date dueDate) Create a task on the content in the current State.editTask(com.atlassian.confluence.core.ContentEntityObject content, String taskId, String newTaskName, String newComment, Date dueDate) Edits a currently existing task.getActiveTasks(com.atlassian.confluence.core.ContentEntityObject ceo) Returns a list of tasks which are currently active on the given content object.getCompletedTasks(com.atlassian.confluence.core.ContentEntityObject ceo) Returns a list of tasks which are completed on the given content object.getTasks(com.atlassian.confluence.core.ContentEntityObject ceo) Returns all tasks which are on the given content object.voidremoveTask(com.atlassian.confluence.core.ContentEntityObject content, String taskId) Removes a given taskvoidremoveTask(com.atlassian.confluence.core.ContentEntityObject content, String taskId, String comment) Removes a given task
-
Method Details
-
createTask
Task createTask(com.atlassian.confluence.core.ContentEntityObject content, String taskName, String assignee, String comment, Date dueDate) throws WorkflowException Create a task on the content in the current State. The task may be assigned to a user- Parameters:
content- the content objecttaskName- the name of the taskassignee- the name of the assignee (optional)comment- a comment of description of the taskdueDate- the due date for this task. (alpha functionality, not yet supported)- Returns:
- the Task created
- Throws:
WorkflowException- Since:
- 1.3
-
createTask
Task createTask(com.atlassian.confluence.core.ContentEntityObject content, String taskName, String assignee, String comment) throws WorkflowException Create a task on the content in the current State. The task may be assigned to a user.- Parameters:
content- the content objecttaskName- the name of the taskassignee- the name of the assignee (optional)comment- a comment of description of the task- Returns:
- the Task created
- Throws:
WorkflowException- Since:
- 1.0
-
editTask
Task editTask(com.atlassian.confluence.core.ContentEntityObject content, String taskId, String newTaskName, String newComment, Date dueDate) throws WorkflowException Edits a currently existing task. This method works as a PUT operation where if no data is provided for a field and it had already a value then it will be removed.- Parameters:
content- the content objecttaskId- the id of the task to editnewTaskName- the new name of the tasknewComment- the new comment for the taskdueDate- the new due date for the task (alpha functionality, not yet supported)- Returns:
- the updated Task object
- Throws:
WorkflowException- Since:
- 1.3
-
completeTask
@Deprecated Task completeTask(com.atlassian.confluence.core.ContentEntityObject content, String taskId, String outcome, String comment) throws WorkflowException Deprecated.since 6.17.3 usecompleteTask(ContentEntityObject, String, String)insteadCompletes the given task.- Parameters:
content- the content objecttaskId- the id of the task to completeoutcome- the outcome of the task. User approved or rejected for Approval-type taskscomment- a comment associated with the completion- Returns:
- the task containing the new completion
- Throws:
WorkflowException- Since:
- 1.0
-
completeTask
Task completeTask(com.atlassian.confluence.core.ContentEntityObject content, String taskId, String comment) throws WorkflowException Completes the given task.- Parameters:
content- the content objecttaskId- the id of the task to completecomment- a comment associated with the completion- Returns:
- the task containing the new completion
- Throws:
WorkflowException- Since:
- 6.17.3
-
removeTask
void removeTask(com.atlassian.confluence.core.ContentEntityObject content, String taskId) throws WorkflowException Removes a given task- Parameters:
content- the content objecttaskId- the id of the task to remove- Throws:
WorkflowException- Since:
- 1.1
-
removeTask
void removeTask(com.atlassian.confluence.core.ContentEntityObject content, String taskId, String comment) throws WorkflowException Removes a given task- Parameters:
content- the content objecttaskId- the id of the task to removecomment- the comment associated with the deletion- Throws:
WorkflowException- Since:
- 1.11.1
-
assignTask
Task assignTask(com.atlassian.confluence.core.ContentEntityObject content, String taskId, String assignee, String comment) throws WorkflowException Assigns the given task- Parameters:
content- the content objecttaskId- the id of the task (in the current state)assignee- the name of the assigneecomment- the comment associated to this assignment- Returns:
- the task containing the new assignment
- Throws:
WorkflowException- Since:
- 1.0
-
assignTask
Task assignTask(com.atlassian.confluence.core.ContentEntityObject content, String taskId, String assignee, String comment, Date dueDate) throws WorkflowException Assigns the given task- Parameters:
content- the content objecttaskId- the id of the task (in the current state)assignee- the name of the assigneecomment- the comment associated to this assignmentdueDate- the due date for this task- Returns:
- the task containing the new assignment
- Throws:
WorkflowException- Since:
- 1.3
-
getTasks
Returns all tasks which are on the given content object.- Parameters:
ceo- the Content object to return the tasks for.- Returns:
- list of tasks, empty list if none.
-
getActiveTasks
Returns a list of tasks which are currently active on the given content object.- Parameters:
ceo- the content object to return the active tasks for.- Returns:
- list of active tasks, empty list if none.
-
getCompletedTasks
Returns a list of tasks which are completed on the given content object.- Parameters:
ceo- the content object to returne the completed tasks for.- Returns:
- list of compelted tasks, empty if none.
-
completeTask(ContentEntityObject, String, String)instead