@Service(value="blEmailTemplateService") public class EmailTemplateServiceImpl extends Object implements EmailTemplateService
| Modifier and Type | Field and Description |
|---|---|
protected static String |
EMAIL_TEMPLATE_PATH_PREFIX |
protected EmailTemplateDao |
emailTemplateDao |
| Constructor and Description |
|---|
EmailTemplateServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
List<EmailTemplate> |
findActiveTemplatesByType(org.broadleafcommerce.common.notification.service.type.NotificationEventType notificationEventType)
Finds a List of active
Notification for the given NotificationType. |
EmailTemplate |
findEmailTemplateById(Long id) |
EmailTemplate |
findEmailTemplateByPath(String path)
Responsible for finding a
Notification for the given resource path. |
String |
getEmailResourcePath(EmailTemplate emailTemplate)
This method is responsible for generating a template path for a given Notification.
|
String |
getEmailTemplateClasspathPath(String prefix,
EmailTemplate emailTemplate)
This method is responsible for generating a classpath template path for a given Notification.
|
protected String |
parseTemplatePathName(EmailTemplate emailTemplate) |
protected static final String EMAIL_TEMPLATE_PATH_PREFIX
@Autowired @Qualifier(value="blEmailTemplateDao") protected EmailTemplateDao emailTemplateDao
@Transactional(value="blTransactionManager") public List<EmailTemplate> findActiveTemplatesByType(org.broadleafcommerce.common.notification.service.type.NotificationEventType notificationEventType)
EmailTemplateServiceNotification for the given NotificationType.findActiveTemplatesByType in interface EmailTemplateServicenotificationEventType - the typeNotificationpublic EmailTemplate findEmailTemplateById(Long id)
findEmailTemplateById in interface EmailTemplateServicepublic EmailTemplate findEmailTemplateByPath(String path)
EmailTemplateServiceNotification 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.findEmailTemplateByPath in interface EmailTemplateServicepath - the template pathpublic String getEmailResourcePath(EmailTemplate emailTemplate)
EmailTemplateServicegetEmailResourcePath in interface EmailTemplateServiceemailTemplate - the Notificationpublic String getEmailTemplateClasspathPath(String prefix, EmailTemplate emailTemplate)
EmailTemplateServicegetEmailTemplateClasspathPath in interface EmailTemplateServiceprotected String parseTemplatePathName(EmailTemplate emailTemplate)
Copyright © 2020. All rights reserved.