Interface CatalogService
- All Known Implementing Classes:
DefaultCatalogService
public interface CatalogService
Service to interact with Catalog service to retrieve products for indexing.
-
Method Summary
Modifier and TypeMethodDescriptionreadBatchOfProductIds
(String startId, int batchSize) Reads a batch of IDs to be placed in a queue for processing.List<com.broadleafcommerce.search.catalog.core.domain.Product>
Reads a batch ofProducts
by an id.List<com.broadleafcommerce.search.catalog.core.domain.Product>
readBatchOfProducts
(List<String> ids) Reads a batch ofProducts
by their IDs.
-
Method Details
-
readBatchOfProductIds
List<String> readBatchOfProductIds(@Nullable String startId, int batchSize) throws com.broadleafcommerce.search.api.SearchIndexException Reads a batch of IDs to be placed in a queue for processing.- Parameters:
startId
- The starting IDbatchSize
- The size of the batch to read- Returns:
- A list of product IDs.
- Throws:
com.broadleafcommerce.search.api.SearchIndexException
-
readBatchOfProducts
List<com.broadleafcommerce.search.catalog.core.domain.Product> readBatchOfProducts(List<String> ids) throws com.broadleafcommerce.search.api.SearchIndexException Reads a batch ofProducts
by their IDs.- Parameters:
ids
- A list of product IDs.- Returns:
- A list of products or an empty list.
- Throws:
com.broadleafcommerce.search.api.SearchIndexException
- if the service call fails for any reason.
-
readBatchOfProducts
List<com.broadleafcommerce.search.catalog.core.domain.Product> readBatchOfProducts(String id) throws com.broadleafcommerce.search.api.SearchIndexException Reads a batch ofProducts
by an id.- Parameters:
id
- A product ID.- Returns:
- A list of products or an empty list.
- Throws:
com.broadleafcommerce.search.api.SearchIndexException
- if the service call fails for any reason.
-