public abstract class AbstractBaseProcessor extends java.lang.Object implements BaseProcessor
| Modifier and Type | Field and Description |
|---|---|
protected OfferTimeZoneProcessor |
offerTimeZoneProcessor |
| Constructor and Description |
|---|
AbstractBaseProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkForItemRequirements(CandidatePromotionItems candidates,
OfferItemCriteria criteria,
java.util.List<PromotableOrderItem> promotableOrderItems,
boolean isQualifier) |
protected void |
clearAllNonFinalizedQuantities(java.util.List<PromotableOrderItemPriceDetail> priceDetails)
We were not able to meet all of the ItemCriteria for a promotion, but some of the items were
marked as qualifiers or targets.
|
protected boolean |
couldOfferApplyToCustomer(Offer offer,
Customer customer)
Private method which executes the appliesToCustomerRules in the Offer to determine if this Offer
can be applied to the Customer.
|
protected CandidatePromotionItems |
couldOfferApplyToOrderItems(Offer offer,
java.util.List<PromotableOrderItem> promotableOrderItems) |
protected boolean |
couldOfferApplyToRequestDTO(Offer offer,
RequestDTO requestDTO) |
protected boolean |
couldOfferApplyToTimePeriod(Offer offer) |
protected boolean |
couldOrderItemMeetOfferRequirement(OfferItemCriteria criteria,
PromotableOrderItem orderItem) |
java.lang.Boolean |
executeExpression(java.lang.String expression,
java.util.Map<java.lang.String,java.lang.Object> vars)
Private method used by couldOfferApplyToOrder to execute the MVEL expression in the
appliesToOrderRules to determine if this offer can be applied.
|
java.util.List<Offer> |
filterOffers(java.util.List<Offer> offers,
Customer customer) |
protected void |
finalizeQuantities(java.util.List<PromotableOrderItemPriceDetail> priceDetails)
Updates the finalQuanties for the PromotionDiscounts and PromotionQualifiers.
|
OfferTimeZoneProcessor |
getOfferTimeZoneProcessor() |
protected boolean |
meetsItemQualifierSubtotal(Offer offer,
CandidatePromotionItems candidateItem) |
protected java.util.List<Offer> |
removeInvalidCustomerOffers(java.util.List<Offer> offers,
Customer customer)
Private method that takes in a list of Offers and removes all Offers from the list that
does not apply to this customer.
|
protected java.util.List<Offer> |
removeInvalidRequestOffers(java.util.List<Offer> offers) |
protected java.util.List<Offer> |
removeOutOfDateOffers(java.util.List<Offer> offers)
Removes all out of date offers.
|
protected java.util.List<Offer> |
removeTimePeriodOffers(java.util.List<Offer> offers)
Removes all offers that are not within the timezone and timeperiod of the offer.
|
void |
setOfferTimeZoneProcessor(OfferTimeZoneProcessor offerTimeZoneProcessor) |
protected void |
splitDetailsIfNecessary(java.util.List<PromotableOrderItemPriceDetail> priceDetails)
Checks to see if the discountQty matches the detailQty.
|
protected OfferTimeZoneProcessor offerTimeZoneProcessor
protected CandidatePromotionItems couldOfferApplyToOrderItems(Offer offer, java.util.List<PromotableOrderItem> promotableOrderItems)
protected boolean meetsItemQualifierSubtotal(Offer offer, CandidatePromotionItems candidateItem)
protected void checkForItemRequirements(CandidatePromotionItems candidates, OfferItemCriteria criteria, java.util.List<PromotableOrderItem> promotableOrderItems, boolean isQualifier)
protected boolean couldOrderItemMeetOfferRequirement(OfferItemCriteria criteria, PromotableOrderItem orderItem)
public java.lang.Boolean executeExpression(java.lang.String expression,
java.util.Map<java.lang.String,java.lang.Object> vars)
expression - vars - protected void clearAllNonFinalizedQuantities(java.util.List<PromotableOrderItemPriceDetail> priceDetails)
priceDetails - protected void finalizeQuantities(java.util.List<PromotableOrderItemPriceDetail> priceDetails)
priceDetails - protected void splitDetailsIfNecessary(java.util.List<PromotableOrderItemPriceDetail> priceDetails)
priceDetails - public java.util.List<Offer> filterOffers(java.util.List<Offer> offers, Customer customer)
filterOffers in interface BaseProcessorprotected java.util.List<Offer> removeInvalidRequestOffers(java.util.List<Offer> offers)
protected boolean couldOfferApplyToRequestDTO(Offer offer, RequestDTO requestDTO)
protected java.util.List<Offer> removeTimePeriodOffers(java.util.List<Offer> offers)
offers - protected boolean couldOfferApplyToTimePeriod(Offer offer)
protected java.util.List<Offer> removeOutOfDateOffers(java.util.List<Offer> offers)
offers - protected java.util.List<Offer> removeInvalidCustomerOffers(java.util.List<Offer> offers, Customer customer)
offers - customer - protected boolean couldOfferApplyToCustomer(Offer offer, Customer customer)
offer - customer - public OfferTimeZoneProcessor getOfferTimeZoneProcessor()
public void setOfferTimeZoneProcessor(OfferTimeZoneProcessor offerTimeZoneProcessor)
Copyright © 2018. All Rights Reserved.