Interface CreateOrderFromCartStrategy
-
- All Known Implementing Classes:
DefaultB2BCreateOrderFromCartStrategy,DefaultB2BPlaceQuoteOrderStrategy,DefaultCreateOrderFromCartStrategy
public interface CreateOrderFromCartStrategyThe strategy creates an
OrderModelinstance out of a givenCartModelinstance. The strategy is used inOrderService.createOrderFromCart(CartModel)to introduce a new order. By default, the strategy validates the cart usingCartValidatorand clones it as an order using configuredCloneAbstractOrderStrategy.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OrderModelcreateOrderFromCart(CartModel cart)Validates the cart usingCartValidatorand performs cart to order cloning.
-
-
-
Method Detail
-
createOrderFromCart
OrderModel createOrderFromCart(CartModel cart) throws InvalidCartException
Validates the cart usingCartValidatorand performs cart to order cloning.- Parameters:
cart- - the targetCartModel- Returns:
- an unsaved and not calculated
OrderModelinstance. - Throws:
InvalidCartException- according toCartValidatorimplementation.
-
-