Interface CsrCartOperationService

All Known Implementing Classes:
DefaultCsrCartOperationService

public interface CsrCartOperationService
Service for orchestrating the different CSR triggered workflows on various cart operations. Delegates to external services as needed to process each operation.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cancelCSRCart(@NonNull com.broadleafcommerce.cart.client.domain.Cart csrCart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Cancels the provided CSR cart.
    com.broadleafcommerce.cart.client.domain.Cart
    cloneCartIntoStatus(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.cart.client.domain.enums.CartStatus status, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Clone the given cart into a new cart with the given status.
    com.broadleafcommerce.cart.client.domain.Cart
    cloneCsrCartFromInProcess(@NonNull com.broadleafcommerce.cart.client.domain.Cart cartToClone, com.broadleafcommerce.cart.client.domain.Cart csrCart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Clone the customer's in-process cart into a new csr-owned cart.
    com.broadleafcommerce.cart.client.domain.Cart
    cloneCsrCartFromInProcess(com.broadleafcommerce.cart.client.domain.Cart csrCart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    com.broadleafcommerce.cart.client.domain.Cart
    overrideCartItemPrice(com.broadleafcommerce.cart.client.domain.Cart cart, String cartItemId, OverridePriceRequest overridePrice, boolean allowPriceCart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Override the unit price on the cart item.
    com.broadleafcommerce.cart.client.domain.Cart
    overrideFulfillmentGroupPrice(com.broadleafcommerce.cart.client.domain.Cart cart, String fulfillmentGroupId, OverridePriceRequest overridePrice, boolean allowPriceCart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Override the total fulfillment price on the fulfillment group.
  • Method Details

    • overrideCartItemPrice

      com.broadleafcommerce.cart.client.domain.Cart overrideCartItemPrice(com.broadleafcommerce.cart.client.domain.Cart cart, String cartItemId, OverridePriceRequest overridePrice, boolean allowPriceCart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Override the unit price on the cart item.
      Parameters:
      cart - The id of the cart on which to perform the operation.
      cartItemId - The id of the cart item on which to perform the operation.
      overridePrice - The override price to set as the unit price on the cart item.
      allowPriceCart - Whether to allow the cart to be priced after updating
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      The cart with the updated item.
    • overrideFulfillmentGroupPrice

      com.broadleafcommerce.cart.client.domain.Cart overrideFulfillmentGroupPrice(com.broadleafcommerce.cart.client.domain.Cart cart, String fulfillmentGroupId, OverridePriceRequest overridePrice, boolean allowPriceCart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Override the total fulfillment price on the fulfillment group.
      Parameters:
      cart - The id of the cart on which to perform the operation.
      fulfillmentGroupId - The id of the fulfillment group on which to perform the operation.
      overridePrice - The override price to set as the total fulfillment price.
      allowPriceCart - Whether to allow the cart to be priced after updating
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      The cart with the updated fulfillment group.
    • cloneCsrCartFromInProcess

      @Deprecated com.broadleafcommerce.cart.client.domain.Cart cloneCsrCartFromInProcess(@Nullable com.broadleafcommerce.cart.client.domain.Cart csrCart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Clone the customer's in-process cart into a new csr-owned cart.
      Parameters:
      csrCart - The CSR-owned cart which will be replaced by the cloned cart
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      The CSR-owned clone of the customer's in-process cart
    • cloneCsrCartFromInProcess

      com.broadleafcommerce.cart.client.domain.Cart cloneCsrCartFromInProcess(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cartToClone, @Nullable com.broadleafcommerce.cart.client.domain.Cart csrCart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Clone the customer's in-process cart into a new csr-owned cart.
      Parameters:
      cartToClone - the in-process cart to clone
      csrCart - the CSR-owned cart which will be replaced by the cloned cart
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      The CSR-owned clone of the customer's in-process cart
    • cancelCSRCart

      void cancelCSRCart(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart csrCart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Cancels the provided CSR cart.
      Parameters:
      csrCart - the cart to cancel
      contextInfo - the contxt info
    • cloneCartIntoStatus

      com.broadleafcommerce.cart.client.domain.Cart cloneCartIntoStatus(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.cart.client.domain.enums.CartStatus status, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Clone the given cart into a new cart with the given status.
      Parameters:
      cart - The original cart which will be cloned
      status - The new status for the cloned cart
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      The newly cloned cart