Interface SubscriptionGenerationService<O extends com.broadleafcommerce.order.client.domain.Order,F extends com.broadleafcommerce.order.client.domain.OrderFulfillment,SWI extends SubscriptionWithItems>
- All Known Implementing Classes:
DefaultSubscriptionGenerationService
public interface SubscriptionGenerationService<O extends com.broadleafcommerce.order.client.domain.Order,F extends com.broadleafcommerce.order.client.domain.OrderFulfillment,SWI extends SubscriptionWithItems>
Service used to generate
Subscription records based on an Order and its items.- Since:
- Order Operation Service 2.2.0, Release Train 2.3.0
-
Method Summary
Modifier and TypeMethodDescriptioncreateNewSubscriptions(O order, Collection<F> fulfillments, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Given the providedOrderand its items, creates aSubscription, if one is required.createToken(String subscriptionId, String tokenIdentifier) lockSubscription(String subscriptionId, List<String> reservations) unlockToken(String subscriptionId, String token, boolean propagate)
-
Method Details
-
createNewSubscriptions
List<SWI> createNewSubscriptions(O order, Collection<F> fulfillments, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Given the providedOrderand its items, creates aSubscription, if one is required. Returns already existedSubscriptionif any.- Parameters:
order- a completed orderfulfillments- the order's collection of fulfillmentscontextInfo- context information around the multi-tenant state- Returns:
- the list of the Subscriptions & SubscriptionItems that were created
-
lockSubscription
-
clearLock
-
unlockToken
-
createToken
-