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 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddPermissions(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.JsonNodefindCaseInstance(java.lang.String caseInstanceId)Page<CaseInstanceSearchRepresentation>findCaseInstancesWithQuery(CaseInstancesIndexQueryRequest request)Page<CaseInstanceSearchRepresentation>findCaseInstancesWithQuery(java.lang.String filterId, CaseInstancesIndexQueryRequest request)com.fasterxml.jackson.databind.JsonNodefindProcessInstance(java.lang.String processInstanceId)Page<ProcessInstanceSearchRepresentation>findProcessInstancesWithQuery(ProcessInstancesIndexQueryRequest request)Page<ProcessInstanceSearchRepresentation>findProcessInstancesWithQuery(java.lang.String filterId, ProcessInstancesIndexQueryRequest request)com.fasterxml.jackson.databind.JsonNodefindTask(java.lang.String taskId)Page<TaskSearchRepresentation>findTasksWithQuery(TasksIndexQueryRequest request)Page<TaskSearchRepresentation>findTasksWithQuery(java.lang.String filterId, TasksIndexQueryRequest request)com.fasterxml.jackson.databind.JsonNodefindWorkInstance(java.lang.String workInstanceId)Page<WorkInstanceSearchRepresentation>findWorkInstancesWithQuery(WorkInstancesIndexQueryRequest request)Page<WorkInstanceSearchRepresentation>findWorkInstancesWithQuery(java.lang.String filterId, WorkInstancesIndexQueryRequest request)protected com.fasterxml.jackson.databind.JsonNodegetCaseInstanceResultNode(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.JsonNodegetInstanceResultNode(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.JsonNodegetProcessInstanceResultNode(java.lang.String processInstanceId)protected com.fasterxml.jackson.databind.JsonNodegetTasksResultNode(java.lang.String taskId)protected com.fasterxml.jackson.databind.JsonNodegetWorkInstanceResultNode(java.lang.String workInstanceId)protected booleanisTemplateQuery(java.lang.String index, PlatformIndexQueryRequest request)protected voidnotAllowed()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 Detail
-
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
@Autowired protected SearchService searchService
-
indexManager
@Autowired protected IndexManager indexManager
-
objectMapper
@Autowired protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
processInstanceResultMapper
@Autowired protected ProcessInstanceResultMapper processInstanceResultMapper
-
caseInstanceResultMapper
@Autowired protected CaseInstanceResultMapper caseInstanceResultMapper
-
taskResultMapper
@Autowired protected TaskResultMapper taskResultMapper
-
workInstanceResultMapper
@Autowired protected WorkInstanceResultMapper workInstanceResultMapper
-
identityService
@Autowired protected com.flowable.core.idm.api.PlatformIdentityService identityService
-
securityHelper
@Autowired protected SecurityHelper securityHelper
-
processInstanceResultFilter
protected ResultFilter<ProcessInstanceSearchRepresentation> processInstanceResultFilter
-
caseInstanceResultFilter
protected ResultFilter<CaseInstanceSearchRepresentation> caseInstanceResultFilter
-
workInstanceResultFilter
protected ResultFilter<WorkInstanceSearchRepresentation> workInstanceResultFilter
-
taskInstanceResultFilter
protected ResultFilter<TaskSearchRepresentation> taskInstanceResultFilter
-
-
Constructor Detail
-
WorkIndexService
public WorkIndexService(ResultFilter<ProcessInstanceSearchRepresentation> processInstanceResultFilter, ResultFilter<CaseInstanceSearchRepresentation> caseInstanceResultFilter, ResultFilter<WorkInstanceSearchRepresentation> workInstanceResultFilter, ResultFilter<TaskSearchRepresentation> taskInstanceResultFilter)
-
-
Method Detail
-
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
public Page<TaskSearchRepresentation> findTasksWithQuery(TasksIndexQueryRequest request)
-
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)
-
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
protected boolean isTemplateQuery(java.lang.String index, PlatformIndexQueryRequest request)
-
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
protected void addPermissions(PlatformIndexQueryRequest request)
-
notAllowed
protected void notAllowed()
-
-