public class WarehousingAvailabilityCalculationStrategy extends DefaultCommerceAvailabilityCalculationStrategy
CommerceAvailabilityCalculationStrategy| Constructor and Description |
|---|
WarehousingAvailabilityCalculationStrategy() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Long |
calculateAvailability(java.util.Collection<StockLevelModel> stockLevels) |
protected java.util.Collection<StockLevelModel> |
filterStockLevels(java.util.Collection<StockLevelModel> stockLevels)
Removes the
StockLevelModel(s) that are either forced out of stock
Or if they belong to cancelled AdvancedShippingNoticeModel |
protected java.util.Collection<StockLevelModel> |
filterStockLevelsExternal(java.util.Collection<StockLevelModel> stockLevels)
Filters the stock level that are external
|
protected java.util.Collection<StockLevelModel> |
filterStockLevelsReturned(java.util.Collection<StockLevelModel> stockLevels)
Filters the stock level that are returned bins
|
protected java.util.Map<java.lang.String,java.lang.Object> |
filterStocks(java.util.Collection<StockLevelModel> stockLevels,
AtpFormulaModel atpFormula)
Filters the
StockLevelModel(s) based on given AtpFormulaModel |
protected AtpFormulaService |
getAtpFormulaService() |
protected BaseStoreService |
getBaseStoreService() |
protected AtpFormulaModel |
getDefaultAtpFormula(java.util.Collection<StockLevelModel> stockLevels)
Gets the default ATP formula based on the current basestore or from the first stock level of the given list
|
protected RestockConfigService |
getRestockConfigService() |
void |
setAtpFormulaService(AtpFormulaService atpFormulaService) |
void |
setBaseStoreService(BaseStoreService baseStoreService) |
void |
setRestockConfigService(RestockConfigService restockConfigService) |
getAvailableToSellQuantitypublic WarehousingAvailabilityCalculationStrategy()
public java.lang.Long calculateAvailability(java.util.Collection<StockLevelModel> stockLevels)
calculateAvailability in interface CommerceAvailabilityCalculationStrategycalculateAvailability in class DefaultCommerceAvailabilityCalculationStrategyprotected AtpFormulaModel getDefaultAtpFormula(java.util.Collection<StockLevelModel> stockLevels)
stockLevels - the list of stock levels from where to retrieve the default base store in case the current basestore is unknownprotected java.util.Map<java.lang.String,java.lang.Object> filterStocks(java.util.Collection<StockLevelModel> stockLevels, AtpFormulaModel atpFormula)
StockLevelModel(s) based on given AtpFormulaModelstockLevels - StockLevelModel to be filteredatpFormula - AtpFormulaModel the formula to filter the stocksprotected java.util.Collection<StockLevelModel> filterStockLevels(java.util.Collection<StockLevelModel> stockLevels)
StockLevelModel(s) that are either forced out of stock
Or if they belong to cancelled AdvancedShippingNoticeModelstockLevels - the stock levels to filterprotected java.util.Collection<StockLevelModel> filterStockLevelsReturned(java.util.Collection<StockLevelModel> stockLevels)
stockLevels - the StockLevelModel to filterprotected java.util.Collection<StockLevelModel> filterStockLevelsExternal(java.util.Collection<StockLevelModel> stockLevels)
stockLevels - the StockLevelModel to filterprotected AtpFormulaService getAtpFormulaService()
public void setAtpFormulaService(AtpFormulaService atpFormulaService)
protected RestockConfigService getRestockConfigService()
public void setRestockConfigService(RestockConfigService restockConfigService)
protected BaseStoreService getBaseStoreService()
public void setBaseStoreService(BaseStoreService baseStoreService)
Copyright © 2018 SAP SE. All Rights Reserved.