Class WarehousingAvailabilityCalculationStrategy
java.lang.Object
de.hybris.platform.commerceservices.stock.strategies.impl.DefaultCommerceAvailabilityCalculationStrategy
de.hybris.platform.warehousing.atp.strategy.impl.WarehousingAvailabilityCalculationStrategy
- All Implemented Interfaces:
CommerceAvailabilityCalculationStrategy
public class WarehousingAvailabilityCalculationStrategy
extends DefaultCommerceAvailabilityCalculationStrategy
Warehousing implementation of
CommerceAvailabilityCalculationStrategy-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculateAvailability(Collection<StockLevelModel> stockLevels) protected Collection<StockLevelModel>filterStockLevels(Collection<StockLevelModel> stockLevels) Removes theStockLevelModel(s) that are either forced out of stock Or if they belong to cancelledAdvancedShippingNoticeModelprotected Collection<StockLevelModel>filterStockLevelsExternal(Collection<StockLevelModel> stockLevels) Filters the stock level that are externalprotected Collection<StockLevelModel>filterStockLevelsReturned(Collection<StockLevelModel> stockLevels) Filters the stock level that are returned binsfilterStocks(Collection<StockLevelModel> stockLevels, AtpFormulaModel atpFormula) Filters theStockLevelModel(s) based on givenAtpFormulaModelprotected AtpFormulaServiceprotected BaseStoreServiceprotected AtpFormulaModelgetDefaultAtpFormula(Collection<StockLevelModel> stockLevels) Gets the default ATP formula based on the current basestore or from the first stock level of the given listprotected RestockConfigServicevoidsetAtpFormulaService(AtpFormulaService atpFormulaService) voidsetBaseStoreService(BaseStoreService baseStoreService) voidsetRestockConfigService(RestockConfigService restockConfigService) Methods inherited from class de.hybris.platform.commerceservices.stock.strategies.impl.DefaultCommerceAvailabilityCalculationStrategy
getAvailableToSellQuantity
-
Constructor Details
-
WarehousingAvailabilityCalculationStrategy
public WarehousingAvailabilityCalculationStrategy()
-
-
Method Details
-
calculateAvailability
- Specified by:
calculateAvailabilityin interfaceCommerceAvailabilityCalculationStrategy- Overrides:
calculateAvailabilityin classDefaultCommerceAvailabilityCalculationStrategy
-
getDefaultAtpFormula
Gets the default ATP formula based on the current basestore or from the first stock level of the given list- Parameters:
stockLevels- the list of stock levels from where to retrieve the default base store in case the current basestore is unknown- Returns:
- the default ATP formula
-
filterStocks
protected Map<String,Object> filterStocks(Collection<StockLevelModel> stockLevels, AtpFormulaModel atpFormula) Filters theStockLevelModel(s) based on givenAtpFormulaModel- Parameters:
stockLevels-StockLevelModelto be filteredatpFormula-AtpFormulaModelthe formula to filter the stocks- Returns:
- A map that contains filtered stocklevels
-
filterStockLevels
Removes theStockLevelModel(s) that are either forced out of stock Or if they belong to cancelledAdvancedShippingNoticeModel- Parameters:
stockLevels- the stock levels to filter- Returns:
- the filtered stock levels
-
filterStockLevelsReturned
protected Collection<StockLevelModel> filterStockLevelsReturned(Collection<StockLevelModel> stockLevels) Filters the stock level that are returned bins- Parameters:
stockLevels- theStockLevelModelto filter- Returns:
- the filtered stock levels (i.e levels that are returned bins)
-
filterStockLevelsExternal
protected Collection<StockLevelModel> filterStockLevelsExternal(Collection<StockLevelModel> stockLevels) Filters the stock level that are external- Parameters:
stockLevels- theStockLevelModelto filter- Returns:
- the external stocklevels
-
getAtpFormulaService
-
setAtpFormulaService
-
getRestockConfigService
-
setRestockConfigService
-
getBaseStoreService
-
setBaseStoreService
-