Class ExternalCartProvider
java.lang.Object
com.broadleafcommerce.inventory.service.provider.ExternalCartProvider
- All Implemented Interfaces:
CartProvider
-
Field Summary
-
Constructor Summary
ConstructorDescriptionExternalCartProvider
(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.http.HttpHeaders
getHeaders
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected com.fasterxml.jackson.databind.ObjectMapper
The service client to use when interacting with cart.protected org.springframework.web.reactive.function.client.WebClient
readCartItems
(String cartLink, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read the cart items for a cartreadFulfillmentGroups
(String fulfillmentGroupLink, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read the fulfillment groups for a cart.void
setServiceClient
(String serviceClient) The service client to use when interacting with cart.
-
Field Details
-
CART_CLIENT_ID
Deprecated.- See Also:
-
-
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 interfaceCartProvider
- Parameters:
fulfillmentGroupLink
- The cart IDcontextInfo
- 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 interfaceCartProvider
- Parameters:
cartLink
- The cart IDcontextInfo
- 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
The service client to use when interacting with cart. Default is "inventoryclient" -
setServiceClient
The service client to use when interacting with cart. Default is "inventoryclient"
-
getServiceClient()