Class AbstractExternalProvider

java.lang.Object
com.broadleafcommerce.vendor.chasepayment.provider.AbstractExternalProvider
Direct Known Subclasses:
DefaultHPSProvider, DefaultOrbitalGatewayProvider

public abstract class AbstractExternalProvider extends Object
An abstract class that is used to execute the requests to an external API using WebClient.
  • Constructor Details

    • AbstractExternalProvider

      public AbstractExternalProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
  • Method Details

    • executeRequest

      protected <T> T executeRequest(Supplier<T> request)
      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()