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.default ProductDetailsListgetDetailsForProducts(Collection<? extends Product> products, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.default ProductDetailsListgetDetailsForProducts(Collection<? extends Product> products, Set<String> productIdsNotFound, Set<String> productUrisNotFound, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.getDetailsForProducts(Collection<? extends Product> products, Set<String> productIdsNotFound, Set<String> productUrisNotFound, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, ProductDetailsRequest request) 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
@Deprecated(since="2.2.0", forRemoval=true) default ProductDetailsList getDetailsForProducts(Collection<? extends Product> products, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Gets theProductDetailsListfor the providedproducts.- Parameters:
products-Productsfor which to get aProductDetailsList.contextInfo- context information surrounding sandboxing/multitenant state- Returns:
ProductDetailsListfor theproducts.
-
getDetailsForProducts
@Deprecated(since="2.2.0", forRemoval=true) default ProductDetailsList getDetailsForProducts(Collection<? extends Product> products, Set<String> productIdsNotFound, Set<String> productUrisNotFound, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Gets theProductDetailsListfor the providedproducts.- Parameters:
products-Productsfor which to get aProductDetailsList.productIdsNotFound- Set of IDs in the request that did not match any productsproductUrisNotFound- Set of URIs in the request that did not match any productscontextInfo- context information surrounding sandboxing/multitenant state- Returns:
ProductDetailsListfor theproducts.
-
getDetailsForProducts
ProductDetailsList getDetailsForProducts(Collection<? extends Product> products, Set<String> productIdsNotFound, Set<String> productUrisNotFound, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @Nullable ProductDetailsRequest request) Gets theProductDetailsListfor the providedproducts.- Parameters:
products-Productsfor which to get aProductDetailsList.productIdsNotFound- Set of IDs in the request that did not match any productsproductUrisNotFound- Set of URIs in the request that did not match any productscontextInfo- context information surrounding sandboxing/multitenant staterequest- The originalrequest.- Returns:
ProductDetailsListfor theproducts.- Since:
- Catalog Service 2.2.0, Release Train 2.2.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.
-
getDetailsForProducts(Collection, Set, Set, ContextInfo, ProductDetailsRequest)