|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.commerce.pricing.DiscountCalculatorService atg.commerce.pricing.ItemDiscountCalculator atg.commerce.pricing.GWPPriceCalculator
public class GWPPriceCalculator
GWP prePromotionProcessing to make existing auto added and selected GWP quantity free before promotions are evaluated.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected atg.commerce.promotion.GWPMarkerManager |
mGwpMarkerManager
|
Fields inherited from class atg.commerce.pricing.ItemDiscountCalculator |
---|
EXTRA_PARAM_QUALIFIERSERVICE |
Fields inherited from class atg.commerce.pricing.DiscountCalculatorService |
---|
AMOUNT_INCREASE_TYPE, AMOUNT_OFF_TYPE, FIXED_PRICE_TYPE, ILLEGAL_TYPE, mPromotionTools, PERCENT_OFF_TYPE |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
GWPPriceCalculator()
|
Method Summary | |
---|---|
void |
applyExistingGWP(PricingContext pPricingContext,
java.util.List<ItemPriceInfo> pPriceQuotes,
java.util.Map pExtraParameters)
Applies a zero fixed price adjustment to make any GWP quantity free on the item. |
protected long |
determineNextRangeMap(QualifiedItem pQualifiedItem,
long pQuantity,
PricingContext pPricingContext,
java.util.Map pExtraParametersMap)
Updates the given qualified item detail map to apply the given quantity of discount. |
atg.commerce.promotion.GWPMarkerManager |
getGwpMarkerManager()
Getter for the GWP marker manager |
void |
invoke(java.util.Collection<RepositoryItem> pPricingModels,
PricingContext pPricingContext,
java.util.Map pExtraParameters)
Apply the promotion engine component logic to call priceItems for this calculator. |
void |
priceItems(java.util.List pPriceQuotes,
java.util.List pItems,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
Order pOrder,
java.util.Map pExtraParameters)
If called with a null pricing model then it applies a zero fixed price adjustment to make any GWP quantity free on the item. |
void |
setGwpMarkerManager(atg.commerce.promotion.GWPMarkerManager pGwpMarkerManager)
Setter for the GWP marker manager |
Methods inherited from class atg.commerce.pricing.DiscountCalculatorService |
---|
adjust, adjustAmount, getAdjuster, getDiscountType, getDiscountType, getPricingModelProperties, getPromotionTools, getQualifierService, getQualifierService, isNegativeAmountException, setNegativeAmountException, setPricingModelProperties, setPromotionTools, setQualifierService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
protected atg.commerce.promotion.GWPMarkerManager mGwpMarkerManager
Constructor Detail |
---|
public GWPPriceCalculator()
Method Detail |
---|
public atg.commerce.promotion.GWPMarkerManager getGwpMarkerManager()
public void setGwpMarkerManager(atg.commerce.promotion.GWPMarkerManager pGwpMarkerManager)
pItemMarkerManager
- GWPMarkerManagerpublic void invoke(java.util.Collection<RepositoryItem> pPricingModels, PricingContext pPricingContext, java.util.Map pExtraParameters) throws PricingException
invoke
in interface atg.commerce.pricing.PromotionProcessingComponent
pPricingModels
- Collection of PricingModel to processpPricingContext
- PricingContextpExtraParameters
- Map of extra parameters, may be null
PricingException
public void priceItems(java.util.List pPriceQuotes, java.util.List pItems, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, Order pOrder, java.util.Map pExtraParameters) throws PricingException
It is expected that pricing model will be null if called as a pre-calculator.
priceItems
in interface ItemPricingCalculator
priceItems
in class ItemDiscountCalculator
pPriceQuotes
- List of ItemPriceInfo with latest price details for the itempItems
- List of CommerceItem being pricedpPricingModel
- RepositoryItem promotion, may be nullpLocale
- Locale for pricingpProfile
- Profile for pricingpOrder
- Order for pricingpExtraParameters
- Optional Map of extra parameters
PricingException
- for problems during pricingpublic void applyExistingGWP(PricingContext pPricingContext, java.util.List<ItemPriceInfo> pPriceQuotes, java.util.Map pExtraParameters) throws PricingException
pPricingContext
- PricingContext for this pricing operationpPriceQuotes
- List of current ItemPriceInfo for items being pricedpExtraParameters
- Optional Map of extra parameters
PricingException
- for problems during pricingprotected long determineNextRangeMap(QualifiedItem pQualifiedItem, long pQuantity, PricingContext pPricingContext, java.util.Map pExtraParametersMap) throws PricingException
pQualifiedItem
- QualifiedItem containing the discount detailspQuantity
- long quantity to discountpPricingContext
- PricingContext for this pricing operationpExtraParametersMap
- Optional Map of extra parameters
PricingException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |