public class CaseRuntimeDataServiceImpl extends Object implements CaseRuntimeDataService, DeploymentEventListener
Modifier and Type | Field and Description |
---|---|
protected Set<CaseDefinitionImpl> |
availableCases |
protected Set<ProcessDefinition> |
availableProcesses |
Constructor and Description |
---|
CaseRuntimeDataServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected List<?> |
adoptList(List<?> source,
List<?> values) |
protected void |
applyDeploymentFilter(Map<String,Object> params) |
protected <T> Collection<T> |
applyPagination(List<T> input,
org.kie.api.runtime.query.QueryContext queryContext) |
protected void |
applyQueryContext(Map<String,Object> params,
org.kie.api.runtime.query.QueryContext queryContext) |
protected List<String> |
collectUserAuthInfo() |
Collection<NodeInstanceDesc> |
getActiveNodesForCase(String caseId,
org.kie.api.runtime.query.QueryContext queryContext)
Returns active nodes in given case regardless in what process instance they belong to.
|
protected Collection<NodeInstanceDesc> |
getActiveNodesForCaseAndStage(String caseId,
String stageId,
org.kie.api.runtime.query.QueryContext queryContext) |
Collection<AdHocFragment> |
getAdHocFragmentsForCase(String caseId)
Returns list of AdHocFragments available in given case.
|
CaseDefinition |
getCase(String deploymentId,
String caseDefinitionId)
Returns case definition identified by caseDefinitionId that belongs to given deploymentId.
|
CaseIdGenerator |
getCaseIdGenerator() |
CaseInstance |
getCaseInstanceById(String caseId)
Returns case instance for given case id if the caller of this class is authorized to see the case instance
|
Collection<CaseFileItem> |
getCaseInstanceDataItems(String caseId,
org.kie.api.runtime.query.QueryContext queryContext)
Returns case file data items (as simple descriptions not actual values) for given case instance
|
Collection<CaseFileItem> |
getCaseInstanceDataItemsByName(String caseId,
List<String> names,
org.kie.api.runtime.query.QueryContext queryContext)
Returns case file data items (as simple descriptions not actual values) for given case instance filtered by item names
|
Collection<CaseFileItem> |
getCaseInstanceDataItemsByType(String caseId,
List<String> types,
org.kie.api.runtime.query.QueryContext queryContext)
Returns case file data items (as simple descriptions not actual values) for given case instance filtered by item types
|
Collection<CaseMilestoneInstance> |
getCaseInstanceMilestones(String caseId,
boolean achievedOnly,
org.kie.api.runtime.query.QueryContext queryContext)
Returns milestones for given case instance, identified by case id.
|
Collection<CaseInstance> |
getCaseInstances(List<CaseStatus> statuses,
org.kie.api.runtime.query.QueryContext queryContext)
Returns all available active case instances that match given statuses
|
Collection<CaseInstance> |
getCaseInstances(org.kie.api.runtime.query.QueryContext queryContext)
Returns all available active case instances
|
Collection<CaseInstance> |
getCaseInstancesAnyRole(List<CaseStatus> statuses,
org.kie.api.runtime.query.QueryContext queryContext)
Returns case instances that given user (via identity provider) is involved in in any role.
|
Collection<CaseInstance> |
getCaseInstancesByDataItem(String dataItemName,
List<CaseStatus> statuses,
org.kie.api.runtime.query.QueryContext queryContext)
Returns all available active case instances that match given statuses and has case file data item with given name
|
Collection<CaseInstance> |
getCaseInstancesByDataItemAndValue(String dataItemName,
String dataItemValue,
List<CaseStatus> statuses,
org.kie.api.runtime.query.QueryContext queryContext)
Returns all available active case instances that match given statuses and has case file data item with given name and value
|
Collection<CaseInstance> |
getCaseInstancesByDefinition(String definitionId,
List<CaseStatus> statuses,
org.kie.api.runtime.query.QueryContext queryContext)
Returns all available case instances;
|
Collection<CaseInstance> |
getCaseInstancesByDeployment(String deploymentId,
List<CaseStatus> statuses,
org.kie.api.runtime.query.QueryContext queryContext)
Returns all available case instances;
|
Collection<CaseInstance> |
getCaseInstancesByRole(String roleName,
List<CaseStatus> statuses,
org.kie.api.runtime.query.QueryContext queryContext)
Returns cases instances that given user (via identity provider) has access to with given role.
|
Collection<CaseInstance> |
getCaseInstancesOwnedBy(String owner,
List<CaseStatus> statuses,
org.kie.api.runtime.query.QueryContext queryContext)
Returns all case instances owned by given user
|
Collection<CaseStageInstance> |
getCaseInstanceStages(String caseId,
boolean activeOnly,
org.kie.api.runtime.query.QueryContext queryContext)
Returns stages of given case instance, identified by case id.
|
Collection<CaseDefinition> |
getCases(org.kie.api.runtime.query.QueryContext queryContext)
Returns available cases.
|
Collection<CaseDefinition> |
getCases(String filter,
org.kie.api.runtime.query.QueryContext queryContext)
Returns available cases which matching filter that applies to case name (usually represented by process id or name).
|
Collection<CaseDefinition> |
getCasesByDeployment(String deploymentId,
org.kie.api.runtime.query.QueryContext queryContext)
Returns available cases for given deployment id
|
List<org.kie.api.task.model.TaskSummary> |
getCaseTasksAssignedAsBusinessAdmin(String caseId,
String userId,
List<org.kie.api.task.model.Status> status,
org.kie.api.runtime.query.QueryContext queryContext)
Returns all tasks associated with given case id that are eligible for user to see as business admin role.
|
List<org.kie.api.task.model.TaskSummary> |
getCaseTasksAssignedAsPotentialOwner(String caseId,
String userId,
List<org.kie.api.task.model.Status> status,
org.kie.api.runtime.query.QueryContext queryContext)
Returns all tasks associated with given case id that are eligible for user to see.
|
List<org.kie.api.task.model.TaskSummary> |
getCaseTasksAssignedAsStakeholder(String caseId,
String userId,
List<org.kie.api.task.model.Status> status,
org.kie.api.runtime.query.QueryContext queryContext)
Returns all tasks associated with given case id that are eligible for user to see in task stakeholder role.
|
Collection<NodeInstanceDesc> |
getCompletedNodesForCase(String caseId,
org.kie.api.runtime.query.QueryContext queryContext)
Returns completed nodes in given case regardless in what process instance they belong to.
|
Collection<ProcessDefinition> |
getProcessDefinitions(org.kie.api.runtime.query.QueryContext queryContext)
Returns process definitions that are not considered as case definitions.
|
Collection<ProcessDefinition> |
getProcessDefinitions(String filter,
org.kie.api.runtime.query.QueryContext queryContext)
Returns process definitions that are not considered as case definitions and are filtered by process id or name.
|
Collection<ProcessDefinition> |
getProcessDefinitionsByDeployment(String deploymentId,
org.kie.api.runtime.query.QueryContext queryContext)
Returns process definitions that are not considered as case definitions that belongs to given deployment.
|
Collection<ProcessInstanceDesc> |
getProcessInstancesForCase(String caseId,
List<Integer> processStates,
org.kie.api.runtime.query.QueryContext queryContext)
Returns process instances found for given case id.
|
Collection<ProcessInstanceDesc> |
getProcessInstancesForCase(String caseId,
org.kie.api.runtime.query.QueryContext queryContext)
Returns process instances found for given case id.
|
List<CaseStageInstance> |
internalGetCaseStages(CaseDefinition caseDef,
String caseId,
boolean activeOnly,
org.kie.api.runtime.query.QueryContext queryContext) |
void |
onActivate(DeploymentEvent event) |
void |
onDeactivate(DeploymentEvent event) |
void |
onDeploy(DeploymentEvent event) |
void |
onUnDeploy(DeploymentEvent event) |
protected List<Integer> |
resolveCaseStatuses(List<CaseStatus> caseStatusesList) |
void |
setCaseIdGenerator(CaseIdGenerator caseIdGenerator) |
void |
setCommandService(TransactionalCommandService commandService) |
void |
setDeploymentRolesManager(DeploymentRolesManager deploymentRolesManager) |
void |
setIdentityProvider(org.kie.internal.identity.IdentityProvider identityProvider) |
void |
setRuntimeDataService(RuntimeDataService runtimeDataService) |
protected Set<CaseDefinitionImpl> availableCases
protected Set<ProcessDefinition> availableProcesses
public CaseIdGenerator getCaseIdGenerator()
public void setCaseIdGenerator(CaseIdGenerator caseIdGenerator)
public void setRuntimeDataService(RuntimeDataService runtimeDataService)
public void setCommandService(TransactionalCommandService commandService)
public void setIdentityProvider(org.kie.internal.identity.IdentityProvider identityProvider)
public void setDeploymentRolesManager(DeploymentRolesManager deploymentRolesManager)
public void onDeploy(DeploymentEvent event)
onDeploy
in interface DeploymentEventListener
public void onUnDeploy(DeploymentEvent event)
onUnDeploy
in interface DeploymentEventListener
public void onActivate(DeploymentEvent event)
onActivate
in interface DeploymentEventListener
public void onDeactivate(DeploymentEvent event)
onDeactivate
in interface DeploymentEventListener
public CaseDefinition getCase(String deploymentId, String caseDefinitionId)
CaseRuntimeDataService
getCase
in interface CaseRuntimeDataService
deploymentId
- deployment identifier that case definition is part ofcaseDefinitionId
- id of the casepublic Collection<CaseDefinition> getCases(org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCases
in interface CaseRuntimeDataService
queryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<CaseDefinition> getCases(String filter, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCases
in interface CaseRuntimeDataService
filter
- filter for case name to narrow down resultsqueryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<CaseDefinition> getCasesByDeployment(String deploymentId, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCasesByDeployment
in interface CaseRuntimeDataService
deploymentId
- deployment identifier that case definition is part ofqueryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<ProcessDefinition> getProcessDefinitions(org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getProcessDefinitions
in interface CaseRuntimeDataService
queryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<ProcessDefinition> getProcessDefinitions(String filter, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getProcessDefinitions
in interface CaseRuntimeDataService
filter
- regex based filter for either name or id of the processqueryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<ProcessDefinition> getProcessDefinitionsByDeployment(String deploymentId, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getProcessDefinitionsByDeployment
in interface CaseRuntimeDataService
deploymentId
- deployment id the processes should be found forqueryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<ProcessInstanceDesc> getProcessInstancesForCase(String caseId, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getProcessInstancesForCase
in interface CaseRuntimeDataService
caseId
- unique id of the casequeryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<ProcessInstanceDesc> getProcessInstancesForCase(String caseId, List<Integer> processStates, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getProcessInstancesForCase
in interface CaseRuntimeDataService
caseId
- unique id of the caseprocessStates
- states representing process instance (active, completed, aborted)queryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<CaseMilestoneInstance> getCaseInstanceMilestones(String caseId, boolean achievedOnly, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCaseInstanceMilestones
in interface CaseRuntimeDataService
caseId
- unique id of the caseachievedOnly
- filter option to return only these that have already been achievedqueryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<CaseStageInstance> getCaseInstanceStages(String caseId, boolean activeOnly, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCaseInstanceStages
in interface CaseRuntimeDataService
caseId
- unique id of the caseactiveOnly
- filter option to return only stages that are activequeryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<NodeInstanceDesc> getActiveNodesForCase(String caseId, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getActiveNodesForCase
in interface CaseRuntimeDataService
caseId
- unique id of the casequeryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<NodeInstanceDesc> getCompletedNodesForCase(String caseId, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCompletedNodesForCase
in interface CaseRuntimeDataService
caseId
- unique id of the casequeryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<CaseInstance> getCaseInstances(org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCaseInstances
in interface CaseRuntimeDataService
queryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<CaseInstance> getCaseInstances(List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCaseInstances
in interface CaseRuntimeDataService
statuses
- list of statuses that case should be in to matchqueryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<CaseInstance> getCaseInstancesByDeployment(String deploymentId, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCaseInstancesByDeployment
in interface CaseRuntimeDataService
deploymentId
- deployment identifier that case instance is part ofstatuses
- list of statuses that case should be in to matchqueryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<CaseInstance> getCaseInstancesByDefinition(String definitionId, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCaseInstancesByDefinition
in interface CaseRuntimeDataService
definitionId
- case definition idstatuses
- list of statuses that case should be in to matchqueryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<CaseInstance> getCaseInstancesOwnedBy(String owner, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCaseInstancesOwnedBy
in interface CaseRuntimeDataService
statuses
- list of statuses that case should be in to matchqueryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<CaseInstance> getCaseInstancesByRole(String roleName, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCaseInstancesByRole
in interface CaseRuntimeDataService
roleName
- name of the role that user should bestatuses
- statuses of the case instancesqueryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<CaseInstance> getCaseInstancesAnyRole(List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCaseInstancesAnyRole
in interface CaseRuntimeDataService
statuses
- statuses of the case instancesqueryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<CaseInstance> getCaseInstancesByDataItem(String dataItemName, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCaseInstancesByDataItem
in interface CaseRuntimeDataService
dataItemName
- name of the case file data itemstatuses
- list of statuses that case should be in to matchqueryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<CaseInstance> getCaseInstancesByDataItemAndValue(String dataItemName, String dataItemValue, List<CaseStatus> statuses, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCaseInstancesByDataItemAndValue
in interface CaseRuntimeDataService
dataItemName
- name of the case file data itemdataItemValue
- expected value of the data itemstatuses
- list of statuses that case should be in to matchqueryContext
- control parameters for the result e.g. sorting, pagingpublic CaseInstance getCaseInstanceById(String caseId)
CaseRuntimeDataService
getCaseInstanceById
in interface CaseRuntimeDataService
caseId
- unique case id of the casepublic Collection<AdHocFragment> getAdHocFragmentsForCase(String caseId)
CaseRuntimeDataService
getAdHocFragmentsForCase
in interface CaseRuntimeDataService
caseId
- unique id of the casepublic List<org.kie.api.task.model.TaskSummary> getCaseTasksAssignedAsPotentialOwner(String caseId, String userId, List<org.kie.api.task.model.Status> status, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCaseTasksAssignedAsPotentialOwner
in interface CaseRuntimeDataService
caseId
- unique id of the caseuserId
- user id that the tasks should be available forstatus
- status of the taskqueryContext
- control parameters for the result e.g. sorting, pagingpublic List<org.kie.api.task.model.TaskSummary> getCaseTasksAssignedAsBusinessAdmin(String caseId, String userId, List<org.kie.api.task.model.Status> status, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCaseTasksAssignedAsBusinessAdmin
in interface CaseRuntimeDataService
caseId
- unique id of the caseuserId
- user id that the tasks should be available forstatus
- status of the taskqueryContext
- control parameters for the result e.g. sorting, pagingpublic List<org.kie.api.task.model.TaskSummary> getCaseTasksAssignedAsStakeholder(String caseId, String userId, List<org.kie.api.task.model.Status> status, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCaseTasksAssignedAsStakeholder
in interface CaseRuntimeDataService
caseId
- unique id of the caseuserId
- user id that the tasks should be available forstatus
- status of the taskqueryContext
- control parameters for the result e.g. sorting, pagingpublic List<CaseStageInstance> internalGetCaseStages(CaseDefinition caseDef, String caseId, boolean activeOnly, org.kie.api.runtime.query.QueryContext queryContext)
protected Collection<NodeInstanceDesc> getActiveNodesForCaseAndStage(String caseId, String stageId, org.kie.api.runtime.query.QueryContext queryContext)
protected void applyQueryContext(Map<String,Object> params, org.kie.api.runtime.query.QueryContext queryContext)
protected <T> Collection<T> applyPagination(List<T> input, org.kie.api.runtime.query.QueryContext queryContext)
protected List<Integer> resolveCaseStatuses(List<CaseStatus> caseStatusesList)
public Collection<CaseFileItem> getCaseInstanceDataItems(String caseId, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCaseInstanceDataItems
in interface CaseRuntimeDataService
caseId
- unique id of the casequeryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<CaseFileItem> getCaseInstanceDataItemsByName(String caseId, List<String> names, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCaseInstanceDataItemsByName
in interface CaseRuntimeDataService
caseId
- unique id of the casenames
- name of data items to be foundqueryContext
- control parameters for the result e.g. sorting, pagingpublic Collection<CaseFileItem> getCaseInstanceDataItemsByType(String caseId, List<String> types, org.kie.api.runtime.query.QueryContext queryContext)
CaseRuntimeDataService
getCaseInstanceDataItemsByType
in interface CaseRuntimeDataService
caseId
- unique id of the casetypes
- type of data items to be foundqueryContext
- control parameters for the result e.g. sorting, pagingCopyright © 2001–2019 JBoss by Red Hat. All rights reserved.