Class PublicTaskController


  • @RestController
    @ConditionalOnProperty(value="nae.public.task.web.enabled",
                           havingValue="true",
                           matchIfMissing=true)
    @RequestMapping("/api/public/task")
    public class PublicTaskController
    extends AbstractTaskController
    • Method Detail

      • getTasksOfCase

        @GetMapping(value="/case/{id}",
                    produces="application/json;charset=UTF-8")
        public java.util.List<TaskReference> getTasksOfCase​(@PathVariable("id")
                                                            java.lang.String caseId,
                                                            java.util.Locale locale)
        Overrides:
        getTasksOfCase in class AbstractTaskController
      • assign

        @PreAuthorize("@taskAuthorizationService.canCallAssign(@userService.getAnonymousLogged(), #taskId)")
        @GetMapping(value="/assign/{id}",
                    produces="application/hal+json")
        public org.springframework.hateoas.EntityModel<EventOutcomeWithMessage> assign​(@PathVariable("id")
                                                                                       java.lang.String taskId,
                                                                                       java.util.Locale locale)
      • finish

        @PreAuthorize("@taskAuthorizationService.canCallFinish(@userService.getAnonymousLogged(), #taskId)")
        @GetMapping(value="/finish/{id}",
                    produces="application/hal+json")
        public org.springframework.hateoas.EntityModel<EventOutcomeWithMessage> finish​(@PathVariable("id")
                                                                                       java.lang.String taskId,
                                                                                       java.util.Locale locale)
      • cancel

        @PreAuthorize("@taskAuthorizationService.canCallCancel(@userService.getAnonymousLogged(), #taskId)")
        @GetMapping(value="/cancel/{id}",
                    produces="application/hal+json")
        public org.springframework.hateoas.EntityModel<EventOutcomeWithMessage> cancel​(@PathVariable("id")
                                                                                       java.lang.String taskId,
                                                                                       java.util.Locale locale)
      • getData

        @GetMapping(value="/{id}/data",
                    produces="application/hal+json")
        public org.springframework.hateoas.EntityModel<EventOutcomeWithMessage> getData​(@PathVariable("id")
                                                                                        java.lang.String taskId,
                                                                                        java.util.Locale locale)
        Overrides:
        getData in class AbstractTaskController
      • setData

        @PreAuthorize("@taskAuthorizationService.canCallSaveData(@userService.getAnonymousLogged(), #taskId)")
        @PostMapping(value="/{id}/data",
                     consumes="application/json;charset=UTF-8",
                     produces="application/json;charset=UTF-8")
        public org.springframework.hateoas.EntityModel<EventOutcomeWithMessage> setData​(@PathVariable("id")
                                                                                        java.lang.String taskId,
                                                                                        @RequestBody
                                                                                        com.fasterxml.jackson.databind.node.ObjectNode dataBody,
                                                                                        java.util.Locale locale)
        Overrides:
        setData in class AbstractTaskController
      • saveFile

        @PreAuthorize("@taskAuthorizationService.canCallSaveFile(@userService.getAnonymousLogged(), #taskId)")
        @PostMapping(value="/{id}/file/{field}",
                     produces="application/hal+json")
        public org.springframework.hateoas.EntityModel<EventOutcomeWithMessage> saveFile​(@PathVariable("id")
                                                                                         java.lang.String taskId,
                                                                                         @PathVariable("field")
                                                                                         java.lang.String fieldId,
                                                                                         @RequestPart("data")
                                                                                         java.util.Map<java.lang.String,​java.lang.String> dataBody,
                                                                                         @RequestPart("file")
                                                                                         org.springframework.web.multipart.MultipartFile multipartFile,
                                                                                         java.util.Locale locale)
      • getFile

        @GetMapping(value="/{id}/file/{field}",
                    produces="application/octet-stream")
        public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getFile​(@PathVariable("id")
                                                                                                     java.lang.String taskId,
                                                                                                     @PathVariable("field")
                                                                                                     java.lang.String fieldId)
                                                                                              throws java.io.FileNotFoundException
        Overrides:
        getFile in class AbstractTaskController
        Throws:
        java.io.FileNotFoundException
      • deleteFile

        @PreAuthorize("@taskAuthorizationService.canCallSaveFile(@userService.getAnonymousLogged(), #taskId)")
        @DeleteMapping(value="/{id}/file/{field}",
                       produces="application/hal+json")
        public org.springframework.hateoas.EntityModel<EventOutcomeWithMessage> deleteFile​(@PathVariable("id")
                                                                                           java.lang.String taskId,
                                                                                           @PathVariable("field")
                                                                                           java.lang.String fieldId,
                                                                                           @RequestParam("parentTaskId")
                                                                                           java.lang.String parentTaskId)
      • getFilePreview

        @GetMapping(value="/{id}/file_preview/{field}",
                    produces="application/octet-stream")
        public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getFilePreview​(@PathVariable("id")
                                                                                                            java.lang.String taskId,
                                                                                                            @PathVariable("field")
                                                                                                            java.lang.String fieldId,
                                                                                                            javax.servlet.http.HttpServletResponse response)
                                                                                                     throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
      • saveFiles

        @PreAuthorize("@taskAuthorizationService.canCallSaveFile(@userService.getAnonymousLogged(), #taskId)")
        @PostMapping(value="/{id}/files/{field}",
                     produces="application/hal+json")
        public org.springframework.hateoas.EntityModel<EventOutcomeWithMessage> saveFiles​(@PathVariable("id")
                                                                                          java.lang.String taskId,
                                                                                          @PathVariable("field")
                                                                                          java.lang.String fieldId,
                                                                                          @RequestPart("data")
                                                                                          java.util.Map<java.lang.String,​java.lang.String> dataBody,
                                                                                          @RequestPart("files")
                                                                                          org.springframework.web.multipart.MultipartFile[] multipartFiles)
      • getNamedFile

        @GetMapping(value="/{id}/file/{field}/{name}",
                    produces="application/octet-stream")
        public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getNamedFile​(@PathVariable("id")
                                                                                                          java.lang.String taskId,
                                                                                                          @PathVariable("field")
                                                                                                          java.lang.String fieldId,
                                                                                                          @PathVariable("name")
                                                                                                          java.lang.String name)
                                                                                                   throws java.io.FileNotFoundException
        Overrides:
        getNamedFile in class AbstractTaskController
        Throws:
        java.io.FileNotFoundException
      • deleteNamedFile

        @PreAuthorize("@taskAuthorizationService.canCallSaveFile(@userService.getAnonymousLogged(), #taskId)")
        @DeleteMapping(value="/{id}/file/{field}/{name}",
                       produces="application/hal+json")
        public org.springframework.hateoas.EntityModel<EventOutcomeWithMessage> deleteNamedFile​(@PathVariable("id")
                                                                                                java.lang.String taskId,
                                                                                                @PathVariable("field")
                                                                                                java.lang.String fieldId,
                                                                                                @PathVariable("name")
                                                                                                java.lang.String name,
                                                                                                @RequestParam("parentTaskId")
                                                                                                java.lang.String parentTaskId)
      • search

        @PostMapping(value="/search",
                     consumes="application/json",
                     produces="application/hal+json")
        public org.springframework.hateoas.PagedModel<LocalisedTaskResource> search​(org.springframework.data.domain.Pageable pageable,
                                                                                    @RequestBody
                                                                                    SingleTaskSearchRequestAsList searchBody,
                                                                                    @RequestParam(defaultValue="OR")
                                                                                    MergeFilterOperation operation,
                                                                                    org.springframework.data.web.PagedResourcesAssembler<Task> assembler,
                                                                                    java.util.Locale locale)