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 Summary
Modifier and TypeMethodDescriptionvoidcommit(String subscriptionId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Apply any uncommitted changes to the production state.default PcreateSubscriptionItem(P subscriptionItem) Deprecated.findActiveBySubscriptionId(String subscriptionId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all activesubscription itemsby subscription idfindActiveItemsBySubscriptionId(String subscriptionId) Deprecated.UsefindActiveBySubscriptionId(String, ContextInfo)insteadfindAllBySubscriptionId(String subscriptionId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds allsubscription itemsby subscription id, including archived recordsorg.springframework.data.domain.Page<P>findAllBySubscriptionIdsIn(Collection<String> subscriptionIds, org.springframework.data.domain.Pageable pageable, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds allsubscriptionItemsby their subscriptionIdsfindAllItemsBySubscriptionId(String subscriptionId) Deprecated.UsefindAllBySubscriptionId(String, ContextInfo)insteadDeprecated.UsefindById(String, ContextInfo)insteadvoidrevert(String subscriptionId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Revert any uncommitted changes.default PupdateSubscriptionItem(P subscriptionItemRequest) Deprecated.UseCrudEntityService.replace(String, Object, ContextInfo)insteaddefault PupdateSubscriptionItem(P subscriptionItemOriginal, P subscriptionItemPatch) Deprecated.UseCrudEntityService.update(String, Object, ContextInfo)insteadMethods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService
create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort
-
Method Details
-
findById
Deprecated.UsefindById(String, ContextInfo)instead -
findById
-
updateSubscriptionItem
Deprecated.UseCrudEntityService.replace(String, Object, ContextInfo)insteadNote: 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.UseCrudEntityService.update(String, Object, ContextInfo)insteadNote: This method used to have update semantics in the previous codebase -
findAllItemsBySubscriptionId
Deprecated.UsefindAllBySubscriptionId(String, ContextInfo)insteadFinds allsubscription itemsby subscription id, including archived records -
findAllBySubscriptionId
List<P> findAllBySubscriptionId(String subscriptionId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds allsubscription itemsby 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 allsubscriptionItemsby their subscriptionIds- Parameters:
subscriptionIds- The collection of subscriptionIds for which the subscriptionItems are to be fetchedpageable- Describes the page of results to returncontextInfo- The context info- Returns:
- A
PageofsubscriptionItems
-
findActiveItemsBySubscriptionId
Deprecated.UsefindActiveBySubscriptionId(String, ContextInfo)insteadFinds all activesubscription itemsby subscription id -
findActiveBySubscriptionId
List<P> findActiveBySubscriptionId(String subscriptionId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all activesubscription itemsby subscription id -
createSubscriptionItem
Deprecated.UseCrudEntityService.create(Object, ContextInfo)insteadCreate 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 commitcontextInfo- 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 revertcontextInfo- context information around multi-tenant state- See Also:
-
CrudEntityService.create(Object, ContextInfo)instead