@RestController
@RequestMapping(path="/v1/tasks",
produces="application/json")
public class TaskController
extends java.lang.Object
Task related endpoints.| Constructor and Description |
|---|
TaskController() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<pro.taskana.Task> |
claimTask(java.lang.String taskId,
java.lang.String userName) |
org.springframework.http.ResponseEntity<pro.taskana.Task> |
completeTask(java.lang.String taskId) |
org.springframework.http.ResponseEntity<pro.taskana.Task> |
createTask(pro.taskana.Task task) |
org.springframework.http.ResponseEntity<pro.taskana.Task> |
getTask(java.lang.String taskId) |
org.springframework.http.ResponseEntity<java.util.List<pro.taskana.TaskSummary>> |
getTasks(org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> params) |
org.springframework.http.ResponseEntity<java.util.List<pro.taskana.TaskSummary>> |
getTasksByWorkbasketIdAndState(java.lang.String workbasketId,
pro.taskana.TaskState taskState) |
org.springframework.http.ResponseEntity<java.util.List<pro.taskana.TaskSummary>> |
getTasksummariesByWorkbasketId(java.lang.String workbasketId) |
org.springframework.http.ResponseEntity<pro.taskana.Task> |
transferTask(java.lang.String taskId,
java.lang.String workbasketKey) |
@GetMapping
@Transactional(readOnly=true,
rollbackFor=java.lang.Exception.class)
public org.springframework.http.ResponseEntity<java.util.List<pro.taskana.TaskSummary>> getTasks(@RequestParam
org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> params)
throws pro.taskana.exceptions.NotAuthorizedException,
pro.taskana.exceptions.InvalidArgumentException
pro.taskana.exceptions.NotAuthorizedExceptionpro.taskana.exceptions.InvalidArgumentException@GetMapping(path="/{taskId}")
@Transactional(readOnly=true,
rollbackFor=java.lang.Exception.class)
public org.springframework.http.ResponseEntity<pro.taskana.Task> getTask(@PathVariable
java.lang.String taskId)
throws pro.taskana.exceptions.TaskNotFoundException,
pro.taskana.exceptions.NotAuthorizedException
pro.taskana.exceptions.TaskNotFoundExceptionpro.taskana.exceptions.NotAuthorizedException@GetMapping(path="/workbasket/{workbasketId}/state/{taskState}")
@Transactional(readOnly=true,
rollbackFor=java.lang.Exception.class)
public org.springframework.http.ResponseEntity<java.util.List<pro.taskana.TaskSummary>> getTasksByWorkbasketIdAndState(@PathVariable
java.lang.String workbasketId,
@PathVariable
pro.taskana.TaskState taskState)
@PostMapping(path="/{taskId}/claim")
@Transactional(rollbackFor=java.lang.Exception.class)
public org.springframework.http.ResponseEntity<pro.taskana.Task> claimTask(@PathVariable
java.lang.String taskId,
@RequestBody
java.lang.String userName)
throws pro.taskana.exceptions.TaskNotFoundException,
pro.taskana.exceptions.InvalidStateException,
pro.taskana.exceptions.InvalidOwnerException,
pro.taskana.exceptions.NotAuthorizedException
pro.taskana.exceptions.TaskNotFoundExceptionpro.taskana.exceptions.InvalidStateExceptionpro.taskana.exceptions.InvalidOwnerExceptionpro.taskana.exceptions.NotAuthorizedException@RequestMapping(method=POST,
value="/{taskId}/complete")
@Transactional(rollbackFor=java.lang.Exception.class)
public org.springframework.http.ResponseEntity<pro.taskana.Task> completeTask(@PathVariable
java.lang.String taskId)
throws pro.taskana.exceptions.TaskNotFoundException,
pro.taskana.exceptions.InvalidOwnerException,
pro.taskana.exceptions.InvalidStateException,
pro.taskana.exceptions.NotAuthorizedException
pro.taskana.exceptions.TaskNotFoundExceptionpro.taskana.exceptions.InvalidOwnerExceptionpro.taskana.exceptions.InvalidStateExceptionpro.taskana.exceptions.NotAuthorizedException@RequestMapping(method=POST)
@Transactional(rollbackFor=java.lang.Exception.class)
public org.springframework.http.ResponseEntity<pro.taskana.Task> createTask(@RequestBody
pro.taskana.Task task)
throws pro.taskana.exceptions.WorkbasketNotFoundException,
pro.taskana.exceptions.ClassificationNotFoundException,
pro.taskana.exceptions.NotAuthorizedException,
pro.taskana.exceptions.TaskAlreadyExistException,
pro.taskana.exceptions.InvalidWorkbasketException,
pro.taskana.exceptions.InvalidArgumentException
pro.taskana.exceptions.WorkbasketNotFoundExceptionpro.taskana.exceptions.ClassificationNotFoundExceptionpro.taskana.exceptions.NotAuthorizedExceptionpro.taskana.exceptions.TaskAlreadyExistExceptionpro.taskana.exceptions.InvalidWorkbasketExceptionpro.taskana.exceptions.InvalidArgumentException@RequestMapping(path="/{taskId}/transfer/{workbasketKey}")
@Transactional(rollbackFor=java.lang.Exception.class)
public org.springframework.http.ResponseEntity<pro.taskana.Task> transferTask(@PathVariable
java.lang.String taskId,
@PathVariable
java.lang.String workbasketKey)
throws pro.taskana.exceptions.TaskNotFoundException,
pro.taskana.exceptions.WorkbasketNotFoundException,
pro.taskana.exceptions.NotAuthorizedException,
pro.taskana.exceptions.InvalidWorkbasketException
pro.taskana.exceptions.TaskNotFoundExceptionpro.taskana.exceptions.WorkbasketNotFoundExceptionpro.taskana.exceptions.NotAuthorizedExceptionpro.taskana.exceptions.InvalidWorkbasketException@GetMapping(path="/workbasket/{workbasketId}")
@Transactional(readOnly=true,
rollbackFor=java.lang.Exception.class)
public org.springframework.http.ResponseEntity<java.util.List<pro.taskana.TaskSummary>> getTasksummariesByWorkbasketId(@PathVariable
java.lang.String workbasketId)
Copyright © 2018. All rights reserved.