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 TypeMethodDescriptionbooleancanHandle(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 theReadCustomerOrdersRequestand populates for the Orders in the specified page ofCustomerOrderInfointgetOrder()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:
getOrderin interfaceorg.springframework.core.Ordered
-
canHandle
public boolean canHandle(ReadCustomerOrdersRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CustomerOrderInfoContributorDetermines if this contributor can handle the request- Specified by:
canHandlein 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:CustomerOrderInfoContributorReads the additional data for the Orders requested in theReadCustomerOrdersRequestand populates for the Orders in the specified page ofCustomerOrderInfo- Specified by:
contributein interfaceCustomerOrderInfoContributor- Parameters:
customerOrderInfos- the page of theCustomerOrderInforequest- the request to read the Orders and the related datacontextInfo- context information around sandbox and multitenant state- Returns:
- the page of the
CustomerOrderInfowith the additional requested data if any
-
getOrderFulfillmentService
protected OrderFulfillmentService<com.broadleafcommerce.order.client.domain.OrderFulfillment> getOrderFulfillmentService()
-