Interface CatalogProvider
- All Superinterfaces:
BrowseEntityProvider
- All Known Implementing Classes:
ExternalCatalogProvider
Provider for interfacing with operations around Catalog entities. Typically utilizes
WebClient to make requests to an external REST API.- Author:
- Nathan Moore (nathandmoore)
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the categories with details for the requests.fetchCartFieldMappings(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves a list of mappings between product and cart item.Retrieves the category with details for the request.Retrieves the data driven enum list with details for the request.Retrieves the product list with details for the request.<T extends Product>
voidhydrateProductAssets(Collection<T> products, org.springframework.util.MultiValueMap<String, String> parameters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves theAssetsfor the providedproductsand populates them ontoProduct.setAssets(java.util.List<com.broadleafcommerce.catalogbrowse.domain.Asset>).<T extends Product>
voidhydrateProductTags(Collection<T> products, org.springframework.util.MultiValueMap<String, String> parameters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves theProductTagsfor the providedproductsand populates them ontoProduct.getAdvancedTags().Methods inherited from interface com.broadleafcommerce.catalogbrowse.service.provider.BrowseEntityProvider
fetchBrowseEntityDetails
-
Method Details
-
fetchProductsWithDetails
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
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
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
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 theAssetsfor the providedproductsand populates them ontoProduct.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)andfetchCategoryWithDetails(com.broadleafcommerce.catalogbrowse.domain.CategoryDetailsRequest).- Parameters:
products-Productsto hydrate.parameters- Request parameters to include when fetching assetscontextInfo- 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 theProductTagsfor the providedproductsand populates them ontoProduct.getAdvancedTags().- Parameters:
products-Productsto hydrate.parameters- Request parameters to include when fetching assetscontextInfo- Additional sandbox and multitenant info.- Throws:
ProviderApiException- if the provider encounters an error with the request.
-