|
|||||||||
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.GWPDiscountCalculator
public class GWPDiscountCalculator
GWP calculator to target items to make free and also to generate GWPInfo objects so free items can be auto added to the cart.
Nested Class Summary | |
---|---|
static class |
GWPDiscountCalculator.GWP_GIFT_TYPES
|
Field Summary | |
---|---|
static java.lang.String |
AUTO_REMOVE_ATTRIBUTE
|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
DISCOUNT_DETAIL_NAME
|
static java.lang.String |
GIFT_DETAIL_ATTRIBUTE
|
static java.lang.String |
GIFT_TYPE_ATTRIBUTE
|
static java.lang.String |
GWP_CALCULATOR_TYPE
|
static java.lang.String |
GWP_GIFT_TYPE_CATEGORY
|
static java.lang.String |
GWP_GIFT_TYPE_PRODUCT
|
static java.lang.String |
GWP_GIFT_TYPE_PRODUCT_CONTENT_GROUP
|
static java.lang.String |
GWP_GIFT_TYPE_SKU
|
static java.lang.String |
GWP_GIFT_TYPE_SKU_CONTENT_GROUP
|
protected atg.commerce.promotion.GWPMarkerManager |
mGwpMarkerManager
|
static java.lang.String |
QUANTITY_ATTRIBUTE
|
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 | |
---|---|
GWPDiscountCalculator()
|
Method Summary | |
---|---|
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. |
CalculatorInfo |
getCalculatorInfo()
Allows a calculator provide it's own CalculatorInfo |
atg.commerce.promotion.GWPMarkerManager |
getGwpMarkerManager()
Getter for the GWP marker manager |
protected long |
getQualifiedItemQuantity(QualifiedItem pQualifiedItem,
int pDetailIndex)
Method to get the total discountable quantity of a qualified item for this detail index |
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
public static final java.lang.String GWP_CALCULATOR_TYPE
public static final java.lang.String DISCOUNT_DETAIL_NAME
public static final java.lang.String AUTO_REMOVE_ATTRIBUTE
public static final java.lang.String QUANTITY_ATTRIBUTE
public static final java.lang.String GIFT_TYPE_ATTRIBUTE
public static final java.lang.String GIFT_DETAIL_ATTRIBUTE
public static final java.lang.String GWP_GIFT_TYPE_SKU
public static final java.lang.String GWP_GIFT_TYPE_PRODUCT
public static final java.lang.String GWP_GIFT_TYPE_CATEGORY
public static final java.lang.String GWP_GIFT_TYPE_SKU_CONTENT_GROUP
public static final java.lang.String GWP_GIFT_TYPE_PRODUCT_CONTENT_GROUP
protected atg.commerce.promotion.GWPMarkerManager mGwpMarkerManager
Constructor Detail |
---|
public GWPDiscountCalculator()
Method Detail |
---|
public atg.commerce.promotion.GWPMarkerManager getGwpMarkerManager()
public void setGwpMarkerManager(atg.commerce.promotion.GWPMarkerManager pGwpMarkerManager)
pItemMarkerManager
- GWPMarkerManagerpublic 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 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
protected long getQualifiedItemQuantity(QualifiedItem pQualifiedItem, int pDetailIndex)
pQualifiedItem
- QualifiedItem to checkpDetailIndex
- int detail index
public CalculatorInfo getCalculatorInfo()
CalculatorInfoProvider
getCalculatorInfo
in interface CalculatorInfoProvider
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |