Class AbstractExternalProvider
java.lang.Object
com.broadleafcommerce.vendor.chasepayment.provider.AbstractExternalProvider
- Direct Known Subclasses:
DefaultHPSProvider,DefaultOrbitalGatewayProvider
An abstract class that is used to execute the requests to an external API using
WebClient.-
Constructor Summary
ConstructorsConstructorDescriptionAbstractExternalProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> TexecuteRequest(Supplier<T> request) Executes a request with default Web Client error handling.protected StringgetApplicationId(com.broadleafcommerce.data.tracking.core.context.ContextInfo context) protected com.fasterxml.jackson.databind.ObjectMapperprotected StringgetTenantId(com.broadleafcommerce.data.tracking.core.context.ContextInfo context) protected org.springframework.web.reactive.function.client.WebClient
-
Constructor Details
-
AbstractExternalProvider
public AbstractExternalProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
executeRequest
Executes a request with default Web Client error handling.- Type Parameters:
T- the return type of the request operation- Parameters:
request- the request to execute- Returns:
- the value generated by the supplier
-
getTenantId
@Nullable protected String getTenantId(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) -
getApplicationId
@Nullable protected String getApplicationId(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) -
getWebClient
protected org.springframework.web.reactive.function.client.WebClient getWebClient() -
getObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-