Interface CustomerService
- All Known Implementing Classes:
DefaultCustomerService
public interface CustomerService
Service to interact with Customer service to retrieve customers for indexing.
-
Method Summary
Modifier and TypeMethodDescriptionreadBatchOfCustomerIds(String startId, int batchSize) Deprecated.readBatchOfCustomerIds(String startId, int batchSize, Map<String, Object> additionalProperties) Reads a batch of IDs to be placed in a queue for processing.List<com.broadleafcommerce.search.customer.core.domain.Customer>readBatchOfCustomers(List<String> ids) Reads a batch ofCustomersby their IDs.Optional<com.broadleafcommerce.search.customer.core.domain.Customer>readCustomer(String id) Reads a batch ofCustomersby their IDs.
-
Method Details
-
readBatchOfCustomerIds
@Deprecated(since="2.1.5-GA") List<String> readBatchOfCustomerIds(@Nullable String startId, int batchSize) throws com.broadleafcommerce.search.api.SearchIndexException Deprecated.in favor ofreadBatchOfCustomerIds(String, int, Map <String, Object>)for the potential to utilize a time range when reading customers.- Throws:
com.broadleafcommerce.search.api.SearchIndexException
-
readBatchOfCustomerIds
List<String> readBatchOfCustomerIds(@Nullable String startId, int batchSize, @Nullable Map<String, Object> additionalProperties) throws com.broadleafcommerce.search.api.SearchIndexExceptionReads a batch of IDs to be placed in a queue for processing.- Parameters:
startId- The starting IDbatchSize- The size of the batchadditionalProperties- additional information that can be used to filter the items to be indexed- Returns:
- A list of customer IDs.
- Throws:
com.broadleafcommerce.search.api.SearchIndexException- if reading the customer ids fails.
-
readBatchOfCustomers
List<com.broadleafcommerce.search.customer.core.domain.Customer> readBatchOfCustomers(List<String> ids) throws com.broadleafcommerce.search.api.SearchIndexException Reads a batch ofCustomersby their IDs.- Parameters:
ids- A list of customer IDs.- Returns:
- A list of customers or an empty list.
- Throws:
com.broadleafcommerce.search.api.SearchIndexException- if reading the customer fails.
-
readCustomer
Optional<com.broadleafcommerce.search.customer.core.domain.Customer> readCustomer(String id) throws com.broadleafcommerce.search.api.SearchIndexException Reads a batch ofCustomersby their IDs.- Parameters:
id- A customer id- Returns:
- A customer optional or
Optional.empty() - Throws:
com.broadleafcommerce.search.api.SearchIndexException- if reading the customer fails.
-
readBatchOfCustomerIds(String, int, Map <String, Object>)for the potential to utilize a time range when reading customers.