public class DefaultBasketStrategy extends java.lang.Object implements BasketStrategy
BasketStrategy interface.| Constructor and Description |
|---|
DefaultBasketStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCart(TypedObject cart)
Clear the cart specified of all cart entries.
|
TypedObject |
cloneCart(TypedObject customer,
java.lang.String cartCode)
Creates a clone of the cart already exists for the specified customer with the specified cartCode.
|
protected CartModel |
createCart() |
protected CartModel |
createCart(CustomerModel customer,
java.lang.String cartCode) |
TypedObject |
createCart(TypedObject customer)
Creates a new cart for the specified customer.
|
TypedObject |
createCart(TypedObject customer,
java.lang.String cartCode)
Creates a new cart for the specified customer with the cart code specified.
|
protected CartModel |
getCart(CustomerModel customer,
java.lang.String cartCode) |
TypedObject |
getCart(TypedObject customer,
java.lang.String cartCode)
Gets an existing cart for the specified customer with a specified cartCode.
|
CartFactory |
getCartFactory() |
protected TypeService |
getCockpitTypeService() |
protected CartModel |
getDefaultCart(CustomerModel customer) |
TypedObject |
getDefaultCart(TypedObject customer)
Gets the default stored cart for the specified customer
|
protected FlexibleSearchService |
getFlexibleSearchService() |
protected KeyGenerator |
getKeyGenerator() |
protected ModelService |
getModelService() |
protected CallContextController |
lookupCallContextController()
Must be overridden! Use <lookup-method> in spring.
|
TypedObject |
pickupCart(TypedObject customer,
java.lang.String cartCode)
Picks up an existing cart for the specified customer with a specified cartCode, sets the CallContext accordingly.
|
void |
setCartFactory(CartFactory cartFactory) |
void |
setCockpitTypeService(TypeService cockpitTypeService) |
void |
setFlexibleSearchService(FlexibleSearchService flexibleSearchService) |
void |
setKeyGenerator(KeyGenerator keyGenerator) |
void |
setModelService(ModelService modelService) |
protected boolean |
transferCartToCustomer(java.lang.String cartCode,
TypedObject cart,
TypedObject customer) |
boolean |
transferCartToCustomer(TypedObject cart,
TypedObject customer)
Transfer ownership of the specified cart to the specified user.
|
protected void |
updateCallContextFromCart(CartModel cart) |
protected void |
updateCartFromCallContext(CartModel cart) |
protected KeyGenerator getKeyGenerator()
public void setKeyGenerator(KeyGenerator keyGenerator)
protected FlexibleSearchService getFlexibleSearchService()
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
protected TypeService getCockpitTypeService()
public void setCockpitTypeService(TypeService cockpitTypeService)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
public CartFactory getCartFactory()
public void setCartFactory(CartFactory cartFactory)
public TypedObject getDefaultCart(TypedObject customer)
BasketStrategygetDefaultCart in interface BasketStrategycustomer - The customerpublic TypedObject getCart(TypedObject customer, java.lang.String cartCode)
BasketStrategygetCart in interface BasketStrategycustomer - The customer that owns the cartcartCode - The code of the cartpublic TypedObject pickupCart(TypedObject customer, java.lang.String cartCode)
BasketStrategypickupCart in interface BasketStrategycustomer - The customer that owns the cartcartCode - The code of the cartpublic TypedObject createCart(TypedObject customer)
BasketStrategycreateCart in interface BasketStrategycustomer - The customer that will own the new cartpublic TypedObject createCart(TypedObject customer, java.lang.String cartCode)
BasketStrategycreateCart in interface BasketStrategycustomer - The customer that will own the new cartcartCode - The cart code for the new cartpublic void clearCart(TypedObject cart)
BasketStrategyclearCart in interface BasketStrategycart - The cartpublic boolean transferCartToCustomer(TypedObject cart, TypedObject customer)
BasketStrategytransferCartToCustomer in interface BasketStrategycart - The cart to transfer to the customercustomer - The customer to transfer the cart toprotected boolean transferCartToCustomer(java.lang.String cartCode,
TypedObject cart,
TypedObject customer)
protected CartModel createCart(CustomerModel customer, java.lang.String cartCode)
protected CartModel createCart()
protected CartModel getDefaultCart(CustomerModel customer)
protected CartModel getCart(CustomerModel customer, java.lang.String cartCode)
public TypedObject cloneCart(TypedObject customer, java.lang.String cartCode)
BasketStrategycloneCart in interface BasketStrategycustomer - The customer that owns the cartcartCode - The code of the cartprotected void updateCallContextFromCart(CartModel cart)
protected void updateCartFromCallContext(CartModel cart)
protected CallContextController lookupCallContextController()
Copyright © 2018 SAP SE. All Rights Reserved.