Class ExternalPricingProvider

java.lang.Object
com.broadleafcommerce.datafeed.service.collector.provider.ExternalPricingProvider
All Implemented Interfaces:
PricingProvider

public class ExternalPricingProvider extends Object implements PricingProvider
  • Constructor Summary

    Constructors
    Constructor
    Description
    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 Summary

    Modifier and Type
    Method
    Description
    protected <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 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 fetch Price Infos for the provided list of Products.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 fetch Price Infos for the provided list of Products.
      Specified by:
      readPricesForProducts in interface PricingProvider
      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

      protected PricingProviderProperties getPricingProviderProperties()
    • getProviderUtil

      protected ProviderUtil getProviderUtil()