Package org.ametys.web.live
Class RebuildLiveSiteWorkspaceSchedulable
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
org.ametys.cms.schedule.AbstractSendingMailSchedulable
org.ametys.web.live.AbstractRebuildLiveWorkspaceSchedulable
org.ametys.web.live.RebuildLiveSiteWorkspaceSchedulable
- All Implemented Interfaces:
Schedulable
,LogEnabled
,PluginAware
,Initializable
,Component
,Configurable
,Contextualizable
,Serviceable
A
Schedulable
job which rebuild and populate the live workspace of a site.-
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 amangerprotected static final String
The key for the site to rebuild the live workspaceFields inherited from class org.ametys.web.live.AbstractRebuildLiveWorkspaceSchedulable
_environmentContext, _rebuildLiveComponent, _repository, JOBDATAMAP_MAINTENANCE_KEY
Fields inherited from class org.ametys.cms.schedule.AbstractSendingMailSchedulable
_currentUserProvider, _i18nUtils, _mailSender, _sysadminMail, _userHelper
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
_getErrorMailBody
(JobExecutionContext context, Throwable throwable) Retrieves the body of the error mailprotected I18nizableText
_getErrorMailSubject
(JobExecutionContext context) Retrieves the subject of the error mailprotected String
_getSuccessMailBody
(JobExecutionContext context) Retrieves the body of the success mailprotected I18nizableText
Retrieves the subject of the success mailprotected boolean
_isMailBodyInHTML
(JobExecutionContext context) Determines if the mail body is in HTMLprotected void
_rebuildLiveWorkspace
(JobExecutionContext context, ContainerProgressionTracker progressionTracker) Implements this method for building the live.void
service
(ServiceManager manager) Methods inherited from class org.ametys.web.live.AbstractRebuildLiveWorkspaceSchedulable
_doExecute, contextualize
Methods inherited from class org.ametys.cms.schedule.AbstractSendingMailSchedulable
_getRecipient, _sendMail, execute, initialize
Methods inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
acceptConcurrentExecution, configure, 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
-
JOBDATAMAP_SITE_KEY
The key for the site to rebuild the live workspace- See Also:
-
_siteManager
The site amanger -
_jsonUtils
The utils for JSON
-
-
Constructor Details
-
RebuildLiveSiteWorkspaceSchedulable
public RebuildLiveSiteWorkspaceSchedulable()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractRebuildLiveWorkspaceSchedulable
- Throws:
ServiceException
-
_rebuildLiveWorkspace
protected void _rebuildLiveWorkspace(JobExecutionContext context, ContainerProgressionTracker progressionTracker) throws Exception Description copied from class:AbstractRebuildLiveWorkspaceSchedulable
Implements this method for building the live.- Specified by:
_rebuildLiveWorkspace
in classAbstractRebuildLiveWorkspaceSchedulable
- Parameters:
context
- the contextprogressionTracker
- The progression tracker- Throws:
Exception
- if an error occurred
-
_isMailBodyInHTML
Description copied from class:AbstractSendingMailSchedulable
Determines if the mail body is in HTML- Overrides:
_isMailBodyInHTML
in classAbstractSendingMailSchedulable
- Parameters:
context
- the context- Returns:
true
if the mail body is in HTML,false
otherwise- Throws:
Exception
- If an error occurs while retrieving if mail body should be HTML
-
_getSuccessMailSubject
Description copied from class:AbstractSendingMailSchedulable
Retrieves the subject of the success mail- Specified by:
_getSuccessMailSubject
in classAbstractSendingMailSchedulable
- Parameters:
context
- the context- Returns:
- the subject of the success mail
-
_getSuccessMailBody
Description copied from class:AbstractSendingMailSchedulable
Retrieves the body of the success mail- Specified by:
_getSuccessMailBody
in classAbstractSendingMailSchedulable
- Parameters:
context
- the context- Returns:
- the body of the success mail
-
_getErrorMailSubject
Description copied from class:AbstractSendingMailSchedulable
Retrieves the subject of the error mail- Specified by:
_getErrorMailSubject
in classAbstractSendingMailSchedulable
- Parameters:
context
- the context- Returns:
- the subject of the error mail
-
_getErrorMailBody
Description copied from class:AbstractSendingMailSchedulable
Retrieves the body of the error mail- Specified by:
_getErrorMailBody
in classAbstractSendingMailSchedulable
- Parameters:
context
- the contextthrowable
- the error- Returns:
- the body of the error mail
-