|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.core.offer.service.discount.domain.PromotableFulfillmentGroupImpl
public class PromotableFulfillmentGroupImpl
| Field Summary | |
|---|---|
protected Money |
adjustedPrice
|
List<PromotableFulfillmentGroupAdjustment> |
candidateFulfillmentGroupAdjustments
|
protected List<PromotableOrderItem> |
discountableOrderItems
|
protected FulfillmentGroup |
fulfillmentGroup
|
protected PromotableItemFactory |
itemFactory
|
protected PromotableOrder |
promotableOrder
|
protected boolean |
useSaleAdjustments
|
| Constructor Summary | |
|---|---|
PromotableFulfillmentGroupImpl(FulfillmentGroup fulfillmentGroup,
PromotableOrder promotableOrder,
PromotableItemFactory itemFactory)
|
|
| Method Summary | |
|---|---|
void |
addCandidateFulfillmentGroupAdjustment(PromotableFulfillmentGroupAdjustment adjustment)
Adds a fulfillmentGroupAdjustment |
Money |
calculatePriceWithAdjustments(boolean useSalePrice)
Calculates the price with adjustments. |
Money |
calculatePriceWithoutAdjustments()
Returns the price of this fulfillment group if no adjustments were applied. |
protected Money |
calculateRetailAdjustmentPrice()
|
protected Money |
calculateSaleAdjustmentPrice()
|
boolean |
canApplyOffer(PromotableCandidateFulfillmentGroupOffer fulfillmentGroupOffer)
Checks to see if the offer can be added to this fulfillmentGroup based on whether or not it is combinable or if this fulfillmentGroup already has a non-combinable offer applied. |
void |
chooseSaleOrRetailAdjustments()
This method will check to see if the salePriceAdjustments or retailPriceAdjustments are better and remove those that should not apply. |
protected void |
finalizeAdjustments(boolean useSaleAdjustments)
|
List<PromotableFulfillmentGroupAdjustment> |
getCandidateFulfillmentGroupAdjustments()
Adds a fulfillmentGroupAdjustment |
List<PromotableOrderItem> |
getDiscountableOrderItems()
Return list of discountable discrete order items contained in this fulfillmentGroup. |
Money |
getFinalizedPriceWithAdjustments()
Calculates the price with all adjustments. |
FulfillmentGroup |
getFulfillmentGroup()
Returns the decorated FulfillmentGroup |
protected Money |
getSalePriceBeforeAdjustments()
|
boolean |
isTotalitarianOfferApplied()
Returns true if totalitarian offer was applied to this promotable fulfillment group. |
void |
removeAllCandidateAdjustments()
Removes all candidate adjustments |
protected void |
removeRetailOnlyAdjustments()
Removes retail only adjustments. |
protected void |
removeZeroDollarAdjustments(boolean useSalePrice)
If removeUnusedAdjustments is s |
void |
updateRuleVariables(Map<String,Object> ruleVars)
Adds the underlying fulfillmentGroup to the rule variable map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected FulfillmentGroup fulfillmentGroup
protected PromotableOrder promotableOrder
protected PromotableItemFactory itemFactory
protected List<PromotableOrderItem> discountableOrderItems
protected boolean useSaleAdjustments
protected Money adjustedPrice
public List<PromotableFulfillmentGroupAdjustment> candidateFulfillmentGroupAdjustments
| Constructor Detail |
|---|
public PromotableFulfillmentGroupImpl(FulfillmentGroup fulfillmentGroup,
PromotableOrder promotableOrder,
PromotableItemFactory itemFactory)
| Method Detail |
|---|
public FulfillmentGroup getFulfillmentGroup()
PromotableFulfillmentGroup
getFulfillmentGroup in interface PromotableFulfillmentGrouppublic void updateRuleVariables(Map<String,Object> ruleVars)
PromotableFulfillmentGroup
updateRuleVariables in interface PromotableFulfillmentGrouppublic List<PromotableOrderItem> getDiscountableOrderItems()
PromotableFulfillmentGroup
getDiscountableOrderItems in interface PromotableFulfillmentGroupprotected Money getSalePriceBeforeAdjustments()
protected Money calculateSaleAdjustmentPrice()
protected Money calculateRetailAdjustmentPrice()
public void chooseSaleOrRetailAdjustments()
chooseSaleOrRetailAdjustments in interface PromotableFulfillmentGroupprotected void finalizeAdjustments(boolean useSaleAdjustments)
protected void removeRetailOnlyAdjustments()
protected void removeZeroDollarAdjustments(boolean useSalePrice)
useSaleAdjustments - public Money getFinalizedPriceWithAdjustments()
PromotableFulfillmentGroup
getFinalizedPriceWithAdjustments in interface PromotableFulfillmentGrouppublic Money calculatePriceWithoutAdjustments()
PromotableFulfillmentGroup
calculatePriceWithoutAdjustments in interface PromotableFulfillmentGrouppublic void addCandidateFulfillmentGroupAdjustment(PromotableFulfillmentGroupAdjustment adjustment)
PromotableFulfillmentGroup
addCandidateFulfillmentGroupAdjustment in interface PromotableFulfillmentGrouppublic List<PromotableFulfillmentGroupAdjustment> getCandidateFulfillmentGroupAdjustments()
PromotableFulfillmentGroup
getCandidateFulfillmentGroupAdjustments in interface PromotableFulfillmentGrouppublic boolean canApplyOffer(PromotableCandidateFulfillmentGroupOffer fulfillmentGroupOffer)
PromotableFulfillmentGroup
canApplyOffer in interface PromotableFulfillmentGrouppublic Money calculatePriceWithAdjustments(boolean useSalePrice)
PromotableFulfillmentGroup
calculatePriceWithAdjustments in interface PromotableFulfillmentGrouppublic boolean isTotalitarianOfferApplied()
PromotableFulfillmentGroup
isTotalitarianOfferApplied in interface PromotableFulfillmentGrouppublic void removeAllCandidateAdjustments()
PromotableFulfillmentGroup
removeAllCandidateAdjustments in interface PromotableFulfillmentGroup
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||