Class DefaultMessageSendHelper

    • Constructor Detail

      • DefaultMessageSendHelper

        public DefaultMessageSendHelper()
    • 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 interface MessageSendHelper
        Parameters:
        message - the message
        conversation - 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)
      • 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 interface MessageSendHelper
        Parameters:
        conversation - the conversation where the message is sent to
        receivingUserId - the optional user id which receives the message.
        messageKey - the template key of the message template to be used
        messageCode - the message code to choose the template variation for
        messageLanguage - 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)
        Returns:
        the content of the template