Interface CustomizedOfferRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
-
- All Known Subinterfaces:
JpaOfferRepository<D>,OfferRepository<D>
- All Known Implementing Classes:
JpaCustomizedOfferRepository
public interface CustomizedOfferRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>Advanced functionality related to offer maintenance and filtering.- Author:
- Chad Harchar (charchar)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Stream<D>findAllCustomerOffers(Iterable<? extends UserTarget> userTargets, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Read all offers that have no user targets or contain the provided user targets.Stream<D>findAutomaticAndCodeAndCustomerOffers(Iterable<? extends UserTarget> userTargets, Iterable<String> codes, Iterable<String> trackingIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Read all offers whereOffer#getAutomaticallyConsideredis true,Offer.getCampaignTrackingIds()intersects with the provided tracking ids,Offer.getSharedCodes()intersects with the provided codes, or offers that contain the provided user targets.List<D>findBySharedCodesCodeIn(Iterable<String> codes, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Reads all offers whereOffer.sharedCodesintersects with the provided codes.Stream<D>findVoucherOffers(Iterable<? extends UserTarget> userTargets, Iterable<String> codes, Iterable<String> trackingIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Read all voucher offers whereOffer#getAutomaticallyConsideredis true,Offer.getCampaignTrackingIds()intersects with the provided tracking ids,Offer.getSharedCodes()intersects with the provided codes, or offers that contain the provided user targets.
-
-
-
Method Detail
-
findBySharedCodesCodeIn
@Policy(operationTypes=READ) List<D> findBySharedCodesCodeIn(Iterable<String> codes, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Reads all offers whereOffer.sharedCodesintersects with the provided codes.
-
findAutomaticAndCodeAndCustomerOffers
@Policy(operationTypes=READ) Stream<D> findAutomaticAndCodeAndCustomerOffers(Iterable<? extends UserTarget> userTargets, Iterable<String> codes, Iterable<String> trackingIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Read all offers whereOffer#getAutomaticallyConsideredis true,Offer.getCampaignTrackingIds()intersects with the provided tracking ids,Offer.getSharedCodes()intersects with the provided codes, or offers that contain the provided user targets. Intended to be used with the Campaign module andcom.broadleafcommerce.promotion.campaign.domain.Campaign#id.- Parameters:
userTargets- The targets to match offers againstcodes- codes the returnedOffer(s) are associated with.trackingIds- tracking ids the returnedOffer(s) are associated with.contextInfo- Context information around sandbox and multitenant state.- Returns:
- all offers where
Offer#getAutomaticallyConsideredis true, or the offer is associated with the provided codes, tracking ids, or user targets.
-
findVoucherOffers
@Policy(operationTypes=READ) Stream<D> findVoucherOffers(Iterable<? extends UserTarget> userTargets, Iterable<String> codes, Iterable<String> trackingIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Read all voucher offers whereOffer#getAutomaticallyConsideredis true,Offer.getCampaignTrackingIds()intersects with the provided tracking ids,Offer.getSharedCodes()intersects with the provided codes, or offers that contain the provided user targets. Skips active date narrowing to fetch voucher offers for validation against submitted orders.- Parameters:
userTargets- The targets to match offers againstcodes- codes the returnedOffer(s) are associated with.trackingIds- tracking ids the returnedOffer(s) are associated with.contextInfo- Context information around sandbox and multitenant state.- Returns:
- all voucher offers where
Offer#getAutomaticallyConsideredis true, or the offer is associated with the provided codes, tracking ids, or user targets.
-
findAllCustomerOffers
@Policy(operationTypes=READ) Stream<D> findAllCustomerOffers(Iterable<? extends UserTarget> userTargets, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Read all offers that have no user targets or contain the provided user targets.- Parameters:
userTargets- The targets to match offers againstcontextInfo- Context information around sandbox and multitenant state.- Returns:
- all offers that have no user targets or contain the provided user targets.
-
-