Class WorkflowController


  • @RestController
    @RequestMapping("/api/workflow")
    @ConditionalOnProperty(value="nae.case.web.enabled",
                           havingValue="true",
                           matchIfMissing=true)
    public class WorkflowController
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      CountResponse count​(SingleCaseSearchRequestAsList searchBody, MergeFilterOperation operation, org.springframework.security.core.Authentication auth, java.util.Locale locale)  
      org.springframework.hateoas.EntityModel<EventOutcomeWithMessage> createCase​(CreateCaseBody body, org.springframework.security.core.Authentication auth, java.util.Locale locale)  
      org.springframework.hateoas.EntityModel<EventOutcomeWithMessage> deleteCase​(org.springframework.security.core.Authentication auth, java.lang.String caseId, boolean deleteSubtree)  
      org.springframework.hateoas.PagedModel<CaseResource> findAllByAuthor​(java.lang.String authorId, java.lang.String petriNet, org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<Case> assembler)  
      org.springframework.hateoas.PagedModel<CaseResource> getAll​(org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<Case> assembler)  
      DataFieldsResource getAllCaseData​(java.lang.String caseId, java.util.Locale locale)
      Deprecated.
      org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getFile​(java.lang.String caseId, java.lang.String fieldId)  
      org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getFileByName​(java.lang.String caseId, java.lang.String fieldId, java.lang.String name)  
      CaseResource getOne​(java.lang.String caseId)  
      MessageResource reloadTasks​(java.lang.String caseId)  
      org.springframework.hateoas.PagedModel<CaseResource> search​(SingleCaseSearchRequestAsList searchBody, MergeFilterOperation operation, org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<Case> assembler, org.springframework.security.core.Authentication auth, java.util.Locale locale)  
      org.springframework.hateoas.PagedModel<CaseResource> search2​(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<Case> assembler)  
      org.springframework.hateoas.PagedModel<CaseResource> searchMongo​(java.util.Map<java.lang.String,​java.lang.Object> searchBody, org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler<Case> assembler, org.springframework.security.core.Authentication auth, java.util.Locale locale)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WorkflowController

        public WorkflowController()
    • Method Detail

      • createCase

        @PreAuthorize("@workflowAuthorizationService.canCallCreate(#auth.getPrincipal(), #body.netId)")
        @PostMapping(value="/case",
                     consumes="application/json",
                     produces="application/hal+json")
        public org.springframework.hateoas.EntityModel<EventOutcomeWithMessage> createCase​(@RequestBody
                                                                                           CreateCaseBody body,
                                                                                           org.springframework.security.core.Authentication auth,
                                                                                           java.util.Locale locale)
      • getAll

        @GetMapping(value="/all",
                    produces="application/hal+json")
        public org.springframework.hateoas.PagedModel<CaseResource> getAll​(org.springframework.data.domain.Pageable pageable,
                                                                           org.springframework.data.web.PagedResourcesAssembler<Case> assembler)
      • search2

        @PostMapping(value="/case/search2",
                     consumes="application/json",
                     produces="application/hal+json")
        public org.springframework.hateoas.PagedModel<CaseResource> search2​(com.querydsl.core.types.Predicate predicate,
                                                                            org.springframework.data.domain.Pageable pageable,
                                                                            org.springframework.data.web.PagedResourcesAssembler<Case> assembler)
      • search

        @PostMapping(value="/case/search",
                     consumes="application/json",
                     produces="application/hal+json")
        public org.springframework.hateoas.PagedModel<CaseResource> search​(@RequestBody
                                                                           SingleCaseSearchRequestAsList searchBody,
                                                                           @RequestParam(defaultValue="OR")
                                                                           MergeFilterOperation operation,
                                                                           org.springframework.data.domain.Pageable pageable,
                                                                           org.springframework.data.web.PagedResourcesAssembler<Case> assembler,
                                                                           org.springframework.security.core.Authentication auth,
                                                                           java.util.Locale locale)
      • searchMongo

        @PostMapping(value="/case/search_mongo",
                     consumes="application/json",
                     produces="application/hal+json")
        public org.springframework.hateoas.PagedModel<CaseResource> searchMongo​(@RequestBody
                                                                                java.util.Map<java.lang.String,​java.lang.Object> searchBody,
                                                                                org.springframework.data.domain.Pageable pageable,
                                                                                org.springframework.data.web.PagedResourcesAssembler<Case> assembler,
                                                                                org.springframework.security.core.Authentication auth,
                                                                                java.util.Locale locale)
      • count

        @PostMapping(value="/case/count",
                     consumes="application/json",
                     produces="application/json")
        public CountResponse count​(@RequestBody
                                   SingleCaseSearchRequestAsList searchBody,
                                   @RequestParam(defaultValue="OR")
                                   MergeFilterOperation operation,
                                   org.springframework.security.core.Authentication auth,
                                   java.util.Locale locale)
      • getOne

        @GetMapping(value="/case/{id}",
                    produces="application/hal+json")
        public CaseResource getOne​(@PathVariable("id")
                                   java.lang.String caseId)
      • findAllByAuthor

        @RequestMapping(value="/case/author/{id}",
                        method=POST,
                        consumes="text/plain",
                        produces="application/hal+json")
        public org.springframework.hateoas.PagedModel<CaseResource> findAllByAuthor​(@PathVariable("id")
                                                                                    java.lang.String authorId,
                                                                                    @RequestBody
                                                                                    java.lang.String petriNet,
                                                                                    org.springframework.data.domain.Pageable pageable,
                                                                                    org.springframework.data.web.PagedResourcesAssembler<Case> assembler)
      • reloadTasks

        @PreAuthorize("@authorizationService.hasAuthority(\'ADMIN\')")
        @GetMapping(value="/case/reload/{id}",
                    produces="application/hal+json")
        public MessageResource reloadTasks​(@PathVariable("id")
                                           java.lang.String caseId)
      • getAllCaseData

        @Deprecated
        @PreAuthorize("@authorizationService.hasAuthority(\'ADMIN\')")
        @GetMapping(value="/case/{id}/data",
                    produces="application/hal+json")
        public DataFieldsResource getAllCaseData​(@PathVariable("id")
                                                 java.lang.String caseId,
                                                 java.util.Locale locale)
        Deprecated.
      • deleteCase

        @PreAuthorize("@workflowAuthorizationService.canCallDelete(#auth.getPrincipal(), #caseId)")
        @DeleteMapping(value="/case/{id}",
                       produces="application/hal+json")
        public org.springframework.hateoas.EntityModel<EventOutcomeWithMessage> deleteCase​(org.springframework.security.core.Authentication auth,
                                                                                           @PathVariable("id")
                                                                                           java.lang.String caseId,
                                                                                           @RequestParam(defaultValue="false")
                                                                                           boolean deleteSubtree)
      • getFile

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

        @GetMapping(value="/case/{id}/file/{field}/{name}",
                    produces="application/octet-stream")
        public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getFileByName​(@PathVariable("id")
                                                                                                           java.lang.String caseId,
                                                                                                           @PathVariable("field")
                                                                                                           java.lang.String fieldId,
                                                                                                           @PathVariable("name")
                                                                                                           java.lang.String name)
                                                                                                    throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException