Interface CatalogProvider<P extends CatalogItem>

  • All Known Implementing Classes:
    ExternalCatalogProvider

    public interface CatalogProvider<P extends CatalogItem>
    Provider for interfacing with operations around a Catalog related entities. Typically utilizes WebClient to make requests to an external REST API.
    Author:
    Chad Harchar (charchar)
    • Method Detail

      • retrieveProduct

        P retrieveProduct​(String productId,
                          @Nullable
                          com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Retrieve the product for the context information provided. The product should be fully hydrated with all of its relationships including pricing (although not offers).
        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

        CatalogItemList<P> retrieveProducts​(Collection<String> productIds,
                                            @Nullable
                                            com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Retrieve the products for the context information provided. The products should be fully hydrated with all of their relationships including pricing (although not offers).
        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.
      • retrieveCatalogItem

        P retrieveCatalogItem​(CatalogItemRequest catalogItemRequest,
                              @Nullable
                              com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Retrieve the catalog item for the context information provided. The item should be fully hydrated with all of its relationships including pricing (although not offers).

        The default implementation uses the product ID to fetch the catalog item.

        Parameters:
        catalogItemRequest - The information required to retrieve the catalog item.
        contextInfo - Context information around sandbox and multitenant state.
        Returns:
        The catalog item for the request and application provided.
      • retrieveCatalogItems

        CatalogItemList<P> retrieveCatalogItems​(Collection<CatalogItemRequest> catalogItemRequests,
                                                @Nullable
                                                com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Retrieve the catalog items for the context information provided. The items should be fully hydrated with all of their relationships including pricing (although not offers).

        The default implementation uses the product IDs to fetch the list of catalog items.

        Parameters:
        catalogItemRequests - The information required to retrieve the catalog items.
        contextInfo - Context information around sandbox and multitenant state.
        Returns:
        The catalog items for the request and application provided.