Class ExternalCartProvider

java.lang.Object
com.broadleafcommerce.inventory.service.provider.ExternalCartProvider
All Implemented Interfaces:
CartProvider

public class ExternalCartProvider extends Object implements CartProvider
  • Field Details

  • Constructor Details

    • ExternalCartProvider

      public ExternalCartProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
  • Method Details

    • readFulfillmentGroups

      public List<FulfillmentGroup<FulfillmentItem>> readFulfillmentGroups(String fulfillmentGroupLink, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: CartProvider
      Read the fulfillment groups for a cart.
      Specified by:
      readFulfillmentGroups in interface CartProvider
      Parameters:
      fulfillmentGroupLink - The cart ID
      contextInfo - The context
      Returns:
      A list of fulfillment groups for a cart.
    • readCartItems

      public List<CartItem> readCartItems(String cartLink, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: CartProvider
      Read the cart items for a cart
      Specified by:
      readCartItems in interface CartProvider
      Parameters:
      cartLink - The cart ID
      contextInfo - The context
      Returns:
      A list of cart items for a cart.
    • getHeaders

      protected org.springframework.http.HttpHeaders getHeaders(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • getWebClient

      protected org.springframework.web.reactive.function.client.WebClient getWebClient()
    • getObjectMapper

      protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
    • getServiceClient

      public String getServiceClient()
      The service client to use when interacting with cart. Default is "inventoryclient"
    • setServiceClient

      public void setServiceClient(String serviceClient)
      The service client to use when interacting with cart. Default is "inventoryclient"