Class ProductDetailsEndpoint

java.lang.Object
com.broadleafcommerce.catalog.web.endpoint.commerce.ProductDetailsEndpoint

@FrameworkRestController @FrameworkMapping("/product-details") @DataRouteByExample(ProductDetails.class) public class ProductDetailsEndpoint extends Object
Author:
Nathan Moore (nathandmoore)
  • Constructor Details

    • ProductDetailsEndpoint

      public ProductDetailsEndpoint(ProductDetailsService productDetailsService, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
  • Method Details

    • readDetailsForRequests

      @FrameworkGetMapping public org.springframework.http.ResponseEntity<ProductDetailsList> readDetailsForRequests(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, ProductDetailsRequest productDetailsRequest)
      Returns a ProductDetails for the given ProductDetailsRequest. If the request is missing or has insufficient information (e.g., is missing ProductDetailsRequest.getProductUris()), then this returns a 400 error. If no product matches the request, then this returns a 404.
      Parameters:
      request - A HttpServletRequest
      context - Context info for multitenant and sandbox conditions
      productDetailsRequest - the ProductDetailsRequest with additional request context for identifying the products for which to retrieve details and defining the how much detail to go into.
      Returns:
      a ProductDetails for the given ProductDetailsRequest
    • readAssetsForProducts

      @FrameworkPostMapping(value="/assets", consumes="application/json") public Map<String,List<ProductAsset>> readAssetsForProducts(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, cz.jirutka.rsql.parser.ast.Node filters, @RequestBody List<String> productIds)
    • readTagsForProducts

      @FrameworkPostMapping(value="/tags", consumes="application/json") public Map<String,List<ProductTagDetail>> readTagsForProducts(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, cz.jirutka.rsql.parser.ast.Node filters, @RequestBody List<String> productIds)
    • getProductDetailsService

      protected ProductDetailsService getProductDetailsService()
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()