Interface EmailTemplateService

All Known Implementing Classes:
EmailTemplateServiceImpl

public interface EmailTemplateService
Author:
Nick Crum ncrum
  • Method Details

    • findActiveTemplatesByType

      List<EmailTemplate> findActiveTemplatesByType(org.broadleafcommerce.common.notification.service.type.NotificationEventType notificationEventType)
      Finds a List of active Notification for the given NotificationType.
      Parameters:
      notificationEventType - the type
      Returns:
      a List of active Notification
    • findEmailTemplateById

      EmailTemplate findEmailTemplateById(Long id)
    • findEmailTemplateByPath

      EmailTemplate findEmailTemplateByPath(String path)
      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.
      Parameters:
      path - the template path
      Returns:
      the Notification if it was a valid template path, or else null
    • getEmailResourcePath

      String getEmailResourcePath(EmailTemplate emailTemplate)
      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.
      Parameters:
      emailTemplate - the Notification
      Returns:
      the template path string
    • getEmailTemplateClasspathPath

      String getEmailTemplateClasspathPath(String prefix, EmailTemplate emailTemplate)
      This method is responsible for generating a classpath template path for a given Notification.
      Parameters:
      prefix -
      emailTemplate -
      Returns: