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

      default ProductDetailsList getDetailsForProducts(Collection<? extends Product> products, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Gets the ProductDetailsList for the provided products.
      Parameters:
      products - Products for which to get a ProductDetailsList.
      contextInfo - context information surrounding sandboxing/multitenant state
      Returns:
      ProductDetailsList for the products.
    • getDetailsForProducts

      ProductDetailsList getDetailsForProducts(Collection<? extends Product> products, Set<String> productIdsNotFound, Set<String> productUrisNotFound, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Gets the ProductDetailsList for the provided products.
      Parameters:
      products - Products for which to get a ProductDetailsList.
      productIdsNotFound - Set of IDs in the request that did not match any products
      productUrisNotFound - Set of URIs in the request that did not match any products
      contextInfo - context information surrounding sandboxing/multitenant state
      Returns:
      ProductDetailsList for the products.
    • 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.