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 the CostComputationComponent
  • Field Details

  • Constructor Details

  • Method Details

    • 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

      Get the program item structure
      Returns:
      the program item structure
    • 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 coursePart
      coursePartCostData - 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

      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 weight
      programItem - 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 sum
      step - the step
      programItem - 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 parent
      programItemId - 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 programItem
      enteredEffective - 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 programItem
      computedGlobalEffective - 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 programItem
      programItemPath - the current path
      effectifCalculeLocal - 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

      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 item
      programItempath - 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 programItem
      effective - 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

      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 programItem
      volumeOfHours - 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 programItem
      eqTD - 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 steps
      programItem - the program item
    • getSteps

      Get all steps of all program item
      Returns:
      all steps of all program item
    • 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 id
      eqTDByStep - 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 programItem
      heReport - 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

      Get all HE report values
      Returns:
      all HE report values
    • getEqTDProratise

      Get all pro-rated eqTD values
      Returns:
      all pro-rated eqTD values
    • getEqTDPorte

      Get all local eqTD values
      Returns:
      all local eqTD values
    • getEqTDGlobal

      Get all global eqTD values
      Returns:
      all global eqTD values