Class ConsistencyExtract
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.odfpilotage.report.AbstractPilotageReport
-
- org.ametys.plugins.odfpilotage.report.impl.AbstractExtract
-
- org.ametys.plugins.odfpilotage.report.impl.ConsistencyExtract
-
- All Implemented Interfaces:
PilotageReport
,LogEnabled
,PluginAware
,Initializable
,Configurable
,Serviceable
public class ConsistencyExtract extends AbstractExtract
Class to generate consistency extract as DOC.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ametys.plugins.odfpilotage.report.AbstractPilotageReport
AbstractPilotageReport.PilotageFile, AbstractPilotageReport.PilotageReportStatus
-
Nested classes/interfaces inherited from interface org.ametys.plugins.odfpilotage.report.PilotageReport
PilotageReport.PilotageReportTarget
-
-
Field Summary
Fields Modifier and Type Field Description protected List<ConsistencyAnalysis>
_analyses
The analyses to apply.protected AnalysisExtensionPoint
_analysisEP
The analysis extension point.static String
PARAMETER_ANALYSIS
The key for the analysis-
Fields inherited from class org.ametys.plugins.odfpilotage.report.AbstractPilotageReport
_currentFormattedDate, _i18nUtils, _odfHelper, _pilotageHelper, _refTableHelper, _reportHelper, _resolver, _sourceResolver, _tmpFolder, _userManager, MANIFEST_FILENAME
-
Fields inherited from interface org.ametys.plugins.odfpilotage.report.PilotageReport
OUTPUT_FORMAT_DOC, OUTPUT_FORMAT_XLS, PARAMETER_CATALOG, PARAMETER_LANG, PARAMETER_ORGUNIT, PARAMETER_OUTPUT_FORMAT, PARAMETER_PROGRAM
-
-
Constructor Summary
Constructors Constructor Description ConsistencyExtract()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
_buildZipName(String contextName)
Build the ZIP name.private String
_getReportFileName(Program program)
Get the report filename for a given programprotected void
_saxProgram(Program program)
Sax a program for the extraction.private void
_saxReport(TransformerHandler handler, Program program)
protected void
_setAdditionalParameters(Map<String,String> reportParameters)
Sax the additional parameters.protected String
getType()
Get the name of the reportprotected boolean
isCompatibleSchedulable(AbstractReportSchedulable schedulable)
Check if the given schedulable is compatible with the currentboolean
isGeneric()
Most of reports are generic.protected String
launchByOrgUnit(Map<String,String> reportParameters)
Launch a report generation on an orgunit.protected String
launchByProgram(Map<String,String> reportParameters)
Launch a report generation on a program.void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.plugins.odfpilotage.report.impl.AbstractExtract
getSupportedOutputFormats, isSupportedTarget
-
Methods inherited from class org.ametys.plugins.odfpilotage.report.AbstractPilotageReport
addManifest, configure, convertReport, createZipFile, getId, getLabel, getMailBody, getMailSubject, getOutputFormat, getPipeline, getPluginName, getReportName, initialize, isSupportedFormat, launch, sendMail, setPluginInfo, supports
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
PARAMETER_ANALYSIS
public static final String PARAMETER_ANALYSIS
The key for the analysis- See Also:
- Constant Field Values
-
_analysisEP
protected AnalysisExtensionPoint _analysisEP
The analysis extension point.
-
_analyses
protected List<ConsistencyAnalysis> _analyses
The analyses to apply.
-
-
Constructor Detail
-
ConsistencyExtract
public ConsistencyExtract()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractPilotageReport
- Throws:
ServiceException
-
getType
protected String getType()
Description copied from class:AbstractPilotageReport
Get the name of the report- Specified by:
getType
in classAbstractPilotageReport
- Returns:
- The report name
-
isGeneric
public boolean isGeneric()
Description copied from class:AbstractPilotageReport
Most of reports are generic. This method can be overridden.- Overrides:
isGeneric
in classAbstractPilotageReport
- Returns:
true
if the current report is generic,false
otherwise
-
isCompatibleSchedulable
protected boolean isCompatibleSchedulable(AbstractReportSchedulable schedulable)
Description copied from class:AbstractPilotageReport
Check if the given schedulable is compatible with the current- Overrides:
isCompatibleSchedulable
in classAbstractPilotageReport
- Parameters:
schedulable
- The schedulable to test- Returns:
true
if the schedulable is compatible with the report
-
launchByOrgUnit
protected String launchByOrgUnit(Map<String,String> reportParameters) throws Exception
Description copied from class:AbstractPilotageReport
Launch a report generation on an orgunit.- Overrides:
launchByOrgUnit
in classAbstractExtract
- Parameters:
reportParameters
- The report parameters- Returns:
- the name of the generated file
- Throws:
Exception
- if an exception occurs
-
launchByProgram
protected String launchByProgram(Map<String,String> reportParameters) throws Exception
Description copied from class:AbstractPilotageReport
Launch a report generation on a program.- Overrides:
launchByProgram
in classAbstractExtract
- Parameters:
reportParameters
- The report parameters- Returns:
- the name of the generated file
- Throws:
Exception
- if an exception occurs
-
_setAdditionalParameters
protected void _setAdditionalParameters(Map<String,String> reportParameters)
Sax the additional parameters.- Parameters:
reportParameters
- The report parameters
-
_buildZipName
protected String _buildZipName(String contextName)
Description copied from class:AbstractPilotageReport
Build the ZIP name.- Overrides:
_buildZipName
in classAbstractPilotageReport
- Parameters:
contextName
- The report context name- Returns:
- The full ZIP name
-
_saxProgram
protected void _saxProgram(Program program)
Description copied from class:AbstractExtract
Sax a program for the extraction.- Specified by:
_saxProgram
in classAbstractExtract
- Parameters:
program
- Program to sax
-
_getReportFileName
private String _getReportFileName(Program program)
Get the report filename for a given program- Parameters:
program
- The program- Returns:
- the file name
-
_saxReport
private void _saxReport(TransformerHandler handler, Program program) throws SAXException
- Throws:
SAXException
-
-