public class TaskEntityImpl extends VariableScopeImpl implements TaskEntity, Serializable, BulkDeleteable
cachedElContext, id, usedVariablesCache, variableInstances
DEFAULT_PRIORITY
Constructor and Description |
---|
TaskEntityImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addCandidateGroup(String groupId)
Adds the given group as candidate group to this task
|
void |
addCandidateGroups(Collection<String> candidateGroups)
Adds multiple groups as candidate group to this task.
|
void |
addCandidateUser(String userId)
Adds the given user as a candidate user to this task.
|
void |
addCandidateUsers(Collection<String> candidateUsers)
Adds multiple users as candidate user to this task.
|
void |
addGroupIdentityLink(String groupId,
String identityLinkType)
Involves a group with group task.
|
void |
addUserIdentityLink(String userId,
String identityLinkType)
Involves a user with a task.
|
protected VariableInstanceEntity |
createVariableInstance(String variableName,
Object value,
ExecutionEntity sourceActivityExecution) |
void |
deleteCandidateGroup(String groupId)
Convenience shorthand for
#deleteGroupIdentityLink(String, String, String) ; with type IdentityLinkType.CANDIDATE |
void |
deleteCandidateUser(String userId)
Convenience shorthand for
DelegateTask.deleteUserIdentityLink(String, String) ; with type IdentityLinkType.CANDIDATE |
void |
deleteGroupIdentityLink(String groupId,
String identityLinkType)
Removes the association between a group and a task for the given identityLinkType.
|
void |
deleteUserIdentityLink(String userId,
String identityLinkType)
Removes the association between a user and a task for the given identityLinkType.
|
void |
forceUpdate() |
String |
getAssignee()
The
userId of the person to which this task is delegated. |
Set<IdentityLink> |
getCandidates()
Retrieves the candidate users and groups associated with the task.
|
String |
getCategory()
The category of the task.
|
Date |
getCreateTime()
The date/time when this task was created
|
DelegationState |
getDelegationState()
The current
DelegationState for this task. |
String |
getDelegationStateString() |
String |
getDescription()
Free text description of the task.
|
Date |
getDueDate()
Due date of the task.
|
String |
getEventName()
Returns the event name which triggered the task listener to fire for this task.
|
ExecutionEntity |
getExecution()
Returns the execution currently at the task.
|
String |
getExecutionId()
Reference to the path of execution or null if it is not related to a process instance.
|
String |
getFormKey()
The form key for the user task
|
List<IdentityLinkEntity> |
getIdentityLinks() |
String |
getLocalizedDescription() |
String |
getLocalizedName() |
String |
getName()
Name or title of the task.
|
String |
getOriginalAssignee() |
String |
getOwner()
The
userId of the person that is responsible for this task. |
String |
getParentTaskId()
The parent task for which this task is a subtask
|
protected VariableScopeImpl |
getParentVariableScope() |
Object |
getPersistentState()
Returns a representation of the object, as would be stored in the database.
|
int |
getPriority()
Indication of how important/urgent this task is
|
String |
getProcessDefinitionId()
Reference to the process definition or null if it is not related to a process.
|
ExecutionEntity |
getProcessInstance() |
String |
getProcessInstanceId()
Reference to the process instance or null if it is not related to a process instance.
|
Map<String,Object> |
getProcessVariables()
Returns the process variables if requested in the task query
|
List<VariableInstanceEntity> |
getQueryVariables() |
int |
getRevision() |
int |
getRevisionNext() |
protected VariableInstanceEntity |
getSpecificVariable(String variableName) |
protected List<VariableInstanceEntity> |
getSpecificVariables(Collection<String> variableNames) |
int |
getSuspensionState() |
String |
getTaskDefinitionKey()
The id of the activity in the process defining this task or null if this is not related to a process
|
Map<String,Object> |
getTaskLocalVariables()
Returns the local task variables if requested in the task query
|
String |
getTenantId()
The tenant identifier of this task
|
Map<String,VariableInstanceEntity> |
getVariableInstances() |
protected void |
initializeVariableInstanceBackPointer(VariableInstanceEntity variableInstance) |
protected boolean |
isActivityIdUsedForDetails()
Execution variable updates have activity instance ids, but historic task variable updates don't.
|
boolean |
isDeleted() |
boolean |
isSuspended()
Indicates whether this task is suspended or not.
|
protected List<VariableInstanceEntity> |
loadVariableInstances() |
void |
setAssignee(String assignee)
The
userId of the person to which this task is delegated. |
void |
setCategory(String category)
Change the category of the task.
|
void |
setCreateTime(Date createTime) |
void |
setDelegationState(DelegationState delegationState)
The current
DelegationState for this task. |
void |
setDelegationStateString(String delegationStateString) |
void |
setDeleted(boolean isDeleted) |
void |
setDescription(String description)
Change the description of the task
|
void |
setDueDate(Date dueDate)
Change due date of the task.
|
void |
setEventName(String eventName) |
void |
setExecution(DelegateExecution execution) |
void |
setExecution(ExecutionEntity execution) |
void |
setExecutionId(String executionId) |
void |
setExecutionVariables(Map<String,Object> parameters) |
void |
setFormKey(String formKey)
Change the form key of the task
|
void |
setLocalizedDescription(String localizedDescription)
Sets an optional localized description for the task.
|
void |
setLocalizedName(String localizedName)
Sets an optional localized name for the task.
|
void |
setName(String taskName)
Name or title of the task.
|
void |
setOwner(String owner)
The
userId of the person that is responsible for this task. |
void |
setParentTaskId(String parentTaskId)
the parent task for which this task is a subtask
|
void |
setPriority(int priority)
Sets the indication of how important/urgent this task is
|
void |
setProcessDefinitionId(String processDefinitionId) |
void |
setProcessInstance(ExecutionEntity processInstance) |
void |
setProcessInstanceId(String processInstanceId) |
void |
setQueryVariables(List<VariableInstanceEntity> queryVariables) |
void |
setRevision(int revision) |
void |
setSuspensionState(int suspensionState) |
void |
setTaskDefinitionKey(String taskDefinitionKey) |
void |
setTenantId(String tenantId)
Change the tenantId of the task
|
String |
toString() |
protected void |
updateVariableInstance(VariableInstanceEntity variableInstance,
Object value,
ExecutionEntity sourceActivityExecution) |
collectVariableNames, collectVariables, createVariableLocal, createVariableLocal, createVariablesLocal, deleteVariableInstanceForExplicitUserCall, deleteVariablesInstanceForLeavingScope, ensureVariableInstancesInitialized, getCachedElContext, getId, getSourceActivityExecution, getUsedVariablesCache, getVariable, getVariable, getVariable, getVariableLocal, getVariableLocal, getVariableLocal, getVariableNames, getVariableNamesLocal, getVariables, getVariables, getVariables, getVariablesLocal, getVariablesLocal, getVariablesLocal, getVariableValues, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeVariable, removeVariable, removeVariableLocal, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setCachedElContext, setId, setVariable, setVariable, setVariable, setVariableLocal, setVariableLocal, setVariableLocal, setVariables, setVariablesLocal
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getId
createVariableLocal, getVariable, getVariable, getVariable, getVariableLocal, getVariableLocal, getVariableLocal, getVariableNames, getVariableNamesLocal, getVariables, getVariables, getVariables, getVariablesLocal, getVariablesLocal, getVariablesLocal, getVariableValues, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeVariable, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setVariable, setVariable, setVariableLocal, setVariableLocal, setVariables, setVariablesLocal
public static final String DELETE_REASON_COMPLETED
public static final String DELETE_REASON_DELETED
protected int revision
protected String owner
protected int assigneeUpdatedCount
protected String originalAssignee
protected String assignee
protected DelegationState delegationState
protected String parentTaskId
protected String name
protected String localizedName
protected String description
protected String localizedDescription
protected int priority
protected Date createTime
protected Date dueDate
protected int suspensionState
protected String category
protected boolean isIdentityLinksInitialized
protected List<IdentityLinkEntity> taskIdentityLinkEntities
protected String executionId
protected ExecutionEntity execution
protected String processInstanceId
protected ExecutionEntity processInstance
protected String processDefinitionId
protected String taskDefinitionKey
protected String formKey
protected boolean isDeleted
protected String eventName
protected String tenantId
protected List<VariableInstanceEntity> queryVariables
protected boolean forcedUpdate
public Object getPersistentState()
Entity
getPersistentState
in interface Entity
public int getRevisionNext()
getRevisionNext
in interface HasRevision
public void forceUpdate()
forceUpdate
in interface TaskEntity
protected VariableScopeImpl getParentVariableScope()
getParentVariableScope
in class VariableScopeImpl
protected void initializeVariableInstanceBackPointer(VariableInstanceEntity variableInstance)
initializeVariableInstanceBackPointer
in class VariableScopeImpl
protected List<VariableInstanceEntity> loadVariableInstances()
loadVariableInstances
in class VariableScopeImpl
protected VariableInstanceEntity createVariableInstance(String variableName, Object value, ExecutionEntity sourceActivityExecution)
createVariableInstance
in class VariableScopeImpl
protected void updateVariableInstance(VariableInstanceEntity variableInstance, Object value, ExecutionEntity sourceActivityExecution)
updateVariableInstance
in class VariableScopeImpl
public ExecutionEntity getExecution()
DelegateTask
getExecution
in interface DelegateTask
getExecution
in interface TaskEntity
public void setExecution(DelegateExecution execution)
public void addCandidateUser(String userId)
DelegateTask
addCandidateUser
in interface DelegateTask
public void addCandidateUsers(Collection<String> candidateUsers)
DelegateTask
addCandidateUsers
in interface DelegateTask
public void addCandidateGroup(String groupId)
DelegateTask
addCandidateGroup
in interface DelegateTask
public void addCandidateGroups(Collection<String> candidateGroups)
DelegateTask
addCandidateGroups
in interface DelegateTask
public void addUserIdentityLink(String userId, String identityLinkType)
DelegateTask
addUserIdentityLink
in interface DelegateTask
userId
- id of the user involve, cannot be null.identityLinkType
- type of identityLink, cannot be null (@see IdentityLinkType
).public void addGroupIdentityLink(String groupId, String identityLinkType)
DelegateTask
addGroupIdentityLink
in interface DelegateTask
groupId
- id of the group to involve, cannot be null.identityLinkType
- type of identity, cannot be null (@see IdentityLinkType
).public Set<IdentityLink> getCandidates()
DelegateTask
getCandidates
in interface DelegateTask
IdentityLink
s of type IdentityLinkType.CANDIDATE
.public void deleteCandidateGroup(String groupId)
DelegateTask
#deleteGroupIdentityLink(String, String, String)
; with type IdentityLinkType.CANDIDATE
deleteCandidateGroup
in interface DelegateTask
groupId
- id of the group to use as candidate, cannot be null.public void deleteCandidateUser(String userId)
DelegateTask
DelegateTask.deleteUserIdentityLink(String, String)
; with type IdentityLinkType.CANDIDATE
deleteCandidateUser
in interface DelegateTask
userId
- id of the user to use as candidate, cannot be null.public void deleteGroupIdentityLink(String groupId, String identityLinkType)
DelegateTask
deleteGroupIdentityLink
in interface DelegateTask
groupId
- id of the group to involve, cannot be null.identityLinkType
- type of identity, cannot be null (@see IdentityLinkType
).public void deleteUserIdentityLink(String userId, String identityLinkType)
DelegateTask
deleteUserIdentityLink
in interface DelegateTask
userId
- id of the user involve, cannot be null.identityLinkType
- type of identityLink, cannot be null (@see IdentityLinkType
).public List<IdentityLinkEntity> getIdentityLinks()
getIdentityLinks
in interface TaskEntity
public void setExecutionVariables(Map<String,Object> parameters)
setExecutionVariables
in interface TaskEntity
public void setName(String taskName)
Task
setName
in interface DelegateTask
setName
in interface Task
public void setDescription(String description)
Task
setDescription
in interface DelegateTask
setDescription
in interface Task
public void setAssignee(String assignee)
Task
userId
of the person to which this task is delegated.setAssignee
in interface DelegateTask
setAssignee
in interface Task
public void setOwner(String owner)
Task
userId
of the person that is responsible for this task.setOwner
in interface DelegateTask
setOwner
in interface Task
public void setDueDate(Date dueDate)
Task
setDueDate
in interface DelegateTask
setDueDate
in interface Task
public void setPriority(int priority)
Task
setPriority
in interface DelegateTask
setPriority
in interface Task
public void setCategory(String category)
Task
setCategory
in interface DelegateTask
setCategory
in interface Task
public void setParentTaskId(String parentTaskId)
Task
setParentTaskId
in interface Task
public String getFormKey()
TaskInfo
getFormKey
in interface DelegateTask
getFormKey
in interface TaskInfo
public void setFormKey(String formKey)
Task
setFormKey
in interface DelegateTask
setFormKey
in interface Task
protected boolean isActivityIdUsedForDetails()
VariableScopeImpl
isActivityIdUsedForDetails
in class VariableScopeImpl
protected VariableInstanceEntity getSpecificVariable(String variableName)
getSpecificVariable
in class VariableScopeImpl
protected List<VariableInstanceEntity> getSpecificVariables(Collection<String> variableNames)
getSpecificVariables
in class VariableScopeImpl
public int getRevision()
getRevision
in interface HasRevision
public void setRevision(int revision)
setRevision
in interface HasRevision
public String getName()
TaskInfo
getName
in interface DelegateTask
getName
in interface TaskInfo
public String getLocalizedName()
public void setLocalizedName(String localizedName)
Task
setLocalizedName
in interface Task
public String getDescription()
TaskInfo
getDescription
in interface DelegateTask
getDescription
in interface TaskInfo
public String getLocalizedDescription()
public void setLocalizedDescription(String localizedDescription)
Task
setLocalizedDescription
in interface Task
public Date getDueDate()
TaskInfo
getDueDate
in interface DelegateTask
getDueDate
in interface TaskInfo
public int getPriority()
TaskInfo
getPriority
in interface DelegateTask
getPriority
in interface TaskInfo
public Date getCreateTime()
TaskInfo
getCreateTime
in interface DelegateTask
getCreateTime
in interface TaskInfo
public void setCreateTime(Date createTime)
setCreateTime
in interface TaskEntity
public String getExecutionId()
TaskInfo
getExecutionId
in interface DelegateTask
getExecutionId
in interface TaskInfo
public String getProcessInstanceId()
TaskInfo
getProcessInstanceId
in interface DelegateTask
getProcessInstanceId
in interface TaskInfo
public String getProcessDefinitionId()
TaskInfo
getProcessDefinitionId
in interface DelegateTask
getProcessDefinitionId
in interface TaskInfo
public void setProcessDefinitionId(String processDefinitionId)
setProcessDefinitionId
in interface TaskEntity
public String getAssignee()
TaskInfo
userId
of the person to which this task is delegated.getAssignee
in interface DelegateTask
getAssignee
in interface TaskInfo
public String getOriginalAssignee()
public String getTaskDefinitionKey()
TaskInfo
getTaskDefinitionKey
in interface DelegateTask
getTaskDefinitionKey
in interface TaskInfo
public void setTaskDefinitionKey(String taskDefinitionKey)
setTaskDefinitionKey
in interface TaskEntity
public String getEventName()
DelegateTask
getEventName
in interface DelegateTask
public void setEventName(String eventName)
setEventName
in interface TaskEntity
public void setExecutionId(String executionId)
setExecutionId
in interface TaskEntity
public ExecutionEntity getProcessInstance()
getProcessInstance
in interface TaskEntity
public void setProcessInstance(ExecutionEntity processInstance)
public void setExecution(ExecutionEntity execution)
setExecution
in interface TaskEntity
public void setProcessInstanceId(String processInstanceId)
setProcessInstanceId
in interface TaskEntity
public String getOwner()
TaskInfo
userId
of the person that is responsible for this task.getOwner
in interface DelegateTask
getOwner
in interface TaskInfo
public DelegationState getDelegationState()
Task
DelegationState
for this task.getDelegationState
in interface DelegateTask
getDelegationState
in interface Task
public void setDelegationState(DelegationState delegationState)
Task
DelegationState
for this task.setDelegationState
in interface Task
public String getDelegationStateString()
public void setDelegationStateString(String delegationStateString)
public boolean isDeleted()
isDeleted
in interface TaskEntity
public void setDeleted(boolean isDeleted)
setDeleted
in interface TaskEntity
public String getParentTaskId()
TaskInfo
getParentTaskId
in interface TaskInfo
public Map<String,VariableInstanceEntity> getVariableInstances()
getVariableInstances
in interface TaskEntity
getVariableInstances
in class VariableScopeImpl
public int getSuspensionState()
getSuspensionState
in interface TaskEntity
public void setSuspensionState(int suspensionState)
setSuspensionState
in interface TaskEntity
public String getCategory()
TaskInfo
getCategory
in interface DelegateTask
getCategory
in interface TaskInfo
public boolean isSuspended()
Task
isSuspended
in interface DelegateTask
isSuspended
in interface Task
public Map<String,Object> getTaskLocalVariables()
TaskInfo
getTaskLocalVariables
in interface TaskInfo
public Map<String,Object> getProcessVariables()
TaskInfo
getProcessVariables
in interface TaskInfo
public String getTenantId()
TaskInfo
getTenantId
in interface DelegateTask
getTenantId
in interface TaskInfo
public void setTenantId(String tenantId)
Task
setTenantId
in interface Task
public List<VariableInstanceEntity> getQueryVariables()
public void setQueryVariables(List<VariableInstanceEntity> queryVariables)
Copyright © 2015 Alfresco. All rights reserved.