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
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
Modifier and TypeFieldDescriptionprotected OdfPageResolver
The ODF page resolverprotected SiteManager
The site managerFields 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
ConstructorDescriptionDefault constructorAlertEngine
(List<String> contentIds, String message) Constructor used to send instant alerts -
Method Summary
Modifier and TypeMethodDescriptionprotected Page
Get the page referenced by this contentprotected Site
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 Details
-
_odfPageResolver
The ODF page resolver -
_siteManager
The site manager
-
-
Constructor Details
-
AlertEngine
public AlertEngine()Default constructor -
AlertEngine
Constructor used to send instant alerts- Parameters:
contentIds
- The content's idmessage
- the message
-
-
Method Details
-
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
Description copied from class:AlertEngine
Get the site name- Overrides:
_getSite
in classAlertEngine
- Parameters:
content
- The content- Returns:
- the site name
-
_getPage
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.
-