Class DefaultMessageSendHelper
java.lang.Object
com.flowable.engage.engine.impl.message.DefaultMessageSendHelper
- All Implemented Interfaces:
MessageSendHelper
- Author:
- Filip Hrisafov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrenderMainContent(Conversation conversation, String receivingUserId, String messageKey, String messageCode, String messageLanguage, Map<String, Object> messagePayload) Render the content of the templatevoidscheduleTemporaryMessageHandling(TemporaryMessage temporaryMessage) Schedule the temporary message handling.booleanshouldHandleAsTemporaryMessage(Message message, Conversation conversation) Check whether the message should be handled as a temporary message.protected booleanshouldHandleAsTemporaryMessageForUserAccount(UserAccount userAccount, Message message, Conversation conversation) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.flowable.engage.engine.impl.message.MessageSendHelper
shouldIncreaseUnreadMessageCount, shouldUpdateConversationLastMessageTime
-
Constructor Details
-
DefaultMessageSendHelper
public DefaultMessageSendHelper()
-
-
Method Details
-
shouldHandleAsTemporaryMessage
Description copied from interface:MessageSendHelperCheck whether the message should be handled as a temporary message.- Specified by:
shouldHandleAsTemporaryMessagein interfaceMessageSendHelper- Parameters:
message- the messageconversation- the conversation- Returns:
trueif the message should be handled as a temporary message,falseotherwise
-
shouldHandleAsTemporaryMessageForUserAccount
protected boolean shouldHandleAsTemporaryMessageForUserAccount(UserAccount userAccount, Message message, Conversation conversation) -
scheduleTemporaryMessageHandling
Description copied from interface:MessageSendHelperSchedule the temporary message handling.- Specified by:
scheduleTemporaryMessageHandlingin 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:MessageSendHelperRender the content of the template- Specified by:
renderMainContentin 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_LANGUAGEis used.messagePayload- the optional payload containing the necessary parameters (if any needed by the template)- Returns:
- the content of the template
-