Class DefaultCommerceAvailabilityCalculationStrategy
- java.lang.Object
-
- de.hybris.platform.commerceservices.stock.strategies.impl.DefaultCommerceAvailabilityCalculationStrategy
-
- All Implemented Interfaces:
CommerceAvailabilityCalculationStrategy
- Direct Known Subclasses:
WarehousingAvailabilityCalculationStrategy
public class DefaultCommerceAvailabilityCalculationStrategy extends java.lang.Object implements CommerceAvailabilityCalculationStrategy
-
-
Constructor Summary
Constructors Constructor Description DefaultCommerceAvailabilityCalculationStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.LongcalculateAvailability(java.util.Collection<StockLevelModel> stockLevels)protected longgetAvailableToSellQuantity(StockLevelModel stockLevel)Get the Available To Sell quantity for a StockLevel.
-
-
-
Method Detail
-
calculateAvailability
public java.lang.Long calculateAvailability(java.util.Collection<StockLevelModel> stockLevels)
- Specified by:
calculateAvailabilityin interfaceCommerceAvailabilityCalculationStrategy
-
getAvailableToSellQuantity
protected long getAvailableToSellQuantity(StockLevelModel stockLevel)
Get the Available To Sell quantity for a StockLevel. Available To Sell stock consists of on-hand stock minus stock reserved for orders that have been placed and stock that have been backordered.- Parameters:
stockLevel- the stock level.- Returns:
- the quantity available to sell.
-
-