Class ExternalCatalogProvider<P extends Product>

java.lang.Object
com.broadleafcommerce.subscriptionoperation.service.provider.external.AbstractExternalProvider
com.broadleafcommerce.subscriptionoperation.service.provider.external.ExternalCatalogProvider<P>
All Implemented Interfaces:
CatalogProvider<P>

public class ExternalCatalogProvider<P extends Product> extends AbstractExternalProvider implements CatalogProvider<P>
  • Field Details

  • Constructor Details

    • ExternalCatalogProvider

      public ExternalCatalogProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalCatalogProviderProperties properties)
  • Method Details

    • readProductById

      public P readProductById(String productId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: CatalogProvider
      Retrieves the Product based on the given id.
      Specified by:
      readProductById in interface CatalogProvider<P extends Product>
      Parameters:
      productId - the product id
      contextInfo - context information around multi-tenant state
      Returns:
      the Product
    • readProductsByIds

      public org.springframework.data.domain.Page<P> readProductsByIds(@NonNull @NonNull Collection<String> productIds, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: CatalogProvider
      Retrieves Products based on the given ids.
      Specified by:
      readProductsByIds in interface CatalogProvider<P extends Product>
      Parameters:
      productIds - list of product ids
      pageable - pageable
      contextInfo - context information around multi-tenant state
      Returns:
      page of Products
    • buildReadProductsByIdsFilters

      protected String buildReadProductsByIdsFilters(@NonNull @NonNull Collection<String> productIds)
      Build the RSQL filters in a String form used for reading the products by IDs.
      Parameters:
      productIds - the list of product ids.
      Returns:
      the RSQL filters in a String form used for reading the products by IDs
    • getPageType

      protected org.springframework.core.ParameterizedTypeReference<ResponsePageGenerator<P>> getPageType()
      Gets the type reference for a page generator of item list items.
      Returns:
      type reference for a page generator of item list items
    • getBaseUri

      protected org.springframework.web.util.UriComponentsBuilder getBaseUri()
      Gets the base URI common to all requests this provider will make.
      Returns:
      a URI components builder with the base URI set up
    • getServiceClient

      protected String getServiceClient()
    • getProperties

      protected ExternalCatalogProviderProperties getProperties()