Interface ProductDetailsService
- All Known Implementing Classes:
DefaultProductDetailsService
public interface ProductDetailsService
This service is responsible for retrieving
ProductDetails for
ProductDetailsRequests. It is responsible for building the details;
however, it typically should defer the hydration of the related domain to the available
ProductDetailsContributors- Author:
- Nathan Moore (nathandmoore)
-
Method Summary
Modifier and TypeMethodDescriptiongetAssetsForProducts(Collection<String> productIds, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets theProductAssetsthat match theproductIdsprovided.getDetailsForProducts(Collection<? extends Product> products, ProductDetailsRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets theProductDetailsListfor the providedproducts.getProductDetailsForRequest(ProductDetailsRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets aProductDetailsfor theProductDetailsRequest.getTagDetailsForProducts(Collection<String> productIds, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets theProductTagsfor the givenproductIds.
-
Method Details
-
getProductDetailsForRequest
Optional<ProductDetailsList> getProductDetailsForRequest(ProductDetailsRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets aProductDetailsfor theProductDetailsRequest.- Parameters:
request- theProductDetailsRequestwith additional request context for identifying the products for which to retrieve details and defining the how much detail to go into.contextInfo- context information surrounding sandboxing/multitenant state- Returns:
ProductDetailsListfor theProductDetailsRequests.- Throws:
ProductDetailsRequestException- Thrown if the request is invalid such as missing both the product URI and ID.
-
getAssetsForProducts
Map<String,List<ProductAsset>> getAssetsForProducts(Collection<String> productIds, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets theProductAssetsthat match theproductIdsprovided. The results are mapped by the product ID.- Parameters:
productIds- IDs of theProductswhose assets to fetch.filters- additional filters to apply in the query.contextInfo- context information surrounding sandboxing/multitenant state.- Returns:
- the
ProductAssetsthat match theproductIdsprovided.
-
getDetailsForProducts
ProductDetailsList getDetailsForProducts(Collection<? extends Product> products, ProductDetailsRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets theProductDetailsListfor the providedproducts.The product IDs and URIs not found should be populated onto the original
ProductDetailsRequestrather than be passed in separately to clean up the method signature and allow even more information to be passed in besides in the future or by extensions.- Parameters:
products-Productsfor which to get aProductDetailsList.request- The originalrequest.contextInfo- context information surrounding sandboxing/multitenant state- Returns:
ProductDetailsListfor theproducts.- Since:
- Catalog Services 2.3.0, Release Train 2.3.0
-
getTagDetailsForProducts
Map<String,List<ProductTagDetail>> getTagDetailsForProducts(Collection<String> productIds, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets theProductTagsfor the givenproductIds. The results are mapped by the owning product ID.- Parameters:
productIds- IDs of theProductswhose assets to fetch.filters- additional filters to apply in the query.contextInfo- context information surrounding sandboxing/multitenant state.- Returns:
- The
ProductTagsfor the givenproductIds.
-