@RestController @EnableHypermediaSupport(type=HAL) public class WorkbasketDefinitionController extends Object
WorkbasketDefinitionRepresentationModel related endpoints.| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<TaskanaPagedModel<WorkbasketDefinitionRepresentationModel>> |
exportWorkbaskets(String domain) |
org.springframework.http.ResponseEntity<Void> |
importWorkbaskets(org.springframework.web.multipart.MultipartFile file)
This method imports a list of
WorkbasketDefinitionRepresentationModel. |
@GetMapping(path="/api/v1/workbasket-definitions")
@Transactional(readOnly=true,
rollbackFor=java.lang.Exception.class)
public org.springframework.http.ResponseEntity<TaskanaPagedModel<WorkbasketDefinitionRepresentationModel>> exportWorkbaskets(@RequestParam(required=false)
String domain)
@PostMapping(path="/api/v1/workbasket-definitions") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<Void> importWorkbaskets(@RequestParam(value="file") org.springframework.web.multipart.MultipartFile file) throws IOException, pro.taskana.common.api.exceptions.NotAuthorizedException, pro.taskana.common.api.exceptions.DomainNotFoundException, pro.taskana.workbasket.api.exceptions.InvalidWorkbasketException, pro.taskana.workbasket.api.exceptions.WorkbasketAlreadyExistException, pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException, pro.taskana.common.api.exceptions.InvalidArgumentException, pro.taskana.workbasket.api.exceptions.WorkbasketAccessItemAlreadyExistException, pro.taskana.common.api.exceptions.ConcurrencyException
WorkbasketDefinitionRepresentationModel. This does
not exactly match the REST norm, but we want to have an option to import all settings at once.
When a logical equal (key and domain are equal) workbasket already exists an update will be
executed. Otherwise a new workbasket will be created.file - the list of workbasket definitions which will be imported to the current system.IOException - if multipart file cannot be parsed.pro.taskana.common.api.exceptions.NotAuthorizedException - if the user is not authorized.pro.taskana.common.api.exceptions.DomainNotFoundException - if domain information is incorrect.pro.taskana.workbasket.api.exceptions.InvalidWorkbasketException - if workbasket has invalid information.pro.taskana.workbasket.api.exceptions.WorkbasketAlreadyExistException - if workbasket already exists when trying to create a
new one.pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException - if do not exists a workbasket in the system with the used
id.pro.taskana.common.api.exceptions.InvalidArgumentException - if authorization information in workbaskets definitions is
incorrect.pro.taskana.workbasket.api.exceptions.WorkbasketAccessItemAlreadyExistException - if a WorkbasketAccessItem for the same
workbasket and access_id already exists.pro.taskana.common.api.exceptions.ConcurrencyException - if workbasket was updated by an other userCopyright © 2020. All rights reserved.