Interface SubscriptionOpsProvider<SWI extends SubscriptionWithItems>
- All Known Implementing Classes:
ExternalSubscriptionOpsProvider
public interface SubscriptionOpsProvider<SWI extends SubscriptionWithItems>
Provider interfacing with Broadleaf's SubscriptionOperationServices to gather and operate on
Subscription and related entities.- Since:
- Order Operation Service 2.2.0, Release Train 2.3.0
-
Method Summary
Modifier and TypeMethodDescriptionClear a lock for a subscriptioncreate(CreateSubscriptionFromOrderRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Persists a subscription alongside its items.createToken(String subscriptionId, String tokenIdentifier) Create a reservation token for a child locklockSubscription(String subscriptionId, List<String> reservations) Create a top-level lock for a subscriptionunlockToken(String subscriptionId, String token, boolean propagate) Unlock a child lock identified by a token
-
Method Details
-
create
List<SWI> create(CreateSubscriptionFromOrderRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Persists a subscription alongside its items. By default, this method returns existing subscriptions if they already exist for the given request.- Parameters:
request- A request DTO to create a subscription with its itemscontextInfo- context information around multi-tenant state- Returns:
- the created subscription and items
-
lockSubscription
Create a top-level lock for a subscription- Parameters:
subscriptionId- The subscription ID to lockreservations- The child lock identifiers to reserve- Returns:
- The status of the lock operation
-
clearLock
Clear a lock for a subscription- Parameters:
subscriptionId- The subscription ID to clear the lock forisRevert- Whether the lock clearing is the result of a revert operation- Returns:
- The status of the lock operation
-
unlockToken
Unlock a child lock identified by a token- Parameters:
subscriptionId- The subscription ID to unlock a child lock fortoken- The token identifying the child lockpropagate- Whether to propagate the unlock operation to the parent lock- Returns:
- The status of the unlock operation
-
createToken
Create a reservation token for a child lock- Parameters:
subscriptionId- The subscription ID to create a token fortokenIdentifier- The identifier for the token- Returns:
- The status of the token creation operation
-