Class RelatedProductsEndpoint
java.lang.Object
com.broadleafcommerce.rest.api.endpoint.BaseEndpoint
com.broadleafcommerce.rest.api.endpoint.catalog.RelatedProductsEndpoint
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.MessageSourceAware
@FrameworkRestController
@FrameworkMapping(value="/related-products",
produces={"application/json","application/xml"})
public class RelatedProductsEndpoint
extends BaseEndpoint
- Author:
- Nick Crum ncrum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.broadleafcommerce.core.catalog.service.CatalogServiceprotected final PromotionMessageDTOWrapperServiceprotected final org.broadleafcommerce.core.catalog.service.RelatedProductsServiceFields inherited from class com.broadleafcommerce.rest.api.endpoint.BaseEndpoint
context, messageSource -
Constructor Summary
ConstructorsConstructorDescriptionRelatedProductsEndpoint(org.broadleafcommerce.core.catalog.service.CatalogService catalogService, org.broadleafcommerce.core.catalog.service.RelatedProductsService relatedProductsService, PromotionMessageDTOWrapperService promotionMessageDTOWrapperService) -
Method Summary
Modifier and TypeMethodDescriptionprotected List<org.broadleafcommerce.core.catalog.domain.Product>buildProductList(List<? extends org.broadleafcommerce.core.catalog.domain.PromotableProduct> relatedProducts) getRelatedProducts(jakarta.servlet.http.HttpServletRequest request, Long productId, String productKey, Long categoryId, String categoryKey, Integer quantity, String type, Boolean includePromotionMessages, Boolean includePriceData) Methods inherited from class com.broadleafcommerce.rest.api.endpoint.BaseEndpoint
getApplicationContext, getMessageSource, setApplicationContext, setMessageSource
-
Field Details
-
catalogService
protected final org.broadleafcommerce.core.catalog.service.CatalogService catalogService -
promotionMessageDTOWrapperService
-
Constructor Details
-
RelatedProductsEndpoint
@Autowired public RelatedProductsEndpoint(org.broadleafcommerce.core.catalog.service.CatalogService catalogService, org.broadleafcommerce.core.catalog.service.RelatedProductsService relatedProductsService, PromotionMessageDTOWrapperService promotionMessageDTOWrapperService)
-
-
Method Details
-
getRelatedProducts
@FrameworkMapping(method=GET) public List<ProductWrapper> getRelatedProducts(jakarta.servlet.http.HttpServletRequest request, @RequestParam(value="productId",required=false) Long productId, @RequestParam(value="productKey",required=false) String productKey, @RequestParam(value="categoryId",required=false) Long categoryId, @RequestParam(value="categoryKey",required=false) String categoryKey, @RequestParam(value="quantity",required=false) Integer quantity, @RequestParam(value="type",required=false) String type, @RequestParam(value="includePromotionMessages",required=false) Boolean includePromotionMessages, @RequestParam(value="includePriceData",required=false) Boolean includePriceData) -
buildProductList
-