public interface MessageBuilder
send(String)
method within the builder.
Make sure to at least add a message content using mainContent(String)
. You can optionally set the user to send that message from using the
senderId(String)
method.Modifier and Type | Method and Description |
---|---|
MessageBuilder |
actionDefinitionId(String actionDefinitionId)
Optionally reference an action definition given by its id.
|
MessageBuilder |
actionDefinitionKey(String key)
Optionally reference an action definition given by its key.
|
MessageBuilder |
actionInstanceId(String actionInstanceId) |
MessageBuilder |
addTag(String tag) |
MessageBuilder |
addTags(List<String> tags) |
MessageBuilder |
creatorId(String creatorId) |
MessageBuilder |
externalId(String externalId) |
MessageBuilder |
mainContent(String mainContent) |
MessageBuilder |
mainContentTemplate(String messageCode,
String language,
Map<String,Object> payload)
Deprecated.
always use the method with the template key instead and provide your own key
|
MessageBuilder |
mainContentTemplate(String templateKey,
String messageCode,
String language,
Map<String,Object> payload)
Adds content being rendered from the specified template (uses "standardMessage" as the template key and the provided message code and optional language
as the variation).
|
MessageBuilder |
mainContentType(String mainContentType) |
MessageBuilder |
media(org.flowable.content.api.ContentItem contentItem)
Send a media message with a provisional content item
|
MessageBuilder |
media(org.flowable.content.api.ContentItem contentItem,
InputStream contentStream) |
MessageBuilder |
privateGroupMessage(String recipientGroupId)
The message should be a private message for the group
with the
recipientGroupId |
MessageBuilder |
privateMessage(String recipientId)
The message should be a private message for the user
with the
recipientId . |
MessageBuilder |
replyToMessageId(String messageId) |
MessageBuilder |
scope(String scopeId,
String scopeType)
Set an explicit scope for a referenced action definition to be passed on to the action instance, if created when posting this message.
|
Message |
send(String conversationId)
Creates and sends the message to the specified conversation.
|
MessageBuilder |
senderId(String senderId) |
MessageBuilder |
stickyMessage() |
MessageBuilder |
subType(String subType) |
MessageBuilder |
tags(List<String> tags) |
MessageBuilder |
type(String type) |
MessageBuilder |
updaterId(String updaterId) |
MessageBuilder creatorId(String creatorId)
MessageBuilder senderId(String senderId)
MessageBuilder updaterId(String updaterId)
MessageBuilder externalId(String externalId)
MessageBuilder actionInstanceId(String actionInstanceId)
MessageBuilder actionDefinitionId(String actionDefinitionId)
scope(String, String)
, if not set,
the conversation is automatically used as the scope for the action instance.actionDefinitionId
- the id of the action definition to create an action instance for, which is then referenced by this messageMessageBuilder actionDefinitionKey(String key)
scope(String, String)
, if not set,
the conversation is automatically used as the scope for the action instance.key
- the key of the action definition to create an action instance for, which is then referenced by this messageMessageBuilder mainContent(String mainContent)
@Deprecated MessageBuilder mainContentTemplate(String messageCode, String language, Map<String,Object> payload)
messageCode
- the message code to be used for the variation of the templatelanguage
- the language or null
to use the default onepayload
- the optional payload containing the values for the placeholder of the template, if neededMessageBuilder mainContentTemplate(String templateKey, String messageCode, String language, Map<String,Object> payload)
templateKey
- the key of the template to be used (will be "standardMessage", if none provided explicitly)messageCode
- the message code to be used for the variation of the templatelanguage
- the language or null
to use the default onepayload
- the optional payload containing the values for the placeholder of the template, if neededMessageBuilder mainContentType(String mainContentType)
MessageBuilder media(org.flowable.content.api.ContentItem contentItem, InputStream contentStream)
MessageBuilder media(org.flowable.content.api.ContentItem contentItem)
contentItem
- the provisional contentMessageBuilder type(String type)
MessageBuilder subType(String subType)
MessageBuilder privateMessage(String recipientId)
recipientId
.recipientId
- the id of the recipient userMessageBuilder privateGroupMessage(String recipientGroupId)
recipientGroupId
recipientGroupId
- the id of the recipient groupMessageBuilder stickyMessage()
MessageBuilder tags(List<String> tags)
MessageBuilder addTag(String tag)
MessageBuilder addTags(List<String> tags)
MessageBuilder replyToMessageId(String messageId)
MessageBuilder scope(String scopeId, String scopeType)
scopeId
- the id of the scope a referenced action definition should be bound toscopeType
- the type of the scope for the referenced action definitionCopyright © 2019. All rights reserved.