All Known Implementing Classes:
ExternalCartProvider

public interface CartProvider
Provider for interfacing with operations directly involving a Cart. Typically utilizes WebClient to make requests to an external REST API.
Author:
Chad Harchar (charchar)
  • Method Summary

    Modifier and Type
    Method
    Description
    com.broadleafcommerce.cart.client.domain.Cart
    createCart(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Create a new cart.
    com.broadleafcommerce.cart.client.domain.Cart
    createNonRequestCart(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Create a new cart, without updating the original request cart.
    void
    deleteCart(String cartId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Archives a cart for the provided cart id.
    void
    deleteCartItem(String cartId, com.broadleafcommerce.cart.client.domain.CartItem cartItem, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Deprecated.
    in favor of updating the entire cart with updateCart(Cart, ContextInfo)
    com.broadleafcommerce.cart.client.domain.Cart
    patchCart(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Patch the cart.
    Optional<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveAnonymousCustomerCartById(String cartId, String emailAddress, Set<String> allowedStatuses, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Find the cart (if it exists) for the provided cart id and email address excluding the customer owned carts.
    Optional<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveCartById(String cartId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieve the cart.
    Optional<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveCartByOrderNumber(String customerId, String orderNumber, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Find the cart (if it exists) for the provided customer id and order number.
    Optional<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveCartByStatus(String customerId, String accountId, String status, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds a customer or account cart with the given status, customer cart will automatically be retrieved if the given accountId is null.
    Optional<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveCartByStatusAndName(String customerId, String status, String name, String accountId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds a customer or account cart with the given status, customer cart will automatically be retrieved if the given accountId is null.
    org.springframework.data.domain.Page<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveCarts(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieves a Page of Carts based on the given filters.
    org.springframework.data.domain.Page<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveCartsByStatuses(String customerId, String accountId, Set<String> statuses, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieves a Page of customer or account Carts based on the given statuses, customer id, and account id.
    default org.springframework.data.domain.Page<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveCartsInStatus(String customerId, String accountId, String status, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Convenient method to retrieve a Page of customer or account Carts in a single status.
    org.springframework.data.domain.Page<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveCartsMatchingTenantByStatus(String status, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieves a Page of Carts based on the given status and matching the tenant from the given ContextInfo.
    default Optional<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveCsrOwnedCart(String customerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Deprecated, for removal: This API element is subject to removal in a future version.
    default Optional<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveCsrOwnedCart(String customerId, String accountId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Convenient method to retrieve the DefaultCartStatuses.CSR_OWNED customer or account cart.
    Optional<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveCustomerCartById(String customerId, String cartId, Set<String> allowedStatuses, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Find the cart (if it exists) for the provided cart id and customer id.
    default Optional<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveCustomerCartByStatus(String customerId, String status, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Optional<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveHistoricalCartForAnonymousCustomer(String emailAddress, String orderNumber, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds a single, historical cart for an anonymous customer.
    SimplePage<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveHistoricalCartsForCustomer(String customerId, Date startDate, Date endDate, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Find all carts that are DefaultCartStatuses.SUBMITTED or DefaultCartStatuses.CANCELLED for the provided customer and dates.
    default Optional<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveInProcessCart(String customerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Deprecated, for removal: This API element is subject to removal in a future version.
    default Optional<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveInProcessCart(String customerId, String accountId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Convenient method to retrieve the DefaultCartStatuses.IN_PROCESS customer or account cart.
    org.springframework.data.domain.Page<com.broadleafcommerce.cart.client.domain.Cart>
    retrieveMyCarts(com.broadleafcommerce.order.common.domain.CustomerRef customerRef, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieves a Page of Carts based on the given filters.
    void
    sendCartAwaitingPaymentResultsEvent(CartAwaitingPaymentResultsEvent cartAwaitingPaymentResultsEvent, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Sends the cart awaiting payment results event to the cart service.
    void
    sendCartPendingPaymentFailedEvent(CartPendingPaymentFailedEvent cartPendingPaymentFailedEvent, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Sends the cart pending payment failed event to the cart service.
    void
    sendCartRejectionEvent(CartRejectionEvent cartRejectionEvent, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This event will be sent directly from Cart Operation Services.
    void
    sendCheckoutCompletionEvent(CheckoutCompletionEvent checkoutCompletionEvent, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Sends the checkout completion event to the cart service.
    void
    sendExternalPaymentTransactionCartFinalizationEvent(ExternalPaymentTransactionCartFinalizationEvent cartFinalizationEvent, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Sends the ExternalPaymentTransactionCartFinalizationEvent via the cart service which uses durable message sending to guarantee message delivery.
    void
    sendRollbackEvent(CheckoutRollbackEvent rollbackEvent, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Sends the rollback event to the cart service.
    com.broadleafcommerce.cart.client.domain.Cart
    updateCart(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Update the cart.
    com.broadleafcommerce.cart.client.domain.Cart
    updateCart(UpdateCartRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Update the cart.
    com.broadleafcommerce.cart.client.domain.CartItem
    updateCartItem(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.cart.client.domain.CartItem cartItem, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Deprecated.
    in favor of updating the entire cart with updateCart(Cart, ContextInfo)
    List<com.broadleafcommerce.cart.client.domain.Cart>
    updateCartsMatchingTenantStatus(List<String> cartIds, String status, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Updates the Cart.getStatus() for the given cart ids and status and matching the tenant from the given ContextInfo.
  • Method Details

    • retrieveCarts

      org.springframework.data.domain.Page<com.broadleafcommerce.cart.client.domain.Cart> retrieveCarts(cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieves a Page of Carts based on the given filters.
      Parameters:
      filters - the filters to apply
      pageable - the requested page of results
      contextInfo - context information related to multitenancy
      Returns:
      a Page of Carts based on the given filters
    • retrieveMyCarts

      org.springframework.data.domain.Page<com.broadleafcommerce.cart.client.domain.Cart> retrieveMyCarts(com.broadleafcommerce.order.common.domain.CustomerRef customerRef, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieves a Page of Carts based on the given filters.
      Parameters:
      filters - the filters to apply
      pageable - the requested page of results
      contextInfo - context information related to multitenancy
      Returns:
      a Page of Carts based on the given filters
    • retrieveCartsByStatuses

      org.springframework.data.domain.Page<com.broadleafcommerce.cart.client.domain.Cart> retrieveCartsByStatuses(String customerId, @Nullable String accountId, Set<String> statuses, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieves a Page of customer or account Carts based on the given statuses, customer id, and account id. Customer cart will automatically be retrieved if the given accountId is null.
      Parameters:
      customerId - the id of the customer that owns the Carts
      accountId - the id of the account that the Carts belong to, null can be passed in to retrieve customer Carts
      statuses - cart statuses to find the Carts by
      pageable - the requested page of results
      contextInfo - context information related to multitenancy
      Returns:
      a Page of customer or account Carts based on the given statuses, customer id, and account id
    • retrieveCartsInStatus

      default org.springframework.data.domain.Page<com.broadleafcommerce.cart.client.domain.Cart> retrieveCartsInStatus(String customerId, @Nullable String accountId, String status, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Convenient method to retrieve a Page of customer or account Carts in a single status. Customer cart will automatically be retrieved if the given accountId is null.
      Parameters:
      customerId - the id of the customer that owns the Carts
      accountId - the id of the account that the Carts belong to, null can be passed in to retrieve customer Carts
      status - the cart status to find the Carts by
      pageable - the requested page of results
      contextInfo - context information related to multitenancy
      Returns:
      a Page of customer or account Carts based on the given status, customer id, and account id
    • retrieveInProcessCart

      @Deprecated(since="1.8.0", forRemoval=true) default Optional<com.broadleafcommerce.cart.client.domain.Cart> retrieveInProcessCart(String customerId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Convenient method to retrieve the DefaultCartStatuses.IN_PROCESS cart for the provided customer.

      The Cart with the latest Cart.getCreateDate() is retrieved if there're multiple Carts.

      Parameters:
      customerId - The id of the customer for which we are attempting to find an DefaultCartStatuses.IN_PROCESS cart.
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      Retrieve the DefaultCartStatuses.IN_PROCESS cart for the provided customer.
    • retrieveInProcessCart

      default Optional<com.broadleafcommerce.cart.client.domain.Cart> retrieveInProcessCart(String customerId, @Nullable String accountId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Convenient method to retrieve the DefaultCartStatuses.IN_PROCESS customer or account cart. Customer cart will automatically be retrieved if the given accountId is null.

      The Cart with the latest Cart.getCreateDate() is retrieved if there're multiple Carts.

      Parameters:
      customerId - The id of the customer for which we are attempting to find an DefaultCartStatuses.IN_PROCESS cart.
      accountId - the id of the account that the cart belong to, null can be passed in to retrieve customer cart.
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      Retrieve the DefaultCartStatuses.IN_PROCESS cart for the provided customer.
    • retrieveCsrOwnedCart

      @Deprecated(since="1.8.0", forRemoval=true) default Optional<com.broadleafcommerce.cart.client.domain.Cart> retrieveCsrOwnedCart(String customerId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Convenient method to retrieve the DefaultCartStatuses.CSR_OWNED cart for the provided customer.

      The Cart with the latest Cart.getCreateDate() is retrieved if there're multiple Carts.

      Parameters:
      customerId - The id of the customer for which we are attempting to find an DefaultCartStatuses.CSR_OWNED cart.
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      Retrieve the DefaultCartStatuses.CSR_OWNED cart for the provided customer.
    • retrieveCsrOwnedCart

      default Optional<com.broadleafcommerce.cart.client.domain.Cart> retrieveCsrOwnedCart(String customerId, @Nullable String accountId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Convenient method to retrieve the DefaultCartStatuses.CSR_OWNED customer or account cart. Customer cart will automatically be retrieved if the given accountId is null.

      The Cart with the latest Cart.getCreateDate() is retrieved if there're multiple Carts.

      Parameters:
      customerId - The id of the customer for which we are attempting to find an DefaultCartStatuses.CSR_OWNED cart.
      accountId - the id of the account that the cart belong to, null can be passed in to retrieve customer cart.
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      Retrieve the DefaultCartStatuses.CSR_OWNED cart for the provided customer.
    • retrieveCustomerCartByStatus

      @Deprecated(since="1.8.0", forRemoval=true) default Optional<com.broadleafcommerce.cart.client.domain.Cart> retrieveCustomerCartByStatus(String customerId, String status, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Finds a cart with the given status belonging to the provided customer.

      The Cart with the latest Cart.getCreateDate() is retrieved if there're multiple Carts.

      Parameters:
      customerId - the customer ID
      status - the status
      contextInfo - the context info
      Returns:
      a cart if it exists
    • retrieveCartByStatus

      Optional<com.broadleafcommerce.cart.client.domain.Cart> retrieveCartByStatus(String customerId, @Nullable String accountId, String status, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds a customer or account cart with the given status, customer cart will automatically be retrieved if the given accountId is null.

      The cart with the latest Cart.getCreateDate() is retrieved if there're multiple Carts.

      Parameters:
      customerId - the customer ID
      accountId - the account ID, null can be passed in to retrieve customer cart
      status - the status
      contextInfo - the context info
      Returns:
      a cart if it exists
    • retrieveCartByStatusAndName

      Optional<com.broadleafcommerce.cart.client.domain.Cart> retrieveCartByStatusAndName(String customerId, String status, @Nullable String name, @Nullable String accountId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds a customer or account cart with the given status, customer cart will automatically be retrieved if the given accountId is null.

      The cart with the latest Cart.getCreateDate() is retrieved if there're multiple Carts.

      Parameters:
      customerId - the customer ID
      status - the status
      name - the name of the cart to match or, if null, then a cart with no name
      accountId - the account ID, null can be passed in to retrieve customer cart
      contextInfo - the context info
      Returns:
      a cart if it exists
    • retrieveCartByOrderNumber

      Optional<com.broadleafcommerce.cart.client.domain.Cart> retrieveCartByOrderNumber(String customerId, String orderNumber, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Find the cart (if it exists) for the provided customer id and order number.
      Parameters:
      customerId - the id of the customer who owns the cart
      orderNumber - the order number for the cart
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      a cart (if it exists) with the given order number that belongs to the provided customer
    • retrieveCustomerCartById

      Optional<com.broadleafcommerce.cart.client.domain.Cart> retrieveCustomerCartById(String customerId, String cartId, Set<String> allowedStatuses, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Find the cart (if it exists) for the provided cart id and customer id.
      Parameters:
      customerId - the customer id
      cartId - the id of the cart
      allowedStatuses - the set of cart statuses that are allowed
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      the cart (if it exists) for the provided cart id and customer id
    • retrieveHistoricalCartsForCustomer

      SimplePage<com.broadleafcommerce.cart.client.domain.Cart> retrieveHistoricalCartsForCustomer(String customerId, @Nullable Date startDate, @Nullable Date endDate, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Find all carts that are DefaultCartStatuses.SUBMITTED or DefaultCartStatuses.CANCELLED for the provided customer and dates.
      Parameters:
      customerId - the id of the customer who owns the carts
      startDate - the starting date to filter carts by
      endDate - the ending date to filter carts by
      page - the requested page of results from the database
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      all carts that are DefaultCartStatuses.SUBMITTED or for the provided customer and dates.
    • retrieveHistoricalCartForAnonymousCustomer

      Optional<com.broadleafcommerce.cart.client.domain.Cart> retrieveHistoricalCartForAnonymousCustomer(String emailAddress, String orderNumber, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds a single, historical cart for an anonymous customer.
      Parameters:
      emailAddress - The email address associated with the cart
      orderNumber - The historical cart's order number
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      The single, historical cart for an anonymous customer
    • retrieveAnonymousCustomerCartById

      Optional<com.broadleafcommerce.cart.client.domain.Cart> retrieveAnonymousCustomerCartById(String cartId, String emailAddress, Set<String> allowedStatuses, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Find the cart (if it exists) for the provided cart id and email address excluding the customer owned carts.
      Parameters:
      cartId - the id of the cart
      emailAddress - the email address of the customer
      allowedStatuses - the set of cart statuses that are allowed
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      the cart (if it exists) for the provided cart id and email address
    • retrieveCartById

      Optional<com.broadleafcommerce.cart.client.domain.Cart> retrieveCartById(String cartId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve the cart.
      Parameters:
      cartId - The id of the cart on which to perform the operation.
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      The cart for the provided id.
    • createNonRequestCart

      com.broadleafcommerce.cart.client.domain.Cart createNonRequestCart(com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Create a new cart, without updating the original request cart.
      Parameters:
      cart - The cart to create
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      The created cart.
    • createCart

      com.broadleafcommerce.cart.client.domain.Cart createCart(com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Create a new cart.
      Parameters:
      cart - The cart to create
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      The created cart.
    • updateCart

      com.broadleafcommerce.cart.client.domain.Cart updateCart(com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Update the cart.
      Parameters:
      cart - The cart on which to perform the operation.
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      The updated cart.
    • updateCart

      com.broadleafcommerce.cart.client.domain.Cart updateCart(UpdateCartRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Update the cart.
      Parameters:
      request - The request used to perform the operation.
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      The updated cart.
    • patchCart

      com.broadleafcommerce.cart.client.domain.Cart patchCart(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Patch the cart. A patch does not replace the cart, but partially updates it using any non-null fields.
      Parameters:
      cart - The cart on which to perform the operation.
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      The patched cart.
    • retrieveCartsMatchingTenantByStatus

      org.springframework.data.domain.Page<com.broadleafcommerce.cart.client.domain.Cart> retrieveCartsMatchingTenantByStatus(String status, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieves a Page of Carts based on the given status and matching the tenant from the given ContextInfo.

      Note that this ignores application context and should only be used in scheduled jobs where application context is not available.

      Parameters:
      status - the status to find the carts
      pageable - the requested page of results
      contextInfo - context information related to multitenancy
      Returns:
      a Page of Carts based on the given status and matching the tenant from the given ContextInfo
    • updateCartsMatchingTenantStatus

      List<com.broadleafcommerce.cart.client.domain.Cart> updateCartsMatchingTenantStatus(List<String> cartIds, String status, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Updates the Cart.getStatus() for the given cart ids and status and matching the tenant from the given ContextInfo.

      Note that this ignores application context and should only be used in scheduled jobs where application context is not available.

      Parameters:
      cartIds - the ids of the carts to update the status for
      status - the status to update the carts to
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      The updated carts.
    • deleteCart

      void deleteCart(String cartId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Archives a cart for the provided cart id.
      Parameters:
      cartId - the id of the carts to archive.
      contextInfo - Context information around sandbox and multitenant state.
    • updateCartItem

      @Deprecated com.broadleafcommerce.cart.client.domain.CartItem updateCartItem(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.cart.client.domain.CartItem cartItem, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deprecated.
      in favor of updating the entire cart with updateCart(Cart, ContextInfo)
      Update the cart item.
      Parameters:
      cart - the cart the item belongs to
      cartItem - The cart item on which to perform the operation.
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      The updated cart item.
    • deleteCartItem

      @Deprecated void deleteCartItem(String cartId, com.broadleafcommerce.cart.client.domain.CartItem cartItem, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deprecated.
      in favor of updating the entire cart with updateCart(Cart, ContextInfo)
      Delete the cart item.
      Parameters:
      cartId - the ID of the card the item belongs to
      cartItem - The cart item on which to perform the operation.
      contextInfo - Context information around sandbox and multitenant state.
    • sendRollbackEvent

      void sendRollbackEvent(CheckoutRollbackEvent rollbackEvent, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Sends the rollback event to the cart service. The cart service handles this event and uses durable message sending to guarantee message delivery.
      Parameters:
      rollbackEvent - the event that should be sent
      contextInfo - context information around sandbox and multitenant state
    • sendCheckoutCompletionEvent

      void sendCheckoutCompletionEvent(CheckoutCompletionEvent checkoutCompletionEvent, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Sends the checkout completion event to the cart service. The cart service handles this event and uses durable message sending to guarantee message delivery.
      Parameters:
      checkoutCompletionEvent - the event that should be sent
      contextInfo - context information around sandbox and multitenant state
    • sendExternalPaymentTransactionCartFinalizationEvent

      void sendExternalPaymentTransactionCartFinalizationEvent(ExternalPaymentTransactionCartFinalizationEvent cartFinalizationEvent, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Sends the ExternalPaymentTransactionCartFinalizationEvent via the cart service which uses durable message sending to guarantee message delivery.
      Parameters:
      cartFinalizationEvent - the event to be sent
      contextInfo - context information related to multitenancy.
    • sendCartRejectionEvent

      @Deprecated(since="1.8.2", forRemoval=true) void sendCartRejectionEvent(CartRejectionEvent cartRejectionEvent, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This event will be sent directly from Cart Operation Services.
      Sends the cart rejection event to the cart service. The cart service handles this event and uses durable message sending to guarantee message delivery.
      Parameters:
      cartRejectionEvent - the event that should be sent
      contextInfo - context information around sandbox and multitenant state
    • sendCartPendingPaymentFailedEvent

      void sendCartPendingPaymentFailedEvent(CartPendingPaymentFailedEvent cartPendingPaymentFailedEvent, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Sends the cart pending payment failed event to the cart service. The cart service handles this event and uses durable message sending to guarantee message delivery.
      Parameters:
      cartPendingPaymentFailedEvent - the event that should be sent
      contextInfo - context information around sandbox and multitenant state
    • sendCartAwaitingPaymentResultsEvent

      void sendCartAwaitingPaymentResultsEvent(CartAwaitingPaymentResultsEvent cartAwaitingPaymentResultsEvent, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Sends the cart awaiting payment results event to the cart service. The cart service handles this event and uses durable message sending to guarantee message delivery.
      Parameters:
      cartAwaitingPaymentResultsEvent - the event that should be sent
      contextInfo - context information around sandbox and multitenant state