public class SendMailToVisitorCommentListener extends AbstractLogEnabled implements Observer, Serviceable
Modifier and Type | Field and Description |
---|---|
protected ContentHelper |
_contentHelper
The content helper
|
protected I18nUtils |
_i18nUtils
The i18n utils of runtime
|
protected SiteConfigurationExtensionPoint |
_siteConfiguration
The site configuration.
|
protected SiteManager |
_siteManager
The site manager
|
MAX_PRIORITY, MIN_PRIORITY
Constructor and Description |
---|
SendMailToVisitorCommentListener() |
Modifier and Type | Method and Description |
---|---|
private void |
_sendCommentDeletedNotificationMail(Content content,
String commentId,
boolean commentIsValidated,
String commentAuthorName,
String commentAuthorEmail,
String commentContent) |
private void |
_sendCommentModifiedNotificationMail(Content content,
Comment comment,
String commentAuthorName,
String commentAuthorEmail,
boolean commentIsEmailHidden,
String commentAuthorUrl,
String commentContent) |
private void |
_sendCommentUnvalidatedNotificationMail(Content content,
Comment comment) |
private void |
_sendCommentValidatedNotificationMail(Content content,
Comment comment) |
int |
getPriority(Event event)
Retrieves the priority to observe this event.
This can be used to process a supported event before others observers. |
void |
observe(Event event,
Map<String,Object> transientVars)
Observes an event.
|
void |
service(ServiceManager manager) |
boolean |
supports(Event event)
Checks if the event is supported.
|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected I18nUtils _i18nUtils
protected SiteConfigurationExtensionPoint _siteConfiguration
protected SiteManager _siteManager
protected ContentHelper _contentHelper
public SendMailToVisitorCommentListener()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public int getPriority(Event event)
Observer
getPriority
in interface Observer
event
- the event.public boolean supports(Event event)
Observer
public void observe(Event event, Map<String,Object> transientVars) throws Exception
Observer
observe
in interface Observer
event
- the event.transientVars
- transientVars passed from one Observer to another when processing a single Event.
This may allow optimizations between observers.Exception
- if an error occurs.
All exceptions will be logged but not propagated, as the observation mechanism should never fail.private void _sendCommentDeletedNotificationMail(Content content, String commentId, boolean commentIsValidated, String commentAuthorName, String commentAuthorEmail, String commentContent)
private void _sendCommentValidatedNotificationMail(Content content, Comment comment)
private void _sendCommentUnvalidatedNotificationMail(Content content, Comment comment)