Class WorkIndexService
java.lang.Object
com.flowable.platform.security.service.AbstractPlatformSecurityService
com.flowable.platform.service.index.WorkIndexService
- All Implemented Interfaces:
PermissionServiceRegistryAware,Aware
- Author:
- Javier Casal, Joram Barrez, Filip Hrisafov, Yvo Swillens
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ResultFilter<CaseInstanceSearchRepresentation>protected CaseInstanceResultMapperprotected Collection<String>static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected PlatformIdentityServiceprotected IndexManagerprotected com.fasterxml.jackson.databind.ObjectMapperprotected PlatformRepositoryServiceprotected ResultFilter<ProcessInstanceSearchRepresentation>protected ProcessInstanceResultMapperprotected SearchServiceprotected SecurityHelperprotected ResultFilter<TaskSearchRepresentation>protected TaskResultMapperprotected TemplateServiceprotected ResultFilter<WorkInstanceSearchRepresentation>protected WorkInstanceResultMapperFields inherited from class com.flowable.platform.security.service.AbstractPlatformSecurityService
additionalAdminUsers, CASE_PREFIX, cmmnRepositoryService, cmmnRuntimeService, cmmnTaskService, defaultSecurityPolicyKey, defaultSecurityPolicyModel, EXTERNAL_WORKER_PREFIX, inspectEnabled, permissionServiceRegistry, platformSecurityInterceptor, policyRepositoryService, PROCESS_PREFIX, repositoryService, runtimeService, SECURITY_POLICY_MODEL, TASK_PREFIX, taskService -
Constructor Summary
ConstructorsConstructorDescriptionWorkIndexService(ResultFilter<ProcessInstanceSearchRepresentation> processInstanceResultFilter, ResultFilter<CaseInstanceSearchRepresentation> caseInstanceResultFilter, ResultFilter<WorkInstanceSearchRepresentation> workInstanceResultFilter, ResultFilter<TaskSearchRepresentation> taskInstanceResultFilter, Collection<String> enabledIndices) -
Method Summary
Modifier and TypeMethodDescriptionprotected 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, String index, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, Supplier<Q> queryBuilderSupplier) com.fasterxml.jackson.databind.JsonNodefindCaseInstance(String caseInstanceId) findCaseInstancesWithQuery(String filterId, CaseInstancesIndexQueryRequest request) com.fasterxml.jackson.databind.JsonNodefindProcessInstance(String processInstanceId) findProcessInstancesWithQuery(String filterId, ProcessInstancesIndexQueryRequest request) com.fasterxml.jackson.databind.JsonNodefindTasksWithQuery(TasksIndexQueryRequest request) findTasksWithQuery(String filterId, TasksIndexQueryRequest request) com.fasterxml.jackson.databind.JsonNodefindWorkInstance(String workInstanceId) protected com.fasterxml.jackson.databind.JsonNodegetCaseInstanceResultNode(String caseInstanceId) protected Map<String,ConfigParameter> getConfigParameters(Map<String, QueryParameter> queryParameters) protected Map<String,SortParameter> getCustomSortParameters(PlatformIndexQueryRequest request, String index, String queryName) protected <RES,REQ extends PlatformIndexQueryRequest, Q extends PlatformIndexQueryBuilder<REQ>>
Page<RES>getInstanceRepresentationPage(REQ request, String index, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, ResultFilter<RES> resultFilter, Supplier<Q> queryBuilderSupplier) protected com.fasterxml.jackson.databind.JsonNodegetInstanceResultNode(String instanceId, String index) protected <T> Page<T>getPageFromQuery(int start, int size, String index, ElasticsearchResultConverter.ResultMapper<T> jsonMapper, String query, String sort, String order) protected com.fasterxml.jackson.databind.JsonNodegetProcessInstanceResultNode(String processInstanceId) protected Map<String,SortParameter> getSortParameters(Map<String, QuerySortParameter> querySortParameters) protected com.fasterxml.jackson.databind.JsonNodegetTasksResultNode(String taskId) protected QueryDefinitionModelgetTemplateDefinition(String queryKey) protected List<TemplateParameter>getTemplateParameters(Map<String, QueryParameter> queryParameters) protected com.fasterxml.jackson.databind.JsonNodegetWorkInstanceResultNode(String workInstanceId) protected booleanisCustomQuery(QueryDefinitionModel queryModel) protected booleanisIndexingDisabled(String index) protected booleanisSafeQuery(QueryDefinitionModel queryModel) protected voidprotected StringprocessCustomQueryTemplate(QueryDefinitionModel queryModel, Map<String, Object> payload) protected com.fasterxml.jackson.databind.node.ObjectNodeprocessSafeQueryTemplate(QueryDefinitionModel queryModel, Map<String, Object> payload) protected <T> Page<T>queryWithCustomQuery(String index, PlatformIndexQueryRequest request, QueryDefinitionModel queryModel, ElasticsearchResultConverter.ResultMapper<T> jsonMapper) protected <RES,REQ extends PlatformIndexQueryRequest, Q extends PlatformIndexQueryBuilder<REQ>>
Page<RES>queryWithSafeQuery(REQ request, String index, QueryDefinitionModel queryModel, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, Supplier<Q> queryBuilderSupplier) protected ConfigParametertransformQueryParameter(QueryParameter queryParameter) protected TemplateParametertransformQueryParameter(String key, QueryParameter queryParameter) protected SortParametertransformSortParameter(QuerySortParameter querySortParameter) Methods inherited from class com.flowable.platform.security.service.AbstractPlatformSecurityService
addAdditionalPermissions, 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, getCurrentSecurityScope, getCurrentTenantId, getCurrentUserId, getDefaultSecurityPolicyModel, getExtensionElementValue, getSecurityPolicyModelByKey, groupOrUserMatches, groupOrUserMatches, hasAnyMatchingIdentityLink, hasAssigneeOrOwnerIdentityLink, hasPermissionForEntityLinks, hasPermissionForHistoricEntityLinks, setPermissionServiceRegistry, translatePermissionForScope
-
Field Details
-
FILTER_COMPLETED
- See Also:
-
FILTER_RUNNING
- See Also:
-
FILTER_MINE
- See Also:
-
FILTER_OPEN
- See Also:
-
FILTER_ALL
- See Also:
-
FILTER_UNASSIGNED
- See Also:
-
FILTER_ASSIGNED_TO_ME
- See Also:
-
filters
-
searchService
-
indexManager
-
objectMapper
-
processInstanceResultMapper
-
caseInstanceResultMapper
-
taskResultMapper
-
workInstanceResultMapper
-
identityService
-
securityHelper
-
platformRepositoryService
-
templateService
-
processInstanceResultFilter
-
caseInstanceResultFilter
-
workInstanceResultFilter
-
taskInstanceResultFilter
-
enabledIndices
-
-
Constructor Details
-
WorkIndexService
public WorkIndexService(ResultFilter<ProcessInstanceSearchRepresentation> processInstanceResultFilter, ResultFilter<CaseInstanceSearchRepresentation> caseInstanceResultFilter, ResultFilter<WorkInstanceSearchRepresentation> workInstanceResultFilter, ResultFilter<TaskSearchRepresentation> taskInstanceResultFilter, Collection<String> enabledIndices)
-
-
Method Details
-
findProcessInstancesWithQuery
public Page<ProcessInstanceSearchRepresentation> findProcessInstancesWithQuery(String filterId, ProcessInstancesIndexQueryRequest request) -
findProcessInstancesWithQuery
public Page<ProcessInstanceSearchRepresentation> findProcessInstancesWithQuery(ProcessInstancesIndexQueryRequest request) -
findProcessInstance
-
findCaseInstancesWithQuery
public Page<CaseInstanceSearchRepresentation> findCaseInstancesWithQuery(String filterId, CaseInstancesIndexQueryRequest request) -
findCaseInstancesWithQuery
public Page<CaseInstanceSearchRepresentation> findCaseInstancesWithQuery(CaseInstancesIndexQueryRequest request) -
findCaseInstance
-
findWorkInstancesWithQuery
public Page<WorkInstanceSearchRepresentation> findWorkInstancesWithQuery(WorkInstancesIndexQueryRequest request) -
findWorkInstancesWithQueryWithoutPermissions
public Page<WorkInstanceSearchRepresentation> findWorkInstancesWithQueryWithoutPermissions(WorkInstancesIndexQueryRequest request) -
findWorkInstance
-
findTasksWithQuery
public Page<TaskSearchRepresentation> findTasksWithQuery(String filterId, TasksIndexQueryRequest request) -
findTasksWithQuery
-
findTasksWithQueryWithoutPermissions
public Page<TaskSearchRepresentation> findTasksWithQueryWithoutPermissions(TasksIndexQueryRequest request) -
findTask
-
getInstanceRepresentationPage
protected <RES,REQ extends PlatformIndexQueryRequest, Page<RES> getInstanceRepresentationPageQ extends PlatformIndexQueryBuilder<REQ>> (REQ request, String index, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, ResultFilter<RES> resultFilter, Supplier<Q> queryBuilderSupplier) -
createInstancesPage
-
fetchData
protected <RES,REQ extends PlatformIndexQueryRequest, Page<RES> fetchDataQ extends PlatformIndexQueryBuilder<REQ>> (REQ request, String index, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, Supplier<Q> queryBuilderSupplier) -
isCustomQuery
-
isSafeQuery
-
getTemplateDefinition
-
queryWithCustomQuery
protected <T> Page<T> queryWithCustomQuery(String index, PlatformIndexQueryRequest request, QueryDefinitionModel queryModel, ElasticsearchResultConverter.ResultMapper<T> jsonMapper) -
queryWithSafeQuery
protected <RES,REQ extends PlatformIndexQueryRequest, Page<RES> queryWithSafeQueryQ extends PlatformIndexQueryBuilder<REQ>> (REQ request, String index, QueryDefinitionModel queryModel, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, Supplier<Q> queryBuilderSupplier) -
processCustomQueryTemplate
protected String processCustomQueryTemplate(QueryDefinitionModel queryModel, Map<String, Object> payload) -
processSafeQueryTemplate
protected com.fasterxml.jackson.databind.node.ObjectNode processSafeQueryTemplate(QueryDefinitionModel queryModel, Map<String, Object> payload) -
getTemplateParameters
-
transformQueryParameter
-
getConfigParameters
protected Map<String,ConfigParameter> getConfigParameters(Map<String, QueryParameter> queryParameters) -
transformQueryParameter
-
getCustomSortParameters
protected Map<String,SortParameter> getCustomSortParameters(PlatformIndexQueryRequest request, String index, String queryName) -
getSortParameters
protected Map<String,SortParameter> getSortParameters(Map<String, QuerySortParameter> querySortParameters) -
transformSortParameter
-
getProcessInstanceResultNode
protected com.fasterxml.jackson.databind.JsonNode getProcessInstanceResultNode(String processInstanceId) -
getCaseInstanceResultNode
-
getWorkInstanceResultNode
-
getTasksResultNode
-
getInstanceResultNode
-
getPageFromQuery
-
addPermissions
-
notAllowed
protected void notAllowed() -
isIndexingDisabled
-