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 classDefaultCommercePriceService.PriceInformationComparatorComparator 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 voidfillAllVariantPrices(ProductModel product, java.util.Collection<PriceInformation> prices)protected java.util.Collection<PriceInformation>getAllVariantPrices(ProductModel product)PriceInformationgetFromPriceForProduct(ProductModel product)Retrieve the minimum price from all variantsprotected PriceInformationgetLowestVariantPrice(ProductModel product)protected PriceServicegetPriceService()PriceInformationgetWebPriceForProduct(ProductModel product)Retrieve the first price returned by ProductItemvoidsetPriceService(PriceService priceService)
-
-
-
Method Detail
-
getFromPriceForProduct
public PriceInformation getFromPriceForProduct(ProductModel product)
Description copied from interface:CommercePriceServiceRetrieve the minimum price from all variants- Specified by:
getFromPriceForProductin interfaceCommercePriceService- Parameters:
product- the product- Returns:
- PriceInformation
-
getWebPriceForProduct
public PriceInformation getWebPriceForProduct(ProductModel product)
Description copied from interface:CommercePriceServiceRetrieve the first price returned by ProductItem- Specified by:
getWebPriceForProductin 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)
-
-