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.EducationalBookletReportNested classes/interfaces inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
AbstractStaticSchedulable.SchedulableParameterParser -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringScheduler parameter name of archive datestatic final StringScheduler 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_IDFields inherited from class org.ametys.cms.schedule.AbstractSendingMailSchedulable
_currentUserProvider, _i18nUtils, _mailSender, _sysadminMail, _userHelperFields 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 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 StringThe base key for mail bodies.protected StringThe base key for mail subjects.Methods inherited from class org.ametys.odf.schedulable.EducationalBookletSchedulable
_doExecute, _generateEducationalBookletZip, _generateFile, _generateProgramItemEducationalBookletPDF, _getErrorMailBody, _getErrorMailSubject, _getProgramItemsI18nText, _getSuccessMailBody, _getSuccessMailSubject, serviceMethods inherited from class org.ametys.cms.schedule.AbstractSendingMailSchedulable
_getRecipient, _isMailBodyInHTML, _sendMail, execute, 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
-
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:EducationalBookletSchedulableGenerate educational booklet for each program items- Overrides:
_generateProgramItemsEducationalBookletin 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:EducationalBookletSchedulableThe base key for mail subjects.- Overrides:
_getMailSubjectBaseKeyin classEducationalBookletSchedulable- Returns:
- The prefix of an I18N key
-
_getMailBodyBaseKey
Description copied from class:EducationalBookletSchedulableThe base key for mail bodies.- Overrides:
_getMailBodyBaseKeyin classEducationalBookletSchedulable- Returns:
- The prefix of an I18N key
-