Interface CustomerService

  • All Known Implementing Classes:
    DefaultCustomerService

    public interface CustomerService
    Service to interact with Customer service to retrieve customers for indexing.
    • Method Detail

      • readBatchOfCustomerIds

        List<String> readBatchOfCustomerIds​(@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 ID
        batchSize - The size of the batch
        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.