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 Summary
Fields -
Constructor Summary
Constructors -
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.protected StringparseTemplatePathName(EmailTemplate emailTemplate)
-
Field Details
-
EMAIL_TEMPLATE_PATH_PREFIX
- See Also:
-
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:EmailTemplateServiceFinds a List of activeNotificationfor the givenNotificationType.- Specified by:
findActiveTemplatesByTypein interfaceEmailTemplateService- Parameters:
notificationEventType- the type- Returns:
- a List of active
Notification
-
findEmailTemplateById
- Specified by:
findEmailTemplateByIdin interfaceEmailTemplateService
-
findEmailTemplateByPath
Description copied from interface:EmailTemplateServiceResponsible 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.- Specified by:
findEmailTemplateByPathin interfaceEmailTemplateService- Parameters:
path- the template path- Returns:
- the Notification if it was a valid template path, or else null
-
getEmailResourcePath
Description copied from interface:EmailTemplateServiceThis 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:
getEmailResourcePathin interfaceEmailTemplateService- Parameters:
emailTemplate- the Notification- Returns:
- the template path string
-
getEmailTemplateClasspathPath
Description copied from interface:EmailTemplateServiceThis method is responsible for generating a classpath template path for a given Notification.- Specified by:
getEmailTemplateClasspathPathin interfaceEmailTemplateService- Returns:
-
parseTemplatePathName
-