public class EmailTemplateNotificationServiceImpl extends Object implements org.broadleafcommerce.common.notification.service.NotificationService
Modifier and Type | Field and Description |
---|---|
protected ContentTargeterService |
contentTargeterService |
protected static String |
EMAIL_TEMPLATE_PROPERTY_PREFIX |
protected List<org.broadleafcommerce.common.email.service.info.EmailInfo> |
emailInfos |
protected EmailTemplateService |
emailTemplateService |
protected org.springframework.core.env.Environment |
environment |
protected org.broadleafcommerce.common.expression.BroadleafExpressionParser |
expressionParser |
protected org.apache.commons.logging.Log |
LOG |
protected org.broadleafcommerce.common.email.service.message.MessageCreator |
messageCreator |
Constructor and Description |
---|
EmailTemplateNotificationServiceImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
canHandle(Class<? extends org.broadleafcommerce.common.notification.service.type.Notification> clazz) |
protected org.broadleafcommerce.common.email.service.info.EmailInfo |
getEmailInfo(org.broadleafcommerce.common.notification.service.type.NotificationEventType type)
This helper method makes use of any defined EmailInfo with the given type as a foundation for the EmailInfo.
|
protected String |
getEmailTemplateProperty(org.broadleafcommerce.common.notification.service.type.NotificationEventType notificationEventType,
String propertyName) |
protected String |
getFromAddress(org.broadleafcommerce.common.notification.service.type.EmailNotification notification,
EmailTemplate emailTemplate,
org.broadleafcommerce.common.email.service.info.EmailInfo emailInfo) |
protected String |
getSubject(org.broadleafcommerce.common.notification.service.type.EmailNotification notification,
EmailTemplate emailTemplate,
org.broadleafcommerce.common.email.service.info.EmailInfo emailInfo) |
protected String |
getToAddress(org.broadleafcommerce.common.notification.service.type.EmailNotification notification,
EmailTemplate emailTemplate) |
protected void |
sendEmailNotification(org.broadleafcommerce.common.notification.service.type.EmailNotification notification,
EmailTemplate emailTemplate) |
void |
sendNotification(org.broadleafcommerce.common.notification.service.type.Notification notification) |
protected static final String EMAIL_TEMPLATE_PROPERTY_PREFIX
protected final org.apache.commons.logging.Log LOG
@Autowired protected org.springframework.core.env.Environment environment
@Autowired(required=false) protected List<org.broadleafcommerce.common.email.service.info.EmailInfo> emailInfos
@Autowired @Qualifier(value="blEmailTemplateService") protected EmailTemplateService emailTemplateService
@Autowired @Qualifier(value="blContentTargeterService") protected ContentTargeterService contentTargeterService
@Autowired @Qualifier(value="blMessageCreator") @Lazy protected org.broadleafcommerce.common.email.service.message.MessageCreator messageCreator
@Autowired @Qualifier(value="blExpressionParser") protected org.broadleafcommerce.common.expression.BroadleafExpressionParser expressionParser
public EmailTemplateNotificationServiceImpl()
public boolean canHandle(Class<? extends org.broadleafcommerce.common.notification.service.type.Notification> clazz)
canHandle
in interface org.broadleafcommerce.common.notification.service.NotificationService
public void sendNotification(org.broadleafcommerce.common.notification.service.type.Notification notification)
sendNotification
in interface org.broadleafcommerce.common.notification.service.NotificationService
protected void sendEmailNotification(org.broadleafcommerce.common.notification.service.type.EmailNotification notification, EmailTemplate emailTemplate) throws org.springframework.mail.MailException, org.broadleafcommerce.common.exception.ServiceException
org.springframework.mail.MailException
org.broadleafcommerce.common.exception.ServiceException
protected org.broadleafcommerce.common.email.service.info.EmailInfo getEmailInfo(org.broadleafcommerce.common.notification.service.type.NotificationEventType type)
type
- the notification typeprotected String getToAddress(org.broadleafcommerce.common.notification.service.type.EmailNotification notification, EmailTemplate emailTemplate)
protected String getFromAddress(org.broadleafcommerce.common.notification.service.type.EmailNotification notification, EmailTemplate emailTemplate, org.broadleafcommerce.common.email.service.info.EmailInfo emailInfo)
protected String getSubject(org.broadleafcommerce.common.notification.service.type.EmailNotification notification, EmailTemplate emailTemplate, org.broadleafcommerce.common.email.service.info.EmailInfo emailInfo)
Copyright © 2020. All rights reserved.