public class DefaultMessageSendHelper extends Object implements MessageSendHelper
Constructor and Description |
---|
DefaultMessageSendHelper() |
Modifier and Type | Method and Description |
---|---|
String |
renderMainContent(Conversation conversation,
String receivingUserId,
String messageKey,
String messageCode,
String messageLanguage,
Map<String,Object> messagePayload)
Render the content of the template
|
void |
scheduleTemporaryMessageHandling(TemporaryMessage temporaryMessage)
Schedule the temporary message handling.
|
boolean |
shouldHandleAsTemporaryMessage(Message message,
Conversation conversation)
Check whether the message should be handled as a temporary message.
|
public boolean shouldHandleAsTemporaryMessage(Message message, Conversation conversation)
MessageSendHelper
shouldHandleAsTemporaryMessage
in interface MessageSendHelper
message
- the messageconversation
- the conversationtrue
if the message should be handled as a temporary message,
false
otherwisepublic void scheduleTemporaryMessageHandling(TemporaryMessage temporaryMessage)
MessageSendHelper
scheduleTemporaryMessageHandling
in interface MessageSendHelper
temporaryMessage
- the temporary messagepublic String renderMainContent(Conversation conversation, String receivingUserId, String messageKey, String messageCode, String messageLanguage, Map<String,Object> messagePayload)
MessageSendHelper
renderMainContent
in interface MessageSendHelper
conversation
- the conversation where the message is sent toreceivingUserId
- the optional user id which receives the message.messageKey
- the template key of the message template to be usedmessageCode
- the message code to choose the template variation formessageLanguage
- the optional language (e.g. "en") for which the message should be rendered. If language is null the default language TemplateMessageUtil.FALLBACK_LANGUAGE
is used.messagePayload
- the optional payload containing the necessary parameters (if any needed by the template)Copyright © 2019. All rights reserved.