Interface CatalogProvider
-
- All Known Implementing Classes:
ExternalCatalogProvider
public interface CatalogProviderProvider for interfacing with operations around aCatalogrelated entities. Typically utilizesWebClientto make requests to an external REST API.- Author:
- Nathan Moore (nathandmoore)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BrowseEntityDetailsfetchBrowseEntityDetails(BrowseDetailsRequest request)Retrieves a product list or category that matches the givenrequest.CategoryfetchCategoryWithDetails(CategoryDetailsRequest request)Retrieves the category with details for the request.DataDrivenEnumListfetchDataDrivenEnumsWithDetails(DataDrivenEnumDetailsRequest request)Retrieves the data driven enum list with details for the request.ProductListfetchProductsWithDetails(ProductDetailsRequest 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().
-
-
-
Method Detail
-
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.
-
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.
-
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.
-
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.
-
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.
-
fetchBrowseEntityDetails
BrowseEntityDetails fetchBrowseEntityDetails(BrowseDetailsRequest request)
Retrieves a product list or category that matches the givenrequest.- Parameters:
request- All of the relevant information to be used to retrieve a browse entity's details such as a list of URIs.- Returns:
- The details of the browse entities matching the
request
-
-