Class CustomerOrderInfoFulfillmentContributor
java.lang.Object
com.broadleafcommerce.order.service.hydration.CustomerOrderInfoFulfillmentContributor
- All Implemented Interfaces:
CustomerOrderInfoContributor
,org.springframework.core.Ordered
public class CustomerOrderInfoFulfillmentContributor
extends Object
implements CustomerOrderInfoContributor
Contributor is responsible for populating the
CustomerOrderInfo.getFulfillments()
for the
Orders.- Author:
- Dima Myroniuk (dmyroniuk)
-
Field Summary
FieldsFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorsConstructorDescriptionCustomerOrderInfoFulfillmentContributor
(OrderFulfillmentService<com.broadleafcommerce.order.client.domain.OrderFulfillment> orderFulfillmentService) -
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
int
getOrder()
protected OrderFulfillmentService<com.broadleafcommerce.order.client.domain.OrderFulfillment>
-
Field Details
-
DEFAULT_ORDER
public static final int DEFAULT_ORDER- See Also:
-
-
Constructor Details
-
CustomerOrderInfoFulfillmentContributor
public CustomerOrderInfoFulfillmentContributor(OrderFulfillmentService<com.broadleafcommerce.order.client.domain.OrderFulfillment> orderFulfillmentService)
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
canHandle
public boolean canHandle(ReadCustomerOrdersRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CustomerOrderInfoContributor
Determines if this contributor can handle the request- Specified by:
canHandle
in interfaceCustomerOrderInfoContributor
- 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
public org.springframework.data.domain.Page<CustomerOrderInfo> contribute(@NonNull @NonNull org.springframework.data.domain.Page<CustomerOrderInfo> customerOrderInfos, @NonNull @NonNull ReadCustomerOrdersRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CustomerOrderInfoContributor
Reads the additional data for the Orders requested in theReadCustomerOrdersRequest
and populates for the Orders in the specified page ofCustomerOrderInfo
- Specified by:
contribute
in interfaceCustomerOrderInfoContributor
- 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
-
getOrderFulfillmentService
protected OrderFulfillmentService<com.broadleafcommerce.order.client.domain.OrderFulfillment> getOrderFulfillmentService()
-