org.broadleafcommerce.core.offer.service.discount.domain
Interface PromotableFulfillmentGroup

All Superinterfaces:
Serializable
All Known Implementing Classes:
PromotableFulfillmentGroupImpl

public interface PromotableFulfillmentGroup
extends Serializable


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.
 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 saleAdjustments or retail only adjustments are better and finalize the set that achieves the best result for the customer.
 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
 boolean isTotalitarianOfferApplied()
          Returns true if totalitarian offer was applied to this promotable fulfillment group.
 void removeAllCandidateAdjustments()
          Removes all candidate adjustments
 void updateRuleVariables(Map<String,Object> ruleVars)
          Adds the underlying fulfillmentGroup to the rule variable map.
 

Method Detail

addCandidateFulfillmentGroupAdjustment

void addCandidateFulfillmentGroupAdjustment(PromotableFulfillmentGroupAdjustment adjustment)
Adds a fulfillmentGroupAdjustment


getCandidateFulfillmentGroupAdjustments

List<PromotableFulfillmentGroupAdjustment> getCandidateFulfillmentGroupAdjustments()
Adds a fulfillmentGroupAdjustment

Returns:

removeAllCandidateAdjustments

void removeAllCandidateAdjustments()
Removes all candidate adjustments


chooseSaleOrRetailAdjustments

void chooseSaleOrRetailAdjustments()
This method will check to see if the saleAdjustments or retail only adjustments are better and finalize the set that achieves the best result for the customer.


getFulfillmentGroup

FulfillmentGroup getFulfillmentGroup()
Returns the decorated FulfillmentGroup


updateRuleVariables

void updateRuleVariables(Map<String,Object> ruleVars)
Adds the underlying fulfillmentGroup to the rule variable map.


calculatePriceWithAdjustments

Money calculatePriceWithAdjustments(boolean useSalePrice)
Calculates the price with adjustments. Uses the sale or retail adjustments based on the passed in parameter.

Parameters:
useSalePrice -

getFinalizedPriceWithAdjustments

Money getFinalizedPriceWithAdjustments()
Calculates the price with all adjustments. May error in the case where adjustments have not been finalized with a call to chooseSaleOrRetailAdjustments.

Parameters:
useSalePrice -

getDiscountableOrderItems

List<PromotableOrderItem> getDiscountableOrderItems()
Return list of discountable discrete order items contained in this fulfillmentGroup.

Returns:

canApplyOffer

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.

Parameters:
fulfillmentGroupOffer -
Returns:

calculatePriceWithoutAdjustments

Money calculatePriceWithoutAdjustments()
Returns the price of this fulfillment group if no adjustments were applied.

Returns:

isTotalitarianOfferApplied

boolean isTotalitarianOfferApplied()
Returns true if totalitarian offer was applied to this promotable fulfillment group.

Returns:


Copyright © 2013. All Rights Reserved.