Class EmailTemplateServiceImpl

java.lang.Object
com.broadleafcommerce.advancedcms.notification.service.EmailTemplateServiceImpl
All Implemented Interfaces:
EmailTemplateService

@Service("blEmailTemplateService") public class EmailTemplateServiceImpl extends Object implements EmailTemplateService
Author:
Nick Crum ncrum
  • Field Details

    • EMAIL_TEMPLATE_PATH_PREFIX

      protected static final String EMAIL_TEMPLATE_PATH_PREFIX
      See Also:
    • emailTemplateDao

      @Autowired @Qualifier("blEmailTemplateDao") protected EmailTemplateDao emailTemplateDao
  • Constructor Details

    • EmailTemplateServiceImpl

      public EmailTemplateServiceImpl()
  • Method Details

    • findActiveTemplatesByType

      @Transactional("blTransactionManager") public List<EmailTemplate> findActiveTemplatesByType(org.broadleafcommerce.common.notification.service.type.NotificationEventType notificationEventType)
      Description copied from interface: EmailTemplateService
      Finds a List of active Notification for the given NotificationType.
      Specified by:
      findActiveTemplatesByType in interface EmailTemplateService
      Parameters:
      notificationEventType - the type
      Returns:
      a List of active Notification
    • findEmailTemplateById

      public EmailTemplate findEmailTemplateById(Long id)
      Specified by:
      findEmailTemplateById in interface EmailTemplateService
    • findEmailTemplateByPath

      public EmailTemplate findEmailTemplateByPath(String path)
      Description copied from interface: EmailTemplateService
      Responsible for finding a Notification for the given resource path. This path is not stored in the database, but instead is generated at runtime. This method is responsible for attempting to parse out this template path and retrieve the correct Notification.
      Specified by:
      findEmailTemplateByPath in interface EmailTemplateService
      Parameters:
      path - the template path
      Returns:
      the Notification if it was a valid template path, or else null
    • getEmailResourcePath

      public String getEmailResourcePath(EmailTemplate emailTemplate)
      Description copied from interface: EmailTemplateService
      This method is responsible for generating a template path for a given Notification. Typically this uses a constant prefix, the notification type, and the entity's ID to generate the path.
      Specified by:
      getEmailResourcePath in interface EmailTemplateService
      Parameters:
      emailTemplate - the Notification
      Returns:
      the template path string
    • getEmailTemplateClasspathPath

      public String getEmailTemplateClasspathPath(String prefix, EmailTemplate emailTemplate)
      Description copied from interface: EmailTemplateService
      This method is responsible for generating a classpath template path for a given Notification.
      Specified by:
      getEmailTemplateClasspathPath in interface EmailTemplateService
      Returns:
    • parseTemplatePathName

      protected String parseTemplatePathName(EmailTemplate emailTemplate)