Interface AtpFormulaService
-
- All Known Implementing Classes:
DefaultAtpFormulaService
public interface AtpFormulaServiceServices to interact with ATP formulas.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AtpFormulaModelcreateAtpFormula(AtpFormulaModel atpFormula)Creates anAtpFormulaModelvoiddeleteAtpFormula(java.lang.String formulaCode)Deletes anAtpFormulaModelfrom its code.java.util.Collection<AtpFormulaModel>getAllAtpFormula()Retrieves collection of allAtpFormulaModelin the system.AtpFormulaModelgetAtpFormulaByCode(java.lang.String formulaCode)Retrieves anAtpFormulaModelby its code.java.lang.LonggetAtpValueFromFormula(AtpFormulaModel atpFormula, java.util.Map<java.lang.String,java.lang.Object> params)Retrieves the ATP value from a specific formulaAtpFormulaModelupdateAtpFormula(AtpFormulaModel atpFormula)Updates anAtpFormulaModelbased on its code
-
-
-
Method Detail
-
getAtpFormulaByCode
AtpFormulaModel getAtpFormulaByCode(java.lang.String formulaCode)
Retrieves anAtpFormulaModelby its code.- Parameters:
formulaCode- The formula code for which we want to retrieve a specificAtpFormulaModel.- Returns:
- the corresponding
AtpFormulaModel.
-
getAllAtpFormula
java.util.Collection<AtpFormulaModel> getAllAtpFormula()
Retrieves collection of allAtpFormulaModelin the system.- Returns:
- the collection of all
AtpFormulaModel.
-
createAtpFormula
AtpFormulaModel createAtpFormula(AtpFormulaModel atpFormula)
Creates anAtpFormulaModel- Parameters:
atpFormula- The ATP formula to be created.- Returns:
- the created
AtpFormulaModel.
-
updateAtpFormula
AtpFormulaModel updateAtpFormula(AtpFormulaModel atpFormula)
Updates anAtpFormulaModelbased on its code- Parameters:
atpFormula- The ATP formula to be updated.- Returns:
- the up to date
AtpFormulaModel.
-
deleteAtpFormula
void deleteAtpFormula(java.lang.String formulaCode)
Deletes anAtpFormulaModelfrom its code. Only possible if the formula is not assign to any base store- Parameters:
formulaCode- The formula code that we want to delete
-
getAtpValueFromFormula
java.lang.Long getAtpValueFromFormula(AtpFormulaModel atpFormula, java.util.Map<java.lang.String,java.lang.Object> params)
Retrieves the ATP value from a specific formula- Parameters:
atpFormula- TheAtpFormulaModelfrom which we want to retrieve the ATP valueparams- The list ofStockLevelModelto gather in order to define the ATP value- Returns:
- the number of available item according to the params
-
-