Class CPSPricingProvider
- java.lang.Object
-
- de.hybris.platform.sap.productconfig.runtime.cps.impl.CPSPricingProvider
-
- All Implemented Interfaces:
PricingProvider
public class CPSPricingProvider extends java.lang.Object implements PricingProvider
Facilitates pricing calls for CPS engine
-
-
Constructor Summary
Constructors Constructor Description CPSPricingProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidfillValuePrices(ConfigModel configModel)Fills value prices into the config modelvoidfillValuePrices(ConfigModel configModel, ConfigurationRetrievalOptions options)Fills value prices into the config modelvoidfillValuePrices(java.util.List<PriceValueUpdateModel> updateModels, java.lang.String kbId)Fills absolute value prices or delta prices for all passed PriceValueUpdateModels dependent on setting in backofficevoidfillValuePrices(java.util.List<PriceValueUpdateModel> updateModels, java.lang.String kbId, ConfigurationRetrievalOptions options)Fills absolute value prices or delta prices for all passed PriceValueUpdateModels dependent on setting in backofficeprotected voidfillValuePricesForInstance(InstanceModel instance, MasterDataContext ctxt)protected ConfigurationMasterDataServicegetMasterDataService()PriceSummaryModelgetPriceSummary(java.lang.String configId)Deprecated, for removal: This API element is subject to removal in a future version.since 18.11.0 - usePricingProvider.getPriceSummary(String, ConfigurationRetrievalOptions)insteadPriceSummaryModelgetPriceSummary(java.lang.String configId, ConfigurationRetrievalOptions options)Retrieves if present current total price, base price and selected options priceprotected PricingHandlergetPricingHandler()booleanisActive()Indicates whether the pricing provider is activeprotected MasterDataContextprepareMasterDataContext(java.lang.String kbId, ConfigurationRetrievalOptions options)voidsetMasterDataService(ConfigurationMasterDataService masterDataService)voidsetPricingHandler(PricingHandler pricingHandler)
-
-
-
Method Detail
-
getPriceSummary
@Deprecated(since="1811", forRemoval=true) public PriceSummaryModel getPriceSummary(java.lang.String configId) throws PricingEngineExceptionDeprecated, for removal: This API element is subject to removal in a future version.since 18.11.0 - usePricingProvider.getPriceSummary(String, ConfigurationRetrievalOptions)insteadDescription copied from interface:PricingProviderRetrieves if present current total price, base price and selected options price- Specified by:
getPriceSummaryin interfacePricingProvider- Parameters:
configId- runtime id of the configuration- Returns:
- map of current total price, base price and selected options price
- Throws:
PricingEngineException
-
getPriceSummary
public PriceSummaryModel getPriceSummary(java.lang.String configId, ConfigurationRetrievalOptions options) throws PricingEngineException, ConfigurationEngineException
Description copied from interface:PricingProviderRetrieves if present current total price, base price and selected options price- Specified by:
getPriceSummaryin interfacePricingProvider- Parameters:
configId- runtime id of the configurationoptions- configuration retrieval options- Returns:
- map of current total price, base price and selected options price
- Throws:
PricingEngineExceptionConfigurationEngineException
-
isActive
public boolean isActive()
Description copied from interface:PricingProviderIndicates whether the pricing provider is active- Specified by:
isActivein interfacePricingProvider- Returns:
- true if pricing provider is active in the implementation
-
fillValuePrices
public void fillValuePrices(java.util.List<PriceValueUpdateModel> updateModels, java.lang.String kbId) throws PricingEngineException
Description copied from interface:PricingProviderFills absolute value prices or delta prices for all passed PriceValueUpdateModels dependent on setting in backoffice- Specified by:
fillValuePricesin interfacePricingProvider- Parameters:
updateModels- each list entry represents a characteristic for which absolute value prices or delta prices are filledkbId- KnowledgeBase id belonging to the runtime configuration for which absolute value prices or delta price are calculated- Throws:
PricingEngineException
-
fillValuePrices
public void fillValuePrices(java.util.List<PriceValueUpdateModel> updateModels, java.lang.String kbId, ConfigurationRetrievalOptions options) throws PricingEngineException
Description copied from interface:PricingProviderFills absolute value prices or delta prices for all passed PriceValueUpdateModels dependent on setting in backoffice- Specified by:
fillValuePricesin interfacePricingProvider- Parameters:
updateModels- each list entry represents a characteristic for which absolute value prices or delta prices are filledkbId- KnowledgeBase id belonging to the runtime configuration for which absolute value prices or delta price are calculatedoptions- options to consider during price retrival/calculation, such as external requested conditions- Throws:
PricingEngineException
-
fillValuePrices
public void fillValuePrices(ConfigModel configModel) throws PricingEngineException
Description copied from interface:PricingProviderFills value prices into the config model- Specified by:
fillValuePricesin interfacePricingProvider- Parameters:
configModel- runtime representation of the configuration- Throws:
PricingEngineException
-
fillValuePrices
public void fillValuePrices(ConfigModel configModel, ConfigurationRetrievalOptions options) throws PricingEngineException
Description copied from interface:PricingProviderFills value prices into the config model- Specified by:
fillValuePricesin interfacePricingProvider- Parameters:
configModel- runtime representation of the configurationoptions- options to consider during price retrival/calculation, such as external requested conditions- Throws:
PricingEngineException
-
prepareMasterDataContext
protected MasterDataContext prepareMasterDataContext(java.lang.String kbId, ConfigurationRetrievalOptions options)
-
fillValuePricesForInstance
protected void fillValuePricesForInstance(InstanceModel instance, MasterDataContext ctxt) throws PricingEngineException
- Throws:
PricingEngineException
-
getPricingHandler
protected PricingHandler getPricingHandler()
-
setPricingHandler
public void setPricingHandler(PricingHandler pricingHandler)
- Parameters:
pricingHandler- Bean that handles REST call, delta price calculation and caching
-
getMasterDataService
protected ConfigurationMasterDataService getMasterDataService()
-
setMasterDataService
public void setMasterDataService(ConfigurationMasterDataService masterDataService)
- Parameters:
masterDataService- master data service
-
-