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 Details

    • createNewSubscriptions

      List<SWI> createNewSubscriptions(O order, Collection<F> fulfillments, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Given the provided Order and its items, creates a Subscription, if one is required. Returns already existed Subscription if any.
      Parameters:
      order - a completed order
      fulfillments - the order's collection of fulfillments
      contextInfo - context information around the multi-tenant state
      Returns:
      the list of the Subscriptions & SubscriptionItems that were created
    • lockSubscription

      LockStatus lockSubscription(String subscriptionId, @Nullable List<String> reservations)
    • clearLock

      LockStatus clearLock(String subscriptionId, boolean isRevert)
    • unlockToken

      LockStatus unlockToken(String subscriptionId, String token, boolean propagate)
    • createToken

      LockStatus createToken(String subscriptionId, String tokenIdentifier)