Interface AdvancedOfferPromotionMessageService
- All Known Implementing Classes:
AdvancedOfferPromotionMessageServiceImpl
public interface AdvancedOfferPromotionMessageService
-
Method Summary
Modifier and TypeMethodDescriptionList<org.broadleafcommerce.core.offer.domain.Offer>filterOutInactiveOffersByDateAndTime(List<org.broadleafcommerce.core.offer.domain.Offer> offers) This method is intended to provide an opportunity to filter the results offindActiveOffersWithPromotionMessages()if you require precise control of the Offer's active start/end dates.List<org.broadleafcommerce.core.offer.domain.Offer>Gathers a list ofAdvancedOffers that havePromotionMessages.List<org.broadleafcommerce.core.promotionMessage.domain.PromotionMessage>findActivePromotionMessagesForOrderItem(org.broadleafcommerce.core.order.domain.OrderItem orderItem) Gathers the set of activePromotionMessages for the givenOrderItem.findActivePromotionMessagesForProduct(org.broadleafcommerce.core.catalog.domain.Product product) Gathers the set of activePromotionMessages for the givenProduct.
-
Method Details
-
findActivePromotionMessagesForProduct
Map<String,List<org.broadleafcommerce.core.promotionMessage.dto.PromotionMessageDTO>> findActivePromotionMessagesForProduct(org.broadleafcommerce.core.catalog.domain.Product product) Gathers the set of activePromotionMessages for the givenProduct.- Parameters:
product-- Returns:
- the set of active
PromotionMessages for the givenProduct
-
findActivePromotionMessagesForOrderItem
List<org.broadleafcommerce.core.promotionMessage.domain.PromotionMessage> findActivePromotionMessagesForOrderItem(org.broadleafcommerce.core.order.domain.OrderItem orderItem) Gathers the set of activePromotionMessages for the givenOrderItem.- Parameters:
orderItem-- Returns:
- the set of active
PromotionMessages for the givenOrderItem
-
findActiveOffersWithPromotionMessages
List<org.broadleafcommerce.core.offer.domain.Offer> findActiveOffersWithPromotionMessages()Gathers a list ofAdvancedOffers that havePromotionMessages.Out of box, this method maintains cached results for 10 minutes.
filterOutInactiveOffersByDateAndTime(List)is intended to provide an opportunity to filter the results of that method if you require precise control of the active start/end dates. Alternatively, you could overrideAdvancedOfferPromotionMessageDao.getCurrentDateResolution()to modify the cache entry's effective range.- Returns:
- a list of
AdvancedOffers that havePromotionMessages
-
filterOutInactiveOffersByDateAndTime
List<org.broadleafcommerce.core.offer.domain.Offer> filterOutInactiveOffersByDateAndTime(List<org.broadleafcommerce.core.offer.domain.Offer> offers) This method is intended to provide an opportunity to filter the results offindActiveOffersWithPromotionMessages()if you require precise control of the Offer's active start/end dates. Out of box, that method maintains cached results for 10 minutes, so results may become inaccurate in that time frame. Alternatively, you could overrideAdvancedOfferPromotionMessageDao.getCurrentDateResolution()to modify the cache entry's effective range.
-