Interface CatalogProvider<P extends Product>
- All Known Implementing Classes:
ExternalCatalogProvider
public interface CatalogProvider<P extends Product>
Provider interfacing with a service or datastore providing catalog entity details for the
Subscription.- Author:
- Sunny Yu
-
Method Summary
Modifier and TypeMethodDescriptionreadProductById(String productId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves theProductbased on the given id.org.springframework.data.domain.Page<P>readProductsByIds(Collection<String> productIds, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) RetrievesProductsbased on the given ids.
-
Method Details
-
readProductById
P readProductById(String productId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves theProductbased on the given id.- Parameters:
productId- the product idcontextInfo- context information around multi-tenant state- Returns:
- the
Product - Throws:
com.broadleafcommerce.data.tracking.core.exception.EntityMissingException- when the product is not found
-
readProductsByIds
org.springframework.data.domain.Page<P> readProductsByIds(Collection<String> productIds, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) RetrievesProductsbased on the given ids.- Parameters:
productIds- list of product idspageable- pageablecontextInfo- context information around multi-tenant state- Returns:
- page of
Products
-