Class WorkIndexService
java.lang.Object
com.flowable.platform.security.service.AbstractPlatformSecurityService
com.flowable.platform.service.index.WorkIndexService
- All Implemented Interfaces:
PermissionServiceRegistryAware
,org.springframework.beans.factory.Aware
@Transactional public class WorkIndexService extends AbstractPlatformSecurityService
- Author:
- Javier Casal, Joram Barrez, Filip Hrisafov
-
Field Summary
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(ResultFilter<ProcessInstanceSearchRepresentation> processInstanceResultFilter, ResultFilter<CaseInstanceSearchRepresentation> caseInstanceResultFilter, ResultFilter<WorkInstanceSearchRepresentation> workInstanceResultFilter, ResultFilter<TaskSearchRepresentation> taskInstanceResultFilter)
-
Method Summary
Modifier and Type Method Description protected void
addPermissions(PlatformIndexQueryRequest request)
protected <T> Page<T>
createInstancesPage(Page<T> page)
protected <RES, REQ extends PlatformIndexQueryRequest, Q extends PlatformIndexQueryBuilder<REQ>>
Page<RES>fetchData(REQ request, java.lang.String index, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, java.util.function.Supplier<Q> queryBuilderSupplier)
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)
com.fasterxml.jackson.databind.JsonNode
findTask(java.lang.String taskId)
Page<TaskSearchRepresentation>
findTasksWithQuery(TasksIndexQueryRequest request)
Page<TaskSearchRepresentation>
findTasksWithQuery(java.lang.String filterId, TasksIndexQueryRequest request)
com.fasterxml.jackson.databind.JsonNode
findWorkInstance(java.lang.String workInstanceId)
Page<WorkInstanceSearchRepresentation>
findWorkInstancesWithQuery(WorkInstancesIndexQueryRequest request)
Page<WorkInstanceSearchRepresentation>
findWorkInstancesWithQuery(java.lang.String filterId, WorkInstancesIndexQueryRequest request)
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 <RES, REQ extends PlatformIndexQueryRequest, Q extends PlatformIndexQueryBuilder<REQ>>
Page<RES>getInstanceRepresentationPage(REQ request, java.lang.String index, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, ResultFilter<RES> resultFilter, java.util.function.Supplier<Q> queryBuilderSupplier)
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, java.lang.String order)
protected com.fasterxml.jackson.databind.JsonNode
getProcessInstanceResultNode(java.lang.String processInstanceId)
protected com.fasterxml.jackson.databind.JsonNode
getTasksResultNode(java.lang.String taskId)
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
-
processInstanceResultFilter
-
caseInstanceResultFilter
-
workInstanceResultFilter
-
taskInstanceResultFilter
-
-
Constructor Details
-
WorkIndexService
public WorkIndexService(ResultFilter<ProcessInstanceSearchRepresentation> processInstanceResultFilter, ResultFilter<CaseInstanceSearchRepresentation> caseInstanceResultFilter, ResultFilter<WorkInstanceSearchRepresentation> workInstanceResultFilter, ResultFilter<TaskSearchRepresentation> taskInstanceResultFilter)
-
-
Method Details
-
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, WorkInstancesIndexQueryRequest request) -
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 <RES, REQ extends PlatformIndexQueryRequest, Q extends PlatformIndexQueryBuilder<REQ>> Page<RES> getInstanceRepresentationPage(REQ request, java.lang.String index, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, ResultFilter<RES> resultFilter, java.util.function.Supplier<Q> queryBuilderSupplier) -
createInstancesPage
-
fetchData
protected <RES, REQ extends PlatformIndexQueryRequest, Q extends PlatformIndexQueryBuilder<REQ>> Page<RES> fetchData(REQ request, java.lang.String index, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, java.util.function.Supplier<Q> queryBuilderSupplier) -
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) -
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) -
addPermissions
-
notAllowed
protected void notAllowed()
-