Interface FulfillmentProvider<F extends com.broadleafcommerce.order.client.domain.OrderFulfillment>
- All Known Implementing Classes:
ExternalFulfillmentProvider
public interface FulfillmentProvider<F extends com.broadleafcommerce.order.client.domain.OrderFulfillment>
Provider for interfacing with operations involving fulfillments. Typically utilizes
WebClient to make requests to an external REST API.-
Method Summary
Modifier and TypeMethodDescriptionCreates aOrderFulfillment.voiddelete(String fulfillmentId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deletes aOrderFulfillmentwith the given ID.org.springframework.data.domain.Page<F>readAll(cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieve allOrderFulfillments.readAllByOrderId(String orderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieve all of theOrderFulfillmentswith the given order ID.readById(String fulfillmentId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieve theOrderFulfillmentwith the given ID.readByIdMatchingTenant(String fulfillmentId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieve theOrderFulfillmentwith the given ID, ignoring its application as long as it's in the current tenant context.replace(F fulfillment, String fulfillmentId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Replace theOrderFulfillmentwith the given ID.replaceOrCreateAll(Collection<F> fulfillments, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Replace all of the givenOrderFulfillmentwhich already exist, or create them.
-
Method Details
-
readAll
org.springframework.data.domain.Page<F> readAll(cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieve allOrderFulfillments.- Parameters:
filters- the list of filters to apply to this querypage- the requested page of results from the databasecontextInfo- context information around sandbox and multitenant state.- Returns:
- the fulfillment with the given ID
-
readById
F readById(String fulfillmentId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieve theOrderFulfillmentwith the given ID.- Parameters:
fulfillmentId- the ID of the fulfillment to retrievecontextInfo- context information around sandbox and multitenant state.- Returns:
- the fulfillment with the given ID
-
readByIdMatchingTenant
F readByIdMatchingTenant(String fulfillmentId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieve theOrderFulfillmentwith the given ID, ignoring its application as long as it's in the current tenant context.- Parameters:
fulfillmentId- the ID of the fulfillment to retrievecontextInfo- context information around sandbox and multitenant state.- Returns:
- the fulfillment with the given ID
-
create
F create(F fulfillment, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Creates aOrderFulfillment.- Parameters:
fulfillment- the fulfillment to createcontextInfo- context information around sandbox and multitenant state.- Returns:
- the fulfillment with the given ID
-
replace
F replace(F fulfillment, String fulfillmentId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Replace theOrderFulfillmentwith the given ID.- Parameters:
fulfillment- the fulfillment to replace withfulfillmentId- the ID of the fulfillment to retrievecontextInfo- context information around sandbox and multitenant state.- Returns:
- the fulfillment with the given ID
-
delete
void delete(String fulfillmentId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deletes aOrderFulfillmentwith the given ID.- Parameters:
fulfillmentId- the ID of the fulfillment to deletecontextInfo- context information around sandbox and multitenant state.
-
replaceOrCreateAll
List<F> replaceOrCreateAll(Collection<F> fulfillments, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Replace all of the givenOrderFulfillmentwhich already exist, or create them.- Parameters:
fulfillments- the fulfillments to replace or createcontextInfo- context information around sandbox and multitenant state.- Returns:
- the replaced and created fulfillments
-
readAllByOrderId
List<F> readAllByOrderId(String orderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieve all of theOrderFulfillmentswith the given order ID.- Parameters:
orderId- the order ID of the fulfillments to retrievecontextInfo- context information around sandbox and multitenant state.- Returns:
- the fulfillments with the given order ID
-