Interface OfferOptInService<P extends OfferOptIn>

Type Parameters:
P -
All Superinterfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
All Known Implementing Classes:
DefaultOfferOptInService

public interface OfferOptInService<P extends OfferOptIn> extends com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
Handle any business logic related to offer opt in processing.
  • Method Summary

    Modifier and Type
    Method
    Description
    buildOptIn(Offer offer, boolean isMutable)
    Build an opt-in for the given offer.
    org.springframework.data.domain.Page<P>
    readAllByOfferIds(Collection<String> offerIds, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable pageInfo, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Find all optIns matched against their related offers.
    readByOfferId(String offerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Find the optIn matched against its related offer.

    Methods 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

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService

    readAll, readAll, readAll, readAll
  • Method Details

    • readAllByOfferIds

      org.springframework.data.domain.Page<P> readAllByOfferIds(Collection<String> offerIds, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable pageInfo, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Find all optIns matched against their related offers.
      Parameters:
      offerIds - The ids of the offers
      filters - Any RSQL filters to apply for refining the query
      pageInfo - The paging information
      contextInfo - The tenant contenxt information
      Returns:
      A page of opt in query results
    • readByOfferId

      Optional<P> readByOfferId(String offerId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Find the optIn matched against its related offer.
      Parameters:
      offerId - The id of the offer
      contextInfo - The tenant contenxt information
      Returns:
      A page of opt in query results
    • buildOptIn

      OfferOptIn buildOptIn(Offer offer, boolean isMutable)
      Build an opt-in for the given offer.
      Parameters:
      offer - The offer to build the opt-in for
      isMutable - Whether the opt-in should be mutable or not
      Returns:
      The built opt-in
      Since:
      Offer Service 3.1.1, Release Train 2.2.1