Class RejectedAccountCartStatusChangeHandler
java.lang.Object
com.broadleafcommerce.cartoperation.service.status.AbstractCartStatusChangeHandler
com.broadleafcommerce.cartoperation.service.status.accountcart.AbstractAccountCartStatusHandler
com.broadleafcommerce.cartoperation.service.status.accountcart.RejectedAccountCartStatusChangeHandler
- All Implemented Interfaces:
- CartStatusHandler
This handler is used to change a cart with 
REQUIRES_APPROVAL status to the REJECTED status in B2B
 flows.- Author:
- Dima Myroniuk (dmyroniuk)
- 
Field SummaryFields inherited from class com.broadleafcommerce.cartoperation.service.status.AbstractCartStatusChangeHandlerINACCESSIBLE_CART_STATUS, USER_AUTHENTICATION_FAILED
- 
Constructor SummaryConstructorsConstructorDescriptionRejectedAccountCartStatusChangeHandler(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils, com.broadleafcommerce.common.extension.TypeFactory typeFactory, CartUtils cartUtils, CartApprovalValidationService cartApprovalValidationService) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleancanBeTransitionedToByUser(@NonNull ChangeCartStatusRequest changeStatusRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Determines if the cart can be transitioned toAbstractCartStatusChangeHandler.getStatusToHandle()by the currently authenticated user.protected StringgetCartActionType(ChangeCartStatusRequest cartStatusRequest) Hook point to determine the cart action type.protected CartApprovalValidationServiceprotected StringGets 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.AbstractAccountCartStatusHandlerbuildCartActionAuditForAccountCartUpdate, canHandle, getCartUtils, isAccountCart, isCartOwner, postProcessStatusChange, processStatusChangeMethods inherited from class com.broadleafcommerce.cartoperation.service.status.AbstractCartStatusChangeHandleraddCartActionAuditUserInfo, buildCartActionAuditToCreate, canBeReadByUser, canBeUpdatedByUser, getAuthenticationUtils, getPolicyUtils, getTypeFactory, isCartOwner, process, setPolicyUtils, validateOriginatingStatus, validateStatusIsReadableByUser, validateStatusIsUpdatableByUser, validateStatusTransition, validateTransitionRules
- 
Constructor Details- 
RejectedAccountCartStatusChangeHandlerpublic RejectedAccountCartStatusChangeHandler(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils, com.broadleafcommerce.common.extension.TypeFactory typeFactory, CartUtils cartUtils, CartApprovalValidationService cartApprovalValidationService) 
 
- 
- 
Method Details- 
canBeTransitionedToByUserprotected boolean canBeTransitionedToByUser(@NonNull @NonNull ChangeCartStatusRequest changeStatusRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from class:AbstractCartStatusChangeHandlerDetermines if the cart can be transitioned toAbstractCartStatusChangeHandler.getStatusToHandle()by the currently authenticated user.This is helpful to restrict certain user types to update a cart in certain statuses. For example, in a B2B quote context, only the sales rep can transition a quote from DefaultQuoteStatuses.ASSIGNEDtoDefaultQuoteStatuses.PUBLISHED.- Overrides:
- canBeTransitionedToByUserin class- AbstractCartStatusChangeHandler
- Parameters:
- changeStatusRequest- the- ChangeCartStatusRequestto facilitate the cart status change
- contextInfo- context information surrounding sandboxing and multitenant state
- Returns:
- true if it can be transitioned to the status by the user, otherwise false
 
- 
getStatusToHandleDescription copied from class:AbstractCartStatusChangeHandlerGets the status to handle by this handler- Specified by:
- getStatusToHandlein class- AbstractCartStatusChangeHandler
- Returns:
- the status to handle by this handler
 
- 
getValidOriginatingStatusesprotected Set<String> getValidOriginatingStatuses(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from class:AbstractCartStatusChangeHandlerGets 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:
- getValidOriginatingStatusesin class- AbstractCartStatusChangeHandler
- Parameters:
- contextInfo- the contextInfo for the request
- Returns:
- a set of valid originating statuses that can transition to the
         AbstractCartStatusChangeHandler.getStatusToHandle()
 
- 
getCartActionTypeDescription copied from class:AbstractCartStatusChangeHandlerHook point to determine the cart action type.Returns DefaultQuoteActionTypes.UNKNOWNby default unless overridden.- Overrides:
- getCartActionTypein class- AbstractCartStatusChangeHandler
- Parameters:
- cartStatusRequest- the change cart status request
- Returns:
- DefaultQuoteActionTypes.UNKNOWNby default unless overridden.
 
- 
getCartApprovalValidationService
 
-