Class CostComputationDataCache
java.lang.Object
org.ametys.plugins.odfpilotage.cost.entity.CostComputationDataCache
This class store caches of the CostComputationDataComponent
-
Constructor Summary
ConstructorDescriptionCostComputationDataCache
(List<Program> programs, List<OdfReferenceTableEntry> norms, List<OdfReferenceTableEntry> teachingNatures, String yearNature, OverriddenData overriddenData) The constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected void
_initializeNatureData
(List<OdfReferenceTableEntry> teachingNatures) Retrieve teaching nature values created and initialize informations about them in the cacheprotected void
Retrieve norm values created and initialize informations about them in the cacheboolean
addExploredItem
(String exploredItem) Add the item to the list of explored itemsGet the computation data, useful at the end of the computation to return the final results.getEffectiveMinMaxByNature
(String natureId) Get an effectiveMinMax for a nature idgetEffectives
(String programItemId) Get a computed effective for a program item idGet the td equivalent for a program item idgetEqTDByNature
(String natureId) Get an eqTD value for a natureIdgetEqTDComputationByNature
(String natureId) Get an eqTD computation mode for a natureIdGet the groups for a program item idgetNormDetails
(String programItemId) Get the norm details for a program item idgetNormDetailsForNature
(String normId, String natureId) Get the norm retrieved by a nature idgetOverriddenEffective
(String programItemId) Get the overridden effective of a program itemgetOverriddenGroups
(String programItemId) Get the overridden number groups of a program itemgetOverriddenVolumeOfHours
(String programItemId) Get the overridden volume of hours of a program itemgetProgramItemData
(String programItemId) Get the full program item (or course part, or orgunit) computed datagetVolumesOfHours
(String programItemId) Get the volumes of hours for a program item idGet a weight for a program itemGet the identifier of the year nature.boolean
natureInNormExists
(String normId, String natureId) Check if the norms map contains the nature idboolean
normExists
(String normId) Check if the norms map contains the norm idvoid
putEffectives
(String programItemId, Effectives effectives) Put a computed effective in the mapvoid
Put td equivalent in the cache for a program item (or course part)void
Put groups in the cache for a program item (or course part)void
putNormDetails
(String programItemId, NormDetails normDetails) Put norm details in the cache for a program item (or course part)void
putVolumesOfHours
(String programItemId, VolumesOfHours volumesOfHours) Put volumes of hours in the cache for a program item (or course part)void
Put a weight in the cache for a program item (or course part)
-
Constructor Details
-
CostComputationDataCache
public CostComputationDataCache(List<Program> programs, List<OdfReferenceTableEntry> norms, List<OdfReferenceTableEntry> teachingNatures, String yearNature, OverriddenData overriddenData) The constructor- Parameters:
programs
- the programs concerned by the current cost computationnorms
- list of normsteachingNatures
- list of teaching naturesyearNature
- identifier for the container's nature with year ("annee") valueoverriddenData
- overridden data by the user
-
-
Method Details
-
_initializeNormData
Retrieve norm values created and initialize informations about them in the cache- Parameters:
norms
- list of norms
-
_initializeNatureData
Retrieve teaching nature values created and initialize informations about them in the cache- Parameters:
teachingNatures
- list of teaching natures
-
addExploredItem
Add the item to the list of explored items- Parameters:
exploredItem
- the item to explore- Returns:
false
if the item has already been added
-
getCostComputationData
Get the computation data, useful at the end of the computation to return the final results.- Returns:
- A
CostComputationData
object with volumes, eqTD, groups, effectives, etc.
-
getEqTDComputationByNature
Get an eqTD computation mode for a natureId- Parameters:
natureId
- the nature id- Returns:
- the eqTD computation mode
-
getEqTDByNature
Get an eqTD value for a natureId- Parameters:
natureId
- the nature id- Returns:
- the eqTD value
-
getEffectiveMinMaxByNature
Get an effectiveMinMax for a nature id- Parameters:
natureId
- the nature id- Returns:
- the effective min max
-
getNormDetailsForNature
Get the norm retrieved by a nature id- Parameters:
normId
- the norm idnatureId
- the nature id- Returns:
- the norm
-
normExists
Check if the norms map contains the norm id- Parameters:
normId
- the norm id- Returns:
- true if the norms map contains the norm id
-
natureInNormExists
Check if the norms map contains the nature id- Parameters:
normId
- the norm idnatureId
- the nature id- Returns:
- true if the norms map contains the nature id
-
getYearNature
Get the identifier of the year nature.- Returns:
- the identifier of the year ("annee") container's nature, can be null
-
getProgramItemData
Get the full program item (or course part, or orgunit) computed data- Parameters:
programItemId
- the identifier of the object- Returns:
- a
ProgramItemData
containing all useful informations for a given program item (or course part, or orgunit)
-
getEffectives
Get a computed effective for a program item id- Parameters:
programItemId
- the program item (or course part) identifier- Returns:
- the computed effective
-
putEffectives
Put a computed effective in the map- Parameters:
programItemId
- the program item (or course part) identifiereffectives
- the effectives
-
getWeight
Get a weight for a program item- Parameters:
programItemId
- the program item id- Returns:
- the weight
-
putWeight
Put a weight in the cache for a program item (or course part)- Parameters:
programItemId
- the program item (or course part) identifierweight
- the weight
-
getVolumesOfHours
Get the volumes of hours for a program item id- Parameters:
programItemId
- the program item (or course part) identifier- Returns:
- the volumes of hours
-
putVolumesOfHours
Put volumes of hours in the cache for a program item (or course part)- Parameters:
programItemId
- the program item (or course part) identifiervolumesOfHours
- the volumes of hours
-
getGroups
Get the groups for a program item id- Parameters:
programItemId
- the program item (or course part) identifier- Returns:
- the groups
-
putGroups
Put groups in the cache for a program item (or course part)- Parameters:
programItemId
- the program item (or course part) identifiergroups
- the groups
-
getEqTD
Get the td equivalent for a program item id- Parameters:
programItemId
- the program item (or course part) identifier- Returns:
- the td equivalent
-
putEqTD
Put td equivalent in the cache for a program item (or course part)- Parameters:
programItemId
- the program item (or course part) identifiereqTD
- the td equivalent
-
getNormDetails
Get the norm details for a program item id- Parameters:
programItemId
- the program item (or course part) identifier- Returns:
- the norm details
-
putNormDetails
Put norm details in the cache for a program item (or course part)- Parameters:
programItemId
- the program item (or course part) identifiernormDetails
- the norm details
-
getOverriddenEffective
Get the overridden effective of a program item- Parameters:
programItemId
- the program item id- Returns:
- the overridden effective
-
getOverriddenGroups
Get the overridden number groups of a program item- Parameters:
programItemId
- the program item id- Returns:
- the overridden number of groups
-
getOverriddenVolumeOfHours
Get the overridden volume of hours of a program item- Parameters:
programItemId
- the program item id- Returns:
- the overridden volume of hours
-