Interface AdvancedOfferPromotionMessageService

All Known Implementing Classes:
AdvancedOfferPromotionMessageServiceImpl

public interface AdvancedOfferPromotionMessageService
  • Method Details

    • findActivePromotionMessagesForProduct

      Map<String,List<org.broadleafcommerce.core.promotionMessage.dto.PromotionMessageDTO>> findActivePromotionMessagesForProduct(org.broadleafcommerce.core.catalog.domain.Product product)
      Gathers the set of active PromotionMessages for the given Product.
      Parameters:
      product -
      Returns:
      the set of active PromotionMessages for the given Product
    • findActivePromotionMessagesForOrderItem

      List<org.broadleafcommerce.core.promotionMessage.domain.PromotionMessage> findActivePromotionMessagesForOrderItem(org.broadleafcommerce.core.order.domain.OrderItem orderItem)
      Gathers the set of active PromotionMessages for the given OrderItem.
      Parameters:
      orderItem -
      Returns:
      the set of active PromotionMessages for the given OrderItem
    • findActiveOffersWithPromotionMessages

      List<org.broadleafcommerce.core.offer.domain.Offer> findActiveOffersWithPromotionMessages()
      Gathers a list of AdvancedOffers that have PromotionMessages.

      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 override AdvancedOfferPromotionMessageDao.getCurrentDateResolution() to modify the cache entry's effective range.

      Returns:
      a list of AdvancedOffers that have PromotionMessages
    • 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 of findActiveOffersWithPromotionMessages() 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 override AdvancedOfferPromotionMessageDao.getCurrentDateResolution() to modify the cache entry's effective range.