public class GWPPriceCalculator extends ItemDiscountCalculator implements atg.commerce.pricing.PromotionProcessingComponent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
protected GWPManager |
mGwpManager |
protected atg.commerce.promotion.GWPMarkerManager |
mGwpMarkerManager |
EXTRA_PARAM_QUALIFIERSERVICE
AMOUNT_INCREASE_TYPE, AMOUNT_OFF_TYPE, FIXED_PRICE_TYPE, ILLEGAL_TYPE, mPromotionTools, PERCENT_OFF_TYPE
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
GWPPriceCalculator() |
Modifier and Type | Method and Description |
---|---|
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 double |
determineNextRangeMap(QualifiedItem pQualifiedItem,
long pQuantity,
double pQuantityWithFraction,
PricingContext pPricingContext,
java.util.Map pExtraParametersMap)
Updates the given qualified item detail map to apply the given quantity of discount.
|
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.
|
GWPManager |
getGwpManager()
Getter for the GWP marker manager
|
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 |
setGwpManager(GWPManager pGwpManager)
Setter for the GWP marker manager
|
void |
setGwpMarkerManager(atg.commerce.promotion.GWPMarkerManager pGwpMarkerManager)
Setter for the GWP marker manager
|
determineDiscountNumber, determineDiscountNumberWithFraction, doStartService, findAdjustedPrice, findQualifyingItems, getAmountToDiscount, getPricingTools, getRangeComparator, priceDetailedItemPriceInfo, priceEachItem, priceItem, priceQualifyingItem, priceQualifyingItems, setPricingTools, setRangeComparator, updateDetailedPriceInfos, updateQualifyingDetails, updateQuantityAsQualifier, validateQualifierService
adjust, adjustAmount, adjustAmount, getAdjuster, getDiscountType, getDiscountType, getPricingModelProperties, getPromotionTools, getQualifierService, getQualifierService, isNegativeAmountException, setNegativeAmountException, setPricingModelProperties, setPromotionTools, setQualifierService
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService, toString
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static final java.lang.String CLASS_VERSION
protected atg.commerce.promotion.GWPMarkerManager mGwpMarkerManager
protected GWPManager mGwpManager
public atg.commerce.promotion.GWPMarkerManager getGwpMarkerManager()
public void setGwpMarkerManager(atg.commerce.promotion.GWPMarkerManager pGwpMarkerManager)
pGwpMarkerManager
- GWPMarkerManagerpublic GWPManager getGwpManager()
public void setGwpManager(GWPManager pGwpManager)
pGwpManager
- GwpManagerpublic 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 nullPricingException
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 parametersPricingException
- 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 parametersPricingException
- for problems during pricingprotected long determineNextRangeMap(QualifiedItem pQualifiedItem, long pQuantity, PricingContext pPricingContext, java.util.Map pExtraParametersMap) throws PricingException
pQualifiedItem
- QualifiedItem (non-fractional) containing the discount detailspQuantity
- long quantity to discountpPricingContext
- PricingContext for this pricing operationpExtraParametersMap
- Optional Map of extra parametersPricingException
protected double determineNextRangeMap(QualifiedItem pQualifiedItem, long pQuantity, double pQuantityWithFraction, PricingContext pPricingContext, java.util.Map pExtraParametersMap) throws PricingException
pQualifiedItem
- QualifiedItem (fractional or non-fractional) containing the discount detailspQuantity
- long quantity to discount (used for non-fractional items)pQuantity
- double quantity to discount (used for fractional items)pPricingContext
- PricingContext for this pricing operationpExtraParametersMap
- Optional Map of extra parametersPricingException