Class ExternalCartProvider
- java.lang.Object
-
- com.broadleafcommerce.inventory.service.provider.ExternalCartProvider
-
- All Implemented Interfaces:
CartProvider
public class ExternalCartProvider extends Object implements CartProvider
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
CART_CLIENT_ID
Deprecated.
-
Constructor Summary
Constructors Constructor Description ExternalCartProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.http.HttpHeaders
getHeaders(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
protected com.fasterxml.jackson.databind.ObjectMapper
getObjectMapper()
String
getServiceClient()
The service client to use when interacting with cart.protected org.springframework.web.reactive.function.client.WebClient
getWebClient()
List<CartItem>
readCartItems(String cartLink, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Read the cart items for a cartList<FulfillmentGroup<FulfillmentItem>>
readFulfillmentGroups(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 Detail
-
CART_CLIENT_ID
@Deprecated protected static final String CART_CLIENT_ID
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
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
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"
-
-