Broadleaf Microservices
  • v1.0.0-latest-prod

Catalog Browse Catalog Provider

Overview

Provider for interfacing with Catalog entities. This is used to retrieve the basic information for products and categories. It additionally will interact with the PricingProvider to enhance the pricing information on products.

Default Implementation Details

The default implementation, ExternalCatalogProvider, is designed to interact with the Broadleaf Catalog Services, which handles building out the product and category hierarchies. This ensures that the fewest number of HTTP requests are made as possible so that the caller does not need to handle as much of the complexity related to the Product domain hierarchy.

Configuration

ExternalCatalogProvider defines the following configuration properties:

  • broadleaf.catalogbrowse.catalogprovider.url: The base url for an external catalog service.

  • broadleaf.catalogbrowse.catalogprovider.productsUri: The context path for reading product information. This is appended to the url property.

  • broadleaf.catalogbrowse.catalogprovider.categoriesUri: The context path for reading category information. This is appended to the url property.

  • broadleaf.catalogbrowse.catalogprovider.dataDrivenEnumsUri: The context path for reading data driven enum information. This is appended to the url property.

Example of building request from properties
UriComponentsBuilder.fromHttpUrl(getUrl())
        .path(getProductsUri())
        .queryParam("productUris", productUris)
        .toUriString();