Interface CatalogProvider

All Superinterfaces:
BrowseEntityProvider
All Known Implementing Classes:
ExternalCatalogProvider

public interface CatalogProvider extends BrowseEntityProvider
Provider for interfacing with operations around Catalog entities. Typically utilizes WebClient to make requests to an external REST API.
Author:
Nathan Moore (nathandmoore)
  • Method Details

    • fetchProductsWithDetails

      ProductList fetchProductsWithDetails(ProductDetailsRequest request)
      Retrieves the product list with details for the request.
      Parameters:
      request - All of the relevant information to be used to retrieve a product's details
      Returns:
      The product list for the parameters provided.
      Throws:
      ProviderApiException - if the provider encounters an error with the request.
    • fetchCategoryWithDetails

      Category fetchCategoryWithDetails(CategoryDetailsRequest request)
      Retrieves the category with details for the request.
      Parameters:
      request - All of the relevant information to be used to retrieve a category's details
      Returns:
      The category for the parameters provided.
      Throws:
      ProviderApiException - if the provider encounters an error with the request.
    • fetchAllCategoriesWithDetails

      CategoryList fetchAllCategoriesWithDetails(BulkCategoryDetailsRequest request)
      Retrieves the categories with details for the requests.
      Parameters:
      request - All of the relevant information to be used to retrieve a categories' details
      Returns:
      The categories for the parameters provided.
      Throws:
      ProviderApiException - if the provider encounters an error with the request.
      Since:
      Catalog Browse Service 2.1.0, Release Train 2.2.0
    • fetchDataDrivenEnumsWithDetails

      DataDrivenEnumList fetchDataDrivenEnumsWithDetails(DataDrivenEnumDetailsRequest request)
      Retrieves the data driven enum list with details for the request.
      Parameters:
      request - All of the relevant information to be used to retrieve a list of data driven enum with their details
      Returns:
      The data driven enum list for the parameters provided.
      Throws:
      ProviderApiException - if the provider encounters an error with the request.
    • fetchCartFieldMappings

      List<CartFieldMapping> fetchCartFieldMappings(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieves a list of mappings between product and cart item.
      Parameters:
      contextInfo - Additional sandbox and multitenant info.
      Returns:
      a list of mappings between product and cart item
    • hydrateProductAssets

      <T extends Product> void hydrateProductAssets(Collection<T> products, @Nullable org.springframework.util.MultiValueMap<String,String> parameters, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieves the Assets for the provided products and populates them onto Product.setAssets(java.util.List<com.broadleafcommerce.catalogbrowse.domain.Asset>).

      Note that this is only necessary if assets are requested separately from product details such as for hydrating search results. Otherwise, they are already hydrated on the results of fetchProductsWithDetails(com.broadleafcommerce.catalogbrowse.domain.ProductDetailsRequest) and fetchCategoryWithDetails(com.broadleafcommerce.catalogbrowse.domain.CategoryDetailsRequest).
      Parameters:
      products - Products to hydrate.
      parameters - Request parameters to include when fetching assets
      contextInfo - Additional sandbox and multitenant info.
      Throws:
      ProviderApiException - if the provider encounters an error with the request.
    • hydrateProductTags

      <T extends Product> void hydrateProductTags(Collection<T> products, @Nullable org.springframework.util.MultiValueMap<String,String> parameters, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieves the ProductTags for the provided products and populates them onto Product.getAdvancedTags().
      Parameters:
      products - Products to hydrate.
      parameters - Request parameters to include when fetching assets
      contextInfo - Additional sandbox and multitenant info.
      Throws:
      ProviderApiException - if the provider encounters an error with the request.