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
FieldsModifier and TypeFieldDescriptionprotected JSONUtilsThe utils for JSONprotected SiteManagerThe site manager.static final StringThe key for the name of the site containing the contents to checkFields inherited from class org.ametys.cms.content.consistency.CheckContentConsistencySchedulable
_ametysResolver, _baseUrl, _contentConsistencyManager, _i18nUtils, _MAIL_RIGHT, _mailFrom, _reportDirectory, _rightManager, _sourceResolverFields inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
_acceptConcurrentExecution, _context, _description, _iconGlyph, _iconLarge, _iconMedium, _iconSmall, _id, _label, _parameters, _pluginName, _private, _schedulableParameterTypeExtensionPoint, _smanager, _userManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringRetrieves the current site name_getEmailParams(List<String> errorResults, List<String> unchecked) Get the report e-mail parameters.protected I18nizableText_getMailSubject(Map<String, String> parameters) Retrieves the mail's subject_getSiteName(String siteAsMap) Retrieves the names of the sites from given parametersvoidexecute(JobExecutionContext context) The action to perform when a trigger is fired.voidservice(ServiceManager manager) Methods inherited from class org.ametys.cms.content.consistency.CheckContentConsistencySchedulable
_getMailBody, _sendEmail, _sendMails, initializeMethods inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
acceptConcurrentExecution, configure, contextualize, getDescription, getIconGlyph, getIconLarge, getIconMedium, getIconSmall, getId, getLabel, getParameters, isPrivate, setPluginInfoMethods 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:
-
_jsonUtils
The utils for JSON -
_siteManager
The site manager.
-
-
Constructor Details
-
CheckContentConsistencySchedulable
public CheckContentConsistencySchedulable()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classCheckContentConsistencySchedulable- Throws:
ServiceException
-
execute
Description copied from interface:SchedulableThe action to perform when a trigger is fired. Do not manually call this method.- Specified by:
executein interfaceSchedulable- Overrides:
executein classCheckContentConsistencySchedulable- Parameters:
context- the context- Throws:
Exception- if an error occured
-
_getMailSubject
Description copied from class:CheckContentConsistencySchedulableRetrieves the mail's subject- Overrides:
_getMailSubjectin classCheckContentConsistencySchedulable- Parameters:
parameters- the mail parameters.- Returns:
- the mail's subject
-
_getEmailParams
Description copied from class:CheckContentConsistencySchedulableGet the report e-mail parameters.- Overrides:
_getEmailParamsin classCheckContentConsistencySchedulable- Parameters:
errorResults- the list of error resultsunchecked- the list of unchecked content id- Returns:
- the e-mail parameters.
-
_getSiteName
Retrieves the names of the sites from given parameters- Parameters:
siteAsMap- JSONMapcontaining the sites names- Returns:
- the names of the sites
-
_getCurrentSiteName
Retrieves the current site name- Returns:
- the current site name
-