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
Fields inherited from class org.ametys.odf.schedulable.EducationalBookletSchedulable
_contentWorkflowHelper, _EDUCATIONAL_BOOKLET_REPORT, _resolver, _sourceResolver, EDUCATIONAL_BOOKLET_DIR_NAME
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
_generateSubProgramsEducationalBooklet
(JobExecutionContext context, File bookletDirectory, Map<String, String> pdfParameters) Generate educational booklet for each subProgramprotected Binary
_getEducationalBookletAsBinary
(File educationalBookletPDF, SubProgram subProgram, 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, _generateSubProgramEducationalBookletPDF, _getErrorMailBody, _getErrorMailSubject, _getSubProgramListAsI18nText, _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
-
Constructor Details
-
ArchiveEducationalBookletSchedulable
public ArchiveEducationalBookletSchedulable()
-
-
Method Details
-
_generateSubProgramsEducationalBooklet
protected void _generateSubProgramsEducationalBooklet(JobExecutionContext context, File bookletDirectory, Map<String, String> pdfParameters) Description copied from class:EducationalBookletSchedulable
Generate educational booklet for each subProgram- Overrides:
_generateSubProgramsEducationalBooklet
in classEducationalBookletSchedulable
- Parameters:
context
- the contextbookletDirectory
- the booklet directorypdfParameters
- the parameters to generate PDF
-
_getEducationalBookletAsBinary
protected Binary _getEducationalBookletAsBinary(File educationalBookletPDF, SubProgram subProgram, ZonedDateTime votedDate) throws IOException Build a binary object from the educational booklet file- Parameters:
educationalBookletPDF
- the educational booklet filesubProgram
- the subProgramvotedDate
- 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
-