@Service(value="blCheckoutService") public class CheckoutServiceImpl extends Object implements CheckoutService
| Modifier and Type | Field and Description |
|---|---|
protected Processor<CheckoutSeed,CheckoutSeed> |
checkoutWorkflow |
protected BroadleafApplicationEventPublisher |
eventPublisher |
protected static ConcurrentMap<Long,Object> |
lockMap
Deprecated.
no longer supported - simplifying interface
|
protected OrderService |
orderService |
| Constructor and Description |
|---|
CheckoutServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
hasOrderBeenCompleted(Order order)
Checks if the order has already been gone through the checkout workflow.
|
CheckoutResponse |
performCheckout(Order order)
Checks out an order by executing the blCheckoutWorkflow.
|
protected Object |
putLock(Long orderId)
Deprecated.
no longer supported - simplifying interface
|
protected void |
removeLock(Long orderId)
Deprecated.
no longer supported - simplifying interface
|
protected Processor<CheckoutSeed,CheckoutSeed> checkoutWorkflow
@Autowired @Qualifier(value="blApplicationEventPublisher") protected BroadleafApplicationEventPublisher eventPublisher
protected OrderService orderService
@Deprecated protected static ConcurrentMap<Long,Object> lockMap
public CheckoutResponse performCheckout(Order order) throws CheckoutException
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
performCheckout in interface CheckoutServiceorder - the order to be checked outCheckoutException - 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)protected boolean hasOrderBeenCompleted(Order order)
order - @Deprecated protected Object putLock(Long orderId)
@Deprecated protected void removeLock(Long orderId)
Copyright © 2024. All rights reserved.