Interface EmailTemplateService
- All Known Implementing Classes:
EmailTemplateServiceImpl
public interface EmailTemplateService
- Author:
- Nick Crum ncrum
-
Method Summary
Modifier and TypeMethodDescriptionfindActiveTemplatesByType(org.broadleafcommerce.common.notification.service.type.NotificationEventType notificationEventType) Finds a List of activeNotificationfor the givenNotificationType.Responsible for finding aNotificationfor the given resource path.getEmailResourcePath(EmailTemplate emailTemplate) This method is responsible for generating a template path for a given Notification.getEmailTemplateClasspathPath(String prefix, EmailTemplate emailTemplate) This method is responsible for generating a classpath template path for a given Notification.
-
Method Details
-
findActiveTemplatesByType
List<EmailTemplate> findActiveTemplatesByType(org.broadleafcommerce.common.notification.service.type.NotificationEventType notificationEventType) Finds a List of activeNotificationfor the givenNotificationType.- Parameters:
notificationEventType- the type- Returns:
- a List of active
Notification
-
findEmailTemplateById
-
findEmailTemplateByPath
Responsible for finding aNotificationfor 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
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
This method is responsible for generating a classpath template path for a given Notification.- Parameters:
prefix-emailTemplate-- Returns:
-