|
|||||||||
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.BulkItemDiscountCalculator
public class BulkItemDiscountCalculator
Calculator to support bulk item discount.
This calculator requires each qualified item to have
a discount structure with 1 or more discount detail.
Each discount detail represents a tier of the bulk
discount.
Example PMDL:
Field Summary | |
---|---|
static java.lang.String |
BULK_CALCULATOR_TYPE
PMDL calculator type |
static java.lang.String |
CLASS_VERSION
Class version string |
protected BandedDiscountCalculatorHelper |
mBandedDiscountCalculatorHelper
Banding discount calculator helper |
protected java.lang.String |
mDefaultBandingProperty
Default banding property |
protected java.lang.String |
mDefaultBandingPropertyScope
Default banding property scope |
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 | |
---|---|
BulkItemDiscountCalculator()
|
Method Summary | |
---|---|
void |
doStartService()
Checks to see if property qualifierService is set |
double |
getAdjuster(RepositoryItem pPricingModel,
java.util.Map pExtraParameters)
Uses the banded discount helper to determine the adjuster to use. |
BandedDiscountCalculatorHelper |
getBandedDiscountCalculatorHelper()
|
CalculatorInfo |
getCalculatorInfo()
Provide a CalculatorInfo for the calculator |
java.lang.String |
getCalculatorType()
Gets the String calculator type of this calculator |
java.lang.String |
getDefaultBandingProperty()
|
java.lang.String |
getDefaultBandingPropertyScope()
|
void |
setBandedDiscountCalculatorHelper(BandedDiscountCalculatorHelper pBandedDiscountCalculatorHelper)
|
void |
setDefaultBandingProperty(java.lang.String pDefaultBandingProperty)
|
void |
setDefaultBandingPropertyScope(java.lang.String pDefaultBandingPropertyScope)
|
protected boolean |
validateQualifierService()
Determines if the qualifier service is valid. |
Methods inherited from class atg.commerce.pricing.DiscountCalculatorService |
---|
adjust, adjustAmount, 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 BULK_CALCULATOR_TYPE
protected java.lang.String mDefaultBandingProperty
protected java.lang.String mDefaultBandingPropertyScope
protected BandedDiscountCalculatorHelper mBandedDiscountCalculatorHelper
Constructor Detail |
---|
public BulkItemDiscountCalculator()
Method Detail |
---|
public void setDefaultBandingProperty(java.lang.String pDefaultBandingProperty)
public java.lang.String getDefaultBandingProperty()
public void setDefaultBandingPropertyScope(java.lang.String pDefaultBandingPropertyScope)
public java.lang.String getDefaultBandingPropertyScope()
public BandedDiscountCalculatorHelper getBandedDiscountCalculatorHelper()
public void setBandedDiscountCalculatorHelper(BandedDiscountCalculatorHelper pBandedDiscountCalculatorHelper)
public double getAdjuster(RepositoryItem pPricingModel, java.util.Map pExtraParameters) throws PricingException
getAdjuster
in class DiscountCalculatorService
pPricingModel
- RepositoryItem pricing modelpExtraParameters
- Map of optional extra parameters, may be null
PricingException
- if the method fails to get a valid double adjusterBandedDiscountCalculatorHelper.getAdjuster(RepositoryItem, Collection, Map, String, String)
public java.lang.String getCalculatorType()
public CalculatorInfo getCalculatorInfo()
getCalculatorInfo
in interface CalculatorInfoProvider
protected boolean validateQualifierService()
validateQualifierService
in class ItemDiscountCalculator
public void doStartService() throws ServiceException
qualifierService
is set
doStartService
in class ItemDiscountCalculator
ServiceException
- if there was a problem initializing this service
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |