Class MessageEntityImpl

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.MessageEntityImpl
All Implemented Interfaces:
Taggable, MessageEntity, Message, org.flowable.common.engine.impl.db.HasRevision, org.flowable.common.engine.impl.persistence.entity.Entity
Direct Known Subclasses:
TemporaryMessageEntityImpl

public class MessageEntityImpl
extends AbstractEngageEngineEntity
implements MessageEntity
The default message implementation.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected java.lang.String actionInstanceId  
    protected Category category  
    protected java.lang.String conversationId  
    protected java.util.Date creationTime  
    protected java.lang.String creatorId  
    protected java.lang.String externalId  
    protected boolean hidden  
    protected boolean isPrivate  
    protected java.lang.String mainContent  
    protected java.lang.String mainContentType  
    protected java.lang.String mediaContentId  
    protected java.util.Collection<MessageAuditEntity> messageAudits
    The message audits for the message.
    protected boolean messageAuditsInitialized  
    protected java.lang.String recipientGroupId  
    protected java.lang.String recipientId  
    protected java.lang.String referenceId  
    protected java.lang.String referenceType  
    protected java.lang.String replyToMessageId  
    protected java.lang.String senderId  
    protected boolean sticky  
    protected java.lang.String subType  
    protected java.util.List<java.lang.String> tags  
    protected java.lang.String tenantId  
    protected java.lang.String type  
    protected java.lang.String updaterId  
    protected java.util.Date updateTime  

    Fields inherited from class org.flowable.common.engine.impl.persistence.entity.AbstractEntity

    id, isDeleted, isInserted, isUpdated, originalPersistentState, revision
  • Constructor Summary

    Constructors 
    Constructor Description
    MessageEntityImpl()  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getActionInstanceId()
    The optional id of an action instance if this message is linked with one.
    Category getCategory()
    Returns the category of this data object, which might be a Category.MESSAGE, Category.EVENT, Category.ACTION.
    java.lang.String getConversationId()
    Returns the conversation id for this data object.
    java.util.Date getCreationTime()
    Returns the creation timestamp of this data object.
    java.lang.String getCreatorId()
    Returns the id of the user creating this data object.
    java.lang.String getExternalId()
    If this data object was created from an external system, this optional external id might be used to map to that external data object id, if necessary.
    java.lang.String getMainContent()
    Returns the main content for this data object, most likely just a mapping into a specific parameter within the payload or a combination of several values within the payload.
    java.lang.String getMainContentType()
    Returns the media type of the main content (e.g.
    java.lang.String getMediaContentId()
    The optional id of a media content id if this message is linked with one.
    java.util.Collection<MessageAuditEntity> getMessageAudits()
    The collection of the audits of this message, in arbitrary order
    java.lang.Object getPersistentState()  
    java.util.Collection<MessageAuditEntity> getQueryMessageAudits()
    Getter used by MyBatis when querying messages with message audits.
    java.lang.String getRecipientGroupId()
    Returns the id of the recipient group of this message.
    java.lang.String getRecipientId()
    Returns the id of the recipient user of this message.
    java.lang.String getReferenceId()
    A reference id of the message (e.g.
    java.lang.String getReferenceType()
    The type of the reference.
    java.lang.String getReplyToMessageId()
    Returns a reference of another message used this one replies to.
    java.lang.String getSenderId()
    The id of the user that is the senderId of the message.
    java.lang.String getSubType()
    Returns the sub type of this data object, defining the data object with more details than the main type.
    java.util.List<java.lang.String> getTags()
    Returns the optional list of tags for this object.
    java.lang.String getTenantId()
    Returns the id of the tenant this data object belongs to.
    java.lang.String getType()
    Returns the main type of this data object.
    java.lang.String getUpdaterId()
    Returns the optional id of the user having last modified this data object, if any, null otherwise.
    java.util.Date getUpdateTime()
    Returns the timestamp of the last update of this data object, in most cases where events are immutable, this timestamp is the same as the creation timestamp, but must never be null.
    boolean isHidden()
    A flag indicating whether a message should be hidden (i.e.
    boolean isMessageAuditsInitialized()  
    boolean isPrivate()
    Returns true if this is a private data object with a explicit and specific set of permissions other than its parent (source).
    boolean isSticky()
    Returns true if this is a sticky data object, false (or null for a default, regular data object, most likely ordered around the value or update timestamp.
    boolean isTemporary()
    Whether this message is a temporary message.
    void setActionInstanceId​(java.lang.String actionInstanceId)  
    void setCategory​(Category category)  
    void setConversationId​(java.lang.String conversationId)  
    void setCreationTime​(java.util.Date creationTime)  
    void setCreatorId​(java.lang.String creatorId)  
    void setExternalId​(java.lang.String externalId)  
    void setHidden​(boolean hidden)  
    void setMainContent​(java.lang.String mainContent)  
    void setMainContentType​(java.lang.String mainContentType)  
    void setMediaContentId​(java.lang.String mediaContentId)  
    void setMessageAudits​(java.util.Collection<MessageAuditEntity> messageAudits)  
    void setPrivate​(boolean isPrivate)  
    void setQueryMessageAudits​(java.util.Collection<MessageAuditEntity> messageAudits)
    Setter used by MyBatis when querying messages with message audits.
    void setRecipientGroupId​(java.lang.String recipientGroupId)  
    void setRecipientId​(java.lang.String recipientId)  
    void setReferenceId​(java.lang.String referenceId)  
    void setReferenceType​(java.lang.String referenceType)  
    void setReplyToMessageId​(java.lang.String messageId)  
    void setSenderId​(java.lang.String senderId)  
    void setSticky​(boolean sticky)  
    void setSubType​(java.lang.String subType)  
    void setTags​(java.util.List<java.lang.String> tags)  
    void setTenantId​(java.lang.String tenantId)  
    void setType​(java.lang.String type)  
    void setUpdaterId​(java.lang.String updaterId)  
    void setUpdateTime​(java.util.Date updateTime)  
    java.lang.String toString()  

    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, wait, wait, wait

    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

    Methods inherited from interface com.flowable.engage.message.api.Message

    getId
  • Field Details

  • Constructor Details

  • Method Details

    • isPrivate

      public boolean isPrivate()
      Description copied from interface: Message
      Returns true if this is a private data object with a explicit and specific set of permissions other than its parent (source). For instance if you want to send a private message to someone within a group conversation or channel, you can use the private mode and explicitly select the recipients of that data object. This is an optional flag and defaults to false if not provided explicitly.
      Specified by:
      isPrivate in interface Message
      Returns:
      true if this is a private data object with a specific set of permissions
    • setPrivate

      public void setPrivate​(boolean isPrivate)
      Specified by:
      setPrivate in interface MessageEntity
    • isHidden

      public boolean isHidden()
      Description copied from interface: Message
      A flag indicating whether a message should be hidden (i.e. not sent when requested).
      Specified by:
      isHidden in interface Message
      Returns:
      true if this message is hidden
    • setHidden

      public void setHidden​(boolean hidden)
      Specified by:
      setHidden in interface MessageEntity
    • isSticky

      public boolean isSticky()
      Description copied from interface: Message
      Returns true if this is a sticky data object, false (or null for a default, regular data object, most likely ordered around the value or update timestamp. This is an optional flag and defaults to false if not provided explicitly.
      Specified by:
      isSticky in interface Message
      Returns:
      true if this is a sticky data object
    • setSticky

      public void setSticky​(boolean sticky)
      Specified by:
      setSticky in interface MessageEntity
    • getTenantId

      public java.lang.String getTenantId()
      Description copied from interface: Message
      Returns the id of the tenant this data object belongs to.
      Specified by:
      getTenantId in interface Message
      Returns:
      the tenant id
    • setTenantId

      public void setTenantId​(java.lang.String tenantId)
      Specified by:
      setTenantId in interface MessageEntity
    • getExternalId

      public java.lang.String getExternalId()
      Description copied from interface: Message
      If this data object was created from an external system, this optional external id might be used to map to that external data object id, if necessary.
      Specified by:
      getExternalId in interface Message
      Returns:
      the optional external id of this data object
    • setExternalId

      public void setExternalId​(java.lang.String externalId)
      Specified by:
      setExternalId in interface MessageEntity
    • getReferenceId

      public java.lang.String getReferenceId()
      Description copied from interface: Message
      A reference id of the message (e.g. a reference to a message in WhatsApp)
      Specified by:
      getReferenceId in interface Message
      Returns:
      the reference id
    • setReferenceId

      public void setReferenceId​(java.lang.String referenceId)
      Specified by:
      setReferenceId in interface MessageEntity
    • getReferenceType

      public java.lang.String getReferenceType()
      Description copied from interface: Message
      The type of the reference. (e.g. "WhatsApp' when the reference id is WhatsApp)
      Specified by:
      getReferenceType in interface Message
      Returns:
      the type of the reference
    • setReferenceType

      public void setReferenceType​(java.lang.String referenceType)
      Specified by:
      setReferenceType in interface MessageEntity
    • getActionInstanceId

      public java.lang.String getActionInstanceId()
      Description copied from interface: Message
      The optional id of an action instance if this message is linked with one.
      Specified by:
      getActionInstanceId in interface Message
      Returns:
      the optional id of an action instance
    • setActionInstanceId

      public void setActionInstanceId​(java.lang.String actionInstanceId)
      Specified by:
      setActionInstanceId in interface MessageEntity
    • getMediaContentId

      public java.lang.String getMediaContentId()
      Description copied from interface: Message
      The optional id of a media content id if this message is linked with one.
      Specified by:
      getMediaContentId in interface Message
      Returns:
      the optional if of a media content
    • setMediaContentId

      public void setMediaContentId​(java.lang.String mediaContentId)
      Specified by:
      setMediaContentId in interface MessageEntity
    • getConversationId

      public java.lang.String getConversationId()
      Description copied from interface: Message
      Returns the conversation id for this data object.
      Specified by:
      getConversationId in interface Message
      Returns:
      the conversation id of the data object
    • setConversationId

      public void setConversationId​(java.lang.String conversationId)
      Specified by:
      setConversationId in interface MessageEntity
    • getCategory

      public Category getCategory()
      Description copied from interface: Message
      Returns the category of this data object, which might be a Category.MESSAGE, Category.EVENT, Category.ACTION.
      Specified by:
      getCategory in interface Message
      Returns:
      the data object category
    • setCategory

      public void setCategory​(Category category)
      Specified by:
      setCategory in interface MessageEntity
    • getType

      public java.lang.String getType()
      Description copied from interface: Message
      Returns the main type of this data object. A lot of services or functions might be based on the type of a data object, so choose it carefully, if not using one of the predefined types. See DataTypes for default types to be used.
      Specified by:
      getType in interface Message
      Returns:
      the type of the data object
    • setType

      public void setType​(java.lang.String type)
      Specified by:
      setType in interface MessageEntity
    • getSubType

      public java.lang.String getSubType()
      Description copied from interface: Message
      Returns the sub type of this data object, defining the data object with more details than the main type. See DataSubTypes for default sub types to be used.
      Specified by:
      getSubType in interface Message
      Returns:
      the sub type of the data object
    • setSubType

      public void setSubType​(java.lang.String subType)
      Specified by:
      setSubType in interface MessageEntity
    • getMainContent

      public java.lang.String getMainContent()
      Description copied from interface: Message
      Returns the main content for this data object, most likely just a mapping into a specific parameter within the payload or a combination of several values within the payload. The main content is typically used whenever a data object is rendered within a conversation it was sent to.
      Specified by:
      getMainContent in interface Message
      Returns:
      the main content of this data object in a human readable way
    • setMainContent

      public void setMainContent​(java.lang.String mainContent)
      Specified by:
      setMainContent in interface MessageEntity
    • getMainContentType

      public java.lang.String getMainContentType()
      Description copied from interface: Message
      Returns the media type of the main content (e.g. 'MD', 'HTML' or 'PLAIN'). See ContentTypes for a list of supported types. If not explicitly specified, it returns the default type, which is ContentTypes.MD.
      Specified by:
      getMainContentType in interface Message
      Returns:
      the type of the main content
    • setMainContentType

      public void setMainContentType​(java.lang.String mainContentType)
      Specified by:
      setMainContentType in interface MessageEntity
    • getCreationTime

      public java.util.Date getCreationTime()
      Description copied from interface: Message
      Returns the creation timestamp of this data object.
      Specified by:
      getCreationTime in interface Message
      Returns:
      the creation timestamp
    • setCreationTime

      public void setCreationTime​(java.util.Date creationTime)
      Specified by:
      setCreationTime in interface MessageEntity
    • getUpdateTime

      public java.util.Date getUpdateTime()
      Description copied from interface: Message
      Returns the timestamp of the last update of this data object, in most cases where events are immutable, this timestamp is the same as the creation timestamp, but must never be null.
      Specified by:
      getUpdateTime in interface Message
      Returns:
      the timestamp of the last update / modification of this data object
    • setUpdateTime

      public void setUpdateTime​(java.util.Date updateTime)
      Specified by:
      setUpdateTime in interface MessageEntity
    • getCreatorId

      public java.lang.String getCreatorId()
      Description copied from interface: Message
      Returns the id of the user creating this data object.
      Specified by:
      getCreatorId in interface Message
      Returns:
      the id of the creation user
    • setCreatorId

      public void setCreatorId​(java.lang.String creatorId)
      Specified by:
      setCreatorId in interface MessageEntity
    • getUpdaterId

      public java.lang.String getUpdaterId()
      Description copied from interface: Message
      Returns the optional id of the user having last modified this data object, if any, null otherwise.
      Specified by:
      getUpdaterId in interface Message
      Returns:
      the optional id of the user having last updated this data object
    • setUpdaterId

      public void setUpdaterId​(java.lang.String updaterId)
      Specified by:
      setUpdaterId in interface MessageEntity
    • getSenderId

      public java.lang.String getSenderId()
      Description copied from interface: Message
      The id of the user that is the senderId of the message.
      Specified by:
      getSenderId in interface Message
      Returns:
      the id of the senderId
    • setSenderId

      public void setSenderId​(java.lang.String senderId)
      Specified by:
      setSenderId in interface MessageEntity
    • getRecipientId

      public java.lang.String getRecipientId()
      Description copied from interface: Message
      Returns the id of the recipient user of this message. This means that the message is private for the given user.
      Specified by:
      getRecipientId in interface Message
      Returns:
      the id of recipient user
    • setRecipientId

      public void setRecipientId​(java.lang.String recipientId)
      Specified by:
      setRecipientId in interface MessageEntity
    • getRecipientGroupId

      public java.lang.String getRecipientGroupId()
      Description copied from interface: Message
      Returns the id of the recipient group of this message. This means that the message is private for the given group.
      Specified by:
      getRecipientGroupId in interface Message
      Returns:
      the id of recipient group
    • setRecipientGroupId

      public void setRecipientGroupId​(java.lang.String recipientGroupId)
      Specified by:
      setRecipientGroupId in interface MessageEntity
    • getTags

      public java.util.List<java.lang.String> getTags()
      Description copied from interface: Taggable
      Returns 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.
      Specified by:
      getTags in interface Taggable
      Returns:
      the optional list of tags, might be null or empty
    • setTags

      public void setTags​(java.util.List<java.lang.String> tags)
      Specified by:
      setTags in interface MessageEntity
    • isTemporary

      public boolean isTemporary()
      Description copied from interface: Message
      Whether this message is a temporary message.
      Specified by:
      isTemporary in interface Message
      Returns:
      true if this is a temporary message, false otherwise
    • setReplyToMessageId

      public void setReplyToMessageId​(java.lang.String messageId)
      Specified by:
      setReplyToMessageId in interface MessageEntity
    • getReplyToMessageId

      public java.lang.String getReplyToMessageId()
      Description copied from interface: Message
      Returns a reference of another message used this one replies to.
      Specified by:
      getReplyToMessageId in interface Message
      Returns:
      the id of the message being replied
    • isMessageAuditsInitialized

      public boolean isMessageAuditsInitialized()
      Specified by:
      isMessageAuditsInitialized in interface MessageEntity
    • getMessageAudits

      public java.util.Collection<MessageAuditEntity> getMessageAudits()
      Description copied from interface: Message
      The collection of the audits of this message, in arbitrary order
      Specified by:
      getMessageAudits in interface Message
      Specified by:
      getMessageAudits in interface MessageEntity
      Returns:
      the audits for this message, if they exist
    • setMessageAudits

      public void setMessageAudits​(java.util.Collection<MessageAuditEntity> messageAudits)
      Specified by:
      setMessageAudits in interface MessageEntity
    • getQueryMessageAudits

      public java.util.Collection<MessageAuditEntity> getQueryMessageAudits()
      Getter used by MyBatis when querying messages with message audits.
    • setQueryMessageAudits

      public void setQueryMessageAudits​(java.util.Collection<MessageAuditEntity> messageAudits)
      Setter used by MyBatis when querying messages with message audits.
    • getPersistentState

      public java.lang.Object getPersistentState()
      Specified by:
      getPersistentState in interface org.flowable.common.engine.impl.persistence.entity.Entity
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object