@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)
EmailTemplateService
Notification
for the given NotificationType
.findActiveTemplatesByType
in interface EmailTemplateService
notificationEventType
- the typeNotification
public EmailTemplate findEmailTemplateById(Long id)
findEmailTemplateById
in interface EmailTemplateService
public EmailTemplate findEmailTemplateByPath(String path)
EmailTemplateService
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.findEmailTemplateByPath
in interface EmailTemplateService
path
- the template pathpublic String getEmailResourcePath(EmailTemplate emailTemplate)
EmailTemplateService
getEmailResourcePath
in interface EmailTemplateService
emailTemplate
- the Notificationpublic String getEmailTemplateClasspathPath(String prefix, EmailTemplate emailTemplate)
EmailTemplateService
getEmailTemplateClasspathPath
in interface EmailTemplateService
protected String parseTemplatePathName(EmailTemplate emailTemplate)
Copyright © 2020. All rights reserved.