Class ExternalCatalogProvider

  • All Implemented Interfaces:
    CatalogProvider

    public class ExternalCatalogProvider
    extends AbstractExternalProvider
    implements CatalogProvider
    This particular implementation of CatalogProvider is designed to interact with a provider that will provide fully hydrated catalog entities, i.e., there is no need for additional calls to get a product's variants or item choices.
    Author:
    Chad Harchar (charchar), Nathan Moore (nathandmoore)
    • Constructor Detail

      • ExternalCatalogProvider

        public ExternalCatalogProvider​(org.springframework.web.reactive.function.client.WebClient webClient,
                                       com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                       com.broadleafcommerce.common.extension.TypeFactory typeFactory,
                                       ExternalCatalogProperties properties)
    • Method Detail

      • retrieveProduct

        public Product retrieveProduct​(String productId,
                                       @Nullable
                                       com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Description copied from interface: CatalogProvider
        Retrieve the product for the context information provided. The product should be fully hydrated with all of its relationships including pricing (although not offers).
        Specified by:
        retrieveProduct in interface CatalogProvider
        Parameters:
        productId - The id of the product to be retrieved.
        contextInfo - Context information around sandbox and multitenant state.
        Returns:
        The product for the id and application provided.
      • retrieveProducts

        public ProductList retrieveProducts​(Collection<String> productIds,
                                            @Nullable
                                            com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Description copied from interface: CatalogProvider
        Retrieve the products for the context information provided. The products should be fully hydrated with all of their relationships including pricing (although not offers).
        Specified by:
        retrieveProducts in interface CatalogProvider
        Parameters:
        productIds - The ids of the products to be retrieved.
        contextInfo - Context information around sandbox and multitenant state.
        Returns:
        The products for the ids and application provided.
      • getRetrieveItemProductMappingsUrl

        protected String getRetrieveItemProductMappingsUrl()
      • getServiceClient

        protected String getServiceClient()