Class ExternalInventoryProvider
java.lang.Object
com.broadleafcommerce.datafeed.service.collector.provider.ExternalInventoryProvider
- All Implemented Interfaces:
InventoryProvider
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Necessary in scenarios where there may be too many SKU codes to pass through request parameters. -
Constructor Summary
ConstructorDescriptionExternalInventoryProvider
(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, InventoryProviderProperties inventoryProviderProperties, ProviderUtil providerUtil) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
buildReadSkuInventoryUri
(@NonNull Set<String> skus, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) buildSkuCodesRequestBody
(@NonNull Set<String> skus, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected <T> reactor.core.publisher.Mono<T>
customizeReadInventoryForSkusMono
(reactor.core.publisher.Mono<T> mono) protected InventoryProviderProperties
protected com.fasterxml.jackson.databind.ObjectMapper
protected ProviderUtil
protected com.broadleafcommerce.common.extension.TypeFactory
protected org.springframework.web.reactive.function.client.WebClient
readInventoryForSkus
(@NonNull Set<String> skus, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Given a collection of SKUs, this returns Inventory totals available, by default, for shipping.
-
Constructor Details
-
ExternalInventoryProvider
public ExternalInventoryProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, InventoryProviderProperties inventoryProviderProperties, ProviderUtil providerUtil)
-
-
Method Details
-
readInventoryForSkus
public Map<String,Long> readInventoryForSkus(@NonNull @NonNull Set<String> skus, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:InventoryProvider
Given a collection of SKUs, this returns Inventory totals available, by default, for shipping.- Specified by:
readInventoryForSkus
in interfaceInventoryProvider
- Returns:
-
buildReadSkuInventoryUri
-
buildSkuCodesRequestBody
protected ExternalInventoryProvider.SkuCodesRequestBody buildSkuCodesRequestBody(@NonNull @NonNull Set<String> skus, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
customizeReadInventoryForSkusMono
protected <T> reactor.core.publisher.Mono<T> customizeReadInventoryForSkusMono(reactor.core.publisher.Mono<T> mono) -
getWebClient
protected org.springframework.web.reactive.function.client.WebClient getWebClient() -
getObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
getInventoryProviderProperties
-
getProviderUtil
-