Class RequiresApprovalAccountCartStatusChangeHandler
java.lang.Object
com.broadleafcommerce.cartoperation.service.status.AbstractCartStatusChangeHandler
com.broadleafcommerce.cartoperation.service.status.accountcart.AbstractAccountCartStatusHandler
com.broadleafcommerce.cartoperation.service.status.accountcart.RequiresApprovalAccountCartStatusChangeHandler
- All Implemented Interfaces:
CartStatusHandler
public class RequiresApprovalAccountCartStatusChangeHandler
extends AbstractAccountCartStatusHandler
This handler is used to change a cart with
IN_PROCESS
status to the REQUIRES_APPROVAL
status in B2B
flows.- Author:
- Dima Myroniuk (dmyroniuk)
-
Field Summary
Fields inherited from class com.broadleafcommerce.cartoperation.service.status.AbstractCartStatusChangeHandler
INACCESSIBLE_CART_STATUS, USER_AUTHENTICATION_FAILED
-
Constructor Summary
ConstructorDescriptionRequiresApprovalAccountCartStatusChangeHandler
(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils, com.broadleafcommerce.common.extension.TypeFactory typeFactory, CartUtils cartUtils) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
getCartActionType
(ChangeCartStatusRequest cartStatusRequest) Hook point to determine the cart action type.protected String
Gets the status to handle by this handlergetValidOriginatingStatuses
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets a set of valid originating statuses that can transition to theAbstractCartStatusChangeHandler.getStatusToHandle()
.Methods inherited from class com.broadleafcommerce.cartoperation.service.status.accountcart.AbstractAccountCartStatusHandler
buildCartActionAuditForAccountCartUpdate, canHandle, getCartUtils, isAccountCart, isCartOwner, postProcessStatusChange, processStatusChange
Methods inherited from class com.broadleafcommerce.cartoperation.service.status.AbstractCartStatusChangeHandler
addCartActionAuditUserInfo, buildCartActionAuditToCreate, canBeReadByUser, canBeTransitionedToByUser, canBeUpdatedByUser, getAuthenticationUtils, getPolicyUtils, getTypeFactory, isCartOwner, process, setPolicyUtils, validateOriginatingStatus, validateStatusIsReadableByUser, validateStatusIsUpdatableByUser, validateStatusTransition, validateTransitionRules
-
Constructor Details
-
RequiresApprovalAccountCartStatusChangeHandler
public RequiresApprovalAccountCartStatusChangeHandler(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils, com.broadleafcommerce.common.extension.TypeFactory typeFactory, CartUtils cartUtils)
-
-
Method Details
-
getStatusToHandle
Description copied from class:AbstractCartStatusChangeHandler
Gets the status to handle by this handler- Specified by:
getStatusToHandle
in classAbstractCartStatusChangeHandler
- Returns:
- the status to handle by this handler
-
getValidOriginatingStatuses
protected Set<String> getValidOriginatingStatuses(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from class:AbstractCartStatusChangeHandler
Gets a set of valid originating statuses that can transition to theAbstractCartStatusChangeHandler.getStatusToHandle()
.The valid originating statuses may vary depending on the context and
certain quote configurations
.- Specified by:
getValidOriginatingStatuses
in classAbstractCartStatusChangeHandler
- Parameters:
contextInfo
- the contextInfo for the request- Returns:
- a set of valid originating statuses that can transition to the
AbstractCartStatusChangeHandler.getStatusToHandle()
-
getCartActionType
Description copied from class:AbstractCartStatusChangeHandler
Hook point to determine the cart action type.Returns
DefaultQuoteActionTypes.UNKNOWN
by default unless overridden.- Overrides:
getCartActionType
in classAbstractCartStatusChangeHandler
- Parameters:
cartStatusRequest
- the change cart status request- Returns:
DefaultQuoteActionTypes.UNKNOWN
by default unless overridden.
-