Class CatalogBrowseEndpoint

java.lang.Object
com.broadleafcommerce.catalogbrowse.web.endpoint.CatalogBrowseEndpoint

@FrameworkRestController @FrameworkMapping @DataRouteByKey("catalogbrowse") public class CatalogBrowseEndpoint extends Object
Author:
Nathan Moore (nathandmoore)
  • Field Details

  • Constructor Details

  • Method Details

    • readProductDetails

      @FrameworkGetMapping({"/products/details","/browse/products"}) public ProductList readProductDetails(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @RequestHeader(value="X-Price-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, @RequestHeader(value="X-Price-Info-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext, @RequestParam org.springframework.util.MultiValueMap<String,String> parameters)
      TODO: The /products/details mapping should be removed in the future as we will want to deprecate it in favor of /browse/products. This mapping was originally slated to be removed in v2.0.0-GA.
      Since:
      2.0.0
    • readProductDetailsWithSkipPricing

      @FrameworkGetMapping(value={"/products/details","/browse/products"}, params="skipPricing") public ProductList readProductDetailsWithSkipPricing(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @RequestHeader(value="X-Price-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, @RequestHeader(value="X-Price-Info-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext, @RequestParam boolean skipPricing, @RequestParam(required=false,defaultValue="false") boolean skipInventory, @RequestParam org.springframework.util.MultiValueMap<String,String> parameters)
      TODO: The /products/details mapping should be removed in the future as we will want to deprecate it in favor of /browse/products. This mapping was originally slated to be removed in v2.0.0-GA.
      Since:
      1.8.8, 2.0.1
    • readCategoryDetails

      @FrameworkGetMapping({"/categories/details","/browse/categories"}) public Category readCategoryDetails(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @RequestHeader(value="X-Price-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, @RequestHeader(value="X-Price-Info-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext, @RequestParam org.springframework.util.MultiValueMap<String,String> parameters)
      TODO: The /categories/details mapping should be removed in the future as we will want to deprecate it in favor of /browse/categories. This mapping was originally slated to be removed in v2.0.0-GA.
      Since:
      2.0.0
    • readAllCategoryDetails

      @FrameworkPostMapping(value="/browse/categories", consumes="application/json") public CategoryList readAllCategoryDetails(jakarta.servlet.http.HttpServletRequest servletRequest, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @RequestHeader(value="X-Price-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, @RequestHeader(value="X-Price-Info-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext, @RequestParam org.springframework.util.MultiValueMap<String,String> parameters, @RequestBody BulkCategoryDetailsRequest request)
    • readContentItems

      @FrameworkGetMapping("/browse/content-items") public ContentResolverResponse readContentItems(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestHeader(value="X-Content-Context",required=false) ContentContext contentContext, @RequestParam org.springframework.util.MultiValueMap<String,String> parameters)
    • readBulkContentItems

      @FrameworkPostMapping(value="/browse/content-items/bulk", consumes="application/json") public BulkContentResolverResponse readBulkContentItems(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestHeader(value="X-Content-Context",required=false) ContentContext contentContext, @RequestParam org.springframework.util.MultiValueMap<String,String> parameters, @RequestBody BulkContentResolverRequest bulkRequest)
    • readBrowseEntityDetails

      @FrameworkGetMapping("/browse/details") public BrowseEntityDetails readBrowseEntityDetails(jakarta.servlet.http.HttpServletRequest servletRequest, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @RequestHeader(value="X-Price-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, @RequestHeader(value="X-Price-Info-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext, @RequestParam org.springframework.util.MultiValueMap<String,String> parameters)
    • readBrowseEntityDetails

      @FrameworkGetMapping(value="/browse/details", headers="X-Content-Context") public BrowseEntityDetails readBrowseEntityDetails(jakarta.servlet.http.HttpServletRequest servletRequest, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @RequestHeader(value="X-Price-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, @RequestHeader(value="X-Price-Info-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext, @RequestParam org.springframework.util.MultiValueMap<String,String> parameters, @RequestHeader(value="X-Content-Context",required=false) @Nullable @Nullable ContentContext contentContext)
    • readDataDrivenEnumDetails

      @FrameworkGetMapping({"/data-driven-enums/details","/browse/data-driven-enums"}) public DataDrivenEnumList readDataDrivenEnumDetails(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, DataDrivenEnumDetailsRequest detailsRequest)
      TODO: The /data-driven-enums/details mapping should be removed in the future as we will want to deprecate it in favor of /browse/data-driven-enums. This mapping was originally slated to be removed in v2.0.0-GA.
      Since:
      2.0.0
    • readCartFieldMappings

      @FrameworkGetMapping({"/products/cart-field-mappings","/browse/products/cart-field-mappings"}) public List<CartFieldMapping> readCartFieldMappings(@ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      TODO: The /products/cart-field-mappings mapping should be removed in the future as we will want to deprecate it in favor of /browse/products/cart-field-mappings. This mapping was originally slated to be removed in v2.0.0-GA.
      Since:
      2.0.0
    • getCatalogSearchResults

      @FrameworkGetMapping({"/search/catalog","/browse/search/catalog"}) public SearchResponse<Product> getCatalogSearchResults(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @RequestHeader(value="X-Price-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, @RequestHeader(value="X-Price-Info-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext, @RequestParam org.springframework.util.MultiValueMap<String,String> parameters)
      TODO: The /search/catalog mapping should be removed in the future as we will want to deprecate it in favor of /browse/search/catalog. This mapping was originally slated to be removed in v2.0.0-GA.
      Since:
      2.0.0
    • getPricingForTargets

      @FrameworkPostMapping(value="/browse/price-targets", consumes="application/json") public List<com.broadleafcommerce.pricing.client.domain.PriceInfo> getPricingForTargets(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @RequestHeader(value="X-Price-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, @RequestHeader(value="X-Price-Info-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext, @RequestBody PriceableTargetsRequest priceableTargetsRequest)
    • getCatalogSuggestions

      @FrameworkGetMapping({"/search/catalog/suggest","/browse/search/catalog/suggest"}) public TypeAheadResponse getCatalogSuggestions(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @RequestHeader(value="X-Price-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, @RequestHeader(value="X-Price-Info-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext, @RequestParam org.springframework.util.MultiValueMap<String,String> parameters)
      TODO: The /search/catalog/suggest mapping should be removed in the future as we will want to deprecate it in favor of /browse/search/catalog/suggest. This mapping was originally slated to be removed in v2.0.0-GA.
      Since:
      2.0.0
    • getMarketingMessages

      @FrameworkPostMapping({"/marketing-messages","/browse/marketing-messages"}) public MarketingMessageResponse getMarketingMessages(@RequestBody MarketingMessageRequest request, @RequestHeader(value="X-Price-Context",required=false) com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      TODO: The /marketing-messages mapping should be removed in the future as we will want to deprecate it in favor of /browse/marketing-messages. This mapping was originally slated to be removed in v2.0.0-GA.
      Since:
      2.0.0
    • getProductIdsToBuildLineItems

      protected Set<String> getProductIdsToBuildLineItems(@NonNull @NonNull MarketingMessageRequest request)
      Gets a set of product ids to build the LineItemDTOs from.

      By default, this method will return the union of the product ids and cart product ids, and any product ids that are already in the line items are removed.

      Parameters:
      request - the MarketingMessageRequest to get the product ids from
      Returns:
      a set of product ids to build the LineItemDTOs from
      Since:
      Catalog Browse Service 2.2.0, Release Train 2.3.0
    • getProductList

      @Deprecated(since="Catalog Browse Service 2.2.0, Release Train 2.3.0", forRemoval=true) protected ProductList getProductList(@NonNull @NonNull Set<String> productIds, @Nullable @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getProductList

      protected ProductList getProductList(@NonNull @NonNull Set<String> productIds, @Nullable @Nullable com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, @Nullable @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • removeDuplicateProductIdsFromRequest

      protected MarketingMessageRequest removeDuplicateProductIdsFromRequest(@NonNull @NonNull MarketingMessageRequest request)
    • getBooleanParameter

      protected boolean getBooleanParameter(@NonNull @NonNull org.springframework.util.MultiValueMap<String,String> parameters, @NonNull @NonNull String paramName)
      Gets a parameter from the parameters and converts to a boolean.
      Parameters:
      parameters - Map of request parameters received.
      paramName - Name of the parameter to get.
      Returns:
      The value of parameter.
      Since:
      Catalog Browse Service 2.1.0, Release Train 2.2.0
    • isSubscriptionEnabled

      protected boolean isSubscriptionEnabled()
    • setSubscriptionEnabled

      @Autowired public void setSubscriptionEnabled(@Value("${broadleaf.subscription.enabled:false}") boolean subscriptionEnabled)
    • getBrowseCatalogProvider

      protected CatalogProvider getBrowseCatalogProvider()
    • getBrowseEntityResolver

      protected BrowseEntityResolver getBrowseEntityResolver()
    • getBrowseCatalogSearchProvider

      protected CatalogSearchProvider<Product> getBrowseCatalogSearchProvider()
    • getBrowseOfferProvider

      protected OfferProvider getBrowseOfferProvider()
    • getMarketingMessageUtils

      protected MarketingMessageUtils getMarketingMessageUtils()
    • getTypeFactory

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

      @Autowired public void setBrowseContentProvider(ContentProvider browseContentProvider)
    • getBrowseContentProvider

      protected ContentProvider getBrowseContentProvider()
    • setBrowsePricingProvider

      @Autowired public void setBrowsePricingProvider(PricingProvider browsePricingProvider)
    • getBrowsePricingProvider

      protected PricingProvider getBrowsePricingProvider()
    • setAuthenticationUtils

      @Autowired public void setAuthenticationUtils(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils)
    • getAuthenticationUtils

      protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils getAuthenticationUtils()