Interface AtpFormulaService
- All Known Implementing Classes:
DefaultAtpFormulaService
public interface AtpFormulaService
Services to interact with ATP formulas.
-
Method Summary
Modifier and TypeMethodDescriptioncreateAtpFormula(AtpFormulaModel atpFormula) Creates anAtpFormulaModelvoiddeleteAtpFormula(String formulaCode) Deletes anAtpFormulaModelfrom its code.Retrieves collection of allAtpFormulaModelin the system.getAtpFormulaByCode(String formulaCode) Retrieves anAtpFormulaModelby its code.getAtpValueFromFormula(AtpFormulaModel atpFormula, Map<String, Object> params) Retrieves the ATP value from a specific formulaupdateAtpFormula(AtpFormulaModel atpFormula) Updates anAtpFormulaModelbased on its code
-
Method Details
-
getAtpFormulaByCode
Retrieves anAtpFormulaModelby its code.- Parameters:
formulaCode- The formula code for which we want to retrieve a specificAtpFormulaModel.- Returns:
- the corresponding
AtpFormulaModel.
-
getAllAtpFormula
Collection<AtpFormulaModel> getAllAtpFormula()Retrieves collection of allAtpFormulaModelin the system.- Returns:
- the collection of all
AtpFormulaModel.
-
createAtpFormula
Creates anAtpFormulaModel- Parameters:
atpFormula- The ATP formula to be created.- Returns:
- the created
AtpFormulaModel.
-
updateAtpFormula
Updates anAtpFormulaModelbased on its code- Parameters:
atpFormula- The ATP formula to be updated.- Returns:
- the up to date
AtpFormulaModel.
-
deleteAtpFormula
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
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
-