Interface StockLevelSelectionStrategy
-
- All Known Implementing Classes:
DefaultStockLevelSelectionStrategy
public interface StockLevelSelectionStrategyStrategy used to select a stock level to be associated with an inventory event
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Map<StockLevelModel,java.lang.Long>getStockLevelsForAllocation(java.util.Collection<StockLevelModel> stockLevels, java.lang.Long quantityToAllocate)Sorts and splits theStockLevelModeland returns a Map ofStockLevelModelto fulfill the quantity passed.java.util.Map<StockLevelModel,java.lang.Long>getStockLevelsForCancellation(java.util.Collection<AllocationEventModel> allocationEvents, java.lang.Long quantityToCancel)Extracts the stock levels out of the listAllocationEventModel.
-
-
-
Method Detail
-
getStockLevelsForAllocation
java.util.Map<StockLevelModel,java.lang.Long> getStockLevelsForAllocation(java.util.Collection<StockLevelModel> stockLevels, java.lang.Long quantityToAllocate)
Sorts and splits theStockLevelModeland returns a Map ofStockLevelModelto fulfill the quantity passed.- Parameters:
stockLevels- collection of stock level modelquantityToAllocate- total quantity to be allocated- Returns:
- a map of
StockLevelModeland quantity to be allocated per stock level
-
getStockLevelsForCancellation
java.util.Map<StockLevelModel,java.lang.Long> getStockLevelsForCancellation(java.util.Collection<AllocationEventModel> allocationEvents, java.lang.Long quantityToCancel)
Extracts the stock levels out of the listAllocationEventModel. Sorts, splits and returns a Map ofStockLevelModelto fulfill the quantity passed.- Parameters:
allocationEvents- collection of allocation eventsquantityToCancel- total quantity to be cancelled- Returns:
- a map of
StockLevelModela the quantity to cancel for this stock level.
-
-