Class NotificationAccountInviteMessageListener

java.lang.Object
com.broadleafcommerce.notification.service.messaging.AbstractEmailNotificationMessageListener
com.broadleafcommerce.notification.service.messaging.NotificationAccountInviteMessageListener

public class NotificationAccountInviteMessageListener extends AbstractEmailNotificationMessageListener
  • Field Details

  • Constructor Details

    • NotificationAccountInviteMessageListener

      public NotificationAccountInviteMessageListener(com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService, NotificationService<Notification> notificationService, org.springframework.context.MessageSource messages, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, AccountNotificationProperties properties)
  • Method Details

    • handleMessage

      @StreamListener("accountInvitationInputNotification") public void handleMessage(org.springframework.messaging.Message<String> message)
    • getAdditionalArgs

      protected Map<String,Object> getAdditionalArgs(com.jayway.jsonpath.DocumentContext jsonContext)
    • getAccountInviteEmail

      @Nullable protected String getAccountInviteEmail(com.jayway.jsonpath.DocumentContext jsonContext)
    • getAccountInvitePhone

      @Nullable protected String getAccountInvitePhone(com.jayway.jsonpath.DocumentContext jsonContext)
    • getAccountName

      protected String getAccountName(com.jayway.jsonpath.DocumentContext jsonContext)
    • getLocale

      protected Locale getLocale(com.jayway.jsonpath.DocumentContext jsonContext)
    • getClassName

      protected String getClassName()
      Description copied from class: AbstractEmailNotificationMessageListener
      Get the class name to identify this listener for handling message idempotency.
      Specified by:
      getClassName in class AbstractEmailNotificationMessageListener
      Returns:
      the listener's class name
    • modifyNotification

      protected void modifyNotification(Notification notification, com.jayway.jsonpath.DocumentContext jsonContext, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Description copied from class: AbstractEmailNotificationMessageListener
      Extension point to allow modifying the notification or context before sending to the notification service
      Overrides:
      modifyNotification in class AbstractEmailNotificationMessageListener
      Parameters:
      notification - the Notification for the current message
      jsonContext - the message payload
      context - The context of the request
    • determineSupportedResolutionTypes

      protected void determineSupportedResolutionTypes()
    • getAccountPageUrl

      protected String getAccountPageUrl(String identifierType, String identifierValue, com.jayway.jsonpath.DocumentContext jsonContext)
    • getRegistrationUrl

      protected String getRegistrationUrl(String identifierType, String identifierValue, com.jayway.jsonpath.DocumentContext jsonContext)
    • determineBaseUrl

      protected String determineBaseUrl(String identifierType, String identifierValue)
    • validateShouldSendNotification

      protected boolean validateShouldSendNotification(com.jayway.jsonpath.DocumentContext jsonContext)
      Description copied from class: AbstractEmailNotificationMessageListener
      Validate that the message state is valid to send the email.
      Specified by:
      validateShouldSendNotification in class AbstractEmailNotificationMessageListener
      Parameters:
      jsonContext - the message payload
      Returns:
      whether the email should be sent
    • getMessageType

      protected String getMessageType(com.jayway.jsonpath.DocumentContext jsonContext)
      Description copied from class: AbstractEmailNotificationMessageListener
      Determine which message type should be sent.
      Specified by:
      getMessageType in class AbstractEmailNotificationMessageListener
      Parameters:
      jsonContext - the message payload
      Returns:
      the message type to send
    • getNotificationSubject

      protected String getNotificationSubject(com.jayway.jsonpath.DocumentContext jsonContext)
      Description copied from class: AbstractEmailNotificationMessageListener
      Determine the subject to use for the email notification.
      Specified by:
      getNotificationSubject in class AbstractEmailNotificationMessageListener
      Parameters:
      jsonContext - the message payload
      Returns:
      the subject to use for the email notification
    • getRecipients

      protected List<Recipient> getRecipients(com.jayway.jsonpath.DocumentContext jsonContext)
      Description copied from class: AbstractEmailNotificationMessageListener
      Determine the recipients to use for the email notification.
      Specified by:
      getRecipients in class AbstractEmailNotificationMessageListener
      Parameters:
      jsonContext - the message payload
      Returns:
      the recipients to use for the email notification
    • buildRecipientsList

      protected List<Recipient> buildRecipientsList(com.jayway.jsonpath.DocumentContext jsonContext)
      Hook point to add additional logic to determine the list of recipients of the account invite notification.
      Parameters:
      jsonContext - The message payload
      Returns:
      the list of recipients
    • buildNotificationContext

      protected com.broadleafcommerce.data.tracking.core.context.ContextInfo buildNotificationContext(com.jayway.jsonpath.DocumentContext jsonContext)
      Description copied from class: AbstractEmailNotificationMessageListener
      Build the ContextInfo for the current message
      Specified by:
      buildNotificationContext in class AbstractEmailNotificationMessageListener
      Parameters:
      jsonContext - the payload of the message
      Returns:
      the NotificationContext for the current message
    • getIdentifierType

      @Nullable protected String getIdentifierType(com.jayway.jsonpath.DocumentContext context)
    • getIdentifierValue

      @Nullable protected String getIdentifierValue(com.jayway.jsonpath.DocumentContext context)
    • getProperties

      protected AccountNotificationProperties getProperties()