Class AbstractQuoteCartStatusHandler
java.lang.Object
com.broadleafcommerce.cartoperation.service.status.AbstractCartStatusChangeHandler
com.broadleafcommerce.cartoperation.service.status.quote.AbstractQuoteCartStatusHandler
- All Implemented Interfaces:
CartStatusHandler
- Direct Known Subclasses:
QuoteAssignedStatusHandler
,QuoteCanceledStatusHandler
,QuoteDraftingStatusHandler
,QuoteEditingStatusHandler
,QuoteExpiredStatusHandler
,QuotePublishedStatusHandler
,QuoteQuoteRequestedStatusHandler
,QuoteRejectedStatusHandler
,QuoteSubmittedStatusHandler
The
AbstractCartStatusChangeHandler
to handle DefaultCartTypes.QUOTE
carts.-
Field Summary
Fields inherited from class com.broadleafcommerce.cartoperation.service.status.AbstractCartStatusChangeHandler
INACCESSIBLE_CART_STATUS, USER_AUTHENTICATION_FAILED
-
Constructor Summary
ConstructorDescriptionAbstractQuoteCartStatusHandler
(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils, com.broadleafcommerce.common.extension.TypeFactory typeFactory, QuoteAuthUtils quoteAuthUtils, com.broadleafcommerce.cart.client.properties.QuoteProperties properties) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCartActionAuditUserInfo
(com.broadleafcommerce.cart.client.domain.CartActionAudit cartActionAudit, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Hook point to populate fields related to user info in theCartActionAudit
.boolean
canHandle
(@NonNull ChangeCartStatusRequest changeStatusRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Determines if this handler can handle the status change.protected com.broadleafcommerce.cart.client.properties.QuoteProperties
protected QuoteAuthUtils
protected boolean
isAssignedToThisQuote
(@NonNull CartStatusValidationRequest statusValidationRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Determines if the user performing the request is the one assigned as a sales rep to this quote.protected boolean
isAssignedToThisQuote
(@NonNull ChangeCartStatusRequest changeStatusRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Determines if the user performing the request is the one assigned as a sales rep to this quote.protected boolean
isConvertingToQuote
(@NonNull ChangeCartStatusRequest changeStatusRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Determines if the givenChangeCartStatusRequest
is converting aDefaultCartTypes.STANDARD
cart into aDefaultCartTypes.QUOTE
.Methods inherited from class com.broadleafcommerce.cartoperation.service.status.AbstractCartStatusChangeHandler
buildCartActionAuditToCreate, canBeReadByUser, canBeTransitionedToByUser, canBeUpdatedByUser, getAuthenticationUtils, getCartActionType, getPolicyUtils, getStatusToHandle, getTypeFactory, getValidOriginatingStatuses, isCartOwner, isCartOwner, postProcessStatusChange, process, processStatusChange, setPolicyUtils, validateOriginatingStatus, validateStatusIsReadableByUser, validateStatusIsUpdatableByUser, validateStatusTransition, validateTransitionRules
-
Constructor Details
-
AbstractQuoteCartStatusHandler
public AbstractQuoteCartStatusHandler(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils, com.broadleafcommerce.common.extension.TypeFactory typeFactory, QuoteAuthUtils quoteAuthUtils, com.broadleafcommerce.cart.client.properties.QuoteProperties properties)
-
-
Method Details
-
canHandle
public boolean canHandle(@NonNull @NonNull ChangeCartStatusRequest changeStatusRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CartStatusHandler
Determines if this handler can handle the status change.- Specified by:
canHandle
in interfaceCartStatusHandler
- Overrides:
canHandle
in classAbstractCartStatusChangeHandler
- Parameters:
changeStatusRequest
- theChangeCartStatusRequest
to facilitate the cart status changecontextInfo
- context information surrounding sandboxing and multitenant state- Returns:
- true if this handler can handle the status change, otherwise false
-
addCartActionAuditUserInfo
public void addCartActionAuditUserInfo(com.broadleafcommerce.cart.client.domain.CartActionAudit cartActionAudit, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from class:AbstractCartStatusChangeHandler
Hook point to populate fields related to user info in theCartActionAudit
.- Overrides:
addCartActionAuditUserInfo
in classAbstractCartStatusChangeHandler
- Parameters:
cartActionAudit
- the cart action auditcontextInfo
- context information surrounding sandboxing and multitenant state
-
isConvertingToQuote
protected boolean isConvertingToQuote(@NonNull @NonNull ChangeCartStatusRequest changeStatusRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Determines if the givenChangeCartStatusRequest
is converting aDefaultCartTypes.STANDARD
cart into aDefaultCartTypes.QUOTE
.- Parameters:
changeStatusRequest
- theChangeCartStatusRequest
for the cart status changecontextInfo
- context information surrounding sandboxing and multitenant state- Returns:
- true if the given request is converting a standard cart into a quote, otherwise false
-
isAssignedToThisQuote
protected boolean isAssignedToThisQuote(@NonNull @NonNull CartStatusValidationRequest statusValidationRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Determines if the user performing the request is the one assigned as a sales rep to this quote.- Parameters:
statusValidationRequest
- theCartStatusValidationRequest
for the quote request.contextInfo
- context information surrounding sandboxing and multitenant state.- Returns:
- true if the current user is the assigned sales rep on this quote, false otherwise.
-
isAssignedToThisQuote
protected boolean isAssignedToThisQuote(@NonNull @NonNull ChangeCartStatusRequest changeStatusRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Determines if the user performing the request is the one assigned as a sales rep to this quote.- Parameters:
changeStatusRequest
- theChangeCartStatusRequest
for the quote request.contextInfo
- context information surrounding sandboxing and multitenant state.- Returns:
- true if the current user is the assigned sales rep on this quote, false otherwise.
-
getQuoteAuthUtils
-
getProperties
protected com.broadleafcommerce.cart.client.properties.QuoteProperties getProperties()
-