Class DefaultMessageSendHelper
- java.lang.Object
-
- com.flowable.engage.engine.impl.message.DefaultMessageSendHelper
-
- All Implemented Interfaces:
MessageSendHelper
public class DefaultMessageSendHelper extends Object implements MessageSendHelper
- Author:
- Filip Hrisafov
-
-
Constructor Summary
Constructors Constructor Description DefaultMessageSendHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
renderMainContent(Conversation conversation, String receivingUserId, String messageKey, String messageCode, String messageLanguage, Map<String,Object> messagePayload)
Render the content of the templatevoid
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.protected boolean
shouldHandleAsTemporaryMessageForUserAccount(UserAccount userAccount, Message message, Conversation conversation)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.flowable.engage.engine.impl.message.MessageSendHelper
shouldIncreaseUnreadMessageCount, shouldUpdateConversationLastMessageTime
-
-
-
-
Method Detail
-
shouldHandleAsTemporaryMessage
public boolean shouldHandleAsTemporaryMessage(Message message, Conversation conversation)
Description copied from interface:MessageSendHelper
Check whether the message should be handled as a temporary message.- Specified by:
shouldHandleAsTemporaryMessage
in interfaceMessageSendHelper
- Parameters:
message
- the messageconversation
- the conversation- Returns:
true
if the message should be handled as a temporary message,false
otherwise
-
shouldHandleAsTemporaryMessageForUserAccount
protected boolean shouldHandleAsTemporaryMessageForUserAccount(UserAccount userAccount, Message message, Conversation conversation)
-
scheduleTemporaryMessageHandling
public void scheduleTemporaryMessageHandling(TemporaryMessage temporaryMessage)
Description copied from interface:MessageSendHelper
Schedule the temporary message handling.- Specified by:
scheduleTemporaryMessageHandling
in interfaceMessageSendHelper
- Parameters:
temporaryMessage
- the temporary message
-
renderMainContent
public String renderMainContent(Conversation conversation, String receivingUserId, String messageKey, String messageCode, String messageLanguage, Map<String,Object> messagePayload)
Description copied from interface:MessageSendHelper
Render the content of the template- Specified by:
renderMainContent
in interfaceMessageSendHelper
- Parameters:
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 languageTemplateMessageUtil.FALLBACK_LANGUAGE
is used.messagePayload
- the optional payload containing the necessary parameters (if any needed by the template)- Returns:
- the content of the template
-
-