Interface BolCartFacade
-
- All Known Subinterfaces:
CPQBolCartFacade
- All Known Implementing Classes:
CPQDefaultBolCartFacade,DefaultBolCartFacade
public interface BolCartFacadeFacade to the BOL layer. Allows to work with the BOL cart.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<Item>addEntriesToCart(java.util.List<Item> items)Adds a list of items to the cart, keeping their handlesvoidaddItemsToCart(java.util.List<Item> items)Adds a list of items to the cart, keeping their handlesItemaddToCart(java.lang.String code, long quantity)Adds a product to the cartAddresscreateAddress()Creates a new address instance.BasketcreateCart()Creates a new session cart.java.util.Map<java.lang.String,java.lang.String>getAllowedDeliveryTypes()Fetches available delivery types from the cache.BasketgetCart()Return current cart from BOL.ItemgetCartItem(int itemNumber)Fetches cart item per item numberjava.lang.BooleanhasCart()Does a session cart exist? This cart is connected to a (non-persisted) order in the SAP back end.booleanisBackendDown()OrderplaceOrderFromCart(Basket sapCart)Places an order based on a cart, and returns this order.voidreleaseCart()Releases the current session cart.voidupdateCart()Updates the session cart and re-reads it from the SAP back end.MessageListvalidateCart()Validates the cart and compiles the list of cart error messages.
-
-
-
Method Detail
-
getCart
Basket getCart()
Return current cart from BOL.- Returns:
- Current cart, might be null if not created yet.
-
hasCart
java.lang.Boolean hasCart()
Does a session cart exist? This cart is connected to a (non-persisted) order in the SAP back end.- Returns:
- Does a session cart exist?
-
createCart
Basket createCart()
Creates a new session cart. This call creates a (non-persisted) order in the SAP back end. At this point in time, the sold-to party needs to be known.- Returns:
- Newly created cart BO instance
-
updateCart
void updateCart()
Updates the session cart and re-reads it from the SAP back end.
-
addToCart
Item addToCart(java.lang.String code, long quantity)
Adds a product to the cart- Parameters:
code- Product ID to be added to the cartquantity- Quantity to be added to the cart- Returns:
- BOL representation of new item
-
getCartItem
Item getCartItem(int itemNumber)
Fetches cart item per item number- Parameters:
itemNumber- Internal item number- Returns:
- BOL representation of cart item
-
getAllowedDeliveryTypes
java.util.Map<java.lang.String,java.lang.String> getAllowedDeliveryTypes()
Fetches available delivery types from the cache. Cache is filled from the SAP back end customizing (ERP customizing table TVSB)- Returns:
- Map of delivery types. Key is the shipping condition code, value the language dependent description
-
createAddress
Address createAddress()
Creates a new address instance.- Returns:
- BOL Address representation
-
placeOrderFromCart
Order placeOrderFromCart(Basket sapCart)
Places an order based on a cart, and returns this order. At this point in time, the order is persisted in the SAP back end.- Parameters:
sapCart- SAP representation of a cart- Returns:
- SAP representation of an order which has been submitted
-
releaseCart
void releaseCart()
Releases the current session cart. A new, initial session cart will be created. An existing session in the SAP back end is released as well, therefore reservations are gone.
-
validateCart
MessageList validateCart()
Validates the cart and compiles the list of cart error messages. Performs a back end call and touches all items to be sure all error situations are handled. Depending on the customizing in the back end, this can be avoided by either redefining this method or the corresponding one inSalesDocument- Returns:
- List of cart error messages arising from validation.
-
addItemsToCart
void addItemsToCart(java.util.List<Item> items)
Adds a list of items to the cart, keeping their handles- Parameters:
items- BOL items
-
addEntriesToCart
java.util.List<Item> addEntriesToCart(java.util.List<Item> items)
Adds a list of items to the cart, keeping their handles- Parameters:
items- BOL items item list- Returns:
- list of items
-
isBackendDown
boolean isBackendDown()
- Returns:
- Is back end not available for a planned downtime?
-
-