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

public abstract class AbstractQuoteCartStatusHandler extends AbstractCartStatusChangeHandler
The AbstractCartStatusChangeHandler to handle DefaultCartTypes.QUOTE carts.
  • 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 interface CartStatusHandler
      Overrides:
      canHandle in class AbstractCartStatusChangeHandler
      Parameters:
      changeStatusRequest - the ChangeCartStatusRequest to facilitate the cart status change
      contextInfo - 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 the CartActionAudit.
      Overrides:
      addCartActionAuditUserInfo in class AbstractCartStatusChangeHandler
      Parameters:
      cartActionAudit - the cart action audit
      contextInfo - 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 given ChangeCartStatusRequest is converting a DefaultCartTypes.STANDARD cart into a DefaultCartTypes.QUOTE.
      Parameters:
      changeStatusRequest - the ChangeCartStatusRequest for the cart status change
      contextInfo - 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 - the CartStatusValidationRequest 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 - the ChangeCartStatusRequest 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

      protected QuoteAuthUtils getQuoteAuthUtils()
    • getProperties

      protected com.broadleafcommerce.cart.client.properties.QuoteProperties getProperties()