Interface CatalogProvider<P extends CatalogItem>
-
- All Known Implementing Classes:
ExternalCatalogProvider
public interface CatalogProvider<P extends CatalogItem>
Provider for interfacing with operations around aCatalog
related entities. Typically utilizesWebClient
to make requests to an external REST API.- Author:
- Chad Harchar (charchar)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default List<CartItemMappingProperties.FieldMapping>
retrieveCartItemProductMappings(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Deprecated, for removal: This API element is subject to removal in a future version.since 1.7.3, in favor ofCartItemProductMappingProvider.retrieveCartItemProductMappings(ContextInfo)
P
retrieveCatalogItem(CatalogItemRequest catalogItemRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Retrieve the catalog item for the context information provided.CatalogItemList<P>
retrieveCatalogItems(Collection<CatalogItemRequest> catalogItemRequests, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Retrieve the catalog items for the context information provided.P
retrieveProduct(String productId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Retrieve the product for the context information provided.CatalogItemList<P>
retrieveProducts(Collection<String> productIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Retrieve the products for the context information provided.
-
-
-
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.
-
retrieveCartItemProductMappings
@Deprecated(since="1.7.3", forRemoval=true) default List<CartItemMappingProperties.FieldMapping> retrieveCartItemProductMappings(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Deprecated, for removal: This API element is subject to removal in a future version.since 1.7.3, in favor ofCartItemProductMappingProvider.retrieveCartItemProductMappings(ContextInfo)
Retrieve a list of cart item to product mappings- Parameters:
contextInfo
- Context information around sandbox and multitenant state.- Returns:
- The list of FieldMapping
-
-