Class ECTSSumAnalysis
java.lang.Object
org.ametys.plugins.odfpilotage.report.consistency.AbstractConsistencyAnalysis
org.ametys.plugins.odfpilotage.report.consistency.impl.ECTSSumAnalysis
- All Implemented Interfaces:
ConsistencyAnalysis
,PluginAware
,Prioritizable
,Configurable
,Serviceable
Analysis on ECTS sums at each level of the
Program
.-
Field Summary
Fields inherited from class org.ametys.plugins.odfpilotage.report.consistency.AbstractConsistencyAnalysis
_description, _id, _label, _odfHelper, _pluginName, _priority, _shortId
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription_controlECTS
(ProgramItem programItem, int level) Control the ECTS consistency between the current content and its children.protected Double
_getChildrenECTSSum
(ProgramItem programItem) Get the sum of the children of the current item.protected Double
Get the ECTS of the currentContent
._getErrorMessage
(ProgramItem programItem, Double parentECTS, Double childrenECTS, int level) Get theI18nizableText
representing the error message to display (with parameters).Analyze the program to find inconsistencies.Methods inherited from class org.ametys.plugins.odfpilotage.report.consistency.AbstractConsistencyAnalysis
configure, getDescription, getId, getLabel, getPriority, getShortId, service, setPluginInfo
-
Constructor Details
-
ECTSSumAnalysis
public ECTSSumAnalysis()
-
-
Method Details
-
analyze
Description copied from interface:ConsistencyAnalysis
Analyze the program to find inconsistencies.- Parameters:
program
- The program to analyze- Returns:
- A
List
of lines asI18nizableText
-
_getErrorMessage
protected Map<String,Object> _getErrorMessage(ProgramItem programItem, Double parentECTS, Double childrenECTS, int level) Get theI18nizableText
representing the error message to display (with parameters).- Parameters:
programItem
- The program element which is inconsistencyparentECTS
- Number of ECTS on the parentchildrenECTS
- Number of ECTS on the childrenlevel
- the level of the line to retrieve (hierarchical level begins at 0 for the program)- Returns:
- The error message
-
_controlECTS
Control the ECTS consistency between the current content and its children.- Parameters:
programItem
- TheProgramItem
to check ECTS consistencylevel
- the level of the program item to control (hierarchical level begins at 0 for the program)- Returns:
- The
List
of error messages
-
_getChildrenECTSSum
Get the sum of the children of the current item. It calculates the coef if it's aCourseList
.- Parameters:
programItem
- The parentProgramItem
.- Returns:
- The sum of children ECTS
-
_getECTS
Get the ECTS of the currentContent
. The method is different if it's aProgram
or aCourse
for example.- Parameters:
content
- The content- Returns:
- The value in the ECTS field
-