Class WorkIndexService
java.lang.Object
com.flowable.platform.security.service.AbstractPlatformSecurityService
com.flowable.platform.service.index.WorkIndexService
- All Implemented Interfaces:
com.flowable.platform.security.permission.PermissionServiceRegistryAware
,org.springframework.beans.factory.Aware
@Transactional
public class WorkIndexService
extends com.flowable.platform.security.service.AbstractPlatformSecurityService
- Author:
- Javier Casal, Joram Barrez, Filip Hrisafov
-
Field Summary
Fields Modifier and Type Field Description protected CaseInstanceResultMapper
caseInstanceResultMapper
static java.lang.String
FILTER_ALL
static java.lang.String
FILTER_COMPLETED
static java.lang.String
FILTER_MINE
static java.lang.String
FILTER_OPEN
static java.lang.String
FILTER_RUNNING
static java.lang.String
FILTER_UNASSIGNED
protected java.util.List<java.lang.String>
filters
protected com.flowable.core.idm.api.PlatformIdentityService
identityService
protected IndexManager
indexManager
protected com.fasterxml.jackson.databind.ObjectMapper
objectMapper
protected ProcessInstanceResultMapper
processInstanceResultMapper
protected SearchService
searchService
protected SecurityHelper
securityHelper
protected TaskResultMapper
taskResultMapper
protected WorkInstanceResultMapper
workInstanceResultMapper
Fields inherited from class com.flowable.platform.security.service.AbstractPlatformSecurityService
additionalAdminUsers, CASE_PREFIX, cmmnRepositoryService, cmmnRuntimeService, cmmnTaskService, defaultSecurityPolicyKey, defaultSecurityPolicyModel, inspectEnabled, permissionServiceRegistry, platformSecurityInterceptor, policyRepositoryService, PROCESS_PREFIX, repositoryService, runtimeService, SECURITY_POLICY_MODEL, TASK_PREFIX, taskService
-
Constructor Summary
Constructors Constructor Description WorkIndexService()
-
Method Summary
Modifier and Type Method Description protected void
addPermissions(PlatformIndexQueryRequest request)
protected void
addWorkInstancePermissionTerms(com.flowable.core.common.api.security.SecurityScope securityScope, FilteredFullTextSearchQueryBuilder queryBuilder)
protected <T> Page<T>
createInstancesPage(Page<T> page)
protected <T> Page<T>
fetchCaseInstances(CaseInstancesIndexQueryRequest request, ElasticsearchResultConverter.ResultMapper<T> jsonMapper)
protected <T> Page<T>
fetchInstances(java.lang.String filterId, com.flowable.core.common.api.security.SecurityScope securityScope, int start, int size, java.lang.String searchText, java.lang.String index, ElasticsearchResultConverter.ResultMapper<T> jsonMapper)
protected <T> Page<T>
fetchProcessInstances(ProcessInstancesIndexQueryRequest request, ElasticsearchResultConverter.ResultMapper<T> jsonMapper)
protected <T> Page<T>
fetchTasks(TasksIndexQueryRequest request, ElasticsearchResultConverter.ResultMapper<T> jsonMapper)
protected <T> Page<T>
fetchWorkInstances(WorkInstancesIndexQueryRequest request, ElasticsearchResultConverter.ResultMapper<T> jsonMapper)
com.fasterxml.jackson.databind.JsonNode
findCaseInstance(java.lang.String caseInstanceId)
Page<CaseInstanceSearchRepresentation>
findCaseInstancesWithQuery(CaseInstancesIndexQueryRequest request)
Page<CaseInstanceSearchRepresentation>
findCaseInstancesWithQuery(java.lang.String filterId, CaseInstancesIndexQueryRequest request)
com.fasterxml.jackson.databind.JsonNode
findProcessInstance(java.lang.String processInstanceId)
Page<ProcessInstanceSearchRepresentation>
findProcessInstancesWithQuery(ProcessInstancesIndexQueryRequest request)
Page<ProcessInstanceSearchRepresentation>
findProcessInstancesWithQuery(java.lang.String filterId, ProcessInstancesIndexQueryRequest request)
Page<ProcessInstanceSearchRepresentation>
findProcessInstancesWithQuery(java.lang.String filterId, java.lang.String searchText, com.flowable.core.common.api.security.SecurityScope securityScope, int start, int size)
com.fasterxml.jackson.databind.JsonNode
findTask(java.lang.String taskId)
Page<TaskSearchRepresentation>
findTasksWithQuery(TasksIndexQueryRequest request)
Page<TaskSearchRepresentation>
findTasksWithQuery(java.lang.String filterId, TasksIndexQueryRequest request)
Page<TaskSearchRepresentation>
findTasksWithQuery(java.lang.String filterId, java.lang.String searchText, com.flowable.core.common.api.security.SecurityScope securityScope, java.lang.Integer start, java.lang.Integer size)
com.fasterxml.jackson.databind.JsonNode
findWorkInstance(java.lang.String workInstanceId)
Page<WorkInstanceSearchRepresentation>
findWorkInstancesWithQuery(WorkInstancesIndexQueryRequest request)
Page<WorkInstanceSearchRepresentation>
findWorkInstancesWithQuery(java.lang.String filterId, java.lang.String searchText, int start, int size, com.flowable.core.common.api.security.SecurityScope securityScope)
protected <T> Page<T>
getCaseInstanceRepresentationPage(CaseInstancesIndexQueryRequest request, ElasticsearchResultConverter.ResultMapper<T> jsonMapper)
protected com.fasterxml.jackson.databind.JsonNode
getCaseInstanceResultNode(java.lang.String caseInstanceId)
protected java.util.Map<java.lang.String,SortParameter>
getCustomSortParameters(PlatformIndexQueryRequest request, java.lang.String index, java.lang.String queryName)
protected <T> Page<T>
getInstanceRepresentationPage(java.lang.String filterId, java.lang.String searchText, com.flowable.core.common.api.security.SecurityScope securityScope, int start, int size, java.lang.String index, ElasticsearchResultConverter.ResultMapper<T> jsonMapper)
protected com.fasterxml.jackson.databind.JsonNode
getInstanceResultNode(java.lang.String instanceId, java.lang.String index)
protected <T> Page<T>
getPageFromQuery(int start, int size, java.lang.String index, ElasticsearchResultConverter.ResultMapper<T> jsonMapper, java.lang.String query, java.lang.String sort)
protected <T> Page<T>
getPageFromQuery(int start, int size, java.lang.String index, ElasticsearchResultConverter.ResultMapper<T> jsonMapper, java.lang.String query, java.lang.String sort, java.lang.String order)
protected <T> Page<T>
getProcessInstanceRepresentationPage(ProcessInstancesIndexQueryRequest request, ElasticsearchResultConverter.ResultMapper<T> jsonMapper)
protected com.fasterxml.jackson.databind.JsonNode
getProcessInstanceResultNode(java.lang.String processInstanceId)
protected <T> Page<T>
getTasksRepresentationPage(TasksIndexQueryRequest request, ElasticsearchResultConverter.ResultMapper<T> jsonMapper)
protected com.fasterxml.jackson.databind.JsonNode
getTasksResultNode(java.lang.String taskId)
protected <T> Page<T>
getWorkInstanceRepresentationPage(WorkInstancesIndexQueryRequest request, ElasticsearchResultConverter.ResultMapper<T> jsonMapper)
protected com.fasterxml.jackson.databind.JsonNode
getWorkInstanceResultNode(java.lang.String workInstanceId)
protected boolean
isTemplateQuery(java.lang.String index, PlatformIndexQueryRequest request)
protected void
notAllowed()
protected <T> Page<T>
queryWithTemplate(java.lang.String index, PlatformIndexQueryRequest request, ElasticsearchResultConverter.ResultMapper<T> jsonMapper)
Methods inherited from class com.flowable.platform.security.service.AbstractPlatformSecurityService
currentUserHasAdminRights, currentUserIsSuperAdmin, fetchCasePermissionMappings, fetchCasePermissionMappings, fetchCaseSecurityPolicyModel, fetchPermissions, fetchPermissionsForTask, fetchProcessPermissionMappings, fetchProcessPermissionMappings, fetchProcessSecurityPolicyModel, fetchSecurityPolicyModel, fetchSecurityPolicyModel, fetchSecurityPolicyModelForCaseInstance, fetchSecurityPolicyModelForProcessInstance, fetchSecurityPolicyModelForTask, fetchSecurityPolicyModelForTask, fetchTaskPermissionMappings, fetchTaskPermissionMappings, fetchTaskPermissionMappings, fetchTaskPermissionMappingsForCase, fetchTaskPermissionMappingsForProcess, fetchTaskSecurityPolicyModelForCase, fetchTaskSecurityPolicyModelForProcess, filterPermissionsForRole, getCmmnExtensionElementValue, getCurrentGroupKeys, getCurrentTenantId, getCurrentUserId, getDefaultSecurityPolicyModel, getExtensionElementValue, getSecurityPolicyModelByKey, groupOrUserMatches, groupOrUserMatches, hasAnyMatchingIdentityLink, hasAssigneeOrOwnerIdentityLink, hasPermissionForEntityLinks, hasPermissionForHistoricEntityLinks, setPermissionServiceRegistry, translatePermissionForScope
-
Field Details
-
FILTER_COMPLETED
public static final java.lang.String FILTER_COMPLETED- See Also:
- Constant Field Values
-
FILTER_RUNNING
public static final java.lang.String FILTER_RUNNING- See Also:
- Constant Field Values
-
FILTER_MINE
public static final java.lang.String FILTER_MINE- See Also:
- Constant Field Values
-
FILTER_OPEN
public static final java.lang.String FILTER_OPEN- See Also:
- Constant Field Values
-
FILTER_ALL
public static final java.lang.String FILTER_ALL- See Also:
- Constant Field Values
-
FILTER_UNASSIGNED
public static final java.lang.String FILTER_UNASSIGNED- See Also:
- Constant Field Values
-
filters
protected java.util.List<java.lang.String> filters -
searchService
-
indexManager
-
objectMapper
@Autowired protected com.fasterxml.jackson.databind.ObjectMapper objectMapper -
processInstanceResultMapper
-
caseInstanceResultMapper
-
taskResultMapper
-
workInstanceResultMapper
-
identityService
@Autowired protected com.flowable.core.idm.api.PlatformIdentityService identityService -
securityHelper
-
-
Constructor Details
-
WorkIndexService
public WorkIndexService()
-
-
Method Details
-
findProcessInstancesWithQuery
public Page<ProcessInstanceSearchRepresentation> findProcessInstancesWithQuery(java.lang.String filterId, java.lang.String searchText, com.flowable.core.common.api.security.SecurityScope securityScope, int start, int size) -
findProcessInstancesWithQuery
public Page<ProcessInstanceSearchRepresentation> findProcessInstancesWithQuery(java.lang.String filterId, ProcessInstancesIndexQueryRequest request) -
findProcessInstancesWithQuery
public Page<ProcessInstanceSearchRepresentation> findProcessInstancesWithQuery(ProcessInstancesIndexQueryRequest request) -
findProcessInstance
public com.fasterxml.jackson.databind.JsonNode findProcessInstance(java.lang.String processInstanceId) -
findCaseInstancesWithQuery
public Page<CaseInstanceSearchRepresentation> findCaseInstancesWithQuery(java.lang.String filterId, CaseInstancesIndexQueryRequest request) -
findCaseInstancesWithQuery
public Page<CaseInstanceSearchRepresentation> findCaseInstancesWithQuery(CaseInstancesIndexQueryRequest request) -
findCaseInstance
public com.fasterxml.jackson.databind.JsonNode findCaseInstance(java.lang.String caseInstanceId) -
findWorkInstancesWithQuery
public Page<WorkInstanceSearchRepresentation> findWorkInstancesWithQuery(java.lang.String filterId, java.lang.String searchText, int start, int size, com.flowable.core.common.api.security.SecurityScope securityScope) -
findWorkInstancesWithQuery
public Page<WorkInstanceSearchRepresentation> findWorkInstancesWithQuery(WorkInstancesIndexQueryRequest request) -
findWorkInstance
public com.fasterxml.jackson.databind.JsonNode findWorkInstance(java.lang.String workInstanceId) -
findTasksWithQuery
public Page<TaskSearchRepresentation> findTasksWithQuery(java.lang.String filterId, TasksIndexQueryRequest request) -
findTasksWithQuery
-
findTask
public com.fasterxml.jackson.databind.JsonNode findTask(java.lang.String taskId) -
getInstanceRepresentationPage
protected <T> Page<T> getInstanceRepresentationPage(java.lang.String filterId, java.lang.String searchText, com.flowable.core.common.api.security.SecurityScope securityScope, int start, int size, java.lang.String index, ElasticsearchResultConverter.ResultMapper<T> jsonMapper) -
getProcessInstanceRepresentationPage
protected <T> Page<T> getProcessInstanceRepresentationPage(ProcessInstancesIndexQueryRequest request, ElasticsearchResultConverter.ResultMapper<T> jsonMapper) -
getCaseInstanceRepresentationPage
protected <T> Page<T> getCaseInstanceRepresentationPage(CaseInstancesIndexQueryRequest request, ElasticsearchResultConverter.ResultMapper<T> jsonMapper) -
getWorkInstanceRepresentationPage
protected <T> Page<T> getWorkInstanceRepresentationPage(WorkInstancesIndexQueryRequest request, ElasticsearchResultConverter.ResultMapper<T> jsonMapper) -
getTasksRepresentationPage
protected <T> Page<T> getTasksRepresentationPage(TasksIndexQueryRequest request, ElasticsearchResultConverter.ResultMapper<T> jsonMapper) -
createInstancesPage
-
fetchProcessInstances
protected <T> Page<T> fetchProcessInstances(ProcessInstancesIndexQueryRequest request, ElasticsearchResultConverter.ResultMapper<T> jsonMapper) -
fetchCaseInstances
protected <T> Page<T> fetchCaseInstances(CaseInstancesIndexQueryRequest request, ElasticsearchResultConverter.ResultMapper<T> jsonMapper) -
fetchWorkInstances
protected <T> Page<T> fetchWorkInstances(WorkInstancesIndexQueryRequest request, ElasticsearchResultConverter.ResultMapper<T> jsonMapper) -
fetchTasks
protected <T> Page<T> fetchTasks(TasksIndexQueryRequest request, ElasticsearchResultConverter.ResultMapper<T> jsonMapper) -
isTemplateQuery
-
queryWithTemplate
protected <T> Page<T> queryWithTemplate(java.lang.String index, PlatformIndexQueryRequest request, ElasticsearchResultConverter.ResultMapper<T> jsonMapper) -
getCustomSortParameters
protected java.util.Map<java.lang.String,SortParameter> getCustomSortParameters(PlatformIndexQueryRequest request, java.lang.String index, java.lang.String queryName) -
getProcessInstanceResultNode
protected com.fasterxml.jackson.databind.JsonNode getProcessInstanceResultNode(java.lang.String processInstanceId) -
getCaseInstanceResultNode
protected com.fasterxml.jackson.databind.JsonNode getCaseInstanceResultNode(java.lang.String caseInstanceId) -
getWorkInstanceResultNode
protected com.fasterxml.jackson.databind.JsonNode getWorkInstanceResultNode(java.lang.String workInstanceId) -
getTasksResultNode
protected com.fasterxml.jackson.databind.JsonNode getTasksResultNode(java.lang.String taskId) -
getInstanceResultNode
protected com.fasterxml.jackson.databind.JsonNode getInstanceResultNode(java.lang.String instanceId, java.lang.String index) -
fetchInstances
protected <T> Page<T> fetchInstances(java.lang.String filterId, com.flowable.core.common.api.security.SecurityScope securityScope, int start, int size, java.lang.String searchText, java.lang.String index, ElasticsearchResultConverter.ResultMapper<T> jsonMapper) -
getPageFromQuery
protected <T> Page<T> getPageFromQuery(int start, int size, java.lang.String index, ElasticsearchResultConverter.ResultMapper<T> jsonMapper, java.lang.String query, java.lang.String sort) -
getPageFromQuery
protected <T> Page<T> getPageFromQuery(int start, int size, java.lang.String index, ElasticsearchResultConverter.ResultMapper<T> jsonMapper, java.lang.String query, java.lang.String sort, java.lang.String order) -
findTasksWithQuery
public Page<TaskSearchRepresentation> findTasksWithQuery(java.lang.String filterId, java.lang.String searchText, com.flowable.core.common.api.security.SecurityScope securityScope, java.lang.Integer start, java.lang.Integer size) -
addWorkInstancePermissionTerms
protected void addWorkInstancePermissionTerms(com.flowable.core.common.api.security.SecurityScope securityScope, FilteredFullTextSearchQueryBuilder queryBuilder) -
addPermissions
-
notAllowed
protected void notAllowed()
-