Class PublicTaskController
- java.lang.Object
-
- com.netgrif.application.engine.workflow.web.AbstractTaskController
-
- com.netgrif.application.engine.workflow.web.PublicTaskController
-
@RestController @ConditionalOnProperty(value="nae.public.task.web.enabled", havingValue="true", matchIfMissing=true) @RequestMapping("/api/public/task") public class PublicTaskController extends AbstractTaskController
-
-
Field Summary
-
Fields inherited from class com.netgrif.application.engine.workflow.web.AbstractTaskController
log
-
-
Constructor Summary
Constructors Constructor Description PublicTaskController(ITaskService taskService, IDataService dataService, IUserService userService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.hateoas.EntityModel<EventOutcomeWithMessage>assign(java.lang.String taskId, java.util.Locale locale)org.springframework.hateoas.EntityModel<EventOutcomeWithMessage>cancel(java.lang.String taskId, java.util.Locale locale)org.springframework.hateoas.EntityModel<EventOutcomeWithMessage>deleteFile(java.lang.String taskId, FileFieldRequest requestBody)org.springframework.hateoas.EntityModel<EventOutcomeWithMessage>deleteNamedFile(java.lang.String taskId, FileFieldRequest requestBody)org.springframework.hateoas.EntityModel<EventOutcomeWithMessage>finish(java.lang.String taskId, java.util.Locale locale)org.springframework.hateoas.EntityModel<EventOutcomeWithMessage>getData(java.lang.String taskId, java.util.Locale locale)org.springframework.http.ResponseEntity<org.springframework.core.io.Resource>getFile(java.lang.String taskId, java.lang.String fieldId)org.springframework.http.ResponseEntity<org.springframework.core.io.Resource>getFilePreview(java.lang.String taskId, java.lang.String fieldId)org.springframework.http.ResponseEntity<org.springframework.core.io.Resource>getNamedFile(java.lang.String taskId, java.lang.String fieldId, java.lang.String fileName)java.util.List<TaskReference>getTasksOfCase(java.lang.String caseId, java.util.Locale locale)org.springframework.hateoas.EntityModel<EventOutcomeWithMessage>saveFile(org.springframework.security.core.Authentication auth, java.lang.String taskId, FileFieldRequest dataBody, org.springframework.web.multipart.MultipartFile multipartFile, java.util.Locale locale)org.springframework.hateoas.EntityModel<EventOutcomeWithMessage>saveFiles(java.lang.String taskId, org.springframework.web.multipart.MultipartFile[] multipartFiles, FileFieldRequest requestBody)org.springframework.hateoas.PagedModel<LocalisedTaskResource>search(org.springframework.data.domain.Pageable pageable, SingleTaskSearchRequestAsList searchBody, MergeFilterOperation operation, org.springframework.data.web.PagedResourcesAssembler<Task> assembler, java.util.Locale locale)org.springframework.hateoas.EntityModel<EventOutcomeWithMessage>setData(java.lang.String taskId, com.fasterxml.jackson.databind.node.ObjectNode dataBody, java.util.Locale locale)-
Methods inherited from class com.netgrif.application.engine.workflow.web.AbstractTaskController
assign, cancel, count, delegate, deleteFile, deleteNamedFile, finish, getAll, getAllByCases, getMy, getMyFinished, getOne, saveFile, search, searchElastic, searchPublic
-
-
-
-
Constructor Detail
-
PublicTaskController
public PublicTaskController(ITaskService taskService, IDataService dataService, IUserService userService)
-
-
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:
getTasksOfCasein classAbstractTaskController
-
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:
getDatain classAbstractTaskController
-
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:
setDatain classAbstractTaskController
-
saveFile
@PreAuthorize("@taskAuthorizationService.canCallSaveFile(@userService.getAnonymousLogged(), #taskId)") @PostMapping(value="/{id}/file", produces="application/hal+json") public org.springframework.hateoas.EntityModel<EventOutcomeWithMessage> saveFile(org.springframework.security.core.Authentication auth, @PathVariable("id") java.lang.String taskId, @RequestPart("data") FileFieldRequest dataBody, @RequestPart("file") org.springframework.web.multipart.MultipartFile multipartFile, java.util.Locale locale)
-
getFile
@GetMapping(value="/{id}/file", produces="application/octet-stream") public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getFile(@PathVariable("id") java.lang.String taskId, @RequestParam("fieldId") java.lang.String fieldId) throws java.io.FileNotFoundException- Overrides:
getFilein classAbstractTaskController- Throws:
java.io.FileNotFoundException
-
deleteFile
@PreAuthorize("@taskAuthorizationService.canCallSaveFile(@userService.getAnonymousLogged(), #taskId)") @DeleteMapping(value="/{id}/file", produces="application/hal+json") public org.springframework.hateoas.EntityModel<EventOutcomeWithMessage> deleteFile(@PathVariable("id") java.lang.String taskId, @RequestBody FileFieldRequest requestBody)
-
getFilePreview
@GetMapping(value="/{id}/file_preview", produces="application/octet-stream") public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getFilePreview(@PathVariable("id") java.lang.String taskId, @RequestParam("fieldId") java.lang.String fieldId) throws java.io.FileNotFoundException- Overrides:
getFilePreviewin classAbstractTaskController- Throws:
java.io.FileNotFoundException
-
saveFiles
@PreAuthorize("@taskAuthorizationService.canCallSaveFile(@userService.getAnonymousLogged(), #taskId)") @PostMapping(value="/{id}/files", produces="application/hal+json") public org.springframework.hateoas.EntityModel<EventOutcomeWithMessage> saveFiles(@PathVariable("id") java.lang.String taskId, @RequestPart("files") org.springframework.web.multipart.MultipartFile[] multipartFiles, @RequestPart("data") FileFieldRequest requestBody)- Overrides:
saveFilesin classAbstractTaskController
-
getNamedFile
@GetMapping(value="/{id}/file/named", produces="application/octet-stream") public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getNamedFile(@PathVariable("id") java.lang.String taskId, @RequestParam("fieldId") java.lang.String fieldId, @RequestParam("fileName") java.lang.String fileName) throws java.io.FileNotFoundException- Overrides:
getNamedFilein classAbstractTaskController- Throws:
java.io.FileNotFoundException
-
deleteNamedFile
@PreAuthorize("@taskAuthorizationService.canCallSaveFile(@userService.getAnonymousLogged(), #taskId)") @DeleteMapping(value="/{id}/file/named", produces="application/hal+json") public org.springframework.hateoas.EntityModel<EventOutcomeWithMessage> deleteNamedFile(@PathVariable("id") java.lang.String taskId, @RequestBody FileFieldRequest requestBody)
-
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)
-
-