Class EmailTemplateNotificationServiceImpl

java.lang.Object
com.broadleafcommerce.advancedcms.notification.service.EmailTemplateNotificationServiceImpl
All Implemented Interfaces:
org.broadleafcommerce.common.notification.service.NotificationService

public class EmailTemplateNotificationServiceImpl extends Object implements org.broadleafcommerce.common.notification.service.NotificationService
Author:
Nick Crum ncrum
  • Field Details

    • EMAIL_TEMPLATE_PROPERTY_PREFIX

      protected static final String EMAIL_TEMPLATE_PROPERTY_PREFIX
      See Also:
    • LOG

      protected final org.apache.commons.logging.Log LOG
    • environment

      @Autowired protected org.springframework.core.env.Environment environment
    • emailInfos

      @Autowired(required=false) protected List<org.broadleafcommerce.common.email.service.info.EmailInfo> emailInfos
    • emailTemplateService

      @Autowired @Qualifier("blEmailTemplateService") protected EmailTemplateService emailTemplateService
    • contentTargeterService

      @Qualifier("blContentTargeterService") protected ContentTargeterService contentTargeterService
    • messageCreator

      @Qualifier("blMessageCreator") @Lazy protected org.broadleafcommerce.common.email.service.message.MessageCreator messageCreator
    • expressionParser

      @Qualifier("blExpressionParser") protected org.broadleafcommerce.common.expression.BroadleafExpressionParser expressionParser
    • emailTrackingManager

      protected org.broadleafcommerce.common.email.service.EmailTrackingManager emailTrackingManager
  • Constructor Details

    • EmailTemplateNotificationServiceImpl

      public EmailTemplateNotificationServiceImpl()
  • Method Details

    • canHandle

      public boolean canHandle(Class<? extends org.broadleafcommerce.common.notification.service.type.Notification> clazz)
      Specified by:
      canHandle in interface org.broadleafcommerce.common.notification.service.NotificationService
    • sendNotification

      public void sendNotification(org.broadleafcommerce.common.notification.service.type.Notification notification)
      Specified by:
      sendNotification in interface org.broadleafcommerce.common.notification.service.NotificationService
    • sendEmailNotification

      protected void sendEmailNotification(org.broadleafcommerce.common.notification.service.type.EmailNotification notification, EmailTemplate emailTemplate) throws org.springframework.mail.MailException, org.broadleafcommerce.common.exception.ServiceException
      Throws:
      org.springframework.mail.MailException
      org.broadleafcommerce.common.exception.ServiceException
    • getEmailInfo

      protected org.broadleafcommerce.common.email.service.info.EmailInfo getEmailInfo(org.broadleafcommerce.common.notification.service.type.NotificationEventType type)
      This helper method makes use of any defined EmailInfo with the given type as a foundation for the EmailInfo.
      Parameters:
      type - the notification type
      Returns:
      the new EmailInfo
    • getToAddress

      protected String getToAddress(org.broadleafcommerce.common.notification.service.type.EmailNotification notification, EmailTemplate emailTemplate)
    • getFromAddress

      protected String getFromAddress(org.broadleafcommerce.common.notification.service.type.EmailNotification notification, EmailTemplate emailTemplate, org.broadleafcommerce.common.email.service.info.EmailInfo emailInfo)
    • getSubject

      protected String getSubject(org.broadleafcommerce.common.notification.service.type.EmailNotification notification, EmailTemplate emailTemplate, org.broadleafcommerce.common.email.service.info.EmailInfo emailInfo)
    • getEmailTemplateProperty

      protected String getEmailTemplateProperty(org.broadleafcommerce.common.notification.service.type.NotificationEventType notificationEventType, String propertyName)