Class WorkIndexService
- java.lang.Object
-
- com.flowable.platform.security.service.AbstractPlatformSecurityService
-
- com.flowable.platform.service.index.WorkIndexService
-
- All Implemented Interfaces:
PermissionServiceRegistryAware
,Aware
@Transactional public class WorkIndexService extends AbstractPlatformSecurityService
- Author:
- Javier Casal, Joram Barrez, Filip Hrisafov, Yvo Swillens
-
-
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
-
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 Detail
-
FILTER_COMPLETED
public static final String FILTER_COMPLETED
- See Also:
- Constant Field Values
-
FILTER_RUNNING
public static final String FILTER_RUNNING
- See Also:
- Constant Field Values
-
FILTER_MINE
public static final String FILTER_MINE
- See Also:
- Constant Field Values
-
FILTER_OPEN
public static final String FILTER_OPEN
- See Also:
- Constant Field Values
-
FILTER_ALL
public static final String FILTER_ALL
- See Also:
- Constant Field Values
-
FILTER_UNASSIGNED
public static final String FILTER_UNASSIGNED
- See Also:
- Constant Field Values
-
FILTER_ASSIGNED_TO_ME
public static final String FILTER_ASSIGNED_TO_ME
- See Also:
- Constant Field Values
-
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 PlatformIdentityService identityService
-
securityHelper
@Autowired protected SecurityHelper securityHelper
-
platformRepositoryService
@Autowired protected PlatformRepositoryService platformRepositoryService
-
templateService
@Autowired protected TemplateService templateService
-
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(String filterId, ProcessInstancesIndexQueryRequest request)
-
findProcessInstancesWithQuery
public Page<ProcessInstanceSearchRepresentation> findProcessInstancesWithQuery(ProcessInstancesIndexQueryRequest request)
-
findProcessInstance
public com.fasterxml.jackson.databind.JsonNode findProcessInstance(String processInstanceId)
-
findCaseInstancesWithQuery
public Page<CaseInstanceSearchRepresentation> findCaseInstancesWithQuery(String filterId, CaseInstancesIndexQueryRequest request)
-
findCaseInstancesWithQuery
public Page<CaseInstanceSearchRepresentation> findCaseInstancesWithQuery(CaseInstancesIndexQueryRequest request)
-
findCaseInstance
public com.fasterxml.jackson.databind.JsonNode findCaseInstance(String caseInstanceId)
-
findWorkInstancesWithQuery
public Page<WorkInstanceSearchRepresentation> findWorkInstancesWithQuery(WorkInstancesIndexQueryRequest request)
-
findWorkInstancesWithQueryWithoutPermissions
public Page<WorkInstanceSearchRepresentation> findWorkInstancesWithQueryWithoutPermissions(WorkInstancesIndexQueryRequest request)
-
findWorkInstance
public com.fasterxml.jackson.databind.JsonNode findWorkInstance(String workInstanceId)
-
findTasksWithQuery
public Page<TaskSearchRepresentation> findTasksWithQuery(String filterId, TasksIndexQueryRequest request)
-
findTasksWithQuery
public Page<TaskSearchRepresentation> findTasksWithQuery(TasksIndexQueryRequest request)
-
findTasksWithQueryWithoutPermissions
public Page<TaskSearchRepresentation> findTasksWithQueryWithoutPermissions(TasksIndexQueryRequest request)
-
findTask
public com.fasterxml.jackson.databind.JsonNode findTask(String taskId)
-
getInstanceRepresentationPage
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)
-
fetchData
protected <RES,REQ extends PlatformIndexQueryRequest,Q extends PlatformIndexQueryBuilder<REQ>> Page<RES> fetchData(REQ request, String index, ElasticsearchResultConverter.ResultMapper<RES> jsonMapper, Supplier<Q> queryBuilderSupplier)
-
isCustomQuery
protected boolean isCustomQuery(QueryDefinitionModel queryModel)
-
isSafeQuery
protected boolean isSafeQuery(QueryDefinitionModel queryModel)
-
getTemplateDefinition
protected QueryDefinitionModel getTemplateDefinition(String queryKey)
-
queryWithCustomQuery
protected <T> Page<T> queryWithCustomQuery(String index, PlatformIndexQueryRequest request, QueryDefinitionModel queryModel, ElasticsearchResultConverter.ResultMapper<T> jsonMapper)
-
queryWithSafeQuery
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)
-
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
protected List<TemplateParameter> getTemplateParameters(Map<String,QueryParameter> queryParameters)
-
transformQueryParameter
protected TemplateParameter transformQueryParameter(String key, QueryParameter queryParameter)
-
getConfigParameters
protected Map<String,ConfigParameter> getConfigParameters(Map<String,QueryParameter> queryParameters)
-
transformQueryParameter
protected ConfigParameter transformQueryParameter(QueryParameter queryParameter)
-
getCustomSortParameters
protected Map<String,SortParameter> getCustomSortParameters(PlatformIndexQueryRequest request, String index, String queryName)
-
getSortParameters
protected Map<String,SortParameter> getSortParameters(Map<String,QuerySortParameter> querySortParameters)
-
transformSortParameter
protected SortParameter transformSortParameter(QuerySortParameter querySortParameter)
-
getProcessInstanceResultNode
protected com.fasterxml.jackson.databind.JsonNode getProcessInstanceResultNode(String processInstanceId)
-
getCaseInstanceResultNode
protected com.fasterxml.jackson.databind.JsonNode getCaseInstanceResultNode(String caseInstanceId)
-
getWorkInstanceResultNode
protected com.fasterxml.jackson.databind.JsonNode getWorkInstanceResultNode(String workInstanceId)
-
getTasksResultNode
protected com.fasterxml.jackson.databind.JsonNode getTasksResultNode(String taskId)
-
getInstanceResultNode
protected com.fasterxml.jackson.databind.JsonNode getInstanceResultNode(String instanceId, String index)
-
getPageFromQuery
protected <T> Page<T> getPageFromQuery(int start, int size, String index, ElasticsearchResultConverter.ResultMapper<T> jsonMapper, String query, String sort, String order)
-
addPermissions
protected void addPermissions(PlatformIndexQueryRequest request)
-
notAllowed
protected void notAllowed()
-
-