Class PricingExternalClient
java.lang.Object
com.broadleafcommerce.catalogbrowse.service.provider.external.pricing.PricingExternalClient
- All Implemented Interfaces:
com.broadleafcommerce.common.extension.intercommunication.ExternalClient,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware
public class PricingExternalClient
extends Object
implements com.broadleafcommerce.common.extension.intercommunication.ExternalClient, org.springframework.beans.factory.BeanFactoryAware
Handles external calls to pricing services to retrieve sku pricing information
-
Constructor Summary
ConstructorsConstructorDescriptionPricingExternalClient(com.broadleafcommerce.common.extension.intercommunication.ExternalClientProperties properties, ExternalPricingProviderProperties providerProperties, org.springframework.web.reactive.function.client.WebClient webClient, com.broadleafcommerce.data.tracking.core.context.ContextInfoWebRequestResolver requestResolver) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.broadleafcommerce.data.tracking.core.context.ContextInfoextractContext(com.broadleafcommerce.common.extension.intercommunication.ExternalRequest request, org.springframework.web.util.UriComponents uriComponents) <T,R extends Exception>
Tget(com.broadleafcommerce.common.extension.intercommunication.ExternalRequest request) protected Class<?>protected Methodprotected com.broadleafcommerce.common.extension.intercommunication.ExternalClientPropertiesprotected ExternalPricingProviderPropertiesprotected com.broadleafcommerce.data.tracking.core.context.ContextInfoWebRequestResolverprotected org.springframework.web.reactive.function.client.WebClientprotected booleanvoidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) protected voidtrimResponse(org.springframework.data.domain.Page<com.broadleafcommerce.pricing.client.domain.PriceInfo> page)
-
Constructor Details
-
PricingExternalClient
public PricingExternalClient(com.broadleafcommerce.common.extension.intercommunication.ExternalClientProperties properties, ExternalPricingProviderProperties providerProperties, org.springframework.web.reactive.function.client.WebClient webClient, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfoWebRequestResolver requestResolver)
-
-
Method Details
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException - Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware- Throws:
org.springframework.beans.BeansException
-
get
public <T,R extends Exception> T get(com.broadleafcommerce.common.extension.intercommunication.ExternalRequest request) throws R - Specified by:
getin interfacecom.broadleafcommerce.common.extension.intercommunication.ExternalClient- Throws:
R extends Exception
-
trimResponse
protected void trimResponse(org.springframework.data.domain.Page<com.broadleafcommerce.pricing.client.domain.PriceInfo> page) -
extractContext
protected com.broadleafcommerce.data.tracking.core.context.ContextInfo extractContext(com.broadleafcommerce.common.extension.intercommunication.ExternalRequest request, org.springframework.web.util.UriComponents uriComponents) -
isPricingServiceOnClasspath
protected boolean isPricingServiceOnClasspath() -
getProperties
protected com.broadleafcommerce.common.extension.intercommunication.ExternalClientProperties getProperties() -
getProviderProperties
-
getWebClient
protected org.springframework.web.reactive.function.client.WebClient getWebClient() -
getRequestResolver
protected com.broadleafcommerce.data.tracking.core.context.ContextInfoWebRequestResolver getRequestResolver() -
getEndpoint
-
getMethod
-
getEndpointSupplier
-