Class ElasticCaseService

    • Field Detail

      • caseIndex

        @Value("${spring.data.elasticsearch.index.case}")
        protected java.lang.String caseIndex
      • template

        @Autowired
        protected org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate template
      • executors

        protected Executor executors
    • Constructor Detail

      • ElasticCaseService

        @Autowired
        public ElasticCaseService​(ElasticCaseRepository repository,
                                  org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate template,
                                  Executor executors)
    • Method Detail

      • setWorkflowService

        @Autowired
        @Lazy
        public void setWorkflowService​(IWorkflowService workflowService)
      • search

        public org.springframework.data.domain.Page<Case> search​(java.util.List<CaseSearchRequest> requests,
                                                                 LoggedUser user,
                                                                 org.springframework.data.domain.Pageable pageable,
                                                                 java.util.Locale locale,
                                                                 java.lang.Boolean isIntersection)
        Specified by:
        search in interface IElasticCaseService
      • buildQuery

        protected org.springframework.data.elasticsearch.core.query.NativeSearchQuery buildQuery​(java.util.List<CaseSearchRequest> requests,
                                                                                                 LoggedUser user,
                                                                                                 org.springframework.data.domain.Pageable pageable,
                                                                                                 java.util.Locale locale,
                                                                                                 java.lang.Boolean isIntersection)
      • buildSingleQuery

        protected org.elasticsearch.index.query.BoolQueryBuilder buildSingleQuery​(CaseSearchRequest request,
                                                                                  LoggedUser user,
                                                                                  java.util.Locale locale)
      • buildPetriNetQuery

        protected void buildPetriNetQuery​(CaseSearchRequest request,
                                          LoggedUser user,
                                          org.elasticsearch.index.query.BoolQueryBuilder query)
      • buildAuthorQuery

        protected void buildAuthorQuery​(CaseSearchRequest request,
                                        org.elasticsearch.index.query.BoolQueryBuilder query)
         {
             "author": {
                 "email": "user@customer.com"
             }
         }
         

        Cases with author with (id 1 AND email "user@customer.com") OR (id 2)

         {
             "author": [{
                 "id": 1
                 "email": "user@customer.com"
             }, {
                 "id": 2
             }
             ]
         }
         

      • buildTaskQuery

        protected void buildTaskQuery​(CaseSearchRequest request,
                                      org.elasticsearch.index.query.BoolQueryBuilder query)
        Cases with tasks with import Id "nova_uloha"
         {
             "transition": "nova_uloha"
         }
         

        Cases with tasks with import Id "nova_uloha" OR "kontrola"

         {
             "transition": [
                 "nova_uloha",
                 "kontrola"
             ]
         }
         
      • buildRoleQuery

        protected void buildRoleQuery​(CaseSearchRequest request,
                                      org.elasticsearch.index.query.BoolQueryBuilder query)
        Cases with active role "5cb07b6ff05be15f0b972c36"
         {
             "role": "5cb07b6ff05be15f0b972c36"
         }
         

        Cases with active role "5cb07b6ff05be15f0b972c36" OR "5cb07b6ff05be15f0b972c31"

         {
             "role" [
                 "5cb07b6ff05be15f0b972c36",
                 "5cb07b6ff05be15f0b972c31"
             ]
         }
         
      • buildDataQuery

        protected void buildDataQuery​(CaseSearchRequest request,
                                      org.elasticsearch.index.query.BoolQueryBuilder query)
        Cases where "text_field" has value EXACTLY "text" AND "number_field" has value EXACTLY "125".
         {
             "data": {
                 "text_field": "text",
                 "number_field": "125"
             }
         }
         
      • buildTagsQuery

        protected void buildTagsQuery​(CaseSearchRequest request,
                                      org.elasticsearch.index.query.BoolQueryBuilder query)
      • buildFullTextQuery

        protected void buildFullTextQuery​(CaseSearchRequest request,
                                          org.elasticsearch.index.query.BoolQueryBuilder query)
      • buildCaseIdQuery

        protected void buildCaseIdQuery​(CaseSearchRequest request,
                                        org.elasticsearch.index.query.BoolQueryBuilder query)
        Case with stringId "5cb07b6ff05be15f0b972c36"
         {
             "stringId": "5cb07b6ff05be15f0b972c36"
         }
         

        Cases with stringId "5cb07b6ff05be15f0b972c36" OR "5cb07b6ff05be15f0b972c31"

         {
             "stringId" [
                 "5cb07b6ff05be15f0b972c36",
                 "5cb07b6ff05be15f0b972c31"
             ]
         }
         
      • buildUriNodeIdQuery

        protected void buildUriNodeIdQuery​(CaseSearchRequest request,
                                           org.elasticsearch.index.query.BoolQueryBuilder query)
      • buildGroupQuery

        protected boolean buildGroupQuery​(CaseSearchRequest request,
                                          LoggedUser user,
                                          java.util.Locale locale,
                                          org.elasticsearch.index.query.BoolQueryBuilder query)
        Cases that are instances of processes of group "5cb07b6ff05be15f0b972c36"
         {
             "group": "5cb07b6ff05be15f0b972c36"
         }
         

        Cases that are instances of processes of group "5cb07b6ff05be15f0b972c36" OR "5cb07b6ff05be15f0b972c31"

         {
             "group" [
                 "5cb07b6ff05be15f0b972c36",
                 "5cb07b6ff05be15f0b972c31"
             ]
         }
         
      • resolveUnmappedSortAttributes

        protected org.springframework.data.domain.Pageable resolveUnmappedSortAttributes​(org.springframework.data.domain.Pageable pageable)