public class MCCDiffReport extends AbstractMCCReport
Modifier and Type | Class and Description |
---|---|
protected static class |
MCCDiffReport.ChangeType
Change type
|
AbstractPilotageReport.PilotageFile, AbstractPilotageReport.PilotageReportStatus
PilotageReport.PilotageReportTarget
Modifier and Type | Field and Description |
---|---|
private ContentComparator |
_contentComparator |
private String |
_oldCatalog |
static String |
PARAMETER_CATALOG_OLD
The key for the old catalog
|
_metadataManager, _STRING2INTEGER_COMPARATOR
_currentFormattedDate, _i18nUtils, _odfHelper, _pilotageHelper, _refTableHelper, _reportHelper, _resolver, _sourceResolver, _tmpFolder, _userManager
PARAMETER_CATALOG, PARAMETER_LANG, PARAMETER_ORGUNIT, PARAMETER_PROGRAM
Constructor and Description |
---|
MCCDiffReport() |
Modifier and Type | Method and Description |
---|---|
private <T extends ProgramItem> |
_findOldProgramItem(T content)
Find the equivalent content in the new catalog
|
private ContentComparatorResult |
_getCourseChanges(Course oldCourse,
Course newCourse)
Compare two courses.
|
private Set<String> |
_getEntryNames(Content content,
String sessionName) |
private ContentComparatorResult |
_getObjectChanges(ProgramItem oldProgramItem,
ProgramItem newProgramItem) |
private boolean |
_hasChanges(ContentComparatorResult result,
String sessionName,
String entryName) |
private boolean |
_hasSameNature(ContentComparatorResult result,
String sessionName,
String entryName) |
private void |
_saxSessionEntry(TransformerHandler handler,
Content content,
String sessionName,
String entryName,
MCCDiffReport.ChangeType changeType) |
protected void |
addProgram2MCCAmetysObjectTree(MCCAmetysObjectTree tree,
Program program)
Add and populate the program to the
MCCAmetysObjectTree |
protected String |
getReportFileName(Program program)
Get the report filename for a given program
|
protected String |
getReportName()
The report name to add in the mail.
|
protected String |
getType()
Get the name of the report
|
protected String |
launchByOrgUnit(Map<String,String> reportParameters)
Launch a report generation on an orgunit.
|
protected void |
populateMCCAmetysObjectTree(MCCAmetysObjectTree tree)
Populate the MCC tree.
|
protected void |
saxGlobalInformations(TransformerHandler handler,
Program program)
Sax the additional global informations of the report.
|
protected void |
saxMCCs(TransformerHandler handler,
Course course,
MCCAmetysObjectTree tree)
Sax the MCC sessions.
|
void |
service(ServiceManager manager) |
_launchByOrgUnit, _processMCC, _writeReportsMcc, extractMCCAmetysObjectTree, saxContainer, saxCourse, saxCourseList, saxCourseParts, saxOrgUnit, saxProgram, saxSessionEntryDetails, saxSubProgram, saxTree, saxTreeChildren
launchByProgram
convertReport, createZipFile, getMailBody, getMailSubject, getPipeline, getPluginName, initialize, launch, sendMail, setPluginInfo
getLogger, setLogger
public static final String PARAMETER_CATALOG_OLD
private String _oldCatalog
private ContentComparator _contentComparator
public MCCDiffReport()
protected String getType()
AbstractPilotageReport
getType
in class AbstractPilotageReport
protected String getReportName()
AbstractPilotageReport
getReportName
in class AbstractPilotageReport
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class AbstractMCCReport
ServiceException
protected String launchByOrgUnit(Map<String,String> reportParameters) throws Exception
AbstractPilotageReport
launchByOrgUnit
in class AbstractReport
reportParameters
- The report parametersException
- if an exception occursprotected void addProgram2MCCAmetysObjectTree(MCCAmetysObjectTree tree, Program program)
AbstractMCCReport
MCCAmetysObjectTree
addProgram2MCCAmetysObjectTree
in class AbstractMCCReport
tree
- The object treeprogram
- The program to addprotected void populateMCCAmetysObjectTree(MCCAmetysObjectTree tree)
AbstractMCCReport
populateMCCAmetysObjectTree
in class AbstractMCCReport
tree
- The MCC treeprivate ContentComparatorResult _getObjectChanges(ProgramItem oldProgramItem, ProgramItem newProgramItem)
private ContentComparatorResult _getCourseChanges(Course oldCourse, Course newCourse)
oldCourse
- The first course to compare (the old one)newCourse
- The second course to compare (the new one)ContentComparatorResult
, or null if an exception occuredprivate <T extends ProgramItem> T _findOldProgramItem(T content)
T
- Type of content to findcontent
- Content in the current catalogprivate Set<String> _getEntryNames(Content content, String sessionName)
protected void saxMCCs(TransformerHandler handler, Course course, MCCAmetysObjectTree tree) throws SAXException
AbstractMCCReport
saxMCCs
in class AbstractMCCReport
handler
- The transformer handlercourse
- The concerned Course
to sax the MCCs ontree
- The MCC treeSAXException
- If an error occursprivate boolean _hasSameNature(ContentComparatorResult result, String sessionName, String entryName)
private boolean _hasChanges(ContentComparatorResult result, String sessionName, String entryName)
private void _saxSessionEntry(TransformerHandler handler, Content content, String sessionName, String entryName, MCCDiffReport.ChangeType changeType) throws SAXException
SAXException
protected String getReportFileName(Program program)
AbstractMCCReport
getReportFileName
in class AbstractMCCReport
program
- The programprotected void saxGlobalInformations(TransformerHandler handler, Program program) throws SAXException
AbstractMCCReport
saxGlobalInformations
in class AbstractMCCReport
handler
- The transformer handlerprogram
- The program on which the report is launchedSAXException
- If an error occurs