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 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 com.fasterxml.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 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, 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) com.fasterxml.jackson.databind.JsonNodefindActivity(String activityId) com.fasterxml.jackson.databind.JsonNodefindCaseInstance(String caseInstanceId) findCaseInstancesWithQuery(String filterId, CaseInstancesIndexQueryRequest request) com.fasterxml.jackson.databind.JsonNodefindContentItem(String contentItemId) com.fasterxml.jackson.databind.JsonNodefindPlanItem(String planItemId) 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.JsonNodegetActivitiesResultNode(String activityId) protected com.fasterxml.jackson.databind.JsonNodegetCaseInstanceResultNode(String caseInstanceId) protected Map<String, ConfigParameter> getConfigParameters(Map<String, QueryParameter> queryParameters) protected com.fasterxml.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 com.fasterxml.jackson.databind.JsonNodegetInstanceResultNode(FilteredFullTextSearchQueryBuilder queryBuilder, String instanceId, String index) 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 <T> Page<T> getPageFromQuery(int start, int size, Set<String> indices, ElasticsearchResultConverter.ResultMapper<T> jsonMapper, String query, String sort, String order) protected com.fasterxml.jackson.databind.JsonNodegetPlanItemsResultNode(String planItemId) 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(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 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
-
activityResultMapper
-
planItemResultMapper
-
contentItemResultMapper
-
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
-
getInstanceRepresentationPage
protected <RES,REQ extends AbstractIndexQueryRequest, Page<RES> getInstanceRepresentationPageQ extends AbstractIndexQueryBuilder<REQ>> (REQ request, String index, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, ResultFilter<RES> resultFilter, Supplier<Q> queryBuilderSupplier) -
getInstanceRepresentationPage
protected <RES,REQ extends AbstractIndexQueryRequest, Page<RES> getInstanceRepresentationPageQ extends AbstractIndexQueryBuilder<REQ>> (REQ request, Set<String> indices, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, ResultFilter<RES> resultFilter, Supplier<Q> queryBuilderSupplier) -
createInstancesPage
-
fetchData
protected <RES,REQ extends AbstractIndexQueryRequest, Page<RES> fetchDataQ extends AbstractIndexQueryBuilder<REQ>> (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, Page<RES> queryWithSafeQueryQ extends AbstractIndexQueryBuilder<REQ>> (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 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(AbstractIndexQueryRequest 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
-
getActivitiesResultNode
-
getPlanItemsResultNode
-
getContentItemsResultNode
-
getInstanceResultNode
-
getInstanceResultNode
protected com.fasterxml.jackson.databind.JsonNode getInstanceResultNode(FilteredFullTextSearchQueryBuilder queryBuilder, String instanceId, String index) -
getPageFromQuery
-
getPageFromQuery
-
addPermissions
-
notAllowed
protected void notAllowed() -
isIndexingDisabled
-
getIndices
-