Class DefaultCommercePriceService
- java.lang.Object
-
- de.hybris.platform.commerceservices.price.impl.DefaultCommercePriceService
-
- All Implemented Interfaces:
CommercePriceService
- Direct Known Subclasses:
DefaultSubscriptionCommercePriceService
public class DefaultCommercePriceService extends java.lang.Object implements CommercePriceService
Default implementation ofCommercePriceService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultCommercePriceService.PriceInformationComparator
Comparator to naturally order PriceInformation by price value ascending
-
Constructor Summary
Constructors Constructor Description DefaultCommercePriceService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
fillAllVariantPrices(ProductModel product, java.util.Collection<PriceInformation> prices)
protected java.util.Collection<PriceInformation>
getAllVariantPrices(ProductModel product)
PriceInformation
getFromPriceForProduct(ProductModel product)
Retrieve the minimum price from all variantsprotected PriceInformation
getLowestVariantPrice(ProductModel product)
protected PriceService
getPriceService()
PriceInformation
getWebPriceForProduct(ProductModel product)
Retrieve the first price returned by ProductItemvoid
setPriceService(PriceService priceService)
-
-
-
Method Detail
-
getFromPriceForProduct
public PriceInformation getFromPriceForProduct(ProductModel product)
Description copied from interface:CommercePriceService
Retrieve the minimum price from all variants- Specified by:
getFromPriceForProduct
in interfaceCommercePriceService
- Parameters:
product
- the product- Returns:
- PriceInformation
-
getWebPriceForProduct
public PriceInformation getWebPriceForProduct(ProductModel product)
Description copied from interface:CommercePriceService
Retrieve the first price returned by ProductItem- Specified by:
getWebPriceForProduct
in interfaceCommercePriceService
- Parameters:
product
- the product- Returns:
- PriceInformation
-
getLowestVariantPrice
protected PriceInformation getLowestVariantPrice(ProductModel product)
-
getAllVariantPrices
protected java.util.Collection<PriceInformation> getAllVariantPrices(ProductModel product)
-
fillAllVariantPrices
protected void fillAllVariantPrices(ProductModel product, java.util.Collection<PriceInformation> prices)
-
getPriceService
protected PriceService getPriceService()
-
setPriceService
public void setPriceService(PriceService priceService)
-
-