Class DefaultOrderFulfillmentViewService<P extends OrderFulfillmentView>
java.lang.Object
com.broadleafcommerce.order.service.DefaultOrderFulfillmentViewService<P>
- All Implemented Interfaces:
OrderFulfillmentViewService<P>
public class DefaultOrderFulfillmentViewService<P extends OrderFulfillmentView>
extends Object
implements OrderFulfillmentViewService<P>
The default implementation of
OrderFulfillmentViewService
.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultOrderFulfillmentViewService
(OrderFulfillmentService<com.broadleafcommerce.order.client.domain.OrderFulfillment> orderFulfillmentService, OrderFulfillmentViewMappingService<P> orderFulfillmentViewMappingService) -
Method Summary
Modifier and TypeMethodDescriptionprotected OrderFulfillmentService<com.broadleafcommerce.order.client.domain.OrderFulfillment>
protected OrderFulfillmentViewMappingService<P>
protected boolean
isApplicationRequest
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) org.springframework.data.domain.Page<P>
readAll
(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieve allOrderFulfillmentViews
using a structured query string to drive the query criteria.org.springframework.data.domain.Page<P>
readAllByGroupReferenceNumber
(String groupReferenceNumber, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of theOrderFulfillmentViews
that are associated with the givengroupReferenceNumber
.readAllByOrderId
(String orderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of theOrderFulfillmentViews
that are associated with the givenorderId
.Reads the requested order fulfillment view byOrderFulfillment.getId()
.
-
Constructor Details
-
DefaultOrderFulfillmentViewService
public DefaultOrderFulfillmentViewService(OrderFulfillmentService<com.broadleafcommerce.order.client.domain.OrderFulfillment> orderFulfillmentService, OrderFulfillmentViewMappingService<P> orderFulfillmentViewMappingService)
-
-
Method Details
-
readById
public P readById(String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:OrderFulfillmentViewService
Reads the requested order fulfillment view byOrderFulfillment.getId()
.- Specified by:
readById
in interfaceOrderFulfillmentViewService<P extends OrderFulfillmentView>
- Parameters:
id
- the ID of the order fulfillment to fetchcontextInfo
- context information surrounding multitenant state. When in a tenant context, the narrowing semantics will return a record within theContextRequest.getTenantId()
regardless of whether it is associated to an application or not. This allows users to read application-level fulfillments from a tenant-context. In an application context, narrowing will apply normally.- Returns:
- the requested order fulfillment view
-
readAllByOrderId
public List<P> readAllByOrderId(String orderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:OrderFulfillmentViewService
Reads all of theOrderFulfillmentViews
that are associated with the givenorderId
.Assumes that the context contains the application containing the order.
- Specified by:
readAllByOrderId
in interfaceOrderFulfillmentViewService<P extends OrderFulfillmentView>
- Parameters:
orderId
- The ID of the order to find fulfillments forcontextInfo
- context information surrounding sandboxing and multitenant state- Returns:
- the fulfillment views that are associated with the given
orderId
-
readAll
public org.springframework.data.domain.Page<P> readAll(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:OrderFulfillmentViewService
Retrieve allOrderFulfillmentViews
using a structured query string to drive the query criteria. The filters string is parsed by an internal implementation and the result is added to the query before executing the fetch against the persistence store. SeeFilterParser
for more information.- Specified by:
readAll
in interfaceOrderFulfillmentViewService<P extends OrderFulfillmentView>
- Parameters:
filters
- the RSQLNode
used to restrict result, must not be nullpageable
- may bePageable.unpaged()
, must not be null.contextInfo
- Request context information around sandbox and multitenant state- Returns:
- The subset (page) of narrowed entities
-
readAllByGroupReferenceNumber
public org.springframework.data.domain.Page<P> readAllByGroupReferenceNumber(String groupReferenceNumber, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:OrderFulfillmentViewService
Reads all of theOrderFulfillmentViews
that are associated with the givengroupReferenceNumber
.- Specified by:
readAllByGroupReferenceNumber
in interfaceOrderFulfillmentViewService<P extends OrderFulfillmentView>
- Parameters:
groupReferenceNumber
- the reference number of the order fulfillments to fetchfilters
- the RSQLNode
used to restrict the resultspageable
- describes the page of results to returncontextInfo
- context information around sandbox and multitenant state- Returns:
- The page of narrowed order fulfillment views
-
isApplicationRequest
protected boolean isApplicationRequest(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getOrderFulfillmentService
protected OrderFulfillmentService<com.broadleafcommerce.order.client.domain.OrderFulfillment> getOrderFulfillmentService() -
getOrderFulfillmentViewMappingService
-