Class MaquetteExtract
- 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.MaquetteExtract
-
- All Implemented Interfaces:
PilotageReport
,LogEnabled
,PluginAware
,Initializable
,Configurable
,Serviceable
public class MaquetteExtract extends AbstractExtract
Class to generate course 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 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 MaquetteExtract()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Optional<ModifiableContent>
_getEtapePorteuseIfExists(ContentValue etapePorteuse, Course course)
private String
_getReportFileName(Program program)
Get the report filename for a given programprivate void
_saxContainer(TransformerHandler handler, Container container, Map<ProgramItem,Object> programTree)
private void
_saxCourse(TransformerHandler handler, Course course, Map<ProgramItem,Object> programTree)
private void
_saxCourseList(TransformerHandler handler, CourseList courseList, Map<ProgramItem,Object> programTree)
protected void
_saxProgram(Program program)
Sax a program for the extraction.private void
_saxProgramsTree(Map<ProgramItem,Object> programTree, Program program)
private void
_saxProgramTree(TransformerHandler handler, Map<ProgramItem,Object> programTree)
private boolean
_saxProgramTreeOnCourseList(TransformerHandler handler, Map<ProgramItem,Object> programTree, Map.Entry<ProgramItem,Object> node)
private void
_saxReport(TransformerHandler handler, Program program, Map<ProgramItem,Object> programTree)
private void
_saxSubProgram(TransformerHandler handler, SubProgram subprogram, Map<ProgramItem,Object> programTree)
protected Set<String>
getSupportedOutputFormats()
Get the list of supported output formatsprotected String
getType()
Get the name of the report-
Methods inherited from class org.ametys.plugins.odfpilotage.report.impl.AbstractExtract
isSupportedTarget, launchByOrgUnit, launchByProgram
-
Methods inherited from class org.ametys.plugins.odfpilotage.report.AbstractPilotageReport
_buildZipName, addManifest, configure, convertReport, createZipFile, getId, getLabel, getMailBody, getMailSubject, getOutputFormat, getPipeline, getPluginName, getReportName, initialize, isCompatibleSchedulable, isGeneric, isSupportedFormat, launch, sendMail, service, setPluginInfo, supports
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
MaquetteExtract
public MaquetteExtract()
-
-
Method Detail
-
getType
protected String getType()
Description copied from class:AbstractPilotageReport
Get the name of the report- Specified by:
getType
in classAbstractPilotageReport
- Returns:
- The report name
-
getSupportedOutputFormats
protected Set<String> getSupportedOutputFormats()
Description copied from class:AbstractPilotageReport
Get the list of supported output formats- Overrides:
getSupportedOutputFormats
in classAbstractExtract
- Returns:
- A
Set
of supported output formats
-
_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
-
_saxProgramsTree
private void _saxProgramsTree(Map<ProgramItem,Object> programTree, Program program)
-
_saxReport
private void _saxReport(TransformerHandler handler, Program program, Map<ProgramItem,Object> programTree) throws SAXException
- Throws:
SAXException
-
_saxProgramTree
private void _saxProgramTree(TransformerHandler handler, Map<ProgramItem,Object> programTree) throws SAXException
- Throws:
SAXException
-
_saxProgramTreeOnCourseList
private boolean _saxProgramTreeOnCourseList(TransformerHandler handler, Map<ProgramItem,Object> programTree, Map.Entry<ProgramItem,Object> node) throws SAXException
- Throws:
SAXException
-
_saxSubProgram
private void _saxSubProgram(TransformerHandler handler, SubProgram subprogram, Map<ProgramItem,Object> programTree) throws SAXException
- Throws:
SAXException
-
_saxContainer
private void _saxContainer(TransformerHandler handler, Container container, Map<ProgramItem,Object> programTree) throws SAXException
- Throws:
SAXException
-
_saxCourse
private void _saxCourse(TransformerHandler handler, Course course, Map<ProgramItem,Object> programTree) throws SAXException
- Throws:
SAXException
-
_getEtapePorteuseIfExists
private Optional<ModifiableContent> _getEtapePorteuseIfExists(ContentValue etapePorteuse, Course course)
-
_saxCourseList
private void _saxCourseList(TransformerHandler handler, CourseList courseList, Map<ProgramItem,Object> programTree) throws SAXException
- Throws:
SAXException
-
-