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
Modifier and TypeFieldDescriptionprotected ResultFilter<CaseInstanceSearchRepresentation>
protected CaseInstanceResultMapper
protected Collection<String>
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected PlatformIdentityService
protected IndexManager
protected com.fasterxml.jackson.databind.ObjectMapper
protected PlatformRepositoryService
protected ResultFilter<ProcessInstanceSearchRepresentation>
protected ProcessInstanceResultMapper
protected SearchService
protected SecurityHelper
protected ResultFilter<TaskSearchRepresentation>
protected TaskResultMapper
protected TemplateService
protected ResultFilter<WorkInstanceSearchRepresentation>
protected WorkInstanceResultMapper
Fields 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
ConstructorDescriptionWorkIndexService
(ResultFilter<ProcessInstanceSearchRepresentation> processInstanceResultFilter, ResultFilter<CaseInstanceSearchRepresentation> caseInstanceResultFilter, ResultFilter<WorkInstanceSearchRepresentation> workInstanceResultFilter, ResultFilter<TaskSearchRepresentation> taskInstanceResultFilter, Collection<String> enabledIndices) -
Method Summary
Modifier and TypeMethodDescriptionprotected 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, String index, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, Supplier<Q> queryBuilderSupplier) com.fasterxml.jackson.databind.JsonNode
findCaseInstance
(String caseInstanceId) findCaseInstancesWithQuery
(String filterId, CaseInstancesIndexQueryRequest request) com.fasterxml.jackson.databind.JsonNode
findProcessInstance
(String processInstanceId) findProcessInstancesWithQuery
(String filterId, ProcessInstancesIndexQueryRequest request) com.fasterxml.jackson.databind.JsonNode
findTasksWithQuery
(TasksIndexQueryRequest request) findTasksWithQuery
(String filterId, TasksIndexQueryRequest request) com.fasterxml.jackson.databind.JsonNode
findWorkInstance
(String workInstanceId) protected com.fasterxml.jackson.databind.JsonNode
getCaseInstanceResultNode
(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.JsonNode
getInstanceResultNode
(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.JsonNode
getProcessInstanceResultNode
(String processInstanceId) protected Map<String,
SortParameter> getSortParameters
(Map<String, QuerySortParameter> querySortParameters) protected com.fasterxml.jackson.databind.JsonNode
getTasksResultNode
(String taskId) protected QueryDefinitionModel
getTemplateDefinition
(String queryKey) protected List<TemplateParameter>
getTemplateParameters
(Map<String, QueryParameter> queryParameters) protected com.fasterxml.jackson.databind.JsonNode
getWorkInstanceResultNode
(String workInstanceId) protected boolean
isCustomQuery
(QueryDefinitionModel queryModel) protected boolean
isIndexingDisabled
(String index) protected boolean
isSafeQuery
(QueryDefinitionModel queryModel) protected void
protected String
processCustomQueryTemplate
(QueryDefinitionModel queryModel, Map<String, Object> payload) protected com.fasterxml.jackson.databind.node.ObjectNode
processSafeQueryTemplate
(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 ConfigParameter
transformQueryParameter
(QueryParameter queryParameter) protected TemplateParameter
transformQueryParameter
(String key, QueryParameter queryParameter) protected SortParameter
transformSortParameter
(QuerySortParameter querySortParameter) 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, 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
-