Class CheckoutServiceImpl
java.lang.Object
org.broadleafcommerce.core.checkout.service.CheckoutServiceImpl
- All Implemented Interfaces:
CheckoutService
@Service("blCheckoutService")
public class CheckoutServiceImpl
extends Object
implements CheckoutService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Processor<CheckoutSeed,CheckoutSeed> protected BroadleafApplicationEventPublisherprotected OrderService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanhasOrderBeenCompleted(Order order) Checks if the order has already been gone through the checkout workflow.performCheckout(Order order) Checks out an order by executing the blCheckoutWorkflow.
-
Field Details
-
checkoutWorkflow
-
eventPublisher
@Autowired @Qualifier("blApplicationEventPublisher") protected BroadleafApplicationEventPublisher eventPublisher -
orderService
-
-
Constructor Details
-
CheckoutServiceImpl
public CheckoutServiceImpl()
-
-
Method Details
-
performCheckout
Description copied from interface:CheckoutServiceChecks out an order by executing the blCheckoutWorkflow. The order is saved both before and after the workflow is executed so that activities can modify the various entities on and related to the order.
This method is also thread-safe; 2 requests cannot attempt to check out the same order
- Specified by:
performCheckoutin interfaceCheckoutService- Parameters:
order- the order to be checked out- Returns:
- Throws:
CheckoutException- if there are any exceptions while executing any of the activities in the workflow (assuming that the workflow does not already have a preconfigured error handler) or if the given order has already been checked out (in Broadleaf terms this means the order has already been changed toOrderStatus.SUBMITTED)
-
hasOrderBeenCompleted
Checks if the order has already been gone through the checkout workflow.- Parameters:
order-- Returns:
-