Class AbstractMCCReport
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.odfpilotage.report.AbstractPilotageReport
org.ametys.plugins.odfpilotage.report.impl.AbstractReport
org.ametys.plugins.odfpilotage.report.impl.AbstractMCCReport
- All Implemented Interfaces:
PilotageReport
,LogEnabled
,PluginAware
,Initializable
,Configurable
,Serviceable
- Direct Known Subclasses:
MCCDiffReport
,MCCReport
Class to generate a report based on MCC.
-
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
Modifier and TypeFieldDescriptionprotected static final String
Name of the first sessionprotected static final String
Name of the second sessionprotected static final String
Prefix of the sessions nameFields 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
_getReportFileName
(Program program) Get the report filename for a given programprotected void
_launchByOrgUnit
(String uaiCode, String catalog, String lang) Launch a report generation on an orgunit.protected MCCAmetysObjectTree
_processMCC
(String uaiCode, String lang, String catalog) Processing of the MCCprotected void
Create the MCC report for one organization unitprotected void
addProgram2MCCAmetysObjectTree
(MCCAmetysObjectTree tree, Program program) Add and populate the program to theMCCAmetysObjectTree
protected MCCAmetysObjectTree
extractMCCAmetysObjectTree
(OrgUnit ou, List<Program> programs) Extract the tree of Ametys object of interested.protected abstract void
Populate the MCC tree.protected void
saxContainer
(TransformerHandler handler, Container container, MCCAmetysObjectTree tree) Sax aContainer
.protected void
saxCourse
(TransformerHandler handler, Course course, MCCAmetysObjectTree tree) Sax aCourse
.protected void
saxCourseList
(TransformerHandler handler, CourseList courseList, MCCAmetysObjectTree tree) Sax aCourseList
.protected void
saxCourseParts
(TransformerHandler handler, Course course) Sax theCoursePart
s containing in aCourse
.protected abstract void
saxGlobalInformations
(TransformerHandler handler, Program program) Sax the additional global informations of the report.protected abstract void
saxMCCs
(TransformerHandler handler, Course course, MCCAmetysObjectTree tree) Sax the MCC sessions.protected void
saxOrgUnit
(TransformerHandler handler, OrgUnit orgunit, MCCAmetysObjectTree tree) Sax anOrgUnit
.protected void
saxProgram
(TransformerHandler handler, Program program, MCCAmetysObjectTree tree) Sax aProgram
.protected void
saxSessionEntryDetails
(TransformerHandler handler, ModelAwareRepeaterEntry sessionEntry) Generates SAX events for the details of a MCC session entry.protected void
saxSubProgram
(TransformerHandler handler, SubProgram subProgram, MCCAmetysObjectTree tree) Sax aSubProgram
.protected void
saxTree
(TransformerHandler handler, MCCAmetysObjectTree tree) SAX the MCC tree for the reportprotected void
saxTreeChildren
(TransformerHandler handler, MCCAmetysObjectTree tree) Iterate on tree's children.Methods inherited from class org.ametys.plugins.odfpilotage.report.impl.AbstractReport
_getReportFileName, 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, getSupportedOutputFormats, getType, initialize, isCompatibleSchedulable, isGeneric, isSupportedFormat, launch, sendMail, service, setPluginInfo, supports
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
SESSION_NAME_PREFIX
Prefix of the sessions name- See Also:
-
FIRST_SESSION_NAME
Name of the first session- See Also:
-
SECOND_SESSION_NAME
Name of the second session- See Also:
-
-
Constructor Details
-
AbstractMCCReport
public AbstractMCCReport()
-
-
Method Details
-
_launchByOrgUnit
Description copied from class:AbstractReport
Launch a report generation on an orgunit.- Specified by:
_launchByOrgUnit
in classAbstractReport
- Parameters:
uaiCode
- The UAI code of theOrgUnit
catalog
- The cataloglang
- The language- Throws:
Exception
- if an exception occurs
-
_processMCC
Processing of the MCC- Parameters:
uaiCode
- the UAI code of the orgunitlang
- The language codecatalog
- The catalogue- Returns:
MCCAmetysObjectTree
-
_writeReportsMcc
Create the MCC report for one organization unit- Parameters:
tree
- The MCC tree
-
saxTree
SAX the MCC tree for the report- Parameters:
handler
- The handlertree
- The MCC tree- Throws:
SAXException
- if an error occurs
-
saxOrgUnit
protected void saxOrgUnit(TransformerHandler handler, OrgUnit orgunit, MCCAmetysObjectTree tree) throws SAXException Sax anOrgUnit
.- Parameters:
handler
- The transformer handlerorgunit
- The orgunit to saxtree
- The MCC tree- Throws:
SAXException
- If an error occurs
-
saxProgram
protected void saxProgram(TransformerHandler handler, Program program, MCCAmetysObjectTree tree) throws SAXException Sax aProgram
.- Parameters:
handler
- The transformer handlerprogram
- The program to saxtree
- The MCC tree- Throws:
SAXException
- If an error occurs
-
saxSubProgram
protected void saxSubProgram(TransformerHandler handler, SubProgram subProgram, MCCAmetysObjectTree tree) throws SAXException Sax aSubProgram
.- Parameters:
handler
- The transformer handlersubProgram
- The subprogram to saxtree
- The MCC tree- Throws:
SAXException
- If an error occurs
-
saxContainer
protected void saxContainer(TransformerHandler handler, Container container, MCCAmetysObjectTree tree) throws SAXException Sax aContainer
.- Parameters:
handler
- The transformer handlercontainer
- The container to saxtree
- The MCC tree- Throws:
SAXException
- If an error occurs
-
saxCourseList
protected void saxCourseList(TransformerHandler handler, CourseList courseList, MCCAmetysObjectTree tree) throws SAXException Sax aCourseList
.- Parameters:
handler
- The transformer handlercourseList
- The course list to saxtree
- The MCC tree- Throws:
SAXException
- If an error occurs
-
saxCourse
protected void saxCourse(TransformerHandler handler, Course course, MCCAmetysObjectTree tree) throws SAXException Sax aCourse
.- Parameters:
handler
- The transformer handlercourse
- The course to saxtree
- The MCC tree- Throws:
SAXException
- If an error occurs
-
saxTreeChildren
protected void saxTreeChildren(TransformerHandler handler, MCCAmetysObjectTree tree) throws SAXException Iterate on tree's children.- Parameters:
handler
- The transformer handlertree
- The MCC tree- Throws:
SAXException
- If an error occurs
-
saxCourseParts
Sax theCoursePart
s containing in aCourse
.- Parameters:
handler
- The transformer handlercourse
- The course with course parts to sax- Throws:
SAXException
- If an error occurs
-
saxMCCs
protected abstract void saxMCCs(TransformerHandler handler, Course course, MCCAmetysObjectTree tree) throws SAXException Sax the MCC sessions.- Parameters:
handler
- The transformer handlercourse
- The concernedCourse
to sax the MCCs ontree
- The MCC tree- Throws:
SAXException
- If an error occurs
-
saxSessionEntryDetails
protected void saxSessionEntryDetails(TransformerHandler handler, ModelAwareRepeaterEntry sessionEntry) throws SAXException Generates SAX events for the details of a MCC session entry.- Parameters:
handler
- The transformer handlersessionEntry
- The session repeater entry to SAX- Throws:
SAXException
- If an error occurs
-
extractMCCAmetysObjectTree
Extract the tree of Ametys object of interested.- Parameters:
ou
- the orgunit to extract the MCC fromprograms
- the list of associated programs- Returns:
MCCAmetysObjectTree
-
addProgram2MCCAmetysObjectTree
Add and populate the program to theMCCAmetysObjectTree
- Parameters:
tree
- The object treeprogram
- The program to add
-
populateMCCAmetysObjectTree
Populate the MCC tree.- Parameters:
tree
- The MCC tree
-
_getReportFileName
Get the report filename for a given program- Parameters:
program
- The program- Returns:
- the file name
-
saxGlobalInformations
protected abstract void saxGlobalInformations(TransformerHandler handler, Program program) throws SAXException Sax the additional global informations of the report.- Parameters:
handler
- The transformer handlerprogram
- The program on which the report is launched- Throws:
SAXException
- If an error occurs
-