Class ExternalPricingProvider
java.lang.Object
com.broadleafcommerce.datafeed.service.collector.provider.ExternalPricingProvider
- All Implemented Interfaces:
PricingProvider
-
Constructor Summary
ConstructorDescriptionExternalPricingProvider
(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, PricingProviderProperties pricingProviderProperties, ProviderUtil providerUtil) -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> reactor.core.publisher.Mono<T>
customizeReadPricesForProductsMono
(reactor.core.publisher.Mono<T> mono) protected org.springframework.http.HttpHeaders
getHeaders
(com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected com.fasterxml.jackson.databind.ObjectMapper
protected PricingProviderProperties
protected ProviderUtil
protected com.broadleafcommerce.common.extension.TypeFactory
protected org.springframework.web.reactive.function.client.WebClient
List<com.broadleafcommerce.pricing.client.domain.PriceInfo>
readPricesForProducts
(@NonNull List<CollectedProduct> products, @NonNull com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext, com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Method to call a PricingService to fetchPrice Infos
for the provided list of Products.
-
Constructor Details
-
ExternalPricingProvider
public ExternalPricingProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, PricingProviderProperties pricingProviderProperties, ProviderUtil providerUtil)
-
-
Method Details
-
readPricesForProducts
public List<com.broadleafcommerce.pricing.client.domain.PriceInfo> readPricesForProducts(@NonNull @NonNull List<CollectedProduct> products, @NonNull @NonNull com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext, @Nullable com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:PricingProvider
Method to call a PricingService to fetchPrice Infos
for the provided list of Products.- Specified by:
readPricesForProducts
in interfacePricingProvider
- Returns:
-
getHeaders
protected org.springframework.http.HttpHeaders getHeaders(@Nullable com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
customizeReadPricesForProductsMono
protected <T> reactor.core.publisher.Mono<T> customizeReadPricesForProductsMono(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() -
getPricingProviderProperties
-
getProviderUtil
-