Class ProductConfigurationPricingStrategyImpl
- java.lang.Object
-
- de.hybris.platform.sap.productconfig.services.impl.ProductConfigurationPricingStrategyImpl
-
- All Implemented Interfaces:
ProductConfigurationPricingStrategy
- Direct Known Subclasses:
ProductConfigurationSynchronousPricingStrategyImpl
public class ProductConfigurationPricingStrategyImpl extends java.lang.Object implements ProductConfigurationPricingStrategy
Default implementation for pricing for configurable products
-
-
Constructor Summary
Constructors Constructor Description ProductConfigurationPricingStrategyImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConfigurationAbstractOrderEntryLinkStrategygetAbstractOrderEntryLinkStrategy()protected CommerceCartServicegetCommerceCartService()protected ProductConfigurationServicegetConfigurationService()protected ModelServicegetModelService()protected CommerceCartParametergetParametersForCartUpdate(AbstractOrderEntryModel entry)protected PricingServicegetPricingService()protected booleanhasBasePriceChanged(AbstractOrderEntryModel entry, java.lang.Double newPrice)booleanisCartPricingErrorPresent(ConfigModel configModel)Indicates whether there is a problem to obtain correct prices for cart/orderprotected PriceModelretrieveCurrentTotalPrice(java.lang.String configId)voidsetAbstractOrderEntryLinkStrategy(ConfigurationAbstractOrderEntryLinkStrategy configurationAbstractOrderEntryLinkStrategy)voidsetCommerceCartService(CommerceCartService commerceCartService)voidsetConfigurationService(ProductConfigurationService configurationService)voidsetModelService(ModelService modelService)voidsetPricingService(PricingService pricingService)booleanupdateCartEntryBasePrice(AbstractOrderEntryModel entry)Updates cart entry's base price from configuration model if a price is available in configuration model.booleanupdateCartEntryPrices(AbstractOrderEntryModel entry, boolean calculateCart, CommerceCartParameter passedParameter)Updates cart entry's base price (in case it deviates from the current configuration price) from configuration model/pricing service.
-
-
-
Method Detail
-
updateCartEntryBasePrice
public boolean updateCartEntryBasePrice(AbstractOrderEntryModel entry)
Description copied from interface:ProductConfigurationPricingStrategyUpdates cart entry's base price from configuration model if a price is available in configuration model. ConfigId has to be present in current session for given cart entry to retrieve configuration model. The caller has to take care for triggering recalculate of cart afterwards.- Specified by:
updateCartEntryBasePricein interfaceProductConfigurationPricingStrategy- Parameters:
entry- cart entry- Returns:
- true if cart entry has been updated
-
hasBasePriceChanged
protected boolean hasBasePriceChanged(AbstractOrderEntryModel entry, java.lang.Double newPrice)
-
updateCartEntryPrices
public boolean updateCartEntryPrices(AbstractOrderEntryModel entry, boolean calculateCart, CommerceCartParameter passedParameter)
Description copied from interface:ProductConfigurationPricingStrategyUpdates cart entry's base price (in case it deviates from the current configuration price) from configuration model/pricing service. ConfigId has to be present in current session for given cart entry to retrieve configuration model. This includes recalculation and saving of the cart if entry prices were updated.- Specified by:
updateCartEntryPricesin interfaceProductConfigurationPricingStrategy- Parameters:
entry- cart entrycalculateCart- specifies whether cart is calculated on successful updatepassedParameter- parameters for recalculation of the cart- Returns:
- true if cart entry has been updated
-
getParametersForCartUpdate
protected CommerceCartParameter getParametersForCartUpdate(AbstractOrderEntryModel entry)
-
retrieveCurrentTotalPrice
protected PriceModel retrieveCurrentTotalPrice(java.lang.String configId)
-
isCartPricingErrorPresent
public boolean isCartPricingErrorPresent(ConfigModel configModel)
Description copied from interface:ProductConfigurationPricingStrategyIndicates whether there is a problem to obtain correct prices for cart/order- Specified by:
isCartPricingErrorPresentin interfaceProductConfigurationPricingStrategy- Parameters:
configModel- configuration model that represents the runtime state of the configuration- Returns:
- true if no prices can be obtained at the moment
-
getConfigurationService
protected ProductConfigurationService getConfigurationService()
-
setConfigurationService
public void setConfigurationService(ProductConfigurationService configurationService)
- Parameters:
configurationService- the configurationService to set
-
getPricingService
protected PricingService getPricingService()
-
setPricingService
public void setPricingService(PricingService pricingService)
- Parameters:
pricingService- the pricingService to set
-
getCommerceCartService
protected CommerceCartService getCommerceCartService()
-
setCommerceCartService
public void setCommerceCartService(CommerceCartService commerceCartService)
- Parameters:
commerceCartService- the commerceCartService to set
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
- Parameters:
modelService- the modelService to set
-
getAbstractOrderEntryLinkStrategy
protected ConfigurationAbstractOrderEntryLinkStrategy getAbstractOrderEntryLinkStrategy()
-
setAbstractOrderEntryLinkStrategy
public void setAbstractOrderEntryLinkStrategy(ConfigurationAbstractOrderEntryLinkStrategy configurationAbstractOrderEntryLinkStrategy)
-
-