Package org.ametys.plugins.odfweb.alerts
Class AlertEngine
- java.lang.Object
-
- org.ametys.cms.alerts.AlertEngine
-
- org.ametys.web.alerts.AlertEngine
-
- org.ametys.plugins.odfweb.alerts.AlertEngine
-
- All Implemented Interfaces:
Runnable
public class AlertEngine extends AlertEngine
Alerts engine: sends alerts mail. This is the web version of the engine: it sets the currently processed content's site name in the request object, and sends additional site and page information in the alerts e-mails.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ametys.cms.alerts.AlertEngine
AlertEngine.BinaryExpression
-
-
Field Summary
Fields Modifier and Type Field Description protected OdfPageResolver
_odfPageResolver
The ODF page resolverprotected SiteManager
_siteManager
The site manager-
Fields inherited from class org.ametys.web.alerts.AlertEngine
_pagePublicationEnabled, _pagePublicationEndBody, _pagePublicationEndRights, _pagePublicationEndSubject
-
Fields inherited from class org.ametys.cms.alerts.AlertEngine
__VALIDATION_ALERT_EXPR_CONTEXT, _ametysResolver, _awaitingValidationBody, _awaitingValidationRights, _awaitingValidationSubject, _baseUrl, _context, _environmentContext, _i18nUtils, _initialized, _instantAlertBody, _instantAlertRights, _instantAlertSubject, _instantMode, _LOGGER, _mailFrom, _manager, _reminderBody, _reminderRights, _reminderSubject, _rightManager, _scheduledArchivingReminderBody, _scheduledArchivingReminderRights, _scheduledArchivingReminderSubject, _unmodifiedContentBody, _unmodifiedContentRights, _unmodifiedContentStepIds, _unmodifiedContentSubject, _userManager
-
-
Constructor Summary
Constructors Constructor Description AlertEngine()
Default constructorAlertEngine(List<String> contentIds, String message)
Constructor used to send instant alerts
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Page
_getPage(Content content, Site site)
Get the page referenced by this contentprotected Site
_getSite(Content content)
Get the site namevoid
initialize(ServiceManager manager, Context context)
Initialize the alert engine.-
Methods inherited from class org.ametys.web.alerts.AlertEngine
_getAdditionalParams, _getContentUrl, _getPagePublicationEndParams, _getPageUrl, _sendAlerts, _sendPagePublicationEndAlerts, _sendPagePublicationEndEmail, _setRequestAttributes, _setRequestAttributes, configure, getI18nKeyBody
-
Methods inherited from class org.ametys.cms.alerts.AlertEngine
_checkInitialization, _dispose, _getAwaitingValidationParams, _getInstantAlertParams, _getReminderParams, _getRightsFromConf, _getScheduledArchivingReminderParams, _getUnmodifiedContentParams, _removeTimeParts, _sendAwaitingValidationAlerts, _sendAwaitingValidationEmail, _sendInstantAlertEmail, _sendInstantAlerts, _sendMails, _sendReminderEmail, _sendReminders, _sendScheduledArchivingReminderEmail, _sendScheduledArchivingReminders, _sendUnmodifiedAlerts, _sendUnmodifiedContentEmail, run
-
-
-
-
Field Detail
-
_odfPageResolver
protected OdfPageResolver _odfPageResolver
The ODF page resolver
-
_siteManager
protected SiteManager _siteManager
The site manager
-
-
Constructor Detail
-
AlertEngine
public AlertEngine()
Default constructor
-
AlertEngine
public AlertEngine(List<String> contentIds, String message)
Constructor used to send instant alerts- Parameters:
contentIds
- The content's idmessage
- the message
-
-
Method Detail
-
initialize
public void initialize(ServiceManager manager, Context context) throws ContextException, ServiceException
Description copied from class:AlertEngine
Initialize the alert engine.- Overrides:
initialize
in classAlertEngine
- Parameters:
manager
- the avalon service manager.context
- the avalon context.- Throws:
ContextException
- if the CONTEXT_ENVIRONMENT_CONTEXT cannot be foundServiceException
- if some components cannot be resolved
-
_getSite
protected Site _getSite(Content content)
Description copied from class:AlertEngine
Get the site name- Overrides:
_getSite
in classAlertEngine
- Parameters:
content
- The content- Returns:
- the site name
-
_getPage
protected Page _getPage(Content content, Site site)
Description copied from class:AlertEngine
Get the page referenced by this content- Overrides:
_getPage
in classAlertEngine
- Parameters:
content
- The contentsite
- the site- Returns:
- the page or null.
-
-