public class MessageBuilderImpl extends Object implements MessageBuilder
Modifier and Type | Field and Description |
---|---|
protected String |
actionDefinitionId |
protected String |
actionDefinitionKey |
protected String |
actionInstanceId |
protected Category |
category |
protected org.flowable.common.engine.impl.interceptor.CommandExecutor |
commandExecutor |
protected org.flowable.content.api.ContentItem |
contentItem |
protected InputStream |
contentStream |
protected String |
conversationId |
protected String |
creatorId |
protected String |
externalId |
protected String |
mainContent |
protected String |
mainContentType |
protected String |
recipientGroupId |
protected String |
recipientId |
protected String |
replyToMessageId |
protected String |
scopeId |
protected String |
scopeType |
protected String |
senderId |
protected boolean |
stickyMessage |
protected String |
subType |
protected List<String> |
tags |
protected String |
templateLanguage |
protected String |
templateMessageCode |
protected String |
templateMessageKey |
protected Map<String,Object> |
templatePayload |
protected String |
type |
protected String |
updaterId |
Constructor and Description |
---|
MessageBuilderImpl(org.flowable.common.engine.impl.interceptor.CommandExecutor commandExecutor) |
Modifier and Type | Method and Description |
---|---|
MessageBuilder |
actionDefinitionId(String actionDefinitionId)
Optionally reference an action definition given by its id.
|
MessageBuilder |
actionDefinitionKey(String actionDefinitionKey)
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) |
String |
getActionDefinitionId() |
String |
getActionDefinitionKey() |
String |
getActionInstanceId() |
Category |
getCategory() |
org.flowable.content.api.ContentItem |
getContentItem() |
InputStream |
getContentStream() |
String |
getConversationId() |
String |
getCreatorId() |
String |
getExternalId() |
String |
getMainContent() |
String |
getMainContentType() |
String |
getRecipientGroupId() |
String |
getRecipientId() |
String |
getReplyToMessageId() |
String |
getScopeId() |
String |
getScopeType() |
String |
getSenderId() |
String |
getSubType() |
List<String> |
getTags() |
String |
getTemplateLanguage() |
String |
getTemplateMessageCode() |
String |
getTemplateMessageKey() |
Map<String,Object> |
getTemplatePayload() |
String |
getType() |
String |
getUpdaterId() |
boolean |
hasContentTemplate() |
boolean |
isStickyMessage() |
MessageBuilder |
mainContent(String mainContent) |
MessageBuilder |
mainContentTemplate(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 |
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) |
void |
setCategory(Category category) |
MessageBuilder |
stickyMessage() |
MessageBuilder |
subType(String subType) |
MessageBuilder |
tags(List<String> tags) |
MessageBuilder |
type(String type) |
MessageBuilder |
updaterId(String updaterId) |
protected org.flowable.common.engine.impl.interceptor.CommandExecutor commandExecutor
protected Category category
protected String conversationId
protected String creatorId
protected String senderId
protected String updaterId
protected String recipientId
protected String recipientGroupId
protected String externalId
protected String actionInstanceId
protected String actionDefinitionId
protected String actionDefinitionKey
protected String mainContent
protected String templateMessageKey
protected String templateMessageCode
protected String templateLanguage
protected String mainContentType
protected org.flowable.content.api.ContentItem contentItem
protected InputStream contentStream
protected String type
protected String subType
protected boolean stickyMessage
protected String scopeId
protected String scopeType
protected String replyToMessageId
public MessageBuilderImpl(org.flowable.common.engine.impl.interceptor.CommandExecutor commandExecutor)
public MessageBuilder creatorId(String creatorId)
creatorId
in interface MessageBuilder
public MessageBuilder senderId(String senderId)
senderId
in interface MessageBuilder
public MessageBuilder updaterId(String updaterId)
updaterId
in interface MessageBuilder
public MessageBuilder externalId(String externalId)
externalId
in interface MessageBuilder
public MessageBuilder actionInstanceId(String actionInstanceId)
actionInstanceId
in interface MessageBuilder
public MessageBuilder actionDefinitionId(String actionDefinitionId)
MessageBuilder
MessageBuilder.scope(String, String)
, if not set,
the conversation is automatically used as the scope for the action instance.actionDefinitionId
in interface MessageBuilder
actionDefinitionId
- the id of the action definition to create an action instance for, which is then referenced by this messagepublic MessageBuilder actionDefinitionKey(String actionDefinitionKey)
MessageBuilder
MessageBuilder.scope(String, String)
, if not set,
the conversation is automatically used as the scope for the action instance.actionDefinitionKey
in interface MessageBuilder
actionDefinitionKey
- the key of the action definition to create an action instance for, which is then referenced by this messagepublic MessageBuilder mainContent(String mainContent)
mainContent
in interface MessageBuilder
public MessageBuilder mainContentTemplate(String messageCode, String language, Map<String,Object> payload)
MessageBuilder
mainContentTemplate
in interface MessageBuilder
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 neededpublic MessageBuilder mainContentTemplate(String templateKey, String messageCode, String language, Map<String,Object> payload)
MessageBuilder
mainContentTemplate
in interface MessageBuilder
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 neededpublic MessageBuilder mainContentType(String mainContentType)
mainContentType
in interface MessageBuilder
public MessageBuilder media(org.flowable.content.api.ContentItem contentItem, InputStream contentStream)
media
in interface MessageBuilder
public MessageBuilder media(org.flowable.content.api.ContentItem contentItem)
MessageBuilder
media
in interface MessageBuilder
contentItem
- the provisional contentpublic MessageBuilder type(String type)
type
in interface MessageBuilder
public MessageBuilder subType(String subType)
subType
in interface MessageBuilder
public MessageBuilder privateMessage(String recipientId)
MessageBuilder
recipientId
.privateMessage
in interface MessageBuilder
recipientId
- the id of the recipient userpublic MessageBuilder privateGroupMessage(String recipientGroupId)
MessageBuilder
recipientGroupId
privateGroupMessage
in interface MessageBuilder
recipientGroupId
- the id of the recipient grouppublic MessageBuilder stickyMessage()
stickyMessage
in interface MessageBuilder
public MessageBuilder tags(List<String> tags)
tags
in interface MessageBuilder
public MessageBuilder addTag(String tag)
addTag
in interface MessageBuilder
public MessageBuilder addTags(List<String> tags)
addTags
in interface MessageBuilder
public MessageBuilder replyToMessageId(String messageId)
replyToMessageId
in interface MessageBuilder
public MessageBuilder scope(String scopeId, String scopeType)
MessageBuilder
scope
in interface MessageBuilder
scopeId
- the id of the scope a referenced action definition should be bound toscopeType
- the type of the scope for the referenced action definitionpublic Category getCategory()
public void setCategory(Category category)
public String getConversationId()
public String getCreatorId()
public String getSenderId()
public String getUpdaterId()
public String getRecipientId()
public String getRecipientGroupId()
public String getExternalId()
public String getActionInstanceId()
public String getActionDefinitionId()
public String getActionDefinitionKey()
public String getMainContent()
public boolean hasContentTemplate()
public String getTemplateMessageKey()
public String getTemplateMessageCode()
public String getTemplateLanguage()
public String getMainContentType()
public org.flowable.content.api.ContentItem getContentItem()
public InputStream getContentStream()
public String getType()
public String getSubType()
public boolean isStickyMessage()
public String getScopeId()
public String getScopeType()
public String getReplyToMessageId()
public Message send(String conversationId)
MessageBuilder
send
in interface MessageBuilder
conversationId
- the id of the conversation to send the message toCopyright © 2019. All rights reserved.