Package org.ametys.web.workflow.archive
Class ArchiveContentsSchedulable
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
org.ametys.cms.workflow.archive.ArchiveContentsSchedulable
org.ametys.web.workflow.archive.ArchiveContentsSchedulable
- All Implemented Interfaces:
Schedulable,LogEnabled,PluginAware,Component,Configurable,Contextualizable,Serviceable
Runnable engine that archive the contents that have an scheduled archiving
date set before the current date.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
AbstractStaticSchedulable.SchedulableParameterParser -
Field Summary
Fields inherited from class org.ametys.cms.workflow.archive.ArchiveContentsSchedulable
_ametysResolver, _archiveRights, _baseUrl, _environmentContext, _i18nUtils, _logger, _mailFrom, _manager, _rightManager, _sourceResolver, _sysadminMail, _userErrorMailBody, _userErrorMailSubject, _userMailBody, _userMailSubjectFields 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 String_getContentsListAsString(List<Content> contents) Get the contents list as Stringprotected String_getRequestURI(Content content) Get the request URI to set in mailprotected StringgetArchiveActionUri(String contentId) Get the pipeline uri for the archive actiongetBodyParamsForContributors(Content content, boolean archived) Get email body parametersprotected voidsetRequestAttributes(Request request, Content content) Set the necessary request attributesMethods inherited from class org.ametys.cms.workflow.archive.ArchiveContentsSchedulable
_getAuthorizedContributors, _sendMailsToUsers, configure, contextualize, execute, getAdminEmailParams, sendErrorMailToContributors, sendMailToAdministrator, sendMailToContributors, serviceMethods inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
acceptConcurrentExecution, getDescription, getIconGlyph, getIconLarge, getIconMedium, getIconSmall, getId, getLabel, getParameters, isPrivate, setPluginInfoMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
ArchiveContentsSchedulable
public ArchiveContentsSchedulable()
-
-
Method Details
-
getArchiveActionUri
Description copied from class:ArchiveContentsSchedulableGet the pipeline uri for the archive action- Overrides:
getArchiveActionUriin classArchiveContentsSchedulable- Parameters:
contentId- the current contend id- Returns:
- a pipeline uri
-
setRequestAttributes
Description copied from class:ArchiveContentsSchedulableSet the necessary request attributes- Overrides:
setRequestAttributesin classArchiveContentsSchedulable- Parameters:
request- The requestcontent- The content
-
getBodyParamsForContributors
Description copied from class:ArchiveContentsSchedulableGet email body parameters- Overrides:
getBodyParamsForContributorsin classArchiveContentsSchedulable- Parameters:
content- the archived contentarchived- true if the content has archived- Returns:
- The mail parameters
-
_getRequestURI
Description copied from class:ArchiveContentsSchedulableGet the request URI to set in mail- Overrides:
_getRequestURIin classArchiveContentsSchedulable- Parameters:
content- The content. Can be null- Returns:
- the request URI
-
_getContentsListAsString
Description copied from class:ArchiveContentsSchedulableGet the contents list as String- Overrides:
_getContentsListAsStringin classArchiveContentsSchedulable- Parameters:
contents- The contents- Returns:
- the list of contents as String
-