Package com.flowable.engage.message.api
Interface Message
- All Superinterfaces:
Taggable
- All Known Subinterfaces:
MessageEntity
,TemporaryMessage
,TemporaryMessageEntity
- All Known Implementing Classes:
MessageEntityImpl
,TemporaryMessageEntityImpl
The message object that holds all relevant data describing the
event, message, action, etc
-
Method Summary
Modifier and TypeMethodDescriptionThe optional id of an action instance if this message is linked with one.Returns the category of this data object, which might be aCategory.MESSAGE
,Category.EVENT
,Category.ACTION
.Returns the conversation id for this data object.Returns the creation timestamp of this data object.Returns the id of the user creating this data object.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.getId()
The unique, technical id of this data object.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.Returns the media type of the main content (e.g.The optional id of a media content id if this message is linked with one.Collection<? extends MessageAudit>
The collection of the audits of this message, in arbitrary orderReturns the id of the recipient group of this message.Returns the id of the recipient user of this message.Returns a reference of another message used this one replies to.The id of the user that is the senderId of the message.Returns the sub type of this data object, defining the data object with more details than the main type.Returns the id of the tenant this data object belongs to.getType()
Returns the main type of this data object.Returns the optional id of the user having last modified this data object, if any,null
otherwise.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 benull
.boolean
isHidden()
A flag indicating whether a message should be hidden (i.e.boolean
Returnstrue
if this is a private data object with a explicit and specific set of permissions other than its parent (source).boolean
isSticky()
Returnstrue
if this is a sticky data object,false
(ornull
for a default, regular data object, most likely ordered around the value or update timestamp.boolean
Whether this message is a temporary message.
-
Method Details
-
isPrivate
boolean isPrivate()Returnstrue
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 tofalse
if not provided explicitly.- Returns:
true
if this is a private data object with a specific set of permissions
-
isHidden
boolean isHidden()A flag indicating whether a message should be hidden (i.e. not sent when requested).- Returns:
true
if this message is hidden
-
isSticky
boolean isSticky()Returnstrue
if this is a sticky data object,false
(ornull
for a default, regular data object, most likely ordered around the value or update timestamp. This is an optional flag and defaults tofalse
if not provided explicitly.- Returns:
true
if this is a sticky data object
-
getTenantId
String getTenantId()Returns the id of the tenant this data object belongs to.- Returns:
- the tenant id
-
getId
String getId()The unique, technical id of this data object.- Returns:
- the id of this object
-
getExternalId
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.- Returns:
- the optional external id of this data object
-
getActionInstanceId
String getActionInstanceId()The optional id of an action instance if this message is linked with one.- Returns:
- the optional id of an action instance
-
getMediaContentId
String getMediaContentId()The optional id of a media content id if this message is linked with one.- Returns:
- the optional if of a media content
-
getConversationId
String getConversationId()Returns the conversation id for this data object.- Returns:
- the conversation id of the data object
-
getCategory
Category getCategory()Returns the category of this data object, which might be aCategory.MESSAGE
,Category.EVENT
,Category.ACTION
.- Returns:
- the data object category
-
getType
String getType()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. SeeDataTypes
for default types to be used.- Returns:
- the type of the data object
-
getSubType
String getSubType()Returns the sub type of this data object, defining the data object with more details than the main type. SeeDataSubTypes
for default sub types to be used.- Returns:
- the sub type of the data object
-
getMainContent
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. The main content is typically used whenever a data object is rendered within a conversation it was sent to.- Returns:
- the main content of this data object in a human readable way
-
getMainContentType
String getMainContentType()Returns the media type of the main content (e.g. 'MD', 'HTML' or 'PLAIN'). SeeContentTypes
for a list of supported types. If not explicitly specified, it returns the default type, which isContentTypes.MD
.- Returns:
- the type of the main content
-
getCreationTime
Date getCreationTime()Returns the creation timestamp of this data object.- Returns:
- the creation timestamp
-
getUpdateTime
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 benull
.- Returns:
- the timestamp of the last update / modification of this data object
-
getCreatorId
String getCreatorId()Returns the id of the user creating this data object.- Returns:
- the id of the creation user
-
getUpdaterId
String getUpdaterId()Returns the optional id of the user having last modified this data object, if any,null
otherwise.- Returns:
- the optional id of the user having last updated this data object
-
getSenderId
String getSenderId()The id of the user that is the senderId of the message.- Returns:
- the id of the senderId
-
getRecipientId
String getRecipientId()Returns the id of the recipient user of this message. This means that the message is private for the given user.- Returns:
- the id of recipient user
-
getRecipientGroupId
String getRecipientGroupId()Returns the id of the recipient group of this message. This means that the message is private for the given group.- Returns:
- the id of recipient group
-
isTemporary
boolean isTemporary()Whether this message is a temporary message.- Returns:
true
if this is a temporary message,false
otherwise
-
getReplyToMessageId
String getReplyToMessageId()Returns a reference of another message used this one replies to.- Returns:
- the id of the message being replied
-
getMessageAudits
Collection<? extends MessageAudit> getMessageAudits()The collection of the audits of this message, in arbitrary order- Returns:
- the audits for this message, if they exist
-