public class SendMailToContributorCommentListener extends AbstractLogEnabled implements Observer, Serviceable, Contextualizable
Modifier and Type | Field and Description |
---|---|
protected ContentHelper |
_contentHelper
The content helper
|
protected Context |
_context
The avalon context
|
protected I18nUtils |
_i18nUtils
The i18n utils of runtime
|
protected RightManager |
_rightManager
The ametys rights manager
|
protected SiteConfigurationExtensionPoint |
_siteConfiguration
The site configuration.
|
protected SiteManager |
_siteManager
The site manager
|
protected UserManager |
_userManager
The users manager.
|
MAX_PRIORITY, MIN_PRIORITY
Constructor and Description |
---|
SendMailToContributorCommentListener() |
Modifier and Type | Method and Description |
---|---|
protected String |
_getRequestURI(Request request)
Get the request URI.
|
private void |
_sendCommentAddedNotificationMail(Content content,
Comment comment) |
private void |
_sendCommentValidatedNotificationMail(Content content,
Comment comment) |
private void |
_setRequestAttributes(Content content) |
void |
contextualize(Context context) |
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 RightManager _rightManager
protected UserManager _userManager
protected SiteConfigurationExtensionPoint _siteConfiguration
protected SiteManager _siteManager
protected ContentHelper _contentHelper
public SendMailToContributorCommentListener()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
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 _setRequestAttributes(Content content)
private void _sendCommentAddedNotificationMail(Content content, Comment comment)
private void _sendCommentValidatedNotificationMail(Content content, Comment comment)
protected String _getRequestURI(Request request)
request
- the request object.