Class CheckContentConsistencySchedulable
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
org.ametys.cms.content.consistency.CheckContentConsistencySchedulable
org.ametys.web.content.consistency.CheckContentConsistencySchedulable
- All Implemented Interfaces:
Schedulable
,LogEnabled
,PluginAware
,Initializable
,Component
,Configurable
,Contextualizable
,Serviceable
Content consistency engine: generate consistency information for all contents.
Sends a report e-mail if there are inconsistencies.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
AbstractStaticSchedulable.SchedulableParameterParser
-
Field Summary
Modifier and TypeFieldDescriptionprotected JSONUtils
The utils for JSONprotected SiteManager
The site manager.static final String
Right to receive the consistency report of content without sitestatic final String
The key for the name of the site containing the contents to checkFields inherited from class org.ametys.cms.content.consistency.CheckContentConsistencySchedulable
__CHECK_CONTENT_CONSISTENCY_NOTIFICATION, __CHECK_CONTENT_CONSISTENCY_REPORT, __MAIL_RIGHT, _ametysResolver, _baseUrl, _contentConsistencyManager, _i18nUtils, _mailFrom, _reportDirectory, _rightManager, _sourceResolver, CHECK_CONTENTS, REMOVE_OUTDATED_RESULT
Fields inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
_acceptConcurrentExecution, _context, _description, _iconGlyph, _iconLarge, _iconMedium, _iconSmall, _id, _label, _parameters, _pluginName, _private, _schedulableParameterTypeExtensionPoint, _smanager, _startTime, _userManager, PROGRESSION_TRACKER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
Retrieves the current site nameprotected I18nizableText
Retrieves the mail's subjectprotected String
Get the report URI_getSiteName
(String siteAsMap) Retrieves the names of the sites from given parametersvoid
execute
(JobExecutionContext context, ContainerProgressionTracker progressionTracker) The action to perform when a trigger is fired.void
service
(ServiceManager manager) Methods inherited from class org.ametys.cms.content.consistency.CheckContentConsistencySchedulable
_getMailBody, _sendEmail, _sendMails, getUsersToNotify, initialize
Methods inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
acceptConcurrentExecution, configure, contextualize, getDescription, getIconGlyph, getIconLarge, getIconMedium, getIconSmall, getId, getLabel, getParameters, getProgressionTracker, isPrivate, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
SITE_NAME_KEY
The key for the name of the site containing the contents to check- See Also:
-
RECEIVE_REPORT_NO_SITE_RIGHT
Right to receive the consistency report of content without site- See Also:
-
_jsonUtils
The utils for JSON -
_siteManager
The site manager.
-
-
Constructor Details
-
CheckContentConsistencySchedulable
public CheckContentConsistencySchedulable()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classCheckContentConsistencySchedulable
- Throws:
ServiceException
-
execute
public void execute(JobExecutionContext context, ContainerProgressionTracker progressionTracker) throws Exception Description copied from interface:Schedulable
The action to perform when a trigger is fired. Do not manually call this method.- Specified by:
execute
in interfaceSchedulable
- Overrides:
execute
in classCheckContentConsistencySchedulable
- Parameters:
context
- the contextprogressionTracker
- The progression tracker- Throws:
Exception
- if an error occurred
-
_getMailSubject
Description copied from class:CheckContentConsistencySchedulable
Retrieves the mail's subject- Overrides:
_getMailSubject
in classCheckContentConsistencySchedulable
- Parameters:
report
- the consistency report- Returns:
- the mail's subject
-
_getReportUri
Description copied from class:CheckContentConsistencySchedulable
Get the report URI- Overrides:
_getReportUri
in classCheckContentConsistencySchedulable
- Returns:
- the report uri
-
_getSiteName
Retrieves the names of the sites from given parameters- Parameters:
siteAsMap
- JSONMap
containing the sites names- Returns:
- the names of the sites
-
_getCurrentSiteName
Retrieves the current site name- Returns:
- the current site name
-