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 utilizesWebClient
to make requests to an external REST API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description F
create(F fulfillment, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Creates aOrderFulfillment
.void
delete(String fulfillmentId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Deletes aOrderFulfillment
with 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
.List<F>
readAllByOrderId(String orderId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Retrieve all of theOrderFulfillments
with the given order ID.F
readById(String fulfillmentId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Retrieve theOrderFulfillment
with the given ID.F
readByIdMatchingTenant(String fulfillmentId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Retrieve theOrderFulfillment
with the given ID, ignoring its application as long as it's in the current tenant context.F
replace(F fulfillment, String fulfillmentId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Replace theOrderFulfillment
with the given ID.List<F>
replaceOrCreateAll(Collection<F> fulfillments, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Replace all of the givenOrderFulfillment
which already exist, or create them.
-
-
-
Method Detail
-
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 theOrderFulfillment
with 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 theOrderFulfillment
with 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 theOrderFulfillment
with 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 aOrderFulfillment
with 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 givenOrderFulfillment
which 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 theOrderFulfillments
with 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
-
-