Class SyntheseReport
- 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.SyntheseReport
-
- All Implemented Interfaces:
PilotageReport
,LogEnabled
,PluginAware
,Initializable
,Configurable
,Serviceable
public class SyntheseReport extends AbstractReport
Pilotage report for cost modeling synthesis
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
SyntheseReport.CompareProgramItemTitle
Compare two programItem by their title-
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
CalculerEffectifComponent-
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 SyntheseReport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Set<String>
_getNatures(CostComputationData costData)
private String
_getPath(ProgramItem programItem, Container step, CostComputationData costData)
protected void
_launchByOrgUnit(String uaiCode, String catalog, String lang)
Launch a report generation on an orgunit.protected void
_writeColumn(TransformerHandler handler, String natureId)
Write columns content of the reportprivate void
_writeColumns(TransformerHandler handler, CostComputationData costData)
Write columns content of the reportprivate void
_writeLines(TransformerHandler handler, CostComputationData costData, OrgUnit orgUnit)
Write lines content of the reportprivate void
_writeOrgUnitLine(TransformerHandler handler, CostComputationData costData, OrgUnit orgUnit)
private void
_writeProgramLine(TransformerHandler handler, CostComputationData costData, OrgUnit orgUnit, ProgramItem program)
private void
_writeStepLine(TransformerHandler handler, CostComputationData costData, ProgramItem program, Container step)
private void
_writeSyntheseReport(String uaiCode, String catalog, String lang, OrgUnit orgUnit, CostComputationData costData)
Create the synthese report for one organization unitprivate void
_writeValues(TransformerHandler handler, CostComputationData costData, Content program, String path)
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
-
-
Constructor Detail
-
SyntheseReport
public SyntheseReport()
-
-
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
-
_writeSyntheseReport
private void _writeSyntheseReport(String uaiCode, String catalog, String lang, OrgUnit orgUnit, CostComputationData costData)
Create the synthese report for one organization unit- Parameters:
uaiCode
- the reference to the organization unit whose formations are going to be saxedcatalog
- the cataloglang
- The language codeorgUnit
- the orgUnitcostData
- object containing informations about the formation
-
_writeColumns
private void _writeColumns(TransformerHandler handler, CostComputationData costData) throws SAXException
Write columns content of the report- Parameters:
handler
- the sax transformer handlercostData
- informations about the capacity- Throws:
SAXException
- to handle XMLUtils exceptions
-
_getNatures
private Set<String> _getNatures(CostComputationData costData)
-
_writeColumn
protected void _writeColumn(TransformerHandler handler, String natureId) throws SAXException
Write columns content of the report- Parameters:
handler
- the sax transformer handlernatureId
- the nature of the volume of hours- Throws:
SAXException
- to handle XMLUtils exceptions
-
_writeLines
private void _writeLines(TransformerHandler handler, CostComputationData costData, OrgUnit orgUnit) throws SAXException
Write lines content of the report- Parameters:
handler
- the transformer handlercostData
- informations about the capacityorgUnit
- the orgUnit- Throws:
SAXException
- to handle XMLUtils exceptions
-
_writeStepLine
private void _writeStepLine(TransformerHandler handler, CostComputationData costData, ProgramItem program, Container step) throws AmetysRepositoryException, SAXException
-
_writeProgramLine
private void _writeProgramLine(TransformerHandler handler, CostComputationData costData, OrgUnit orgUnit, ProgramItem program) throws AmetysRepositoryException, SAXException
-
_writeOrgUnitLine
private void _writeOrgUnitLine(TransformerHandler handler, CostComputationData costData, OrgUnit orgUnit) throws SAXException
- Throws:
SAXException
-
_writeValues
private void _writeValues(TransformerHandler handler, CostComputationData costData, Content program, String path) throws SAXException
- Throws:
SAXException
-
_getPath
private String _getPath(ProgramItem programItem, Container step, CostComputationData costData)
-
-