Package org.ametys.odf.schedulable
Class ArchiveEducationalBookletSchedulable
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
org.ametys.cms.schedule.AbstractSendingMailSchedulable
org.ametys.odf.schedulable.EducationalBookletSchedulable
org.ametys.odf.schedulable.ArchiveEducationalBookletSchedulable
- All Implemented Interfaces:
Schedulable
,LogEnabled
,PluginAware
,Initializable
,Component
,Configurable
,Contextualizable
,Serviceable
- Direct Known Subclasses:
ArchiveEducationalBookletSchedulable
Schedulable
for archive educational booklet.-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.odf.schedulable.EducationalBookletSchedulable
EducationalBookletSchedulable.EducationalBookletReport
Nested classes/interfaces inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
AbstractStaticSchedulable.SchedulableParameterParser
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Scheduler parameter name of archive datestatic final String
Scheduler parameter name of edit workflow action idFields inherited from class org.ametys.odf.schedulable.EducationalBookletSchedulable
_contentWorkflowHelper, _EDUCATIONAL_BOOKLET_REPORT, _resolver, _sourceResolver, EDUCATIONAL_BOOKLET_DIR_NAME, PARAM_INCLUDE_SUBPROGRAMS, PARAM_PROGRAM_ITEM_ID
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, _userManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
_generateProgramItemsEducationalBooklet
(JobExecutionContext context, File bookletDirectory, Map<String, Object> pdfParameters) Generate educational booklet for each program itemsprotected Binary
_getEducationalBookletAsBinary
(File educationalBookletPDF, Content content, ZonedDateTime votedDate) Build a binary object from the educational booklet fileprotected String
The base key for mail bodies.protected String
The base key for mail subjects.Methods inherited from class org.ametys.odf.schedulable.EducationalBookletSchedulable
_doExecute, _generateEducationalBookletZip, _generateFile, _generateProgramItemEducationalBookletPDF, _getErrorMailBody, _getErrorMailSubject, _getProgramItemsI18nText, _getSuccessMailBody, _getSuccessMailSubject, service
Methods inherited from class org.ametys.cms.schedule.AbstractSendingMailSchedulable
_getRecipient, _isMailBodyInHTML, _sendMail, execute, initialize
Methods inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
acceptConcurrentExecution, configure, contextualize, getDescription, getIconGlyph, getIconLarge, getIconMedium, getIconSmall, getId, getLabel, getParameters, isPrivate, setPluginInfo
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
PARAM_ARCHIVE_DATE
Scheduler parameter name of archive date- See Also:
-
PARAM_WORKFLOW_ACTION_ID
Scheduler parameter name of edit workflow action id- See Also:
-
-
Constructor Details
-
ArchiveEducationalBookletSchedulable
public ArchiveEducationalBookletSchedulable()
-
-
Method Details
-
_generateProgramItemsEducationalBooklet
protected void _generateProgramItemsEducationalBooklet(JobExecutionContext context, File bookletDirectory, Map<String, Object> pdfParameters) Description copied from class:EducationalBookletSchedulable
Generate educational booklet for each program items- Overrides:
_generateProgramItemsEducationalBooklet
in classEducationalBookletSchedulable
- Parameters:
context
- the contextbookletDirectory
- the booklet directorypdfParameters
- the parameters to generate PDF
-
_getEducationalBookletAsBinary
protected Binary _getEducationalBookletAsBinary(File educationalBookletPDF, Content content, ZonedDateTime votedDate) throws IOException Build a binary object from the educational booklet file- Parameters:
educationalBookletPDF
- the educational booklet filecontent
- the contentvotedDate
- the voted date for the educational booklet- Returns:
- the binary
- Throws:
IOException
- if an error occurred
-
_getMailSubjectBaseKey
Description copied from class:EducationalBookletSchedulable
The base key for mail subjects.- Overrides:
_getMailSubjectBaseKey
in classEducationalBookletSchedulable
- Returns:
- The prefix of an I18N key
-
_getMailBodyBaseKey
Description copied from class:EducationalBookletSchedulable
The base key for mail bodies.- Overrides:
_getMailBodyBaseKey
in classEducationalBookletSchedulable
- Returns:
- The prefix of an I18N key
-