Class ConversationEntityImpl
- java.lang.Object
-
- org.flowable.common.engine.impl.persistence.entity.AbstractEntity
-
- com.flowable.engage.engine.impl.persistence.entity.AbstractEngageEngineEntity
-
- com.flowable.engage.engine.impl.persistence.entity.ConversationEntityImpl
-
- All Implemented Interfaces:
Permissions,Taggable,Conversation,ConversationEntity,HasRevision,Entity
public class ConversationEntityImpl extends AbstractEngageEngineEntity implements ConversationEntity
- Author:
- Filip Hrisafov
-
-
Field Summary
-
Fields inherited from class org.flowable.common.engine.impl.persistence.entity.AbstractEntity
id, isDeleted, isInserted, isUpdated, originalPersistentState, revision
-
-
Constructor Summary
Constructors Constructor Description ConversationEntityImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAssignedGroupId()Returns the id of the assigned group of this object.StringgetAssigneeId()Returns the id of the assignee of this conversation.StringgetAvatarId()Returns the optional avatar info, if this conversation has an avatar attached.Set<String>getCandidateGroupIds()Returns a set view of the optional list of candidate group ids of this conversation.Set<String>getCandidateUserIds()Returns a set view of the optional list of candidate user ids of this conversation.StringgetConversationDefinitionId()The definition id of the conversation definition typeMap<String,Object>getConversationVariables()Returns the conversation variables when used within a conversation query with the include variables method invoked.DategetCreationTime()Returns the creation timestamp of this conversation.StringgetCreatorId()Returns the id of the user creating this conversation.StringgetDescription()Returns the optional description for this conversation, containing the means of its discussed topics, any global notes or whatever is necessary as a global overview of the conversation.StringgetExternalId()If the conversation was created from an external system, this optional external id might be used to map to that external conversation id, if necessary.StringgetFallbackName()The fallback that needs to be used in caseConversation.getName()is not set.List<IdentityLinkEntity>getIdentityLinks()Returns the identity links.StringgetJoiningType()Returns the joining type of this conversation which defines on how new participants might join the running conversation.DategetLastMessageTime()The time when the last message of the conversation has ben sent.Map<String,Object>getMetaData()A conversation can have additional meta information, most likely describing the conversation behavior in more detail.StringgetName()Returns the optional name of this conversation, most likely representing the main topic of the conversation.StringgetOwnerId()Returns the id of the owner of this conversation, most likely representing the user actually creating it or being created as part of an operation that user executed.StringgetParentId()Returns the optional parent id of this conversation, if any, which represents another work item, the parent for this conversation (might be another conversation object or any other work item this conversation is attached to).StringgetPermissionType()Returns the permission type for this conversation which is used to drive the permissions for messages and events sent to this conversation.ObjectgetPersistentState()IntegergetPriority()Returns the optional priority of this conversation which can be used for sorting or other means.List<IdentityLinkEntity>getQueryIdentityLinks()Getter used by MyBatis when querying conversation with identity links.List<VariableInstanceEntity>getQueryVariables()Getter used by MyBatis when querying conversation with variables.StringgetReferenceDefinitionId()The definition id of the scoped entity (for example Task Definition id, Case Definition Id, etc)StringgetReferenceId()An id of the scoped linked entity (for example Task, Case, etc)StringgetReferenceType()The type of the scoped linked entityDategetResubmissionTime()Returns the optional resubmission time for this conversation.StringgetState()Returns the state of this conversation.StringgetSubType()Returns the sub type of this conversation.List<String>getTags()Returns the optional list of tags for this object.StringgetTenantId()Returns the id of the tenant this conversation belongs to.StringgetType()Returns the type of this conversation.StringgetUpdaterId()Returns the id of the user updating this conversation.DategetUpdateTime()Returns the timestamp of the last update of this conversation, which is the case if anything has changed in the conversation itself or if there was a message posted to this conversation.StringgetUserAccountId()The id of the user account that is linked with this conversation.Collection<String>getUserAccountIds()The ids of the user accounts that are linked with this conversation.booleanisIdentityLinksInitialized()BooleanisPinned()Returns true, if this conversation is pinned by the current user.BooleanisStarred()Returns true, if this conversation is starred by the current user.booleanisVariablesInitialized()voidsetAvatarId(String avatarId)voidsetConversationDefinitionId(String conversationDefinitionId)voidsetCreationTime(Date creationTime)voidsetCreatorId(String creatorId)voidsetDescription(String description)voidsetExternalId(String externalId)voidsetFallbackName(String fallbackName)voidsetIdentityLinks(List<IdentityLinkEntity> identityLinks)voidsetJoiningType(String joiningType)voidsetLastMessageTime(Date lastMessageTime)voidsetMetaData(Map<String,Object> metaData)voidsetName(String name)voidsetParentId(String parentId)voidsetPermissionType(String permissionType)voidsetPriority(Integer priority)voidsetQueryIdentityLinks(List<IdentityLinkEntity> identityLinks)Setter used by MyBatis when querying conversation with identity links.voidsetQueryVariables(List<VariableInstanceEntity> queryVariables)Setter used by MyBatis when querying conversation with variables.voidsetReferenceDefinitionId(String referenceDefinitionId)voidsetReferenceId(String referenceId)voidsetReferenceType(String referenceType)voidsetResubmissionTime(Date resubmissionTime)voidsetState(String state)voidsetSubType(String subType)voidsetTags(List<String> tags)voidsetTenantId(String tenantId)voidsetType(String type)voidsetUpdaterId(String updaterId)voidsetUpdateTime(Date updateTime)voidsetUserAccountIds(Collection<String> userAccountIds)-
Methods inherited from class com.flowable.engage.engine.impl.persistence.entity.AbstractEngageEngineEntity
getIdPrefix
-
Methods inherited from class org.flowable.common.engine.impl.persistence.entity.AbstractEntity
getId, getOriginalPersistentState, getRevision, getRevisionNext, isDeleted, isInserted, isUpdated, setDeleted, setId, setInserted, setOriginalPersistentState, setRevision, setUpdated
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.flowable.engage.conversation.api.Conversation
getId
-
Methods inherited from interface org.flowable.common.engine.impl.persistence.entity.Entity
getId, getIdPrefix, getOriginalPersistentState, isDeleted, isInserted, isUpdated, setDeleted, setId, setInserted, setOriginalPersistentState, setUpdated
-
Methods inherited from interface org.flowable.common.engine.impl.db.HasRevision
getRevision, getRevisionNext, setRevision
-
-
-
-
Field Detail
-
externalId
protected String externalId
-
tenantId
protected String tenantId
-
parentId
protected String parentId
-
referenceId
protected String referenceId
-
referenceType
protected String referenceType
-
referenceDefinitionId
protected String referenceDefinitionId
-
conversationDefinitionId
protected String conversationDefinitionId
-
state
protected String state
-
type
protected String type
-
subType
protected String subType
-
permissionType
protected String permissionType
-
joiningType
protected String joiningType
-
priority
protected Integer priority
-
name
protected String name
-
fallbackName
protected String fallbackName
-
description
protected String description
-
avatarId
protected String avatarId
-
creationTime
protected Date creationTime
-
creatorId
protected String creatorId
-
updateTime
protected Date updateTime
-
updaterId
protected String updaterId
-
resubmissionTime
protected Date resubmissionTime
-
lastMessageTime
protected Date lastMessageTime
-
userAccountIds
protected Collection<String> userAccountIds
-
identityLinksInitialized
protected boolean identityLinksInitialized
-
identityLinks
protected List<IdentityLinkEntity> identityLinks
The identity links for the conversation. Make sure that it is not set otherwise MyBatis won't invoke the setter.
-
variablesInitialized
protected boolean variablesInitialized
-
queryVariables
protected List<VariableInstanceEntity> queryVariables
-
-
Method Detail
-
getExternalId
public String getExternalId()
Description copied from interface:ConversationIf the conversation was created from an external system, this optional external id might be used to map to that external conversation id, if necessary.- Specified by:
getExternalIdin interfaceConversation- Returns:
- the optional external id of this conversation
-
setExternalId
public void setExternalId(String externalId)
- Specified by:
setExternalIdin interfaceConversationEntity
-
getTenantId
public String getTenantId()
Description copied from interface:ConversationReturns the id of the tenant this conversation belongs to.- Specified by:
getTenantIdin interfaceConversation- Returns:
- the tenant id
-
setTenantId
public void setTenantId(String tenantId)
- Specified by:
setTenantIdin interfaceConversationEntity
-
getParentId
public String getParentId()
Description copied from interface:ConversationReturns the optional parent id of this conversation, if any, which represents another work item, the parent for this conversation (might be another conversation object or any other work item this conversation is attached to).- Specified by:
getParentIdin interfaceConversation- Returns:
- the optional parent work item id
-
setParentId
public void setParentId(String parentId)
- Specified by:
setParentIdin interfaceConversationEntity
-
getReferenceId
public String getReferenceId()
Description copied from interface:ConversationAn id of the scoped linked entity (for example Task, Case, etc)- Specified by:
getReferenceIdin interfaceConversation- Returns:
- the id of the scoped entity
-
setReferenceId
public void setReferenceId(String referenceId)
- Specified by:
setReferenceIdin interfaceConversationEntity
-
getReferenceType
public String getReferenceType()
Description copied from interface:ConversationThe type of the scoped linked entity- Specified by:
getReferenceTypein interfaceConversation- Returns:
- the type of the scoped linked entity
-
setReferenceType
public void setReferenceType(String referenceType)
- Specified by:
setReferenceTypein interfaceConversationEntity
-
getReferenceDefinitionId
public String getReferenceDefinitionId()
Description copied from interface:ConversationThe definition id of the scoped entity (for example Task Definition id, Case Definition Id, etc)- Specified by:
getReferenceDefinitionIdin interfaceConversation- Returns:
- the definition id of the scoped entity
-
setReferenceDefinitionId
public void setReferenceDefinitionId(String referenceDefinitionId)
- Specified by:
setReferenceDefinitionIdin interfaceConversationEntity
-
getConversationDefinitionId
public String getConversationDefinitionId()
Description copied from interface:ConversationThe definition id of the conversation definition type- Specified by:
getConversationDefinitionIdin interfaceConversation- Returns:
- the definition id of the conversation definition
-
setConversationDefinitionId
public void setConversationDefinitionId(String conversationDefinitionId)
- Specified by:
setConversationDefinitionIdin interfaceConversationEntity
-
getState
public String getState()
Description copied from interface:ConversationReturns the state of this conversation.- Specified by:
getStatein interfaceConversation- Returns:
- the state of this conversation
-
setState
public void setState(String state)
- Specified by:
setStatein interfaceConversationEntity
-
getType
public String getType()
Description copied from interface:ConversationReturns the type of this conversation. SeeConversationTypes.- Specified by:
getTypein interfaceConversation- Returns:
- the type of this conversation
-
setType
public void setType(String type)
- Specified by:
setTypein interfaceConversationEntity
-
getSubType
public String getSubType()
Description copied from interface:ConversationReturns the sub type of this conversation. The sub type might be used for filtering or even driving some of the behavior of the conversation, its participants and messages.- Specified by:
getSubTypein interfaceConversation- Returns:
- the sub type of this conversation
-
setSubType
public void setSubType(String subType)
- Specified by:
setSubTypein interfaceConversationEntity
-
getPermissionType
public String getPermissionType()
Description copied from interface:ConversationReturns the permission type for this conversation which is used to drive the permissions for messages and events sent to this conversation.- Specified by:
getPermissionTypein interfaceConversation- Returns:
- the permission type for this conversation
-
setPermissionType
public void setPermissionType(String permissionType)
- Specified by:
setPermissionTypein interfaceConversationEntity
-
getJoiningType
public String getJoiningType()
Description copied from interface:ConversationReturns the joining type of this conversation which defines on how new participants might join the running conversation.- Specified by:
getJoiningTypein interfaceConversation- Returns:
- the joining type of this conversation
-
setJoiningType
public void setJoiningType(String joiningType)
- Specified by:
setJoiningTypein interfaceConversationEntity
-
getPriority
public Integer getPriority()
Description copied from interface:ConversationReturns the optional priority of this conversation which can be used for sorting or other means.- Specified by:
getPriorityin interfaceConversation- Returns:
- the priority of this conversation
-
setPriority
public void setPriority(Integer priority)
- Specified by:
setPriorityin interfaceConversationEntity
-
isPinned
public Boolean isPinned()
Description copied from interface:ConversationReturns true, if this conversation is pinned by the current user. If there is no current user id available or the list of pinned user ids is not available, this method might returnnull.- Specified by:
isPinnedin interfaceConversation- Returns:
trueif this conversation is pinned by the current user,falseif it is not pinned by the current user,nullif pinning for the current user cannot be determined
-
isStarred
public Boolean isStarred()
Description copied from interface:ConversationReturns true, if this conversation is starred by the current user. If there is no current user id available or the list of starred user ids is not available, this method might returnnull.- Specified by:
isStarredin interfaceConversation- Returns:
trueif this conversation is starred by the current user,falseif it is not starred by the current user,nullif starring for the current user cannot be determined
-
getName
public String getName()
Description copied from interface:ConversationReturns the optional name of this conversation, most likely representing the main topic of the conversation.- Specified by:
getNamein interfaceConversation- Returns:
- the name of this conversation, might be
null
-
setName
public void setName(String name)
- Specified by:
setNamein interfaceConversationEntity
-
getFallbackName
public String getFallbackName()
Description copied from interface:ConversationThe fallback that needs to be used in caseConversation.getName()is not set.- Specified by:
getFallbackNamein interfaceConversation- Returns:
- the fallback name that needs to be used
-
setFallbackName
public void setFallbackName(String fallbackName)
- Specified by:
setFallbackNamein interfaceConversationEntity
-
getDescription
public String getDescription()
Description copied from interface:ConversationReturns the optional description for this conversation, containing the means of its discussed topics, any global notes or whatever is necessary as a global overview of the conversation.- Specified by:
getDescriptionin interfaceConversation- Returns:
- the optional description for this conversation
-
setDescription
public void setDescription(String description)
- Specified by:
setDescriptionin interfaceConversationEntity
-
getAvatarId
public String getAvatarId()
Description copied from interface:ConversationReturns the optional avatar info, if this conversation has an avatar attached.- Specified by:
getAvatarIdin interfaceConversation- Returns:
- the optional avatar info
-
setAvatarId
public void setAvatarId(String avatarId)
- Specified by:
setAvatarIdin interfaceConversationEntity
-
getCreationTime
public Date getCreationTime()
Description copied from interface:ConversationReturns the creation timestamp of this conversation.- Specified by:
getCreationTimein interfaceConversation- Returns:
- the creation timestamp
-
setCreationTime
public void setCreationTime(Date creationTime)
- Specified by:
setCreationTimein interfaceConversationEntity
-
getCreatorId
public String getCreatorId()
Description copied from interface:ConversationReturns the id of the user creating this conversation.- Specified by:
getCreatorIdin interfaceConversation- Returns:
- the id of the creation user
-
setCreatorId
public void setCreatorId(String creatorId)
- Specified by:
setCreatorIdin interfaceConversationEntity
-
getUpdateTime
public Date getUpdateTime()
Description copied from interface:ConversationReturns the timestamp of the last update of this conversation, which is the case if anything has changed in the conversation itself or if there was a message posted to this conversation.- Specified by:
getUpdateTimein interfaceConversation- Returns:
- the timestamp of the last update / modification conversation or one of its messages
-
setUpdateTime
public void setUpdateTime(Date updateTime)
- Specified by:
setUpdateTimein interfaceConversationEntity
-
getUpdaterId
public String getUpdaterId()
Description copied from interface:ConversationReturns the id of the user updating this conversation.- Specified by:
getUpdaterIdin interfaceConversation- Returns:
- the id of the updater user
-
setUpdaterId
public void setUpdaterId(String updaterId)
- Specified by:
setUpdaterIdin interfaceConversationEntity
-
getResubmissionTime
public Date getResubmissionTime()
Description copied from interface:ConversationReturns the optional resubmission time for this conversation. Resubmit a conversation means to actually hide it until a given resubmission time where it will appear again as a regular conversation.- Specified by:
getResubmissionTimein interfaceConversation- Returns:
- the optional resubmission time of this conversation, might be null
-
setResubmissionTime
public void setResubmissionTime(Date resubmissionTime)
- Specified by:
setResubmissionTimein interfaceConversationEntity
-
getLastMessageTime
public Date getLastMessageTime()
Description copied from interface:ConversationThe time when the last message of the conversation has ben sent.- Specified by:
getLastMessageTimein interfaceConversation- Returns:
- the last message time of the conversation
-
setLastMessageTime
public void setLastMessageTime(Date lastMessageTime)
- Specified by:
setLastMessageTimein interfaceConversationEntity
-
getUserAccountId
public String getUserAccountId()
Description copied from interface:ConversationThe id of the user account that is linked with this conversation. This would usually mean that this conversation is an external conversation for the given user account. This method is here for backwards compatibility. If the conversation is linked with more than one user account it will throw an exception.- Specified by:
getUserAccountIdin interfaceConversation- Returns:
- the id of the user account that this conversation is linked to
-
getUserAccountIds
public Collection<String> getUserAccountIds()
Description copied from interface:ConversationThe ids of the user accounts that are linked with this conversation. This would usually mean that this conversation is an external conversation for the given user accounts.- Specified by:
getUserAccountIdsin interfaceConversation- Returns:
- the ids of the user accounts that this conversation is linked to
-
setUserAccountIds
public void setUserAccountIds(Collection<String> userAccountIds)
- Specified by:
setUserAccountIdsin interfaceConversationEntity
-
getMetaData
public Map<String,Object> getMetaData()
Description copied from interface:ConversationA conversation can have additional meta information, most likely describing the conversation behavior in more detail. The meta data is stored as a JSON string within a single variable.- Specified by:
getMetaDatain interfaceConversation- Returns:
- the optional map of meta information or
nullif this conversation does not have any meta data
-
setMetaData
public void setMetaData(Map<String,Object> metaData)
- Specified by:
setMetaDatain interfaceConversationEntity
-
getIdentityLinks
public List<IdentityLinkEntity> getIdentityLinks()
Description copied from interface:ConversationReturns the identity links.- Specified by:
getIdentityLinksin interfaceConversation- Specified by:
getIdentityLinksin interfaceConversationEntity
-
setIdentityLinks
public void setIdentityLinks(List<IdentityLinkEntity> identityLinks)
- Specified by:
setIdentityLinksin interfaceConversationEntity
-
getQueryIdentityLinks
public List<IdentityLinkEntity> getQueryIdentityLinks()
Getter used by MyBatis when querying conversation with identity links.
-
setQueryIdentityLinks
public void setQueryIdentityLinks(List<IdentityLinkEntity> identityLinks)
Setter used by MyBatis when querying conversation with identity links.
-
isIdentityLinksInitialized
public boolean isIdentityLinksInitialized()
- Specified by:
isIdentityLinksInitializedin interfaceConversationEntity
-
getOwnerId
public String getOwnerId()
Description copied from interface:ConversationReturns the id of the owner of this conversation, most likely representing the user actually creating it or being created as part of an operation that user executed. Most likely the owner of a conversation is also given the access right to add and remove participants (depending on the permission type of the conversation).- Specified by:
getOwnerIdin interfaceConversation- Specified by:
getOwnerIdin interfacePermissions- Returns:
- the id of the user being the owner of this conversation
-
getAssigneeId
public String getAssigneeId()
Description copied from interface:ConversationReturns the id of the assignee of this conversation. In most cases, the assignee is not explicitly used and hence optional, but for some specific permission type cases, the assignee of a conversation might be given certain permissions to handle particular aspects of a conversation.- Specified by:
getAssigneeIdin interfaceConversation- Specified by:
getAssigneeIdin interfacePermissions- Returns:
- the optional id of the user being the assignee of the conversation
-
getAssignedGroupId
public String getAssignedGroupId()
Description copied from interface:PermissionsReturns the id of the assigned group of this object. What the assigned group actually represents is up to the objects use cases and implementation.- Specified by:
getAssignedGroupIdin interfacePermissions- Returns:
- the id of the optional assigned group
-
getCandidateUserIds
public Set<String> getCandidateUserIds()
Description copied from interface:ConversationReturns a set view of the optional list of candidate user ids of this conversation. In most cases, this list actually represents the participants of a conversation and messages / events within that conversation are sent to.- Specified by:
getCandidateUserIdsin interfaceConversation- Specified by:
getCandidateUserIdsin interfacePermissions- Returns:
- the optional list of candidate user ids attached to this conversation
-
getCandidateGroupIds
public Set<String> getCandidateGroupIds()
Description copied from interface:ConversationReturns a set view of the optional list of candidate group ids of this conversation. Like with the list of candidate users, all users being at least a member of one of the candidate groups will also become participants of this conversation.- Specified by:
getCandidateGroupIdsin interfaceConversation- Specified by:
getCandidateGroupIdsin interfacePermissions- Returns:
- the optional list of candidate group ids attached to this conversation
-
isVariablesInitialized
public boolean isVariablesInitialized()
- Specified by:
isVariablesInitializedin interfaceConversationEntity
-
getConversationVariables
public Map<String,Object> getConversationVariables()
Description copied from interface:ConversationReturns the conversation variables when used within a conversation query with the include variables method invoked. Otherwise an empty map is returned.- Specified by:
getConversationVariablesin interfaceConversation- Returns:
- the variables linked to the conversation
-
getQueryVariables
public List<VariableInstanceEntity> getQueryVariables()
Getter used by MyBatis when querying conversation with variables.- Specified by:
getQueryVariablesin interfaceConversationEntity
-
setQueryVariables
public void setQueryVariables(List<VariableInstanceEntity> queryVariables)
Setter used by MyBatis when querying conversation with variables.- Specified by:
setQueryVariablesin interfaceConversationEntity
-
getTags
public List<String> getTags()
Description copied from interface:TaggableReturns the optional list of tags for this object. Tags might be used for different reasons, most likely for filtering and to have an impact on how the object might be rendered.
-
setTags
public void setTags(List<String> tags)
- Specified by:
setTagsin interfaceConversationEntity
-
getPersistentState
public Object getPersistentState()
- Specified by:
getPersistentStatein interfaceEntity
-
-