public class ExternalCatalogProvider extends AbstractExternalProvider implements CatalogProvider
CatalogProvider
is designed to interact with a provider
that will provide fully hydrated catalog entities, i.e., there is no need for additional calls to
get a product's variants or item choices.Constructor and Description |
---|
ExternalCatalogProvider(org.springframework.web.reactive.function.client.WebClient webClient,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
com.broadleafcommerce.common.extension.TypeFactory typeFactory,
ExternalCatalogProperties properties) |
Modifier and Type | Method and Description |
---|---|
protected String |
getRetrieveItemProductMappingsUrl() |
protected String |
getRetrieveProductsUrl(Collection<String> productIds) |
List<CartItemMappingProperties.FieldMapping> |
retrieveCartItemProductMappings(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Retrieve a list of cart item to product mappings
|
Product |
retrieveProduct(String productId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Retrieve the product for the context information provided.
|
ProductList |
retrieveProducts(Collection<String> productIds,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Retrieve the products for the context information provided.
|
executeRequest, getHeaders, getObjectMapper, getTypeFactory, getWebClient, pageableToParams, uriVars
public ExternalCatalogProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalCatalogProperties properties)
public Product retrieveProduct(String productId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
CatalogProvider
retrieveProduct
in interface CatalogProvider
productId
- The id of the product to be retrieved.contextInfo
- Context information around sandbox and multitenant state.public ProductList retrieveProducts(Collection<String> productIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
CatalogProvider
retrieveProducts
in interface CatalogProvider
productIds
- The ids of the products to be retrieved.contextInfo
- Context information around sandbox and multitenant state.public List<CartItemMappingProperties.FieldMapping> retrieveCartItemProductMappings(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
CatalogProvider
retrieveCartItemProductMappings
in interface CatalogProvider
contextInfo
- Context information around sandbox and multitenant state.protected String getRetrieveProductsUrl(Collection<String> productIds)
protected String getRetrieveItemProductMappingsUrl()
Copyright © 2021. All rights reserved.