Class AbstractCaseInstanceIdentityLinkCmd
java.lang.Object
org.flowable.cmmn.engine.impl.cmd.AbstractCaseInstanceIdentityLinkCmd
- Direct Known Subclasses:
RemoveCaseInstanceAssigneeCmd
,RemoveCaseInstanceOwnerCmd
,SetCaseInstanceAssigneeCmd
,SetCaseInstanceOwnerCmd
An abstract command supporting functionality around identity link management for case instances.
- Author:
- Micha Kiener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
createIdentityLinkType
(CommandContext commandContext, String caseInstanceId, String userId, String groupId, String identityType) Creates a new identity link entry for the given case instance, which can either be a user or group based one, but not both the same time.protected CaseInstanceEntity
getCaseInstanceEntity
(CommandContext commandContext, String caseInstanceId) Returns the case instance entity for the given id, if it exists, otherwise an exception will be thrown.protected void
removeIdentityLinkType
(CommandContext commandContext, String caseInstanceId, String identityType) This will remove ALL identity links with the given type, no mather whether they are user or group based.
-
Constructor Details
-
AbstractCaseInstanceIdentityLinkCmd
public AbstractCaseInstanceIdentityLinkCmd()
-
-
Method Details
-
getCaseInstanceEntity
protected CaseInstanceEntity getCaseInstanceEntity(CommandContext commandContext, String caseInstanceId) Returns the case instance entity for the given id, if it exists, otherwise an exception will be thrown.- Parameters:
commandContext
- the command context within which the case instance is loadedcaseInstanceId
- the id of the case instance to be loaded- Returns:
- the case instance entity, if found, never null
- Throws:
FlowableIllegalArgumentException
- if the provided case instance id is not valid (could not be found)
-
removeIdentityLinkType
protected void removeIdentityLinkType(CommandContext commandContext, String caseInstanceId, String identityType) This will remove ALL identity links with the given type, no mather whether they are user or group based.- Parameters:
commandContext
- the command context within which to remove the identity linkscaseInstanceId
- the id of the case instance to remove the identity links foridentityType
- the identity link type (e.g. assignee or owner, etc) to be removed
-
createIdentityLinkType
protected void createIdentityLinkType(CommandContext commandContext, String caseInstanceId, String userId, String groupId, String identityType) Creates a new identity link entry for the given case instance, which can either be a user or group based one, but not both the same time. If both the user and group ids are null, no new identity link is created.- Parameters:
commandContext
- the command context within which to perform the identity link creationcaseInstanceId
- the id of the case instance to create an identity link foruserId
- the user id if this is a user based identity link, otherwise nullgroupId
- the group id if this is a group based identity link, otherwise nullidentityType
- the type of identity link (e.g. owner or assignee, etc)
-