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<ActivitySearchRepresentation> protected ActivityResultMapperprotected AgentInstanceResultMapperprotected AgentInvocationResultMapperprotected ResultFilter<CaseInstanceSearchRepresentation> protected CaseInstanceResultMapperprotected ResultFilter<ContentItemRepresentation> protected ContentItemResultMapperprotected Collection<String> protected booleanstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected PlatformIdentityServiceprotected IndexManagerprotected tools.jackson.databind.ObjectMapperprotected ResultFilter<PlanItemSearchRepresentation> protected PlanItemResultMapperprotected ResultFilter<PlatformGlobalSearchRepresentation> protected PlatformGlobalSearchResultMapperprotected PlatformRepositoryServiceprotected ResultFilter<ProcessInstanceSearchRepresentation> protected ProcessInstanceResultMapperprotected SearchServiceprotected SecurityHelperprotected ResultFilter<TaskSearchRepresentation> protected TaskResultMapperprotected TemplateServiceprotected ResultFilter<WorkInstanceSearchRepresentation> protected WorkInstanceResultMapperFields inherited from class 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, ResultFilter<ActivitySearchRepresentation> activityResultFilter, ResultFilter<PlanItemSearchRepresentation> planItemResultFilter, ResultFilter<ContentItemRepresentation> contentItemResultFilter, Collection<String> enabledIndices, boolean enableQueryTest) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPermissions(PlatformIndexQueryRequest request) protected <T> Page<T> createInstancesPage(Page<T> page) protected <RES, REQ extends AbstractIndexQueryRequest, Q extends AbstractIndexQueryBuilder<REQ>>
Page<RES> fetchData(REQ request, Set<String> indices, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, Supplier<Q> queryBuilderSupplier) tools.jackson.databind.JsonNodefindActivity(String activityId) tools.jackson.databind.JsonNodefindAgentInstance(String agentInstanceId) tools.jackson.databind.JsonNodefindAgentInvocation(String agentInvocationId) tools.jackson.databind.JsonNodefindCaseInstance(String caseInstanceId) findCaseInstancesWithQuery(String filterId, CaseInstancesIndexQueryRequest request) tools.jackson.databind.JsonNodefindContentItem(String contentItemId) tools.jackson.databind.JsonNodefindPlanItem(String planItemId) tools.jackson.databind.JsonNodefindProcessInstance(String processInstanceId) findProcessInstancesWithQuery(String filterId, ProcessInstancesIndexQueryRequest request) tools.jackson.databind.JsonNodefindTasksWithQuery(TasksIndexQueryRequest request) findTasksWithQuery(String filterId, TasksIndexQueryRequest request) tools.jackson.databind.JsonNodefindWorkInstance(String workInstanceId) protected tools.jackson.databind.JsonNodegetActivitiesResultNode(String activityId) protected tools.jackson.databind.JsonNodegetCaseInstanceResultNode(String caseInstanceId) protected Map<String, ConfigParameter> getConfigParameters(Map<String, QueryParameter> queryParameters) protected tools.jackson.databind.JsonNodegetContentItemsResultNode(String planItemId) protected Map<String, SortParameter> getCustomSortParameters(AbstractIndexQueryRequest request, String index, String queryName) protected <RES, REQ extends AbstractIndexQueryRequest, Q extends AbstractIndexQueryBuilder<REQ>>
Page<RES> getInstanceRepresentationPage(REQ request, String index, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, ResultFilter<RES> resultFilter, Supplier<Q> queryBuilderSupplier) protected <RES, REQ extends AbstractIndexQueryRequest, Q extends AbstractIndexQueryBuilder<REQ>>
Page<RES> getInstanceRepresentationPage(REQ request, Set<String> indices, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, ResultFilter<RES> resultFilter, Supplier<Q> queryBuilderSupplier) protected tools.jackson.databind.JsonNodegetInstanceResultNode(FilteredFullTextSearchQueryBuilder queryBuilder, String instanceId, String index) protected tools.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 <T> Page<T> getPageFromQuery(int start, int size, Set<String> indices, ElasticsearchResultConverter.ResultMapper<T> jsonMapper, String query, String sort, String order) protected tools.jackson.databind.JsonNodegetPlanItemsResultNode(String planItemId) protected tools.jackson.databind.JsonNodegetProcessInstanceResultNode(String processInstanceId) protected Map<String, SortParameter> getSortParameters(Map<String, QuerySortParameter> querySortParameters) protected tools.jackson.databind.JsonNodegetTasksResultNode(String taskId) protected QueryDefinitionModelgetTemplateDefinition(String queryKey) protected List<TemplateParameter> getTemplateParameters(Map<String, QueryParameter> queryParameters) protected tools.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 tools.jackson.databind.node.ObjectNodeprocessSafeQueryTemplate(QueryDefinitionModel queryModel, Map<String, Object> payload) protected <T> Page<T> queryWithCustomQuery(Set<String> indices, AbstractIndexQueryRequest request, QueryDefinitionModel queryModel, ElasticsearchResultConverter.ResultMapper<T> jsonMapper) protected <RES, REQ extends AbstractIndexQueryRequest, Q extends AbstractIndexQueryBuilder<REQ>>
Page<RES> queryWithSafeQuery(REQ request, Set<String> indices, 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 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
-
activityResultMapper
-
planItemResultMapper
-
contentItemResultMapper
-
agentInstanceResultMapper
-
agentInvocationResultMapper
-
platformGlobalSearchResultMapper
-
identityService
-
securityHelper
-
platformRepositoryService
-
templateService
-
processInstanceResultFilter
-
caseInstanceResultFilter
-
workInstanceResultFilter
-
taskInstanceResultFilter
-
activityResultFilter
-
planItemResultFilter
-
contentItemResultFilter
-
platformGlobalSearchResultFilter
-
enabledIndices
-
enableQueryTest
protected boolean enableQueryTest
-
-
Constructor Details
-
WorkIndexService
public WorkIndexService(ResultFilter<ProcessInstanceSearchRepresentation> processInstanceResultFilter, ResultFilter<CaseInstanceSearchRepresentation> caseInstanceResultFilter, ResultFilter<WorkInstanceSearchRepresentation> workInstanceResultFilter, ResultFilter<TaskSearchRepresentation> taskInstanceResultFilter, ResultFilter<ActivitySearchRepresentation> activityResultFilter, ResultFilter<PlanItemSearchRepresentation> planItemResultFilter, ResultFilter<ContentItemRepresentation> contentItemResultFilter, Collection<String> enabledIndices, boolean enableQueryTest)
-
-
Method Details
-
findGlobalInstancesWithQuery
public Page<PlatformGlobalSearchRepresentation> findGlobalInstancesWithQuery(PlatformGlobalSearchIndexQueryRequest request) -
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
-
findActivitiesWithQueryWithoutPermissions
public Page<ActivitySearchRepresentation> findActivitiesWithQueryWithoutPermissions(ActivitiesIndexQueryRequest request) -
findActivity
-
findPlanItemsWithQueryWithoutPermissions
public Page<PlanItemSearchRepresentation> findPlanItemsWithQueryWithoutPermissions(PlanItemsIndexQueryRequest request) -
findPlanItem
-
findContentItemsWithQueryWithoutPermissions
public Page<ContentItemRepresentation> findContentItemsWithQueryWithoutPermissions(ContentItemsIndexQueryRequest request) -
findContentItem
-
findAgentInstancesWithQuery
public Page<AgentInstanceSearchRepresentation> findAgentInstancesWithQuery(AgentInstancesIndexQueryRequest request) -
findAgentInstance
-
findAgentInvocationsWithQuery
public Page<AgentInvocationSearchRepresentation> findAgentInvocationsWithQuery(AgentInvocationsIndexQueryRequest request) -
findAgentInvocation
-
getInstanceRepresentationPage
protected <RES, REQ extends AbstractIndexQueryRequest, Q extends AbstractIndexQueryBuilder<REQ>> Page<RES> getInstanceRepresentationPage(REQ request, String index, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, ResultFilter<RES> resultFilter, Supplier<Q> queryBuilderSupplier) -
getInstanceRepresentationPage
protected <RES, REQ extends AbstractIndexQueryRequest, Q extends AbstractIndexQueryBuilder<REQ>> Page<RES> getInstanceRepresentationPage(REQ request, Set<String> indices, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, ResultFilter<RES> resultFilter, Supplier<Q> queryBuilderSupplier) -
createInstancesPage
-
fetchData
protected <RES, REQ extends AbstractIndexQueryRequest, Q extends AbstractIndexQueryBuilder<REQ>> Page<RES> fetchData(REQ request, Set<String> indices, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, Supplier<Q> queryBuilderSupplier) -
isCustomQuery
-
isSafeQuery
-
getTemplateDefinition
-
queryWithCustomQuery
protected <T> Page<T> queryWithCustomQuery(Set<String> indices, AbstractIndexQueryRequest request, QueryDefinitionModel queryModel, ElasticsearchResultConverter.ResultMapper<T> jsonMapper) -
queryWithSafeQuery
protected <RES, REQ extends AbstractIndexQueryRequest, Q extends AbstractIndexQueryBuilder<REQ>> Page<RES> queryWithSafeQuery(REQ request, Set<String> indices, QueryDefinitionModel queryModel, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, Supplier<Q> queryBuilderSupplier) -
processCustomQueryTemplate
protected String processCustomQueryTemplate(QueryDefinitionModel queryModel, Map<String, Object> payload) -
processSafeQueryTemplate
protected tools.jackson.databind.node.ObjectNode processSafeQueryTemplate(QueryDefinitionModel queryModel, Map<String, Object> payload) -
getTemplateParameters
protected List<TemplateParameter> getTemplateParameters(Map<String, QueryParameter> queryParameters) -
transformQueryParameter
-
getConfigParameters
protected Map<String, ConfigParameter> getConfigParameters(Map<String, QueryParameter> queryParameters) -
transformQueryParameter
-
getCustomSortParameters
protected Map<String, SortParameter> getCustomSortParameters(AbstractIndexQueryRequest request, String index, String queryName) -
getSortParameters
protected Map<String, SortParameter> getSortParameters(Map<String, QuerySortParameter> querySortParameters) -
transformSortParameter
-
getProcessInstanceResultNode
-
getCaseInstanceResultNode
-
getWorkInstanceResultNode
-
getTasksResultNode
-
getActivitiesResultNode
-
getPlanItemsResultNode
-
getContentItemsResultNode
-
getInstanceResultNode
-
getInstanceResultNode
protected tools.jackson.databind.JsonNode getInstanceResultNode(FilteredFullTextSearchQueryBuilder queryBuilder, String instanceId, String index) -
getPageFromQuery
-
getPageFromQuery
-
addPermissions
-
notAllowed
protected void notAllowed() -
isIndexingDisabled
-
getIndices
-