Class DefaultWorkObjectUpdater
- All Implemented Interfaces:
WorkObject
,WorkObjectUpdater
public class DefaultWorkObjectUpdater extends java.lang.Object implements WorkObjectUpdater, WorkObject
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Optional<java.lang.String>
assignedGroupId
protected java.util.Optional<java.lang.String>
assigneeId
protected org.flowable.common.engine.impl.interceptor.CommandExecutor
commandExecutor
protected java.util.Optional<java.util.Date>
dueTime
protected java.util.Optional<java.lang.String>
name
protected java.util.Optional<java.lang.String>
ownerId
protected java.util.Optional<java.lang.Integer>
priority
protected java.util.Optional<java.lang.String>
state
protected java.util.Optional<java.lang.String>
subState
protected WorkObject
workObject
-
Constructor Summary
Constructors Constructor Description DefaultWorkObjectUpdater(WorkObject workObject, org.flowable.common.engine.impl.interceptor.CommandExecutor commandExecutor)
-
Method Summary
Modifier and Type Method Description WorkObjectUpdater
assignedGroupId(java.lang.String assignedGroupId)
WorkObjectUpdater
assigneeId(java.lang.String assigneeId)
WorkObjectUpdater
dueTime(java.util.Date dueDate)
java.lang.String
getAssignedGroupId()
Returns the work object assigned group ID.java.util.Date
getAssignedGroupIdUpdateTime()
Returns the time the entity's assigned group ID was last updated.java.lang.String
getAssigneeId()
Returns the work object assignee's user ID.java.util.Date
getAssigneeIdUpdateTime()
Returns the time the entity's assignee ID was last updated.java.util.Set<java.lang.String>
getCandidateGroupIds()
Returns the work object candidate group IDs.java.util.Set<java.lang.String>
getCandidateUserIds()
Returns the work object candidate user IDs.java.util.Date
getCreationTime()
Returns the time the entity was created.java.lang.String
getDefinitionId()
Returns the definition ID of this work object.java.util.Date
getDueTime()
Returns the work object due time.java.lang.String
getExternalId()
Returns the external ID of this work object.java.lang.String
getGlobalId()
Returns the global ID of this work object.java.lang.String
getId()
Returns the ID of this work object.java.lang.String
getInitialAssignedGroupId()
Returns the initial assigned group ID.java.lang.String
getInitialAssigneeId()
Returns the initial assignee's user ID.java.util.List<LegacyVariable>
getLegacyVariables()
java.lang.String
getModificationCreatorId()
Returns the ID of the user who created the work object.java.lang.String
getModificationUpdaterId()
Returns the ID of the user who last modified the work object.long
getModificationVersion()
Returns the work object modification version.java.lang.String
getName()
Returns the work object name.java.lang.String
getOwnerId()
Returns the work object owner's user ID.java.lang.String
getParentId()
Returns parent idjava.lang.String
getParentIdRef()
Returns parent id referencejava.lang.String
getParentType()
Returns parent typejava.util.List<java.lang.String>
getPath()
Returns the work object hierarchy path (i.e.java.lang.String
getPreviousAssignedGroupId()
Returns the previous assigned group ID.java.lang.String
getPreviousAssigneeId()
Returns the previous assignee's user ID.java.lang.Integer
getPriority()
Returns the work object priority.java.lang.String
getProviderId()
Returns the provider ID of this work object.java.util.Date
getResubmissionTime()
Returns the work object resubmission time.java.lang.String
getRootId()
Returns the ID of the root work object (may be work object ID of this work object).java.lang.String
getState()
Returns the work object state.java.util.Date
getStateUpdateTime()
Returns the time the work object state was last updated.java.lang.String
getSubState()
Returns the work object sub-state.java.util.Date
getSubStateUpdateTime()
Returns the time the work object sub state was last updated.java.lang.String
getTenantId()
Returns the tenant ID for this work object.java.lang.String
getType()
Returns the work object type.java.util.Date
getUpdateTime()
Returns the time the entity was last updated.java.util.Map<java.lang.String,java.lang.Object>
getWorkObjectVariables()
Returns theWorkObject
variables if requested in theWorkObjectQuery
boolean
isHasLegacyVariables()
Flag to specify whether workObject contains legacy variablesWorkObjectUpdater
name(java.lang.String name)
WorkObjectUpdater
ownerId(java.lang.String ownerId)
WorkObjectUpdater
priority(java.lang.Integer priority)
void
setAssignedGroupId(java.lang.String assignedGroupId)
void
setAssigneeId(java.lang.String assigneeId)
void
setCandidateGroupIds(java.util.Set<java.lang.String> candidateGroups)
void
setCandidateUserIds(java.util.Set<java.lang.String> candidateUsers)
void
setDueTime(java.util.Date dueDate)
void
setName(java.lang.String name)
void
setOwnerId(java.lang.String ownerId)
void
setPriority(java.lang.Integer priority)
WorkObjectUpdater
state(java.lang.String state)
WorkObjectUpdater
subState(java.lang.String subState)
WorkObject
update()
-
Field Details
-
workObject
-
name
protected java.util.Optional<java.lang.String> name -
state
protected java.util.Optional<java.lang.String> state -
subState
protected java.util.Optional<java.lang.String> subState -
ownerId
protected java.util.Optional<java.lang.String> ownerId -
assigneeId
protected java.util.Optional<java.lang.String> assigneeId -
assignedGroupId
protected java.util.Optional<java.lang.String> assignedGroupId -
priority
protected java.util.Optional<java.lang.Integer> priority -
dueTime
protected java.util.Optional<java.util.Date> dueTime -
commandExecutor
protected final org.flowable.common.engine.impl.interceptor.CommandExecutor commandExecutor
-
-
Constructor Details
-
DefaultWorkObjectUpdater
public DefaultWorkObjectUpdater(WorkObject workObject, org.flowable.common.engine.impl.interceptor.CommandExecutor commandExecutor)
-
-
Method Details
-
update
- Specified by:
update
in interfaceWorkObjectUpdater
-
name
- Specified by:
name
in interfaceWorkObjectUpdater
-
state
- Specified by:
state
in interfaceWorkObjectUpdater
-
subState
- Specified by:
subState
in interfaceWorkObjectUpdater
-
ownerId
- Specified by:
ownerId
in interfaceWorkObjectUpdater
-
assigneeId
- Specified by:
assigneeId
in interfaceWorkObjectUpdater
-
assignedGroupId
- Specified by:
assignedGroupId
in interfaceWorkObjectUpdater
-
priority
- Specified by:
priority
in interfaceWorkObjectUpdater
-
dueTime
- Specified by:
dueTime
in interfaceWorkObjectUpdater
-
getType
public java.lang.String getType()Description copied from interface:WorkObject
Returns the work object type.- Specified by:
getType
in interfaceWorkObject
- Returns:
- the work object type
-
getId
public java.lang.String getId()Description copied from interface:WorkObject
Returns the ID of this work object.The ID is used to uniquely identify this particular work object instance.
- Specified by:
getId
in interfaceWorkObject
- Returns:
- the work object ID
-
getProviderId
public java.lang.String getProviderId()Description copied from interface:WorkObject
Returns the provider ID of this work object.The ID is used to identify the provider responsible for managing the work object.
- Specified by:
getProviderId
in interfaceWorkObject
- Returns:
- the work object provider ID
-
getExternalId
public java.lang.String getExternalId()Description copied from interface:WorkObject
Returns the external ID of this work object.The external ID is used by the provider for managing the work object.
- Specified by:
getExternalId
in interfaceWorkObject
- Returns:
- the work object external ID
-
getDefinitionId
public java.lang.String getDefinitionId()Description copied from interface:WorkObject
Returns the definition ID of this work object.The definition ID references a definition that provides template information for the work object.
- Specified by:
getDefinitionId
in interfaceWorkObject
- Returns:
- the definition ID
-
getGlobalId
public java.lang.String getGlobalId()Description copied from interface:WorkObject
Returns the global ID of this work object.The global ID is used to identify this entity represented by this work object. Work objects in different tenants or even in different systems that represent the same entity will have the same global ID. Management of global IDs will vary depending on the application and the work object type.
- Specified by:
getGlobalId
in interfaceWorkObject
- Returns:
- the global ID
-
getTenantId
public java.lang.String getTenantId()Description copied from interface:WorkObject
Returns the tenant ID for this work object.A single edoras one system can support multiple tenants, where each tenant is an isolated environment. Each tenant has a tenant ID, and a work object belongs to a specific tenant.
- Specified by:
getTenantId
in interfaceWorkObject
- Returns:
- the tenant ID
-
getName
public java.lang.String getName()Description copied from interface:WorkObject
Returns the work object name.- Specified by:
getName
in interfaceWorkObject
- Returns:
- the work object name
-
setName
public void setName(java.lang.String name)- Specified by:
setName
in interfaceWorkObject
-
getState
public java.lang.String getState()Description copied from interface:WorkObject
Returns the work object state.- Specified by:
getState
in interfaceWorkObject
- Returns:
- the work object state
-
getSubState
public java.lang.String getSubState()Description copied from interface:WorkObject
Returns the work object sub-state.- Specified by:
getSubState
in interfaceWorkObject
- Returns:
- the work object sub-state {}
-
getOwnerId
public java.lang.String getOwnerId()Description copied from interface:WorkObject
Returns the work object owner's user ID.- Specified by:
getOwnerId
in interfaceWorkObject
- Returns:
- the work object owner's user ID
-
setOwnerId
public void setOwnerId(java.lang.String ownerId)- Specified by:
setOwnerId
in interfaceWorkObject
-
getAssigneeId
public java.lang.String getAssigneeId()Description copied from interface:WorkObject
Returns the work object assignee's user ID.- Specified by:
getAssigneeId
in interfaceWorkObject
- Returns:
- the work object assignee's user ID
-
setAssigneeId
public void setAssigneeId(java.lang.String assigneeId)- Specified by:
setAssigneeId
in interfaceWorkObject
-
getAssignedGroupId
public java.lang.String getAssignedGroupId()Description copied from interface:WorkObject
Returns the work object assigned group ID.- Specified by:
getAssignedGroupId
in interfaceWorkObject
- Returns:
- the work object assigned group ID
-
setAssignedGroupId
public void setAssignedGroupId(java.lang.String assignedGroupId)- Specified by:
setAssignedGroupId
in interfaceWorkObject
-
getCandidateUserIds
public java.util.Set<java.lang.String> getCandidateUserIds()Description copied from interface:WorkObject
Returns the work object candidate user IDs.- Specified by:
getCandidateUserIds
in interfaceWorkObject
- Returns:
- the work object candidate user IDs
-
setCandidateUserIds
public void setCandidateUserIds(java.util.Set<java.lang.String> candidateUsers)- Specified by:
setCandidateUserIds
in interfaceWorkObject
-
getCandidateGroupIds
public java.util.Set<java.lang.String> getCandidateGroupIds()Description copied from interface:WorkObject
Returns the work object candidate group IDs.- Specified by:
getCandidateGroupIds
in interfaceWorkObject
- Returns:
- the work object candidate group IDs
-
setCandidateGroupIds
public void setCandidateGroupIds(java.util.Set<java.lang.String> candidateGroups)- Specified by:
setCandidateGroupIds
in interfaceWorkObject
-
getPriority
public java.lang.Integer getPriority()Description copied from interface:WorkObject
Returns the work object priority.- Specified by:
getPriority
in interfaceWorkObject
- Returns:
- the work object priority
-
setPriority
public void setPriority(java.lang.Integer priority)- Specified by:
setPriority
in interfaceWorkObject
-
getResubmissionTime
public java.util.Date getResubmissionTime()Description copied from interface:WorkObject
Returns the work object resubmission time.- Specified by:
getResubmissionTime
in interfaceWorkObject
- Returns:
- the work object resubmission time
-
getDueTime
public java.util.Date getDueTime()Description copied from interface:WorkObject
Returns the work object due time.- Specified by:
getDueTime
in interfaceWorkObject
- Returns:
- the work object due time
-
setDueTime
public void setDueTime(java.util.Date dueDate)- Specified by:
setDueTime
in interfaceWorkObject
-
getModificationCreatorId
public java.lang.String getModificationCreatorId()Description copied from interface:WorkObject
Returns the ID of the user who created the work object.- Specified by:
getModificationCreatorId
in interfaceWorkObject
- Returns:
- the ID of the user who created the work object
-
getCreationTime
public java.util.Date getCreationTime()Description copied from interface:WorkObject
Returns the time the entity was created.- Specified by:
getCreationTime
in interfaceWorkObject
- Returns:
- the time the entity was created
-
getPath
public java.util.List<java.lang.String> getPath()Description copied from interface:WorkObject
Returns the work object hierarchy path (i.e. the sequence of parent IDs to the root work object).The entries in the path are ordered from the highest level (root) to the lowest level (current work object).
- Specified by:
getPath
in interfaceWorkObject
- Returns:
- the work object hierarchy path
-
getRootId
public java.lang.String getRootId()Description copied from interface:WorkObject
Returns the ID of the root work object (may be work object ID of this work object).- Specified by:
getRootId
in interfaceWorkObject
- Returns:
- the ID of the root work object (may be work object ID of this work object)
-
getStateUpdateTime
public java.util.Date getStateUpdateTime()Description copied from interface:WorkObject
Returns the time the work object state was last updated.- Specified by:
getStateUpdateTime
in interfaceWorkObject
- Returns:
- the time the work object state was last updated
-
getSubStateUpdateTime
public java.util.Date getSubStateUpdateTime()Description copied from interface:WorkObject
Returns the time the work object sub state was last updated.- Specified by:
getSubStateUpdateTime
in interfaceWorkObject
- Returns:
- the time the work object sub state was last updated
-
getInitialAssigneeId
public java.lang.String getInitialAssigneeId()Description copied from interface:WorkObject
Returns the initial assignee's user ID.- Specified by:
getInitialAssigneeId
in interfaceWorkObject
- Returns:
- the initial assignee's user ID
-
getPreviousAssigneeId
public java.lang.String getPreviousAssigneeId()Description copied from interface:WorkObject
Returns the previous assignee's user ID.- Specified by:
getPreviousAssigneeId
in interfaceWorkObject
- Returns:
- the previous assignee's user ID
-
getAssigneeIdUpdateTime
public java.util.Date getAssigneeIdUpdateTime()Description copied from interface:WorkObject
Returns the time the entity's assignee ID was last updated.- Specified by:
getAssigneeIdUpdateTime
in interfaceWorkObject
- Returns:
- the time the entity's assignee ID was last updated
-
getInitialAssignedGroupId
public java.lang.String getInitialAssignedGroupId()Description copied from interface:WorkObject
Returns the initial assigned group ID.- Specified by:
getInitialAssignedGroupId
in interfaceWorkObject
- Returns:
- the initial assigned group ID
-
getPreviousAssignedGroupId
public java.lang.String getPreviousAssignedGroupId()Description copied from interface:WorkObject
Returns the previous assigned group ID.- Specified by:
getPreviousAssignedGroupId
in interfaceWorkObject
- Returns:
- the previous assigned group ID
-
getAssignedGroupIdUpdateTime
public java.util.Date getAssignedGroupIdUpdateTime()Description copied from interface:WorkObject
Returns the time the entity's assigned group ID was last updated.- Specified by:
getAssignedGroupIdUpdateTime
in interfaceWorkObject
- Returns:
- the time the entity's assigned group ID was last updated
-
getModificationVersion
public long getModificationVersion()Description copied from interface:WorkObject
Returns the work object modification version.The modification version is changed each time the work object is modified.
- Specified by:
getModificationVersion
in interfaceWorkObject
- Returns:
- the work object modification version
-
getModificationUpdaterId
public java.lang.String getModificationUpdaterId()Description copied from interface:WorkObject
Returns the ID of the user who last modified the work object.- Specified by:
getModificationUpdaterId
in interfaceWorkObject
- Returns:
- the ID of the user who last modified the work object
-
getUpdateTime
public java.util.Date getUpdateTime()Description copied from interface:WorkObject
Returns the time the entity was last updated.- Specified by:
getUpdateTime
in interfaceWorkObject
- Returns:
- the time the entity was last updated
-
getParentIdRef
public java.lang.String getParentIdRef()Description copied from interface:WorkObject
Returns parent id reference- Specified by:
getParentIdRef
in interfaceWorkObject
- Returns:
- parent id reference
-
getParentId
public java.lang.String getParentId()Description copied from interface:WorkObject
Returns parent id- Specified by:
getParentId
in interfaceWorkObject
- Returns:
- parent id
-
getParentType
public java.lang.String getParentType()Description copied from interface:WorkObject
Returns parent type- Specified by:
getParentType
in interfaceWorkObject
- Returns:
- parent type
-
getLegacyVariables
- Specified by:
getLegacyVariables
in interfaceWorkObject
- Returns:
- variables associated with the work object
-
isHasLegacyVariables
public boolean isHasLegacyVariables()Description copied from interface:WorkObject
Flag to specify whether workObject contains legacy variables- Specified by:
isHasLegacyVariables
in interfaceWorkObject
- Returns:
- true if there are legacy variables in the work object, false otherwise
-
getWorkObjectVariables
public java.util.Map<java.lang.String,java.lang.Object> getWorkObjectVariables()Description copied from interface:WorkObject
Returns theWorkObject
variables if requested in theWorkObjectQuery
- Specified by:
getWorkObjectVariables
in interfaceWorkObject
-