public abstract class AbstractBaseProcessor extends 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,
List<PromotableOrderItem> promotableOrderItems,
boolean isQualifier) |
protected void |
clearAllNonFinalizedQuantities(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,
List<PromotableOrderItem> promotableOrderItems) |
protected boolean |
couldOfferApplyToRequestDTO(Offer offer,
RequestDTO requestDTO) |
protected boolean |
couldOfferApplyToTimePeriod(Offer offer) |
protected boolean |
couldOrderItemMeetOfferRequirement(OfferItemCriteria criteria,
PromotableOrderItem orderItem) |
Boolean |
executeExpression(String expression,
Map<String,Object> vars)
Private method used by couldOfferApplyToOrder to execute the MVEL expression in the
appliesToOrderRules to determine if this offer can be applied.
|
List<Offer> |
filterOffers(List<Offer> offers,
Customer customer) |
protected void |
finalizeQuantities(List<PromotableOrderItemPriceDetail> priceDetails)
Updates the finalQuanties for the PromotionDiscounts and PromotionQualifiers.
|
OfferTimeZoneProcessor |
getOfferTimeZoneProcessor() |
protected boolean |
meetsItemQualifierSubtotal(Offer offer,
CandidatePromotionItems candidateItem) |
protected List<Offer> |
removeInvalidCustomerOffers(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 List<Offer> |
removeInvalidRequestOffers(List<Offer> offers) |
protected List<Offer> |
removeOutOfDateOffers(List<Offer> offers)
Removes all out of date offers.
|
protected List<Offer> |
removeTimePeriodOffers(List<Offer> offers)
Removes all offers that are not within the timezone and timeperiod of the offer.
|
void |
setOfferTimeZoneProcessor(OfferTimeZoneProcessor offerTimeZoneProcessor) |
protected void |
splitDetailsIfNecessary(List<PromotableOrderItemPriceDetail> priceDetails)
Checks to see if the discountQty matches the detailQty.
|
protected OfferTimeZoneProcessor offerTimeZoneProcessor
protected CandidatePromotionItems couldOfferApplyToOrderItems(Offer offer, List<PromotableOrderItem> promotableOrderItems)
protected boolean meetsItemQualifierSubtotal(Offer offer, CandidatePromotionItems candidateItem)
protected void checkForItemRequirements(CandidatePromotionItems candidates, OfferItemCriteria criteria, List<PromotableOrderItem> promotableOrderItems, boolean isQualifier)
protected boolean couldOrderItemMeetOfferRequirement(OfferItemCriteria criteria, PromotableOrderItem orderItem)
public Boolean executeExpression(String expression, Map<String,Object> vars)
expression - vars - protected void clearAllNonFinalizedQuantities(List<PromotableOrderItemPriceDetail> priceDetails)
priceDetails - protected void finalizeQuantities(List<PromotableOrderItemPriceDetail> priceDetails)
priceDetails - protected void splitDetailsIfNecessary(List<PromotableOrderItemPriceDetail> priceDetails)
priceDetails - public List<Offer> filterOffers(List<Offer> offers, Customer customer)
filterOffers in interface BaseProcessorprotected boolean couldOfferApplyToRequestDTO(Offer offer, RequestDTO requestDTO)
protected List<Offer> removeTimePeriodOffers(List<Offer> offers)
offers - protected boolean couldOfferApplyToTimePeriod(Offer offer)
protected List<Offer> removeOutOfDateOffers(List<Offer> offers)
offers - protected List<Offer> removeInvalidCustomerOffers(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 © 2014. All Rights Reserved.