Package org.ametys.web.workflow.archive
Class ArchiveContentsEngine
java.lang.Object
org.ametys.cms.workflow.archive.ArchiveContentsEngine
org.ametys.web.workflow.archive.ArchiveContentsEngine
- All Implemented Interfaces:
Runnable
Runnable engine that archive the contents that have an scheduled archiving
date set before the current date.
-
Field Summary
Fields inherited from class org.ametys.cms.workflow.archive.ArchiveContentsEngine
_ametysResolver, _archiveRights, _baseUrl, _context, _environmentContext, _i18nUtils, _initialized, _logger, _mailFrom, _manager, _rightManager, _sourceResolver, _sysadminMail, _userErrorMailBody, _userErrorMailSubject, _userMailBody, _userMailSubject, _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 String
getArchiveActionUri
(String contentId) Get the pipeline uri for the archive actiongetBodyParamsForContributors
(Content content, boolean archived) Get email body parametersprotected void
setRequestAttributes
(Request request, Content content) Set the necessary request attributesMethods inherited from class org.ametys.cms.workflow.archive.ArchiveContentsEngine
_getAuthorizedContributors, _sendMailsToUsers, archiveContents, checkInitialization, configure, dispose, getAdminEmailParams, initialize, run, sendErrorMailToContributors, sendMailToAdministrator, sendMailToContributors
-
Constructor Details
-
ArchiveContentsEngine
public ArchiveContentsEngine()
-
-
Method Details
-
getArchiveActionUri
Description copied from class:ArchiveContentsEngine
Get the pipeline uri for the archive action- Overrides:
getArchiveActionUri
in classArchiveContentsEngine
- Parameters:
contentId
- the current contend id- Returns:
- a pipeline uri
-
setRequestAttributes
Description copied from class:ArchiveContentsEngine
Set the necessary request attributes- Overrides:
setRequestAttributes
in classArchiveContentsEngine
- Parameters:
request
- The requestcontent
- The content
-
getBodyParamsForContributors
Description copied from class:ArchiveContentsEngine
Get email body parameters- Overrides:
getBodyParamsForContributors
in classArchiveContentsEngine
- Parameters:
content
- the archived contentarchived
- true if the content has archived- Returns:
- The mail parameters
-
_getRequestURI
Description copied from class:ArchiveContentsEngine
Get the request URI to set in mail- Overrides:
_getRequestURI
in classArchiveContentsEngine
- Parameters:
content
- The content. Can be null- Returns:
- the request URI
-
_getContentsListAsString
Description copied from class:ArchiveContentsEngine
Get the contents list as String- Overrides:
_getContentsListAsString
in classArchiveContentsEngine
- Parameters:
contents
- The contents- Returns:
- the list of contents as String
-