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 Details

    • getProductDetailsForRequest

      Optional<ProductDetailsList> getProductDetailsForRequest(ProductDetailsRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Parameters:
      request - the ProductDetailsRequest with 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:
      ProductDetailsList for the ProductDetailsRequests.
      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 the ProductAssets that match the productIds provided. The results are mapped by the product ID.
      Parameters:
      productIds - IDs of the Products whose assets to fetch.
      filters - additional filters to apply in the query.
      contextInfo - context information surrounding sandboxing/multitenant state.
      Returns:
      the ProductAssets that match the productIds provided.
    • getDetailsForProducts

      ProductDetailsList getDetailsForProducts(Collection<? extends Product> products, ProductDetailsRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Gets the ProductDetailsList for the provided products.

      The product IDs and URIs not found should be populated onto the original ProductDetailsRequest rather 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 - Products for which to get a ProductDetailsList.
      request - The original request.
      contextInfo - context information surrounding sandboxing/multitenant state
      Returns:
      ProductDetailsList for the products.
      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 the ProductTags for the given productIds. The results are mapped by the owning product ID.
      Parameters:
      productIds - IDs of the Products whose assets to fetch.
      filters - additional filters to apply in the query.
      contextInfo - context information surrounding sandboxing/multitenant state.
      Returns:
      The ProductTags for the given productIds.