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 Details

    • checkoutWorkflow

      protected Processor<CheckoutSeed,CheckoutSeed> checkoutWorkflow
    • eventPublisher

      @Autowired @Qualifier("blApplicationEventPublisher") protected org.broadleafcommerce.common.event.BroadleafApplicationEventPublisher eventPublisher
    • orderService

      protected OrderService orderService
  • Constructor Details

    • CheckoutServiceImpl

      public CheckoutServiceImpl()
  • Method Details

    • performCheckout

      public CheckoutResponse performCheckout(Order order) throws CheckoutException
      Description copied from interface: CheckoutService

      Checks 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:
      performCheckout in interface CheckoutService
      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 to OrderStatus.SUBMITTED)
    • hasOrderBeenCompleted

      protected boolean hasOrderBeenCompleted(Order order)
      Checks if the order has already been gone through the checkout workflow.
      Parameters:
      order -
      Returns: