public abstract class AbstractMCCReport extends AbstractReport
AbstractPilotageReport.PilotageFile, AbstractPilotageReport.PilotageReportStatus
PilotageReport.PilotageReportTarget
Modifier and Type | Field and Description |
---|---|
protected MetadataManager |
_metadataManager
The metadata manager
|
protected static Comparator<String> |
_STRING2INTEGER_COMPARATOR
|
_currentFormattedDate, _i18nUtils, _odfHelper, _pilotageHelper, _refTableHelper, _reportHelper, _resolver, _sourceResolver, _tmpFolder, _userManager
PARAMETER_CATALOG, PARAMETER_LANG, PARAMETER_ORGUNIT, PARAMETER_PROGRAM
Constructor and Description |
---|
AbstractMCCReport() |
Modifier and Type | Method and Description |
---|---|
private Long |
_getCodeAnu(MCCAmetysObjectTree tree)
Recurse through containers and courses to find a code anu.
|
protected 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 MCC
|
protected void |
_writeReportsMcc(MCCAmetysObjectTree tree)
Create the MCC report for one organization unit
|
protected void |
addProgram2MCCAmetysObjectTree(MCCAmetysObjectTree tree,
Program program)
Add and populate the program to the
MCCAmetysObjectTree |
protected MCCAmetysObjectTree |
extractMCCAmetysObjectTree(OrgUnit ou,
List<Program> programs)
Extract the tree of Ametys object of interested.
|
protected abstract String |
getReportFileName(Program program)
Get the report filename for a given program
|
protected abstract void |
populateMCCAmetysObjectTree(MCCAmetysObjectTree tree)
Populate the MCC tree.
|
protected void |
saxContainer(TransformerHandler handler,
Container container,
MCCAmetysObjectTree tree)
Sax a
Container . |
protected void |
saxCourse(TransformerHandler handler,
Course course,
MCCAmetysObjectTree tree)
Sax a
Course . |
protected void |
saxCourseList(TransformerHandler handler,
CourseList courseList,
MCCAmetysObjectTree tree)
Sax a
CourseList . |
protected void |
saxCourseParts(TransformerHandler handler,
Course course)
Sax the
CoursePart s containing in a Course . |
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 an
OrgUnit . |
protected void |
saxProgram(TransformerHandler handler,
Program program,
MCCAmetysObjectTree tree)
Sax a
Program . |
protected void |
saxSessionEntryDetails(TransformerHandler handler,
CompositeMetadata sessionEntry)
Sax the details of a MCC session entry.
|
protected void |
saxSubProgram(TransformerHandler handler,
SubProgram subProgram,
MCCAmetysObjectTree tree)
Sax a
SubProgram . |
protected void |
saxTree(TransformerHandler handler,
MCCAmetysObjectTree tree)
SAX the MCC tree for the report
|
protected void |
saxTreeChildren(TransformerHandler handler,
MCCAmetysObjectTree tree)
Iterate on tree's children.
|
void |
service(ServiceManager manager) |
launchByOrgUnit, launchByProgram
convertReport, createZipFile, getMailBody, getMailSubject, getPipeline, getPluginName, getReportName, getType, initialize, launch, sendMail, setPluginInfo
getLogger, setLogger
protected static final Comparator<String> _STRING2INTEGER_COMPARATOR
protected MetadataManager _metadataManager
public AbstractMCCReport()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class AbstractPilotageReport
ServiceException
protected void _launchByOrgUnit(String uaiCode, String catalog, String lang) throws Exception
AbstractReport
_launchByOrgUnit
in class AbstractReport
uaiCode
- The UAI code of the OrgUnit
catalog
- The cataloglang
- The languageException
- if an exception occursprotected MCCAmetysObjectTree _processMCC(String uaiCode, String lang, String catalog)
uaiCode
- the UAI code of the orgunitlang
- The language codecatalog
- The catalogueMCCAmetysObjectTree
protected void _writeReportsMcc(MCCAmetysObjectTree tree) throws SAXException, IOException, TransformerConfigurationException
tree
- The MCC treeSAXException
- if an error occursIOException
- if an error occursTransformerConfigurationException
- if an error occursprotected void saxTree(TransformerHandler handler, MCCAmetysObjectTree tree) throws SAXException
handler
- The handlertree
- The MCC treeSAXException
- if an error occursprotected void saxOrgUnit(TransformerHandler handler, OrgUnit orgunit, MCCAmetysObjectTree tree) throws SAXException
OrgUnit
.handler
- The transformer handlerorgunit
- The orgunit to saxtree
- The MCC treeSAXException
- If an error occursprotected void saxProgram(TransformerHandler handler, Program program, MCCAmetysObjectTree tree) throws SAXException
Program
.handler
- The transformer handlerprogram
- The program to saxtree
- The MCC treeSAXException
- If an error occursprotected void saxSubProgram(TransformerHandler handler, SubProgram subProgram, MCCAmetysObjectTree tree) throws SAXException
SubProgram
.handler
- The transformer handlersubProgram
- The subprogram to saxtree
- The MCC treeSAXException
- If an error occursprotected void saxContainer(TransformerHandler handler, Container container, MCCAmetysObjectTree tree) throws SAXException
Container
.handler
- The transformer handlercontainer
- The container to saxtree
- The MCC treeSAXException
- If an error occursprotected void saxCourseList(TransformerHandler handler, CourseList courseList, MCCAmetysObjectTree tree) throws SAXException
CourseList
.handler
- The transformer handlercourseList
- The course list to saxtree
- The MCC treeSAXException
- If an error occursprotected void saxCourse(TransformerHandler handler, Course course, MCCAmetysObjectTree tree) throws SAXException
Course
.handler
- The transformer handlercourse
- The course to saxtree
- The MCC treeSAXException
- If an error occursprotected void saxTreeChildren(TransformerHandler handler, MCCAmetysObjectTree tree) throws SAXException
handler
- The transformer handlertree
- The MCC treeSAXException
- If an error occursprotected void saxCourseParts(TransformerHandler handler, Course course) throws SAXException
CoursePart
s containing in a Course
.handler
- The transformer handlercourse
- The course with course parts to saxSAXException
- If an error occursprotected abstract void saxMCCs(TransformerHandler handler, Course course, MCCAmetysObjectTree tree) throws SAXException
handler
- The transformer handlercourse
- The concerned Course
to sax the MCCs ontree
- The MCC treeSAXException
- If an error occursprotected void saxSessionEntryDetails(TransformerHandler handler, CompositeMetadata sessionEntry) throws SAXException
handler
- The transformer handlersessionEntry
- The session entry composite metadata to saxSAXException
- If an error occursprotected MCCAmetysObjectTree extractMCCAmetysObjectTree(OrgUnit ou, List<Program> programs)
ou
- the orgunit to extract the MCC fromprograms
- the list of associated programsMCCAmetysObjectTree
protected void addProgram2MCCAmetysObjectTree(MCCAmetysObjectTree tree, Program program)
MCCAmetysObjectTree
tree
- The object treeprogram
- The program to addprotected abstract void populateMCCAmetysObjectTree(MCCAmetysObjectTree tree)
tree
- The MCC treeprivate Long _getCodeAnu(MCCAmetysObjectTree tree)
tree
- The MCC treeprotected abstract String getReportFileName(Program program)
program
- The programprotected abstract void saxGlobalInformations(TransformerHandler handler, Program program) throws SAXException
handler
- The transformer handlerprogram
- The program on which the report is launchedSAXException
- If an error occurs