Interface CustomerService

All Known Implementing Classes:
DefaultCustomerService

public interface CustomerService
Service to interact with Customer service to retrieve customers for indexing.
  • 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 of readBatchOfCustomerIds(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.SearchIndexException
      Reads a batch of IDs to be placed in a queue for processing.
      Parameters:
      startId - The starting ID
      batchSize - The size of the batch
      additionalProperties - 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 of Customers by 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 of Customers by 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.