Interface OrderService
- All Known Implementing Classes:
DefaultOrderService
public interface OrderService
Service to interact with Order service to retrieve orders for indexing.
-
Method Summary
Modifier and TypeMethodDescriptionreadBatchOfOrderIds
(String startId, int batchSize) Deprecated.readBatchOfOrderIds
(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.order.core.domain.Order>
readBatchOfOrders
(List<String> ids) Reads a batch ofOrders
by their IDs.Optional<com.broadleafcommerce.search.order.core.domain.Order>
Reads anOrder
by its ID.
-
Method Details
-
readBatchOfOrderIds
@Deprecated(since="2.1.2-GA") List<String> readBatchOfOrderIds(String startId, int batchSize) throws com.broadleafcommerce.search.api.SearchIndexException Deprecated.in favor ofreadBatchOfOrderIds(String, int, Map<String, Object>)
for the potential to utilize a time range when reading orders.- Throws:
com.broadleafcommerce.search.api.SearchIndexException
-
readBatchOfOrderIds
List<String> readBatchOfOrderIds(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. Additional properties can also be specified to limit the items being read to be indexed.- 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 order IDs.
- Throws:
com.broadleafcommerce.search.api.SearchIndexException
- if reading the order ids fails.
-
readBatchOfOrders
List<com.broadleafcommerce.search.order.core.domain.Order> readBatchOfOrders(List<String> ids) throws com.broadleafcommerce.search.api.SearchIndexException Reads a batch ofOrders
by their IDs.- Parameters:
ids
- A list of order IDs.- Returns:
- A list of orders or an empty list.
- Throws:
com.broadleafcommerce.search.api.SearchIndexException
- if reading the order fails.
-
readOrder
Optional<com.broadleafcommerce.search.order.core.domain.Order> readOrder(String id) throws com.broadleafcommerce.search.api.SearchIndexException Reads anOrder
by its ID.- Parameters:
id
- An order id- Returns:
- An order optional or
Optional.empty()
- Throws:
com.broadleafcommerce.search.api.SearchIndexException
- if reading the order fails.
-
readBatchOfOrderIds(String, int, Map<String, Object>)
for the potential to utilize a time range when reading orders.