public class AlertEngine extends AlertEngine
AlertEngine.BinaryExpression
Modifier and Type | Field and Description |
---|---|
protected boolean |
_pagePublicationEnabled
True if the alert of page publication ending is enabled
|
protected String |
_pagePublicationEndBody
The "page nearing end of publication" e-mail body i18n key.
|
protected Set<String> |
_pagePublicationEndRights
The "page nearing end of publication" e-mail will be sent to users that have this right.
|
protected String |
_pagePublicationEndSubject
The "page nearing end of publication" e-mail subject i18n key.
|
_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 and Description |
---|
AlertEngine()
Default constructor
|
AlertEngine(List<String> contentIds,
String message)
Constructor used to send instant alerts
|
Modifier and Type | Method and Description |
---|---|
protected List<String> |
_getAdditionalParams(Content content)
Get the additional i18n parameters for content
|
protected String |
_getContentUrl(Content content)
Get the URL to the given content tool.
|
protected Page |
_getPage(Content content,
Site site)
Get the page referenced by this content
|
protected List<String> |
_getPagePublicationEndParams(Page page)
Get the "page nearing end of publication" mail parameters.
|
protected String |
_getPageUrl(Page page)
Get the URL of the back-office, opening on the page tool.
|
protected Site |
_getSite(Content content)
Get the site name
|
protected void |
_sendAlerts()
Send all the alerts.
|
protected void |
_sendPagePublicationEndAlerts()
Send the "page nearing end of publication" alerts.
|
protected void |
_sendPagePublicationEndEmail(Page page)
Send the "page publication end" alert e-mail.
|
protected void |
_setRequestAttributes(Content content)
Set the necessary request attributes
|
protected void |
_setRequestAttributes(Page page)
Set the necessary request attributes
|
void |
configure(Configuration configuration)
Configure the engine (called by the scheduler).
|
protected String |
getI18nKeyBody(String bodyI18nKey,
Content content)
Get the transform i18n body key for specific content
|
_checkInitialization, _dispose, _getAwaitingValidationParams, _getInstantAlertParams, _getReminderParams, _getRightsFromConf, _getScheduledArchivingReminderParams, _getUnmodifiedContentParams, _removeTimeParts, _sendAwaitingValidationAlerts, _sendAwaitingValidationEmail, _sendInstantAlertEmail, _sendInstantAlerts, _sendMails, _sendReminderEmail, _sendReminders, _sendScheduledArchivingReminderEmail, _sendScheduledArchivingReminders, _sendUnmodifiedAlerts, _sendUnmodifiedContentEmail, initialize, run
protected boolean _pagePublicationEnabled
protected Set<String> _pagePublicationEndRights
protected String _pagePublicationEndSubject
protected String _pagePublicationEndBody
public AlertEngine()
public AlertEngine(List<String> contentIds, String message)
contentIds
- The content's idmessage
- the messagepublic void configure(Configuration configuration) throws ConfigurationException
AlertEngine
configure
in class AlertEngine
configuration
- the component configuration.ConfigurationException
- if the configuration is not validprotected void _sendAlerts() throws AmetysRepositoryException
AlertEngine
_sendAlerts
in class AlertEngine
AmetysRepositoryException
- if an error occurs.protected void _setRequestAttributes(Content content)
AlertEngine
_setRequestAttributes
in class AlertEngine
content
- The contentprotected void _setRequestAttributes(Page page)
page
- The concerned pageprotected void _sendPagePublicationEndAlerts() throws AmetysRepositoryException
AmetysRepositoryException
- if an error occurs.protected void _sendPagePublicationEndEmail(Page page) throws AmetysRepositoryException
page
- the page nearing publication end.AmetysRepositoryException
- if an error occurs.protected String getI18nKeyBody(String bodyI18nKey, Content content)
AlertEngine
getI18nKeyBody
in class AlertEngine
bodyI18nKey
- the original body keycontent
- the contentprotected List<String> _getAdditionalParams(Content content)
AlertEngine
_getAdditionalParams
in class AlertEngine
content
- The contentprotected List<String> _getPagePublicationEndParams(Page page)
page
- the page.protected String _getContentUrl(Content content)
AlertEngine
_getContentUrl
in class AlertEngine
content
- the content.protected String _getPageUrl(Page page)
page
- the page to link to.protected Site _getSite(Content content)
content
- The content