Class DefaultOrderHistoryService<O extends com.broadleafcommerce.order.client.domain.Order,F extends com.broadleafcommerce.order.client.domain.OrderFulfillment,R extends com.broadleafcommerce.order.client.domain.ReturnAuthorization>
- java.lang.Object
- 
- com.broadleafcommerce.orderoperation.service.DefaultOrderHistoryService<O,F,R>
 
- 
- All Implemented Interfaces:
- OrderHistoryService<O,OrderWithFulfillmentsAndReturns>
 
 public class DefaultOrderHistoryService<O extends com.broadleafcommerce.order.client.domain.Order,F extends com.broadleafcommerce.order.client.domain.OrderFulfillment,R extends com.broadleafcommerce.order.client.domain.ReturnAuthorization> extends Object implements OrderHistoryService<O,OrderWithFulfillmentsAndReturns> 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static StringCUSTOMER_IDprotected static StringORDER_IDprotected static StringSUBMIT_DATE
 - 
Constructor SummaryConstructors Constructor Description DefaultOrderHistoryService(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils, com.broadleafcommerce.common.extension.TypeFactory typeFactory, OrderProvider<O> orderProvider, FulfillmentProvider<F> fulfillmentProvider, ReturnAuthorizationProvider<R> returnAuthorizationProvider)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected cz.jirutka.rsql.parser.ast.NodebuildOrderHistoryFilters(String customerId, Instant start, Instant end)protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtilsgetAuthenticationUtils()protected FulfillmentProvider<F>getFulfillmentProvider()protected OrderProvider<O>getOrderProvider()protected ReturnAuthorizationProvider<R>getReturnAuthorizationProvider()protected com.broadleafcommerce.common.extension.TypeFactorygetTypeFactory()protected voidreadFulfillmentsIntoOrderHistory(List<OrderWithFulfillmentsAndReturns> orderHistory, List<String> orderIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)protected org.springframework.data.domain.Page<O>readHistoricalOrdersForCustomer(Integer days, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)OrderWithFulfillmentsAndReturnsreadOrderByIdOrNumber(String orderRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Retrieve the order with the given order reference (ID or order number) and its fulfillments and returns.org.springframework.data.domain.Page<OrderWithFulfillmentsAndReturns>readOrderHistoryForCustomer(Integer days, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Read all orders with its fulfillments and returns for the currently authenticated customer for the past number of days.protected voidreadReturnsIntoOrderHistory(List<OrderWithFulfillmentsAndReturns> orderHistory, List<String> orderIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
 
- 
- 
- 
Field Detail- 
CUSTOMER_IDprotected static final String CUSTOMER_ID - See Also:
- Constant Field Values
 
 - 
SUBMIT_DATEprotected static final String SUBMIT_DATE - See Also:
- Constant Field Values
 
 - 
ORDER_IDprotected static final String ORDER_ID - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
DefaultOrderHistoryServicepublic DefaultOrderHistoryService(com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils, com.broadleafcommerce.common.extension.TypeFactory typeFactory, OrderProvider<O> orderProvider, FulfillmentProvider<F> fulfillmentProvider, ReturnAuthorizationProvider<R> returnAuthorizationProvider)
 
- 
 - 
Method Detail- 
readOrderHistoryForCustomerpublic org.springframework.data.domain.Page<OrderWithFulfillmentsAndReturns> readOrderHistoryForCustomer(@Nullable Integer days, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:OrderHistoryServiceRead all orders with its fulfillments and returns for the currently authenticated customer for the past number of days.- Specified by:
- readOrderHistoryForCustomerin interface- OrderHistoryService<O extends com.broadleafcommerce.order.client.domain.Order,F extends com.broadleafcommerce.order.client.domain.OrderFulfillment>
- Parameters:
- days- The number of days to read order history
- page- the requested page of results from the database
- contextInfo- The current context
- Returns:
- The orders with the customer ID in the date range
 
 - 
readHistoricalOrdersForCustomerprotected org.springframework.data.domain.Page<O> readHistoricalOrdersForCustomer(@Nullable Integer days, org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) 
 - 
buildOrderHistoryFiltersprotected cz.jirutka.rsql.parser.ast.Node buildOrderHistoryFilters(String customerId, Instant start, Instant end) 
 - 
readFulfillmentsIntoOrderHistoryprotected void readFulfillmentsIntoOrderHistory(List<OrderWithFulfillmentsAndReturns> orderHistory, List<String> orderIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) 
 - 
readReturnsIntoOrderHistoryprotected void readReturnsIntoOrderHistory(List<OrderWithFulfillmentsAndReturns> orderHistory, List<String> orderIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) 
 - 
readOrderByIdOrNumberpublic OrderWithFulfillmentsAndReturns readOrderByIdOrNumber(String orderRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:OrderHistoryServiceRetrieve the order with the given order reference (ID or order number) and its fulfillments and returns.- Specified by:
- readOrderByIdOrNumberin interface- OrderHistoryService<O extends com.broadleafcommerce.order.client.domain.Order,F extends com.broadleafcommerce.order.client.domain.OrderFulfillment>
- Parameters:
- orderRef- The ID or number of the order to read
- contextInfo- The current context
- Returns:
- The order with the given ID and its fulfillments and returns.
 
 - 
getAuthenticationUtilsprotected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils getAuthenticationUtils() 
 - 
getTypeFactoryprotected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() 
 - 
getOrderProviderprotected OrderProvider<O> getOrderProvider() 
 - 
getFulfillmentProviderprotected FulfillmentProvider<F> getFulfillmentProvider() 
 - 
getReturnAuthorizationProviderprotected ReturnAuthorizationProvider<R> getReturnAuthorizationProvider() 
 
- 
 
-