Class AbstractReportSchedulable
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
-
- org.ametys.plugins.odfpilotage.schedulable.AbstractReportSchedulable
-
- All Implemented Interfaces:
Schedulable
,LogEnabled
,PluginAware
,Component
,Configurable
,Contextualizable
,Serviceable
- Direct Known Subclasses:
OrgUnitReportSchedulable
,ProgramReportSchedulable
public abstract class AbstractReportSchedulable extends AbstractStaticSchedulable
Schedulable
for pilotage report.
-
-
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 CurrentUserProvider
_currentUserProvider
The current user providerprotected ReportExtensionPoint
_reportEP
The report extension pointstatic String
JOBDATAMAP_EXTENSION_ID_KEY
The key for the extension IDstatic String
JOBDATAMAP_OUTPUT_FORMAT_KEY
The key for the output format-
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 AbstractReportSchedulable()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
configure(Configuration configuration)
void
execute(JobExecutionContext context)
The action to perform when a trigger is fired.boolean
forGenericReports()
The schedulable is written for generic reports or it has additional parameters.protected Map<String,String>
getReportParameters(JobDataMap jobDataMap)
Get the report parameters from the schedulable parametersabstract PilotageReport.PilotageReportTarget
getTarget()
The target of the report.void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.plugins.core.impl.schedule.AbstractStaticSchedulable
acceptConcurrentExecution, contextualize, getDescription, getIconGlyph, getIconLarge, getIconMedium, getIconSmall, getId, getLabel, getParameters, isPrivate, setPluginInfo
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
JOBDATAMAP_EXTENSION_ID_KEY
public static final String JOBDATAMAP_EXTENSION_ID_KEY
The key for the extension ID- See Also:
- Constant Field Values
-
JOBDATAMAP_OUTPUT_FORMAT_KEY
public static final String JOBDATAMAP_OUTPUT_FORMAT_KEY
The key for the output format- See Also:
- Constant Field Values
-
_reportEP
protected ReportExtensionPoint _reportEP
The report extension point
-
_currentUserProvider
protected CurrentUserProvider _currentUserProvider
The current user provider
-
-
Constructor Detail
-
AbstractReportSchedulable
public AbstractReportSchedulable()
-
-
Method Detail
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classAbstractStaticSchedulable
- Throws:
ConfigurationException
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractStaticSchedulable
- Throws:
ServiceException
-
execute
public void execute(JobExecutionContext context) throws Exception
Description copied from interface:Schedulable
The action to perform when a trigger is fired. Do not manually call this method.- Specified by:
execute
in interfaceSchedulable
- Specified by:
execute
in classAbstractStaticSchedulable
- Parameters:
context
- the context- Throws:
Exception
- if an error occured
-
getTarget
public abstract PilotageReport.PilotageReportTarget getTarget()
The target of the report.- Returns:
- The target
-
forGenericReports
public boolean forGenericReports()
The schedulable is written for generic reports or it has additional parameters.- Returns:
true
if the schedulable is only for generic reports.
-
getReportParameters
protected Map<String,String> getReportParameters(JobDataMap jobDataMap)
Get the report parameters from the schedulable parameters- Parameters:
jobDataMap
- The schedulable parameters- Returns:
- The report parameters
-
-