Class PotentielEnseignantReport
- 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.PotentielEnseignantReport
-
- All Implemented Interfaces:
PilotageReport
,LogEnabled
,PluginAware
,Initializable
,Configurable
,Serviceable
public class PotentielEnseignantReport extends AbstractReport
Pilotage report for "potentiel enseignant".
-
-
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 Modifier and Type Field Description protected CostComputationComponent
_costComputationComponent
CalculerEffectifComponentprivate Map<String,Double>
_eqTDByNature
private Map<String,Double>
_nbHoursSumByDiscipline
-
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 PotentielEnseignantReport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private List<CoursePart>
_getCoursePartsForProgramItem(ProgramItem programItem)
Get theCoursePart
of the given program item.private Set<OrgUnit>
_getDirectOrgUnits(ProgramItem programItem)
private String
_getDisciplineEnseignement(CoursePart coursePart)
private Optional<String>
_getDisciplineEnseignementAttribute(Content content)
private Double
_getEqTD(CoursePart coursePart)
private Long
_getGroups(CoursePart coursePart, CostComputationData costData)
private void
_initializeData()
private boolean
_isHoldByOrgUnit(CoursePart coursePart, OrgUnit orgUnit)
protected void
_launchByOrgUnit(String uaiCode, String catalog, String lang)
Launch a report generation on an orgunit.private boolean
_matchOrgUnit(OrgUnit orgUnit, OrgUnit orgUnitToMatch)
private OrgUnit
_resolve(String id)
private Set<OrgUnit>
_resolveAll(Collection<String> orgUnitIds)
private Set<OrgUnit>
_retrieveOrgUnits(ProgramItem programItem)
private Set<OrgUnit>
_retrieveOrgUnitsFromParents(ProgramItem programItem)
private void
_saxNbHoursSum(TransformerHandler handler)
Sax the final lines : number of hours sum by discipline.private void
_saxOptional(TransformerHandler handler, String tagName, Optional<String> value)
Sax if optional is present.private void
_saxPotentielEnseignant(TransformerHandler handler, OrgUnit orgUnit)
Sax the potentials for the given org unit.private void
_sumNbHoursByDiscipline(List<Program> programs, OrgUnit orgUnit)
Sum hours by discipline for the course parts of the given programs which belongs to the given org unit.protected void
_writeReport(OrgUnit orgUnit, String catalog, String lang)
Write the report.protected Set<String>
getSupportedOutputFormats()
Get the list of supported output formatsprotected String
getType()
Get the name of the reportvoid
service(ServiceManager manager)
-
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, initialize, isCompatibleSchedulable, isGeneric, isSupportedFormat, launch, sendMail, setPluginInfo, supports
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_costComputationComponent
protected CostComputationComponent _costComputationComponent
CalculerEffectifComponent
-
_eqTDByNature
private Map<String,Double> _eqTDByNature
-
_nbHoursSumByDiscipline
private Map<String,Double> _nbHoursSumByDiscipline
-
-
Constructor Detail
-
PotentielEnseignantReport
public PotentielEnseignantReport()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractPilotageReport
- Throws:
ServiceException
-
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 classAbstractPilotageReport
- Returns:
- A
Set
of supported output formats
-
_launchByOrgUnit
protected void _launchByOrgUnit(String uaiCode, String catalog, String lang) throws Exception
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
-
_initializeData
private void _initializeData()
-
_writeReport
protected void _writeReport(OrgUnit orgUnit, String catalog, String lang)
Write the report.- Parameters:
orgUnit
- The orgunitcatalog
- The cataloglang
- The language
-
_saxNbHoursSum
private void _saxNbHoursSum(TransformerHandler handler) throws SAXException
Sax the final lines : number of hours sum by discipline.- Parameters:
handler
- The transformer handler- Throws:
SAXException
- if an error occurs
-
_saxPotentielEnseignant
private void _saxPotentielEnseignant(TransformerHandler handler, OrgUnit orgUnit) throws SAXException
Sax the potentials for the given org unit.- Parameters:
handler
- The transformer handlerorgUnit
- The org unit- Throws:
SAXException
- if an error occurs
-
_saxOptional
private void _saxOptional(TransformerHandler handler, String tagName, Optional<String> value) throws SAXException
Sax if optional is present.- Parameters:
handler
- The transformer handlertagName
- The tag namevalue
- The optional value to sax- Throws:
SAXException
- if an error occurs
-
_sumNbHoursByDiscipline
private void _sumNbHoursByDiscipline(List<Program> programs, OrgUnit orgUnit)
Sum hours by discipline for the course parts of the given programs which belongs to the given org unit.- Parameters:
programs
- The list of programsorgUnit
- The org unit
-
_isHoldByOrgUnit
private boolean _isHoldByOrgUnit(CoursePart coursePart, OrgUnit orgUnit)
-
_retrieveOrgUnits
private Set<OrgUnit> _retrieveOrgUnits(ProgramItem programItem)
-
_retrieveOrgUnitsFromParents
private Set<OrgUnit> _retrieveOrgUnitsFromParents(ProgramItem programItem)
-
_getDirectOrgUnits
private Set<OrgUnit> _getDirectOrgUnits(ProgramItem programItem)
-
_resolveAll
private Set<OrgUnit> _resolveAll(Collection<String> orgUnitIds)
-
_matchOrgUnit
private boolean _matchOrgUnit(OrgUnit orgUnit, OrgUnit orgUnitToMatch)
-
_getGroups
private Long _getGroups(CoursePart coursePart, CostComputationData costData)
-
_getEqTD
private Double _getEqTD(CoursePart coursePart)
-
_getDisciplineEnseignement
private String _getDisciplineEnseignement(CoursePart coursePart)
-
_getDisciplineEnseignementAttribute
private Optional<String> _getDisciplineEnseignementAttribute(Content content)
-
_getCoursePartsForProgramItem
private List<CoursePart> _getCoursePartsForProgramItem(ProgramItem programItem)
Get theCoursePart
of the given program item. Only get course parts when theCourse
doesn't have any children.- Parameters:
programItem
- The program item- Returns:
- A
List
ofCoursePart
-
-