Interface SubscriptionItemService<P extends SubscriptionItem>

All Superinterfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>
All Known Implementing Classes:
DefaultSubscriptionItemService

public interface SubscriptionItemService<P extends SubscriptionItem> extends com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>
  • Method Details

    • findById

      @Deprecated(since="1.0.0") default Optional<P> findById(String id)
      Deprecated.
    • findById

      Optional<P> findById(String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • updateSubscriptionItem

      @Deprecated(since="1.0.0") default P updateSubscriptionItem(P subscriptionItemRequest)
      Deprecated.
      Use CrudEntityService.replace(String, Object, ContextInfo) instead
      Note: This method used to have replace semantics in the previous codebase
    • updateSubscriptionItem

      @Deprecated(since="1.0.0") default P updateSubscriptionItem(P subscriptionItemOriginal, P subscriptionItemPatch)
      Deprecated.
      Use CrudEntityService.update(String, Object, ContextInfo) instead
      Note: This method used to have update semantics in the previous codebase
    • findAllItemsBySubscriptionId

      @Deprecated(since="1.0.0") default List<P> findAllItemsBySubscriptionId(String subscriptionId)
      Finds all subscription items by subscription id, including archived records
    • findAllBySubscriptionId

      List<P> findAllBySubscriptionId(String subscriptionId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all subscription items by subscription id, including archived records
    • findAllBySubscriptionIdsIn

      org.springframework.data.domain.Page<P> findAllBySubscriptionIdsIn(Collection<String> subscriptionIds, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all subscriptionItems by their subscriptionIds
      Parameters:
      subscriptionIds - The collection of subscriptionIds for which the subscriptionItems are to be fetched
      pageable - Describes the page of results to return
      contextInfo - The context info
      Returns:
      A Page of subscriptionItems
    • findActiveItemsBySubscriptionId

      @Deprecated(since="1.0.0") default List<P> findActiveItemsBySubscriptionId(String subscriptionId)
      Finds all active subscription items by subscription id
    • findActiveBySubscriptionId

      List<P> findActiveBySubscriptionId(String subscriptionId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all active subscription items by subscription id
    • createSubscriptionItem

      @Deprecated(since="1.0.0") default P createSubscriptionItem(P subscriptionItem)
      Deprecated.
      Use CrudEntityService.create(Object, ContextInfo) instead
      Create a subscription item
    • commit

      void commit(String subscriptionId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Apply any uncommitted changes to the production state. Subscriptions are not only locked during a modification flow, but changes are also stored in a temporary modification state. When the modification flow is complete, this method is called to finalize the changes.

      Special note, during the modification flow, any retrieval of the subscription (and dependents) will return the modified state. However, the billing view of the subscription will continue to see the unmodified state until this method is called and the changes are finalized.

      Parameters:
      subscriptionId - the subscription to commit
      contextInfo - context information around multi-tenant state
    • revert

      void revert(String subscriptionId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Revert any uncommitted changes. This will remove any changes that have been made during the modification flow and leave the production state untouched.
      Parameters:
      subscriptionId - the subscription to revert
      contextInfo - context information around multi-tenant state
      See Also: