Class ProductConfigurationOrderIntegrationServiceImpl
- java.lang.Object
-
- de.hybris.platform.sap.productconfig.services.impl.ProductConfigurationOrderIntegrationServiceImpl
-
- All Implemented Interfaces:
ProductConfigurationOrderIntegrationService
public class ProductConfigurationOrderIntegrationServiceImpl extends java.lang.Object implements ProductConfigurationOrderIntegrationService
Default implementation of theProductConfigurationOrderIntegrationService.
-
-
Constructor Summary
Constructors Constructor Description ProductConfigurationOrderIntegrationServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CartEntryConfigurationAttributescalculateCartEntryConfigurationAttributes(AbstractOrderEntryModel entryModel)Calculates configuration relevant attributes at cart entry levelCartEntryConfigurationAttributescalculateCartEntryConfigurationAttributes(java.lang.String cartEntryKey, java.lang.String productCode, java.lang.String externalConfiguration)Deprecated, for removal: This API element is subject to removal in a future version.since 18.08ConfigModelensureConfigurationInSession(java.lang.String cartEntryKey, java.lang.String productCode, java.lang.String externalConfiguration)Deprecated, for removal: This API element is subject to removal in a future version.since 18.08 useConfigurationAbstractOrderEntryLinkStrategy#getConfigurationForAbstractOrderEntry(AbstractOrderEntryModel)insteadvoidfillSummaryMap(AbstractOrderEntryModel entry)Fill the summary map at the order entry with configuration status informationprotected ConfigurationAbstractOrderEntryLinkStrategygetAbstractOrderEntryLinkStrategy()protected CommerceCartServicegetCommerceCartService()protected ConfigurationAbstractOrderIntegrationStrategygetConfigurationAbstractOrderIntegrationStrategy()protected ProductConfigurationServicegetConfigurationService()protected ModelServicegetModelService()protected ProductConfigurationPricingStrategygetProductConfigurationPricingStrategy()protected TrackingRecordergetRecorder()protected booleanhasProductChangedForCartItem(ProductModel product, AbstractOrderEntryModel cartItem)voidsetAbstractOrderEntryLinkStrategy(ConfigurationAbstractOrderEntryLinkStrategy configurationAbstractOrderEntryLinkStrategy)voidsetCommerceCartService(CommerceCartService commerceCartService)voidsetConfigurationAbstractOrderIntegrationStrategy(ConfigurationAbstractOrderIntegrationStrategy configurationAbstractOrderIntegrationStrategy)voidsetConfigurationService(ProductConfigurationService configurationService)voidsetModelService(ModelService modelService)voidsetProductConfigurationPricingStrategy(ProductConfigurationPricingStrategy productConfigurationPricingStrategy)voidsetRecorder(TrackingRecorder recorder)booleanupdateCartEntryBasePrice(AbstractOrderEntryModel entry)Deprecated, for removal: This API element is subject to removal in a future version.since 18.08booleanupdateCartEntryExternalConfiguration(CommerceCartParameter parameters, AbstractOrderEntryModel entry)Deprecated, for removal: This API element is subject to removal in a future version.since 18.08booleanupdateCartEntryExternalConfiguration(java.lang.String externalConfiguration, AbstractOrderEntryModel entry)Updates cart entry's external configuration and creates configuration in current session from external string representation (which contains the configuration in XML format)booleanupdateCartEntryPrices(AbstractOrderEntryModel entry, boolean calculateCart, CommerceCartParameter passedParameter)Deprecated, for removal: This API element is subject to removal in a future version.since 18.08booleanupdateCartEntryProduct(AbstractOrderEntryModel entry, ProductModel product, java.lang.String configId)Update the product of the cartItem, if the product is different to the current cart item product
-
-
-
Method Detail
-
calculateCartEntryConfigurationAttributes
public CartEntryConfigurationAttributes calculateCartEntryConfigurationAttributes(AbstractOrderEntryModel entryModel)
Description copied from interface:ProductConfigurationOrderIntegrationServiceCalculates configuration relevant attributes at cart entry level- Specified by:
calculateCartEntryConfigurationAttributesin interfaceProductConfigurationOrderIntegrationService- Parameters:
entryModel- Cart Entry- Returns:
- attributes relevant for configuration
-
calculateCartEntryConfigurationAttributes
@Deprecated(since="1808", forRemoval=true) public CartEntryConfigurationAttributes calculateCartEntryConfigurationAttributes(java.lang.String cartEntryKey, java.lang.String productCode, java.lang.String externalConfiguration)Deprecated, for removal: This API element is subject to removal in a future version.since 18.08Description copied from interface:ProductConfigurationOrderIntegrationServiceCalculates configuration relevant attributes at cart entry level- Specified by:
calculateCartEntryConfigurationAttributesin interfaceProductConfigurationOrderIntegrationService- Parameters:
cartEntryKey- Key of cart entry, derived fromPKproductCode- Product IDexternalConfiguration- External configuration as XML- Returns:
- attributes relevant for configuration
-
ensureConfigurationInSession
@Deprecated(since="1808", forRemoval=true) public ConfigModel ensureConfigurationInSession(java.lang.String cartEntryKey, java.lang.String productCode, java.lang.String externalConfiguration)Deprecated, for removal: This API element is subject to removal in a future version.since 18.08 useConfigurationAbstractOrderEntryLinkStrategy#getConfigurationForAbstractOrderEntry(AbstractOrderEntryModel)instead- Specified by:
ensureConfigurationInSessionin interfaceProductConfigurationOrderIntegrationService- Parameters:
cartEntryKey- Key of cart entry, derived fromPKproductCode- Product IDexternalConfiguration- External configuration as XML- Returns:
- configuration model
-
updateCartEntryExternalConfiguration
@Deprecated(since="1808", forRemoval=true) public boolean updateCartEntryExternalConfiguration(CommerceCartParameter parameters, AbstractOrderEntryModel entry)Deprecated, for removal: This API element is subject to removal in a future version.since 18.08Description copied from interface:ProductConfigurationOrderIntegrationServiceUpdates cart entry's external configuration from configuration model- Specified by:
updateCartEntryExternalConfigurationin interfaceProductConfigurationOrderIntegrationService- Parameters:
parameters- parameters for cartentry- cart entry- Returns:
- true if cart entry has been updated
-
updateCartEntryExternalConfiguration
public boolean updateCartEntryExternalConfiguration(java.lang.String externalConfiguration, AbstractOrderEntryModel entry)Description copied from interface:ProductConfigurationOrderIntegrationServiceUpdates cart entry's external configuration and creates configuration in current session from external string representation (which contains the configuration in XML format)- Specified by:
updateCartEntryExternalConfigurationin interfaceProductConfigurationOrderIntegrationService- Parameters:
externalConfiguration- Configuration as XML stringentry- cart entry- Returns:
- true if cart entry has been updated
-
updateCartEntryProduct
public boolean updateCartEntryProduct(AbstractOrderEntryModel entry, ProductModel product, java.lang.String configId)
Description copied from interface:ProductConfigurationOrderIntegrationServiceUpdate the product of the cartItem, if the product is different to the current cart item product- Specified by:
updateCartEntryProductin interfaceProductConfigurationOrderIntegrationService- Parameters:
entry- Entry to change, if necessaryproduct- cart item productconfigId- ID of the current configuration- Returns:
- true if the entry was updated
-
hasProductChangedForCartItem
protected boolean hasProductChangedForCartItem(ProductModel product, AbstractOrderEntryModel cartItem)
-
fillSummaryMap
public void fillSummaryMap(AbstractOrderEntryModel entry)
Description copied from interface:ProductConfigurationOrderIntegrationServiceFill the summary map at the order entry with configuration status information- Specified by:
fillSummaryMapin interfaceProductConfigurationOrderIntegrationService- Parameters:
entry- Entry to be enhanced with additional information
-
getConfigurationService
protected ProductConfigurationService getConfigurationService()
-
setConfigurationService
public void setConfigurationService(ProductConfigurationService configurationService)
- Parameters:
configurationService- the configurationService to set
-
getAbstractOrderEntryLinkStrategy
protected ConfigurationAbstractOrderEntryLinkStrategy getAbstractOrderEntryLinkStrategy()
-
setAbstractOrderEntryLinkStrategy
public void setAbstractOrderEntryLinkStrategy(ConfigurationAbstractOrderEntryLinkStrategy configurationAbstractOrderEntryLinkStrategy)
-
getRecorder
protected TrackingRecorder getRecorder()
-
setRecorder
public void setRecorder(TrackingRecorder recorder)
- Parameters:
recorder- inject the CPQ tracking recorder for tracking CPQ events
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
- Parameters:
modelService-
-
getCommerceCartService
protected CommerceCartService getCommerceCartService()
-
setCommerceCartService
public void setCommerceCartService(CommerceCartService commerceCartService)
- Parameters:
commerceCartService- the commerceCartService to set
-
updateCartEntryBasePrice
@Deprecated(since="1808", forRemoval=true) public boolean updateCartEntryBasePrice(AbstractOrderEntryModel entry)Deprecated, for removal: This API element is subject to removal in a future version.since 18.08Description copied from interface:ProductConfigurationOrderIntegrationServiceUpdates 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 interfaceProductConfigurationOrderIntegrationService- Parameters:
entry- cart entry- Returns:
- true if cart entry has been updated
-
updateCartEntryPrices
@Deprecated(since="1808", forRemoval=true) public boolean updateCartEntryPrices(AbstractOrderEntryModel entry, boolean calculateCart, CommerceCartParameter passedParameter)Deprecated, for removal: This API element is subject to removal in a future version.since 18.08Description copied from interface:ProductConfigurationOrderIntegrationServiceUpdates 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 interfaceProductConfigurationOrderIntegrationService- 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
-
getProductConfigurationPricingStrategy
protected ProductConfigurationPricingStrategy getProductConfigurationPricingStrategy()
-
setProductConfigurationPricingStrategy
public void setProductConfigurationPricingStrategy(ProductConfigurationPricingStrategy productConfigurationPricingStrategy)
- Parameters:
productConfigurationPricingStrategy- the productConfigurationPricingStrategy to set
-
setConfigurationAbstractOrderIntegrationStrategy
public void setConfigurationAbstractOrderIntegrationStrategy(ConfigurationAbstractOrderIntegrationStrategy configurationAbstractOrderIntegrationStrategy)
- Parameters:
configurationAbstractOrderIntegrationStrategy-
-
getConfigurationAbstractOrderIntegrationStrategy
protected ConfigurationAbstractOrderIntegrationStrategy getConfigurationAbstractOrderIntegrationStrategy()
-
-