public class DefaultCheckoutWorkflow extends Object implements CheckoutWorkflow
| Modifier and Type | Field and Description |
|---|---|
static String |
CHECKOUT_WORKFLOW_ERRORS |
static String |
CHECKOUT_WORKFLOW_ROLLBACK_ERRORS |
| Constructor and Description |
|---|
DefaultCheckoutWorkflow(List<CheckoutWorkflowActivity> workflowActivities,
CheckoutRollbackEventProducer checkoutRollbackEventProducer,
CartProvider cartProvider,
com.broadleafcommerce.common.extension.TypeFactory typeFactory,
org.springframework.context.MessageSource messageSource) |
| Modifier and Type | Method and Description |
|---|---|
com.broadleafcommerce.cart.client.domain.Cart |
execute(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull String requestId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Method used to coordinate the execution of
CheckoutWorkflowActivities. |
com.broadleafcommerce.cart.client.domain.Cart |
execute(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull String requestId,
@NonNull Map<String,String> securityCodes,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Method used to coordinate the execution of
CheckoutWorkflowActivities. |
protected com.broadleafcommerce.cart.client.domain.Cart |
executeActivity(@NonNull CheckoutWorkflowActivity activity,
@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull String requestId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) |
protected com.broadleafcommerce.cart.client.domain.Cart |
executeActivity(@NonNull CheckoutWorkflowActivity activity,
@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull String requestId,
@NonNull Map<String,String> securityCodes,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) |
protected CartProvider |
getCartProvider() |
protected CheckoutRollbackEventProducer |
getCheckoutRollbackEventProducer() |
protected org.springframework.context.MessageSource |
getMessageSource() |
protected com.broadleafcommerce.common.extension.TypeFactory |
getTypeFactory() |
protected List<CheckoutWorkflowActivity> |
getWorkflowActivities() |
protected void |
logErrorInitiatingWorkflowRollback(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull String requestId,
@NonNull CheckoutWorkflowActivityException e) |
protected void |
logErrorInitiatingWorkflowRollback(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull String requestId,
Exception e)
Log a message to record the initiation of the workflow rollback
|
protected com.broadleafcommerce.cart.client.domain.Cart |
recordRollbackError(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull String requestId,
@NonNull Exception e,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Method responsible for recording the error that was encountered during the activity's
rollback.
|
protected com.broadleafcommerce.cart.client.domain.Cart |
recordWorkflowError(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull String requestId,
@NonNull CheckoutWorkflowActivityException e,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Method responsible for recording the error that was encountered during the activity's
execution.
|
com.broadleafcommerce.cart.client.domain.Cart |
rollback(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull String requestId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Method used to coordinate the rollback of work that has been done by the
CheckoutWorkflowActivities up to that point. |
public static final String CHECKOUT_WORKFLOW_ERRORS
public static final String CHECKOUT_WORKFLOW_ROLLBACK_ERRORS
public DefaultCheckoutWorkflow(List<CheckoutWorkflowActivity> workflowActivities, CheckoutRollbackEventProducer checkoutRollbackEventProducer, CartProvider cartProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory, org.springframework.context.MessageSource messageSource)
public com.broadleafcommerce.cart.client.domain.Cart execute(@NonNull
@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull
@NonNull String requestId,
@Nullable
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
CheckoutWorkflowCheckoutWorkflowActivities. If there is an exception/error during the execution of those
activities, then #rollback(Cart, String) should be called to un-do the work that had
been done up to the point of the exception/error.execute in interface CheckoutWorkflowcart - The Cart that we're attempting to checkout with.requestId - The id used to identify changes tied to the specific execution requestcontextInfo - Context information around sandbox and multitenant state.public com.broadleafcommerce.cart.client.domain.Cart execute(@NonNull
@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull
@NonNull String requestId,
@NonNull
@NonNull Map<String,String> securityCodes,
@Nullable
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
CheckoutWorkflowCheckoutWorkflowActivities. If there is an exception/error during the execution of those
activities, then #rollback(Cart, String) should be called to un-do the work that had
been done up to the point of the exception/error.execute in interface CheckoutWorkflowcart - The Cart that we're attempting to checkout with.requestId - The id used to identify changes tied to the specific execution requestsecurityCodes - The map of card security codes keyed by payment id for processing saved
paymentscontextInfo - Context information around sandbox and multitenant state.public com.broadleafcommerce.cart.client.domain.Cart rollback(@NonNull
@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull
@NonNull String requestId,
@Nullable
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
CheckoutWorkflowCheckoutWorkflowActivities up to that point.rollback in interface CheckoutWorkflowcart - The Cart that we were attempting to checkout with, but ran into an
exception/error.requestId - The id used to identify changes tied to the specific execution requestcontextInfo - Context information around sandbox and multitenant state.protected void logErrorInitiatingWorkflowRollback(@NonNull
@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull
@NonNull String requestId,
Exception e)
cart - The cart that is being acted upon in this workflowrequestId - The id used to identify changes tied to the specific execution requeste - The exception thrown by the CheckoutWorkflowActivityprotected com.broadleafcommerce.cart.client.domain.Cart executeActivity(@NonNull
@NonNull CheckoutWorkflowActivity activity,
@NonNull
@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull
@NonNull String requestId,
@Nullable
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
protected com.broadleafcommerce.cart.client.domain.Cart executeActivity(@NonNull
@NonNull CheckoutWorkflowActivity activity,
@NonNull
@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull
@NonNull String requestId,
@NonNull
@NonNull Map<String,String> securityCodes,
@Nullable
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
protected void logErrorInitiatingWorkflowRollback(@NonNull
@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull
@NonNull String requestId,
@NonNull
@NonNull CheckoutWorkflowActivityException e)
protected com.broadleafcommerce.cart.client.domain.Cart recordWorkflowError(@NonNull
@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull
@NonNull String requestId,
@NonNull
@NonNull CheckoutWorkflowActivityException e,
@Nullable
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
cart - The cart that is being acted upon in this workflowrequestId - The id used to identify changes tied to the specific execution requeste - The exception thrown by the CheckoutWorkflowActivitycontextInfo - Context information around sandbox and multitenant state.protected com.broadleafcommerce.cart.client.domain.Cart recordRollbackError(@NonNull
@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull
@NonNull String requestId,
@NonNull
@NonNull Exception e,
@Nullable
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
cart - The cart that encountered an error during the execution of this activityrequestId - The id used to identify changes tied to the specific execution requeste - contextInfo - Context information around sandbox and multitenant state.protected List<CheckoutWorkflowActivity> getWorkflowActivities()
protected CheckoutRollbackEventProducer getCheckoutRollbackEventProducer()
protected CartProvider getCartProvider()
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
protected org.springframework.context.MessageSource getMessageSource()
Copyright © 2021. All rights reserved.