@Service(value="blAdvancedOfferPromotionMessageService") public class AdvancedOfferPromotionMessageServiceImpl extends Object implements AdvancedOfferPromotionMessageService
| Modifier and Type | Field and Description |
|---|---|
protected AdvancedOfferPromotionMessageDao |
advancedOfferPromotionMessageDao |
| Constructor and Description |
|---|
AdvancedOfferPromotionMessageServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected org.broadleafcommerce.core.order.domain.DiscreteOrderItem |
buildDiscreteOrderItemFromProduct(org.broadleafcommerce.core.catalog.domain.Product product) |
protected Map<String,Object> |
buildRuleParams(org.broadleafcommerce.core.catalog.domain.Product product) |
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
AdvancedOfferPromotionMessageService.findActiveOffersWithPromotionMessages() if you require precise control
of the Offer's active start/end dates. |
List<org.broadleafcommerce.core.offer.domain.Offer> |
findActiveOffersWithPromotionMessages()
Gathers a list of
AdvancedOffers that have PromotionMessages. |
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. |
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. |
protected Set<org.broadleafcommerce.core.promotionMessage.domain.PromotionMessage> |
findApplicableOfferTargetAndQualifierMessages(org.broadleafcommerce.core.catalog.domain.Product product,
org.broadleafcommerce.core.offer.domain.Offer offer) |
protected Set<org.broadleafcommerce.core.promotionMessage.domain.PromotionMessage> |
findApplicablePromotionMessagesByType(org.broadleafcommerce.core.catalog.domain.Product product,
org.broadleafcommerce.core.offer.domain.Offer offer,
org.broadleafcommerce.core.offer.domain.OfferItemCriteria criteria,
org.broadleafcommerce.core.promotionMessage.domain.type.PromotionMessageType promotionMessageType) |
protected List<org.broadleafcommerce.core.promotionMessage.domain.PromotionMessage> |
gatherCartOfferMessagesByType(org.broadleafcommerce.core.offer.domain.Offer offer,
org.broadleafcommerce.core.promotionMessage.domain.type.PromotionMessageType messageType) |
protected List<org.broadleafcommerce.core.promotionMessage.domain.PromotionMessage> |
gatherOfferQualifierMessages(org.broadleafcommerce.core.order.domain.OrderItem orderItem) |
protected List<org.broadleafcommerce.core.promotionMessage.domain.PromotionMessage> |
gatherOfferTargetMessages(org.broadleafcommerce.core.order.domain.OrderItem orderItem) |
protected boolean |
isOfferQualifier(org.broadleafcommerce.core.order.domain.OrderItem orderItem) |
protected boolean |
isOfferTarget(org.broadleafcommerce.core.order.domain.OrderItem orderItem) |
protected boolean |
productPassesMatchRule(org.broadleafcommerce.core.catalog.domain.Product product,
String matchRule) |
protected AdvancedOfferPromotionMessageDao advancedOfferPromotionMessageDao
public AdvancedOfferPromotionMessageServiceImpl()
public Map<String,List<org.broadleafcommerce.core.promotionMessage.dto.PromotionMessageDTO>> findActivePromotionMessagesForProduct(org.broadleafcommerce.core.catalog.domain.Product product)
AdvancedOfferPromotionMessageServicePromotionMessages for the given Product.findActivePromotionMessagesForProduct in interface AdvancedOfferPromotionMessageServicePromotionMessages for the given Productpublic List<org.broadleafcommerce.core.promotionMessage.domain.PromotionMessage> findActivePromotionMessagesForOrderItem(org.broadleafcommerce.core.order.domain.OrderItem orderItem)
AdvancedOfferPromotionMessageServicePromotionMessages for the given OrderItem.findActivePromotionMessagesForOrderItem in interface AdvancedOfferPromotionMessageServicePromotionMessages for the given OrderItempublic List<org.broadleafcommerce.core.offer.domain.Offer> findActiveOffersWithPromotionMessages()
AdvancedOfferPromotionMessageServiceAdvancedOffers that have PromotionMessages.
Out of box, this method maintains cached results for 10 minutes.
AdvancedOfferPromotionMessageService.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.findActiveOffersWithPromotionMessages in interface AdvancedOfferPromotionMessageServiceAdvancedOffers that have PromotionMessagespublic List<org.broadleafcommerce.core.offer.domain.Offer> filterOutInactiveOffersByDateAndTime(List<org.broadleafcommerce.core.offer.domain.Offer> offers)
AdvancedOfferPromotionMessageService.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.filterOutInactiveOffersByDateAndTime in interface AdvancedOfferPromotionMessageServiceprotected Set<org.broadleafcommerce.core.promotionMessage.domain.PromotionMessage> findApplicableOfferTargetAndQualifierMessages(org.broadleafcommerce.core.catalog.domain.Product product, org.broadleafcommerce.core.offer.domain.Offer offer)
protected Set<org.broadleafcommerce.core.promotionMessage.domain.PromotionMessage> findApplicablePromotionMessagesByType(org.broadleafcommerce.core.catalog.domain.Product product, org.broadleafcommerce.core.offer.domain.Offer offer, org.broadleafcommerce.core.offer.domain.OfferItemCriteria criteria, org.broadleafcommerce.core.promotionMessage.domain.type.PromotionMessageType promotionMessageType)
protected boolean productPassesMatchRule(org.broadleafcommerce.core.catalog.domain.Product product,
String matchRule)
protected Map<String,Object> buildRuleParams(org.broadleafcommerce.core.catalog.domain.Product product)
protected org.broadleafcommerce.core.order.domain.DiscreteOrderItem buildDiscreteOrderItemFromProduct(org.broadleafcommerce.core.catalog.domain.Product product)
protected boolean isOfferTarget(org.broadleafcommerce.core.order.domain.OrderItem orderItem)
protected List<org.broadleafcommerce.core.promotionMessage.domain.PromotionMessage> gatherOfferTargetMessages(org.broadleafcommerce.core.order.domain.OrderItem orderItem)
protected boolean isOfferQualifier(org.broadleafcommerce.core.order.domain.OrderItem orderItem)
protected List<org.broadleafcommerce.core.promotionMessage.domain.PromotionMessage> gatherOfferQualifierMessages(org.broadleafcommerce.core.order.domain.OrderItem orderItem)
protected List<org.broadleafcommerce.core.promotionMessage.domain.PromotionMessage> gatherCartOfferMessagesByType(org.broadleafcommerce.core.offer.domain.Offer offer, org.broadleafcommerce.core.promotionMessage.domain.type.PromotionMessageType messageType)
Copyright © 2020. All rights reserved.