Class WorkbasketController


  • @RestController
    @EnableHypermediaSupport(type=HAL)
    public class WorkbasketController
    extends AbstractPagingController
    Controller for all Workbasket related endpoints.
    • Method Detail

      • getWorkbaskets

        @GetMapping(path="/api/v1/workbaskets")
        @Transactional(readOnly=true,
                       rollbackFor=java.lang.Exception.class)
        public org.springframework.http.ResponseEntity<TaskanaPagedModel<WorkbasketSummaryRepresentationModel>> getWorkbaskets​(@RequestParam
                                                                                                                               org.springframework.util.MultiValueMap<String,​String> params)
                                                                                                                        throws pro.taskana.common.api.exceptions.InvalidArgumentException
        Throws:
        pro.taskana.common.api.exceptions.InvalidArgumentException
      • getWorkbasket

        @GetMapping(path="/api/v1/workbaskets/{workbasketId}",
                    produces="application/hal+json")
        @Transactional(readOnly=true,
                       rollbackFor=java.lang.Exception.class)
        public org.springframework.http.ResponseEntity<WorkbasketRepresentationModel> getWorkbasket​(@PathVariable("workbasketId")
                                                                                                    String workbasketId)
                                                                                             throws pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException,
                                                                                                    pro.taskana.common.api.exceptions.NotAuthorizedException
        Throws:
        pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException
        pro.taskana.common.api.exceptions.NotAuthorizedException
      • deleteWorkbasket

        @DeleteMapping(path="/api/v1/workbaskets/{workbasketId}")
        @Transactional(rollbackFor=java.lang.Exception.class,
                       noRollbackFor=pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException.class)
        public org.springframework.http.ResponseEntity<WorkbasketRepresentationModel> deleteWorkbasket​(@PathVariable("workbasketId")
                                                                                                       String workbasketId)
                                                                                                throws pro.taskana.common.api.exceptions.NotAuthorizedException,
                                                                                                       pro.taskana.common.api.exceptions.InvalidArgumentException,
                                                                                                       pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException,
                                                                                                       pro.taskana.workbasket.api.exceptions.WorkbasketInUseException
        Throws:
        pro.taskana.common.api.exceptions.NotAuthorizedException
        pro.taskana.common.api.exceptions.InvalidArgumentException
        pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException
        pro.taskana.workbasket.api.exceptions.WorkbasketInUseException
      • createWorkbasket

        @PostMapping(path="/api/v1/workbaskets")
        @Transactional(rollbackFor=java.lang.Exception.class)
        public org.springframework.http.ResponseEntity<WorkbasketRepresentationModel> createWorkbasket​(@RequestBody
                                                                                                       WorkbasketRepresentationModel workbasketRepresentationModel)
                                                                                                throws pro.taskana.workbasket.api.exceptions.InvalidWorkbasketException,
                                                                                                       pro.taskana.common.api.exceptions.NotAuthorizedException,
                                                                                                       pro.taskana.workbasket.api.exceptions.WorkbasketAlreadyExistException,
                                                                                                       pro.taskana.common.api.exceptions.DomainNotFoundException
        Throws:
        pro.taskana.workbasket.api.exceptions.InvalidWorkbasketException
        pro.taskana.common.api.exceptions.NotAuthorizedException
        pro.taskana.workbasket.api.exceptions.WorkbasketAlreadyExistException
        pro.taskana.common.api.exceptions.DomainNotFoundException
      • updateWorkbasket

        @PutMapping(path="/api/v1/workbaskets/{workbasketId}")
        @Transactional(rollbackFor=java.lang.Exception.class)
        public org.springframework.http.ResponseEntity<WorkbasketRepresentationModel> updateWorkbasket​(@PathVariable("workbasketId")
                                                                                                       String workbasketId,
                                                                                                       @RequestBody
                                                                                                       WorkbasketRepresentationModel workbasketRepresentationModel)
                                                                                                throws pro.taskana.workbasket.api.exceptions.InvalidWorkbasketException,
                                                                                                       pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException,
                                                                                                       pro.taskana.common.api.exceptions.NotAuthorizedException,
                                                                                                       pro.taskana.common.api.exceptions.ConcurrencyException
        Throws:
        pro.taskana.workbasket.api.exceptions.InvalidWorkbasketException
        pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException
        pro.taskana.common.api.exceptions.NotAuthorizedException
        pro.taskana.common.api.exceptions.ConcurrencyException
      • getWorkbasketAccessItems

        @GetMapping(path="/api/v1/workbaskets/{workbasketId}/workbasketAccessItems",
                    produces="application/hal+json")
        @Transactional(readOnly=true,
                       rollbackFor=java.lang.Exception.class)
        public org.springframework.http.ResponseEntity<TaskanaPagedModel<WorkbasketAccessItemRepresentationModel>> getWorkbasketAccessItems​(@PathVariable("workbasketId")
                                                                                                                                            String workbasketId)
                                                                                                                                     throws pro.taskana.common.api.exceptions.NotAuthorizedException,
                                                                                                                                            pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException
        Throws:
        pro.taskana.common.api.exceptions.NotAuthorizedException
        pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException
      • setWorkbasketAccessItems

        @PutMapping(path="/api/v1/workbaskets/{workbasketId}/workbasketAccessItems")
        @Transactional(rollbackFor=java.lang.Exception.class)
        public org.springframework.http.ResponseEntity<TaskanaPagedModel<WorkbasketAccessItemRepresentationModel>> setWorkbasketAccessItems​(@PathVariable("workbasketId")
                                                                                                                                            String workbasketId,
                                                                                                                                            @RequestBody
                                                                                                                                            List<WorkbasketAccessItemRepresentationModel> workbasketAccessResourceItems)
                                                                                                                                     throws pro.taskana.common.api.exceptions.NotAuthorizedException,
                                                                                                                                            pro.taskana.common.api.exceptions.InvalidArgumentException,
                                                                                                                                            pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException,
                                                                                                                                            pro.taskana.workbasket.api.exceptions.WorkbasketAccessItemAlreadyExistException
        Throws:
        pro.taskana.common.api.exceptions.NotAuthorizedException
        pro.taskana.common.api.exceptions.InvalidArgumentException
        pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException
        pro.taskana.workbasket.api.exceptions.WorkbasketAccessItemAlreadyExistException
      • getDistributionTargets

        @GetMapping(path="/api/v1/workbaskets/{workbasketId}/distribution-targets",
                    produces="application/hal+json")
        @Transactional(readOnly=true,
                       rollbackFor=java.lang.Exception.class)
        public org.springframework.http.ResponseEntity<TaskanaPagedModel<WorkbasketSummaryRepresentationModel>> getDistributionTargets​(@PathVariable("workbasketId")
                                                                                                                                       String workbasketId)
                                                                                                                                throws pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException,
                                                                                                                                       pro.taskana.common.api.exceptions.NotAuthorizedException
        Throws:
        pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException
        pro.taskana.common.api.exceptions.NotAuthorizedException
      • setDistributionTargetsForWorkbasketId

        @PutMapping(path="/api/v1/workbaskets/{workbasketId}/distribution-targets")
        @Transactional(rollbackFor=java.lang.Exception.class)
        public org.springframework.http.ResponseEntity<TaskanaPagedModel<WorkbasketSummaryRepresentationModel>> setDistributionTargetsForWorkbasketId​(@PathVariable("workbasketId")
                                                                                                                                                      String sourceWorkbasketId,
                                                                                                                                                      @RequestBody
                                                                                                                                                      List<String> targetWorkbasketIds)
                                                                                                                                               throws pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException,
                                                                                                                                                      pro.taskana.common.api.exceptions.NotAuthorizedException
        Throws:
        pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException
        pro.taskana.common.api.exceptions.NotAuthorizedException
      • removeDistributionTargetForWorkbasketId

        @DeleteMapping(path="/api/v1/workbaskets/{workbasketId}/distribution-targets")
        @Transactional(rollbackFor=java.lang.Exception.class)
        public org.springframework.http.ResponseEntity<TaskanaPagedModel<WorkbasketSummaryRepresentationModel>> removeDistributionTargetForWorkbasketId​(@PathVariable("workbasketId")
                                                                                                                                                        String targetWorkbasketId)
                                                                                                                                                 throws pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException,
                                                                                                                                                        pro.taskana.common.api.exceptions.NotAuthorizedException
        Throws:
        pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException
        pro.taskana.common.api.exceptions.NotAuthorizedException