public class ConfigurationCartIntegrationFacadeImpl extends ConfigurationBaseFacadeImpl implements ConfigurationCartIntegrationFacade
ConfigurationCartIntegrationFacadeINTERNAL_CODE_ERP_VARIANT_PRODUCT| Constructor and Description |
|---|
ConfigurationCartIntegrationFacadeImpl() |
| Modifier and Type | Method and Description |
|---|---|
String |
addConfigurationToCart(ConfigurationData configContent)
Adds the current configuration to shopping cart.
|
protected PK |
convertStringToPK(String pkString)
Converts a string to the primary key wrapping it
|
String |
copyConfiguration(String configId)
Copies a configuration.
|
String |
copyConfiguration(String configId,
String productCode)
Copies a configuration.
|
protected AbstractOrderEntryModel |
createCartItem(ProductModel product,
ConfigurationData configData,
CommerceCartParameter commerceCartParameter,
CartModel cart) |
protected void |
fillCommerceCartParameterForAddToCart(CommerceCartParameter parameter,
CartModel cart,
ProductModel product,
long l,
UnitModel unit,
boolean forceNewEntry,
String configId) |
protected void |
fillCommerceCartParameterForUpdate(CommerceCartParameter parameter,
CartModel sessionCart,
String configId) |
AbstractOrderEntryModel |
findItemInCartByPK(PK cartItemPk)
Searches the session cart for an entry specified by a primary key.
|
protected CartService |
getCartService() |
protected CommerceCartService |
getCommerceCartService() |
protected ModelService |
getModelService() |
protected AbstractOrderEntryModel |
getOrCreateCartItem(ProductModel product,
ConfigurationData configData)
Creates a new entry in the session cart or returns the entry belonging to the current configuration and updates
the price and its external configuration.
|
boolean |
isItemInCartByKey(String key) |
void |
resetConfiguration(String configId)
Resets the configuration to the initial state
|
ConfigurationData |
restoreConfiguration(KBKeyData kbKey,
String cartEntryKey)
Restores a configuration from a cart entry specified by its key.
|
void |
setCartService(CartService cartService) |
void |
setCommerceCartService(CommerceCartService commerceCartService) |
void |
setModelService(ModelService modelService) |
protected void |
updateCartItem(ProductModel product,
ConfigurationData configData,
AbstractOrderEntryModel cartItem,
CommerceCartParameter commerceCartParameter,
CartModel cart) |
applyAdditionalPopulators, convert, createCsticGroup, createUiGroup, finalizeUiGroups, getConfigPricing, getConfigurationService, getConfigurationVariantUtil, getConflictPopulator, getCsticGroupsFromModel, getCsticTypeMapper, getGroupsFromInstance, getListOfCsticData, getProductDao, getProductService, getSessionAccessService, getUiKeyGenerator, isAnyVariantExisting, isOfferVariantSearch, isOneSubGroupConfigurable, isShowLegend, isUiGroupConfigurable, mapMessageSeverity, mapMessagesFromModelToData, markFirstAndLastGroup, setConfigPricing, setConfigurationService, setConfigurationVariantUtil, setConflictPopulator, setCsticTypeMapper, setOfferVariantSearch, setProductDao, setProductService, setSessionAccessService, setUiKeyGenerator, showVariantspublic ConfigurationCartIntegrationFacadeImpl()
public String addConfigurationToCart(ConfigurationData configContent) throws CommerceCartModificationException
ConfigurationCartIntegrationFacadeaddConfigurationToCart in interface ConfigurationCartIntegrationFacadeconfigContent - configuration to add to the shopping cartCommerceCartModificationException - in case the update of the cart failedprotected AbstractOrderEntryModel getOrCreateCartItem(ProductModel product, ConfigurationData configData) throws CommerceCartModificationException
ConfigurationData.getCartItemPK()product - configData - DTO representation of configuration runtime instanceCommerceCartModificationExceptionprotected AbstractOrderEntryModel createCartItem(ProductModel product, ConfigurationData configData, CommerceCartParameter commerceCartParameter, CartModel cart) throws CommerceCartModificationException
CommerceCartModificationExceptionprotected void updateCartItem(ProductModel product, ConfigurationData configData, AbstractOrderEntryModel cartItem, CommerceCartParameter commerceCartParameter, CartModel cart)
protected void fillCommerceCartParameterForAddToCart(CommerceCartParameter parameter, CartModel cart, ProductModel product, long l, UnitModel unit, boolean forceNewEntry, String configId)
protected void fillCommerceCartParameterForUpdate(CommerceCartParameter parameter, CartModel sessionCart, String configId)
parameter - sessionCart - configId - protected PK convertStringToPK(String pkString)
pkString - public AbstractOrderEntryModel findItemInCartByPK(PK cartItemPk)
findItemInCartByPK in interface ConfigurationCartIntegrationFacadecartItemPk - Entry keypublic boolean isItemInCartByKey(String key)
isItemInCartByKey in interface ConfigurationCartIntegrationFacadekey - /handle to re-identify the item within the sessiontrue, only if the item is in the cartpublic String copyConfiguration(String configId)
ConfigurationCartIntegrationFacadecopyConfiguration in interface ConfigurationCartIntegrationFacadeconfigId - ID of existing configurationpublic String copyConfiguration(String configId, String productCode)
ConfigurationCartIntegrationFacadecopyConfiguration in interface ConfigurationCartIntegrationFacadeconfigId - ID of existing configurationproductCode - product code of configurable product to be copiedpublic void resetConfiguration(String configId)
ConfigurationCartIntegrationFacaderesetConfiguration in interface ConfigurationCartIntegrationFacadepublic ConfigurationData restoreConfiguration(KBKeyData kbKey, String cartEntryKey)
ConfigurationCartIntegrationFacaderestoreConfiguration in interface ConfigurationCartIntegrationFacadeprotected CartService getCartService()
public void setCartService(CartService cartService)
cartService - injects the cart service for interaction with the cartprotected ModelService getModelService()
public void setModelService(ModelService modelService)
modelService - injects the hybris model serviceprotected CommerceCartService getCommerceCartService()
public void setCommerceCartService(CommerceCartService commerceCartService)
commerceCartService - injects the commerce cart serviceCopyright © 2017 SAP SE. All Rights Reserved.