Package org.ametys.odf.schedulable
Class CatalogPDFExportSchedulable
- 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.CatalogPDFExportSchedulable
-
- All Implemented Interfaces:
Schedulable,LogEnabled,PluginAware,Initializable,Component,Configurable,Contextualizable,Serviceable
- Direct Known Subclasses:
CatalogPDFExportSchedulable
public class CatalogPDFExportSchedulable extends AbstractSendingMailSchedulable
Schedulable to export the ODF catalog as PDF
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
AbstractStaticSchedulable.SchedulableParameterParser
-
-
Field Summary
Fields Modifier and Type Field Description protected static String_CATALOG_FILENAMEMap key where the generated filename is storedprotected File_catalogRootDirectoryThe catalog directory.protected OdfReferenceTableHelper_odfRefTableHelperThe ODF reference table helper.protected AmetysObjectResolver_resolverThe Ametys object resolver.protected SourceResolver_sourceResolverThe avalon source resolver.static StringJOBDATAMAP_CATALOG_KEYThe key for the catalogstatic StringJOBDATAMAP_DEGREE_KEYThe key for the degreestatic StringJOBDATAMAP_LANG_KEYThe key for the langstatic StringJOBDATAMAP_ORGUNIT_KEYThe key for the orgunit-
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
Constructors Constructor Description CatalogPDFExportSchedulable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_doExecute(JobExecutionContext context)Executes the schedulable.protected I18nizableText_getErrorMailBody(JobExecutionContext context, Throwable throwable)Retrieves the body of the error mailprotected I18nizableText_getErrorMailSubject(JobExecutionContext context)Retrieves the subject of the error mailprotected I18nizableText_getSuccessMailBody(JobExecutionContext context)Retrieves the body of the success mailprotected I18nizableText_getSuccessMailSubject(JobExecutionContext context)Retrieves the subject of the success mailMap<String,ElementDefinition>getParameters()Get the parameters for job executionvoidinitialize()voidservice(ServiceManager manager)-
Methods inherited from class org.ametys.cms.schedule.AbstractSendingMailSchedulable
_getRecipient, _isMailBodyInHTML, _sendMail, execute
-
Methods inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
acceptConcurrentExecution, configure, contextualize, getDescription, getIconGlyph, getIconLarge, getIconMedium, getIconSmall, getId, getLabel, isPrivate, setPluginInfo
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
JOBDATAMAP_CATALOG_KEY
public static final String JOBDATAMAP_CATALOG_KEY
The key for the catalog- See Also:
- Constant Field Values
-
JOBDATAMAP_LANG_KEY
public static final String JOBDATAMAP_LANG_KEY
The key for the lang- See Also:
- Constant Field Values
-
JOBDATAMAP_ORGUNIT_KEY
public static final String JOBDATAMAP_ORGUNIT_KEY
The key for the orgunit- See Also:
- Constant Field Values
-
JOBDATAMAP_DEGREE_KEY
public static final String JOBDATAMAP_DEGREE_KEY
The key for the degree- See Also:
- Constant Field Values
-
_CATALOG_FILENAME
protected static final String _CATALOG_FILENAME
Map key where the generated filename is stored- See Also:
- Constant Field Values
-
_resolver
protected AmetysObjectResolver _resolver
The Ametys object resolver.
-
_odfRefTableHelper
protected OdfReferenceTableHelper _odfRefTableHelper
The ODF reference table helper.
-
_sourceResolver
protected SourceResolver _sourceResolver
The avalon source resolver.
-
_catalogRootDirectory
protected File _catalogRootDirectory
The catalog directory.
-
-
Constructor Detail
-
CatalogPDFExportSchedulable
public CatalogPDFExportSchedulable()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractSendingMailSchedulable- Throws:
ServiceException
-
initialize
public void initialize() throws Exception
- Specified by:
initializein interfaceInitializable- Overrides:
initializein classAbstractSendingMailSchedulable- Throws:
Exception
-
_doExecute
protected void _doExecute(JobExecutionContext context) throws Exception
Description copied from class:AbstractSendingMailSchedulableExecutes the schedulable.- Specified by:
_doExecutein classAbstractSendingMailSchedulable- Parameters:
context- the context- Throws:
Exception- if an error occurred
-
getParameters
public Map<String,ElementDefinition> getParameters()
Description copied from interface:SchedulableGet the parameters for job execution- Specified by:
getParametersin interfaceSchedulable- Overrides:
getParametersin classAbstractStaticSchedulable- Returns:
- the parameters
-
_getSuccessMailSubject
protected I18nizableText _getSuccessMailSubject(JobExecutionContext context) throws Exception
Description copied from class:AbstractSendingMailSchedulableRetrieves the subject of the success mail- Specified by:
_getSuccessMailSubjectin classAbstractSendingMailSchedulable- Parameters:
context- the context- Returns:
- the subject of the success mail
- Throws:
Exception- If an error occurs while building the mail subject
-
_getSuccessMailBody
protected I18nizableText _getSuccessMailBody(JobExecutionContext context) throws Exception
Description copied from class:AbstractSendingMailSchedulableRetrieves the body of the success mail- Specified by:
_getSuccessMailBodyin classAbstractSendingMailSchedulable- Parameters:
context- the context- Returns:
- the body of the success mail
- Throws:
Exception- If an error occurs while building the mail body
-
_getErrorMailSubject
protected I18nizableText _getErrorMailSubject(JobExecutionContext context) throws Exception
Description copied from class:AbstractSendingMailSchedulableRetrieves the subject of the error mail- Specified by:
_getErrorMailSubjectin classAbstractSendingMailSchedulable- Parameters:
context- the context- Returns:
- the subject of the error mail
- Throws:
Exception- If an error occurs while building the mail subject
-
_getErrorMailBody
protected I18nizableText _getErrorMailBody(JobExecutionContext context, Throwable throwable) throws Exception
Description copied from class:AbstractSendingMailSchedulableRetrieves the body of the error mail- Specified by:
_getErrorMailBodyin classAbstractSendingMailSchedulable- Parameters:
context- the contextthrowable- the error- Returns:
- the body of the error mail
- Throws:
Exception- If an error occurs while building the mail body
-
-