@RestController
@EnableHypermediaSupport(type=HAL)
@RequestMapping(path="/v1/tasks",
produces="application/hal+json")
public class TaskController
extends AbstractPagingController
Task related endpoints.| Constructor and Description |
|---|
TaskController() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<TaskResource> |
claimTask(String taskId,
String userName) |
org.springframework.http.ResponseEntity<TaskResource> |
completeTask(String taskId) |
org.springframework.http.ResponseEntity<TaskResource> |
createTask(TaskResource taskResource) |
org.springframework.http.ResponseEntity<TaskResource> |
deleteTask(String taskId) |
org.springframework.http.ResponseEntity<TaskResource> |
getTask(String taskId) |
org.springframework.http.ResponseEntity<org.springframework.hateoas.PagedResources<TaskSummaryResource>> |
getTasks(org.springframework.util.MultiValueMap<String,String> params) |
org.springframework.http.ResponseEntity<TaskResource> |
transferTask(String taskId,
String workbasketId) |
org.springframework.http.ResponseEntity<TaskResource> |
updateTask(String taskId,
TaskResource taskResource) |
extractCommaSeparatedFields, initPageMetadata, validateNoInvalidParameterIsLeft@GetMapping
@Transactional(readOnly=true,
rollbackFor=java.lang.Exception.class)
public org.springframework.http.ResponseEntity<org.springframework.hateoas.PagedResources<TaskSummaryResource>> getTasks(@RequestParam
org.springframework.util.MultiValueMap<String,String> params)
throws pro.taskana.exceptions.InvalidArgumentException
pro.taskana.exceptions.InvalidArgumentException@GetMapping(path="/{taskId}")
@Transactional(readOnly=true,
rollbackFor=java.lang.Exception.class)
public org.springframework.http.ResponseEntity<TaskResource> getTask(@PathVariable
String taskId)
throws pro.taskana.exceptions.TaskNotFoundException,
pro.taskana.exceptions.NotAuthorizedException
pro.taskana.exceptions.TaskNotFoundExceptionpro.taskana.exceptions.NotAuthorizedException@PostMapping(path="/{taskId}/claim")
@Transactional(rollbackFor=java.lang.Exception.class)
public org.springframework.http.ResponseEntity<TaskResource> claimTask(@PathVariable
String taskId,
@RequestBody
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<TaskResource> completeTask(@PathVariable
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=DELETE,
value="/{taskId}")
@Transactional(rollbackFor=java.lang.Exception.class)
public org.springframework.http.ResponseEntity<TaskResource> deleteTask(@PathVariable
String taskId)
throws pro.taskana.exceptions.TaskNotFoundException,
pro.taskana.exceptions.InvalidStateException,
pro.taskana.exceptions.NotAuthorizedException
pro.taskana.exceptions.TaskNotFoundExceptionpro.taskana.exceptions.InvalidStateExceptionpro.taskana.exceptions.NotAuthorizedException@RequestMapping(method=POST) @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskResource> createTask(@RequestBody TaskResource taskResource) throws pro.taskana.exceptions.WorkbasketNotFoundException, pro.taskana.exceptions.ClassificationNotFoundException, pro.taskana.exceptions.NotAuthorizedException, pro.taskana.exceptions.TaskAlreadyExistException, pro.taskana.exceptions.InvalidArgumentException
pro.taskana.exceptions.WorkbasketNotFoundExceptionpro.taskana.exceptions.ClassificationNotFoundExceptionpro.taskana.exceptions.NotAuthorizedExceptionpro.taskana.exceptions.TaskAlreadyExistExceptionpro.taskana.exceptions.InvalidArgumentException@RequestMapping(path="/{taskId}/transfer/{workbasketId}")
@Transactional(rollbackFor=java.lang.Exception.class)
public org.springframework.http.ResponseEntity<TaskResource> transferTask(@PathVariable
String taskId,
@PathVariable
String workbasketId)
throws pro.taskana.exceptions.TaskNotFoundException,
pro.taskana.exceptions.WorkbasketNotFoundException,
pro.taskana.exceptions.NotAuthorizedException,
pro.taskana.exceptions.InvalidStateException
pro.taskana.exceptions.TaskNotFoundExceptionpro.taskana.exceptions.WorkbasketNotFoundExceptionpro.taskana.exceptions.NotAuthorizedExceptionpro.taskana.exceptions.InvalidStateException@PutMapping(path="/{taskId}")
@Transactional(rollbackFor=java.lang.Exception.class)
public org.springframework.http.ResponseEntity<TaskResource> updateTask(@PathVariable(value="taskId")
String taskId,
@RequestBody
TaskResource taskResource)
throws pro.taskana.exceptions.TaskNotFoundException,
pro.taskana.exceptions.ClassificationNotFoundException,
pro.taskana.exceptions.InvalidArgumentException,
pro.taskana.exceptions.ConcurrencyException,
pro.taskana.exceptions.NotAuthorizedException,
pro.taskana.exceptions.AttachmentPersistenceException
pro.taskana.exceptions.TaskNotFoundExceptionpro.taskana.exceptions.ClassificationNotFoundExceptionpro.taskana.exceptions.InvalidArgumentExceptionpro.taskana.exceptions.ConcurrencyExceptionpro.taskana.exceptions.NotAuthorizedExceptionpro.taskana.exceptions.AttachmentPersistenceExceptionCopyright © 2018. All rights reserved.