Class ElasticCaseService
- java.lang.Object
-
- com.netgrif.application.engine.elastic.service.ElasticViewPermissionService
-
- com.netgrif.application.engine.elastic.service.ElasticCaseService
-
- All Implemented Interfaces:
IElasticCaseService
@Service public class ElasticCaseService extends ElasticViewPermissionService implements IElasticCaseService
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringcaseIndexprotected ElasticsearchPropertieselasticsearchPropertiesprotected Executorexecutorsprotected IElasticCasePrioritySearchiElasticCasePrioritySearchprotected IPetriNetServicepetriNetServiceprotected ElasticCaseRepositoryrepositoryprotected org.springframework.data.elasticsearch.core.ElasticsearchRestTemplatetemplateprotected IWorkflowServiceworkflowService
-
Constructor Summary
Constructors Constructor Description ElasticCaseService(ElasticCaseRepository repository, org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate template, Executor executors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbuildAuthorQuery(CaseSearchRequest request, org.elasticsearch.index.query.BoolQueryBuilder query){ "author": { "email": "user@customer.com" } }protected voidbuildCaseIdQuery(CaseSearchRequest request, org.elasticsearch.index.query.BoolQueryBuilder query)Case with stringId "5cb07b6ff05be15f0b972c36"protected voidbuildDataQuery(CaseSearchRequest request, org.elasticsearch.index.query.BoolQueryBuilder query)Cases where "text_field" has value EXACTLY "text" AND "number_field" has value EXACTLY "125".protected voidbuildFullTextQuery(CaseSearchRequest request, org.elasticsearch.index.query.BoolQueryBuilder query)protected booleanbuildGroupQuery(CaseSearchRequest request, LoggedUser user, java.util.Locale locale, org.elasticsearch.index.query.BoolQueryBuilder query)Cases that are instances of processes of group "5cb07b6ff05be15f0b972c36"protected voidbuildPetriNetQuery(CaseSearchRequest request, LoggedUser user, org.elasticsearch.index.query.BoolQueryBuilder query)org.springframework.data.elasticsearch.core.query.NativeSearchQuerybuildQuery(java.util.List<CaseSearchRequest> requests, LoggedUser user, org.springframework.data.domain.Pageable pageable, java.util.Locale locale, java.lang.Boolean isIntersection)protected voidbuildRoleQuery(CaseSearchRequest request, org.elasticsearch.index.query.BoolQueryBuilder query)Cases with active role "5cb07b6ff05be15f0b972c36"protected org.elasticsearch.index.query.BoolQueryBuilderbuildSingleQuery(CaseSearchRequest request, LoggedUser user, java.util.Locale locale)protected voidbuildStringQuery(CaseSearchRequest request, org.elasticsearch.index.query.BoolQueryBuilder query, LoggedUser user)protected voidbuildTagsQuery(CaseSearchRequest request, org.elasticsearch.index.query.BoolQueryBuilder query)protected voidbuildTaskQuery(CaseSearchRequest request, org.elasticsearch.index.query.BoolQueryBuilder query)Cases with tasks with import Id "nova_uloha"protected voidbuildUriNodeIdQuery(CaseSearchRequest request, org.elasticsearch.index.query.BoolQueryBuilder query)longcount(java.util.List<CaseSearchRequest> requests, LoggedUser user, java.util.Locale locale, java.lang.Boolean isIntersection)java.lang.StringfindUriNodeId(Case aCase)voidindex(ElasticCase useCase)voidindexNow(ElasticCase useCase)voidremove(java.lang.String caseId)voidremoveByPetriNetId(java.lang.String processId)protected org.springframework.data.domain.PageableresolveUnmappedSortAttributes(org.springframework.data.domain.Pageable pageable)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)voidsetWorkflowService(IWorkflowService workflowService)-
Methods inherited from class com.netgrif.application.engine.elastic.service.ElasticViewPermissionService
buildViewPermissionQuery
-
-
-
-
Field Detail
-
repository
protected ElasticCaseRepository repository
-
workflowService
protected IWorkflowService workflowService
-
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
-
elasticsearchProperties
@Autowired protected ElasticsearchProperties elasticsearchProperties
-
petriNetService
@Autowired protected IPetriNetService petriNetService
-
iElasticCasePrioritySearch
@Autowired protected IElasticCasePrioritySearch iElasticCasePrioritySearch
-
-
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)
-
remove
public void remove(java.lang.String caseId)
- Specified by:
removein interfaceIElasticCaseService
-
removeByPetriNetId
public void removeByPetriNetId(java.lang.String processId)
- Specified by:
removeByPetriNetIdin interfaceIElasticCaseService
-
index
public void index(ElasticCase useCase)
- Specified by:
indexin interfaceIElasticCaseService
-
indexNow
public void indexNow(ElasticCase useCase)
- Specified by:
indexNowin interfaceIElasticCaseService
-
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:
searchin interfaceIElasticCaseService
-
count
public long count(java.util.List<CaseSearchRequest> requests, LoggedUser user, java.util.Locale locale, java.lang.Boolean isIntersection)
- Specified by:
countin interfaceIElasticCaseService
-
findUriNodeId
public java.lang.String findUriNodeId(Case aCase)
- Specified by:
findUriNodeIdin interfaceIElasticCaseService
-
buildQuery
public 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)
- Specified by:
buildQueryin interfaceIElasticCaseService
-
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)
-
buildStringQuery
protected void buildStringQuery(CaseSearchRequest request, org.elasticsearch.index.query.BoolQueryBuilder query, LoggedUser user)
-
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)
-
-