Class CostComputationData
- java.lang.Object
-
- org.ametys.plugins.odfpilotage.cost.entity.CostComputationData
-
public class CostComputationData extends Object
This class store all of the information computed by theCostComputationComponent
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<CoursePart,CoursePartCostData>
_coursePartsCostData
All informations about each coursePart gathered by their idprotected Map<String,Effectives>
_effectives
Effectives informations gathered by a program itemprotected Map<String,EqTD>
_eqTD
TD equivalent values gathered by a program itemprotected Map<String,Map<Container,Double>>
_eqTDByStep
All td equivalent by step gathered by their program item idprivate Map<String,Double>
_heReport
HE report value gathered by a program itemprotected Map<String,Map<Container,Double>>
_programItemEffectiveByStep
All effectives by step gathered by their program item idprotected List<ProgramItem>
_programItemStructure
List of program items in the program structureprotected Map<ProgramItem,Map<String,Container>>
_steps
Steps gathered by their programprotected Map<String,VolumesOfHours>
_volumesOfHours
Hourly volume gathered by a program item
-
Constructor Summary
Constructors Constructor Description CostComputationData()
The constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Double effective, Container step, ProgramItem programItem)
Add a new effective by step to a program itemvoid
add(String parentId, String programItemId)
Transfer and compute effectives by step of the parent to the program itemvoid
addCoursePartCostData(CoursePart coursePart, CoursePartCostData coursePartCostData)
Add an element in the coursePartInformation mapvoid
addEnteredEffective(String programItemId, Optional<Double> enteredEffective)
Affect a new entered effective to a programItemvoid
addEqTD(String programItemId, EqTD eqTD)
Add a new TD equivalent to a programItemvoid
addEqTDByStep(String coursePartId, Map<Container,Double> eqTDByStep)
Affect eqTD values by step to a course partvoid
addGlobalComputedEffective(String programItemId, Double computedGlobalEffective)
Affect a new global computed effective to a programItemvoid
addHeReport(String programItemPath, Double heReport)
Add a new HE report value to a programItemvoid
addLocalComputedEffective(String programItemId, String programItemPath, Double effectifCalculeLocal)
Affect a new local computed effective to a programItemvoid
addProgramItem(ProgramItem programItem)
Add a new ProgramItem to the structurevoid
addSteps(Map<String,Container> steps, ProgramItem programItem)
Add all steps of a program itemvoid
addVolumeOfHours(String programItemId, VolumesOfHours volumeOfHours)
Add a new volume of hours to a programItemvoid
cloneWithWeight(double weight, ProgramItem programItem)
Apply a weight to all effectives by step of a program itemBoolean
contains(ProgramItem programItem)
Check if the program item belong to current structureMap<Container,Double>
getAllEffectivesByStep()
Get all effectives by stepOptional<Double>
getComputedLocalEffective(String programItemId, String programItempath)
Get the local computed effective of a program itemMap<CoursePart,CoursePartCostData>
getCoursePartCostData()
Get the computedCourseParts mapCoursePartCostData
getCoursePartCostData(CoursePart coursePart)
Get coursePart informations retrieved by a coursePartEffectives
getEffective(String programItemId)
Get the effective of a programItemMap<Container,Double>
getEffectiveByStep(String programItemId)
Get effectives by step of a program itemOptional<Double>
getEnteredEffective(String programItemId)
Get the entered effective of a programItemEqTD
getEqTD(String programItemId)
Get the TD equivalent of a programItemMap<Container,Double>
getEqTDByStep(String coursePartId)
Get eqTD values of a course partMap<String,Double>
getEqTDGlobal()
Get all global eqTD valuesMap<String,Double>
getEqTDPorte()
Get all local eqTD valuesMap<String,Double>
getEqTDProratise()
Get all pro-rated eqTD valuesOptional<Double>
getGlobalComputedEffective(String programItemId)
Get the global computed effective of a programItemMap<String,Double>
getHeReport()
Get all HE report valuesDouble
getHeReport(String programItemPath)
Get the HE report value of a programItemList<ProgramItem>
getProgramItemStructure()
Get the program item structureMap<ProgramItem,Map<String,Container>>
getSteps()
Get all steps of all program itemMap<String,VolumesOfHours>
getVolumesOfHours()
Get all volumes of hours gathered by their program item idVolumesOfHours
getVolumesOfHours(String programItemId)
Get the volume of hours of a programItemboolean
hasCoursePartsInfos(CoursePart coursePart)
Check if the map contains the key in parametervoid
setEffective(String programItemId, Effectives effective)
Add the effective of a programItem
-
-
-
Field Detail
-
_coursePartsCostData
protected Map<CoursePart,CoursePartCostData> _coursePartsCostData
All informations about each coursePart gathered by their id
-
_volumesOfHours
protected Map<String,VolumesOfHours> _volumesOfHours
Hourly volume gathered by a program item
-
_effectives
protected Map<String,Effectives> _effectives
Effectives informations gathered by a program item
-
_programItemStructure
protected List<ProgramItem> _programItemStructure
List of program items in the program structure
-
_eqTDByStep
protected Map<String,Map<Container,Double>> _eqTDByStep
All td equivalent by step gathered by their program item id
-
_programItemEffectiveByStep
protected Map<String,Map<Container,Double>> _programItemEffectiveByStep
All effectives by step gathered by their program item id
-
-
Constructor Detail
-
CostComputationData
public CostComputationData()
The constructor
-
-
Method Detail
-
addProgramItem
public void addProgramItem(ProgramItem programItem)
Add a new ProgramItem to the structure- Parameters:
programItem
- the new ProgramItem
-
contains
public Boolean contains(ProgramItem programItem)
Check if the program item belong to current structure- Parameters:
programItem
- the programItem- Returns:
- true if the list contains the programItem in parameter
-
getProgramItemStructure
public List<ProgramItem> getProgramItemStructure()
Get the program item structure- Returns:
- the program item structure
-
getCoursePartCostData
public Map<CoursePart,CoursePartCostData> getCoursePartCostData()
Get the computedCourseParts map- Returns:
- the computedCourseParts map
-
addCoursePartCostData
public void addCoursePartCostData(CoursePart coursePart, CoursePartCostData coursePartCostData)
Add an element in the coursePartInformation map- Parameters:
coursePart
- the coursePartcoursePartCostData
- cost data values of the coursePart
-
hasCoursePartsInfos
public boolean hasCoursePartsInfos(CoursePart coursePart)
Check if the map contains the key in parameter- Parameters:
coursePart
- the key- Returns:
- true is the map contains the key
-
getCoursePartCostData
public CoursePartCostData getCoursePartCostData(CoursePart coursePart)
Get coursePart informations retrieved by a coursePart- Parameters:
coursePart
- the coursePart- Returns:
- coursePart informations
-
cloneWithWeight
public void cloneWithWeight(double weight, ProgramItem programItem)
Apply a weight to all effectives by step of a program item- Parameters:
weight
- the weightprogramItem
- the program item
-
add
public void add(Double effective, Container step, ProgramItem programItem)
Add a new effective by step to a program item- Parameters:
effective
- the effective to sumstep
- the stepprogramItem
- the program item
-
add
public void add(String parentId, String programItemId)
Transfer and compute effectives by step of the parent to the program item- Parameters:
parentId
- the id of the parentprogramItemId
- the id of the program item
-
addEnteredEffective
public void addEnteredEffective(String programItemId, Optional<Double> enteredEffective)
Affect a new entered effective to a programItem- Parameters:
programItemId
- the id of the programItementeredEffective
- the new entered effective
-
addGlobalComputedEffective
public void addGlobalComputedEffective(String programItemId, Double computedGlobalEffective)
Affect a new global computed effective to a programItem- Parameters:
programItemId
- the id of the programItemcomputedGlobalEffective
- the new computed global effective
-
addLocalComputedEffective
public void addLocalComputedEffective(String programItemId, String programItemPath, Double effectifCalculeLocal)
Affect a new local computed effective to a programItem- Parameters:
programItemId
- the id of the programItemprogramItemPath
- the current patheffectifCalculeLocal
- the new computed local effective
-
getEnteredEffective
public Optional<Double> getEnteredEffective(String programItemId)
Get the entered effective of a programItem- Parameters:
programItemId
- the id of the programItem- Returns:
- the optional value of the effective
-
getGlobalComputedEffective
public Optional<Double> getGlobalComputedEffective(String programItemId)
Get the global computed effective of a programItem- Parameters:
programItemId
- the id of the programItem- Returns:
- the optional value of the effective
-
getComputedLocalEffective
public Optional<Double> getComputedLocalEffective(String programItemId, String programItempath)
Get the local computed effective of a program item- Parameters:
programItemId
- the id of the program itemprogramItempath
- the program item path- Returns:
- the optional value of the effective
-
getEffective
public Effectives getEffective(String programItemId)
Get the effective of a programItem- Parameters:
programItemId
- the id of the programItem- Returns:
- the effective
-
setEffective
public void setEffective(String programItemId, Effectives effective)
Add the effective of a programItem- Parameters:
programItemId
- the id of the programItemeffective
- the effective
-
getVolumesOfHours
public VolumesOfHours getVolumesOfHours(String programItemId)
Get the volume of hours of a programItem- Parameters:
programItemId
- the id of the programItem- Returns:
- the hourly volume
-
getVolumesOfHours
public Map<String,VolumesOfHours> getVolumesOfHours()
Get all volumes of hours gathered by their program item id- Returns:
- all volumes of hours
-
addVolumeOfHours
public void addVolumeOfHours(String programItemId, VolumesOfHours volumeOfHours)
Add a new volume of hours to a programItem- Parameters:
programItemId
- the id of the programItemvolumeOfHours
- the volume of hours
-
addEqTD
public void addEqTD(String programItemId, EqTD eqTD)
Add a new TD equivalent to a programItem- Parameters:
programItemId
- the id of the programItemeqTD
- the TD equivalent
-
getEqTD
public EqTD getEqTD(String programItemId)
Get the TD equivalent of a programItem- Parameters:
programItemId
- the id of a programItem- Returns:
- the TD equivalent
-
addSteps
public void addSteps(Map<String,Container> steps, ProgramItem programItem)
Add all steps of a program item- Parameters:
steps
- all stepsprogramItem
- the program item
-
getSteps
public Map<ProgramItem,Map<String,Container>> getSteps()
Get all steps of all program item- Returns:
- all steps of all program item
-
getAllEffectivesByStep
public Map<Container,Double> getAllEffectivesByStep()
Get all effectives by step- Returns:
- all effectives by step
-
getEffectiveByStep
public Map<Container,Double> getEffectiveByStep(String programItemId)
Get effectives by step of a program item- Parameters:
programItemId
- the program item id- Returns:
- effectives by step of a program item
-
addEqTDByStep
public void addEqTDByStep(String coursePartId, Map<Container,Double> eqTDByStep)
Affect eqTD values by step to a course part- Parameters:
coursePartId
- the coursePart ideqTDByStep
- eqTD by step values
-
getEqTDByStep
public Map<Container,Double> getEqTDByStep(String coursePartId)
Get eqTD values of a course part- Parameters:
coursePartId
- the course part id- Returns:
- eqTD values
-
addHeReport
public void addHeReport(String programItemPath, Double heReport)
Add a new HE report value to a programItem- Parameters:
programItemPath
- the path of the programItemheReport
- the HE report value
-
getHeReport
public Double getHeReport(String programItemPath)
Get the HE report value of a programItem- Parameters:
programItemPath
- the path of a programItem- Returns:
- the HE report value
-
getHeReport
public Map<String,Double> getHeReport()
Get all HE report values- Returns:
- all HE report values
-
getEqTDProratise
public Map<String,Double> getEqTDProratise()
Get all pro-rated eqTD values- Returns:
- all pro-rated eqTD values
-
getEqTDPorte
public Map<String,Double> getEqTDPorte()
Get all local eqTD values- Returns:
- all local eqTD values
-
getEqTDGlobal
public Map<String,Double> getEqTDGlobal()
Get all global eqTD values- Returns:
- all global eqTD values
-
-