Interface CustomerOrderInfoContributor
- All Superinterfaces:
org.springframework.core.Ordered
- All Known Implementing Classes:
CustomerOrderInfoFulfillmentContributor
public interface CustomerOrderInfoContributor
extends org.springframework.core.Ordered
Responsible for contributing a specific subset of information to a
CustomerOrderInfo
based on a ReadCustomerOrdersRequest
such as contributing the order fulfillments.- Author:
- Dima Myroniuk (dmyroniuk)
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canHandle
(ReadCustomerOrdersRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Determines if this contributor can handle the requestorg.springframework.data.domain.Page<CustomerOrderInfo>
contribute
(@NonNull org.springframework.data.domain.Page<CustomerOrderInfo> customerOrderInfos, @NonNull ReadCustomerOrdersRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads the additional data for the Orders requested in theReadCustomerOrdersRequest
and populates for the Orders in the specified page ofCustomerOrderInfo
Methods inherited from interface org.springframework.core.Ordered
getOrder
-
Method Details
-
canHandle
boolean canHandle(ReadCustomerOrdersRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Determines if this contributor can handle the request- Parameters:
request
- the request to read the Orders and the related datacontextInfo
- context information around sandbox and multitenant state- Returns:
- true if this contributor can handle the request, false otherwise
-
contribute
org.springframework.data.domain.Page<CustomerOrderInfo> contribute(@NonNull @NonNull org.springframework.data.domain.Page<CustomerOrderInfo> customerOrderInfos, @NonNull @NonNull ReadCustomerOrdersRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads the additional data for the Orders requested in theReadCustomerOrdersRequest
and populates for the Orders in the specified page ofCustomerOrderInfo
- Parameters:
customerOrderInfos
- the page of theCustomerOrderInfo
request
- the request to read the Orders and the related datacontextInfo
- context information around sandbox and multitenant state- Returns:
- the page of the
CustomerOrderInfo
with the additional requested data if any
-