Interface CartOrderGenerationService<C extends com.broadleafcommerce.cart.client.domain.Cart,P extends com.broadleafcommerce.order.client.domain.Order>
- All Known Implementing Classes:
DefaultCartOrderGenerationService
public interface CartOrderGenerationService<C extends com.broadleafcommerce.cart.client.domain.Cart,P extends com.broadleafcommerce.order.client.domain.Order>
Handles generating
orders
from carts
.-
Method Summary
Modifier and TypeMethodDescriptiongenerateOrderFromCart
(C cart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Creates and persists a newOrder
from the given cart if such an order does not already exist or returns the existingOrder
.
-
Method Details
-
generateOrderFromCart
P generateOrderFromCart(C cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Creates and persists a newOrder
from the given cart if such an order does not already exist or returns the existingOrder
.- Parameters:
cart
- The cart to create an order fromcontextInfo
- the context around sandboxing and multitenant state- Returns:
- The order created from the cart, or existing order if it is already exists
-