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 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 items
      contextInfo - context information around multi-tenant state
      Returns:
      the created subscription and items
    • lockSubscription

      LockStatus lockSubscription(String subscriptionId, @Nullable List<String> reservations)
      Create a top-level lock for a subscription
      Parameters:
      subscriptionId - The subscription ID to lock
      reservations - The child lock identifiers to reserve
      Returns:
      The status of the lock operation
    • clearLock

      LockStatus clearLock(String subscriptionId, boolean isRevert)
      Clear a lock for a subscription
      Parameters:
      subscriptionId - The subscription ID to clear the lock for
      isRevert - Whether the lock clearing is the result of a revert operation
      Returns:
      The status of the lock operation
    • unlockToken

      LockStatus unlockToken(String subscriptionId, String token, boolean propagate)
      Unlock a child lock identified by a token
      Parameters:
      subscriptionId - The subscription ID to unlock a child lock for
      token - The token identifying the child lock
      propagate - Whether to propagate the unlock operation to the parent lock
      Returns:
      The status of the unlock operation
    • createToken

      LockStatus createToken(String subscriptionId, String tokenIdentifier)
      Create a reservation token for a child lock
      Parameters:
      subscriptionId - The subscription ID to create a token for
      tokenIdentifier - The identifier for the token
      Returns:
      The status of the token creation operation