|
|||||||||
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.PricingEngineService atg.commerce.pricing.OrderPricingEngineImpl
public class OrderPricingEngineImpl
An OrderPricingEngine implementation which computes the price for an order. It accomplishes this task by invoking a series of OrderPricingCalculators which incrementally compute the order's price:
pPriceQuote
before any pricing models are
evaluated.
pPriceQuote
after any pricing models are
evaluated.
OrderPriceInfo
,
OrderPricingCalculator
Nested Class Summary |
---|
Nested classes/interfaces inherited from class atg.commerce.pricing.PricingEngineService |
---|
PricingEngineService.EmptyItemPriceInfo |
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from class atg.commerce.pricing.PricingEngineService |
---|
EXTRA_PARAM_QUALIFIERSERVICE, mGlobalPromotions, mPricingCalculatorServices |
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 | |
---|---|
OrderPricingEngineImpl()
|
Method Summary | |
---|---|
protected void |
applyCalculator(java.lang.Object pCalc,
OrderPriceInfo pOrderPriceQuote,
PricingContext pPricingContext,
java.util.Map pExtraParameters)
Calls the supplied calculator service to price an Order. |
protected java.util.Collection<RepositoryItem> |
applyPromotions(java.util.Collection pPricingModels,
OrderPriceInfo pOrderPriceQuote,
PricingContext pPricingContext,
java.util.Map pExtraParameters)
Apply the pricing models (promotions) to the object being priced. |
void |
checkPromotionsForCloseness(OrderPriceInfo pPriceInfo,
Order pOrder,
java.util.Collection pPricingModels,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Check to see if the item qualifies under any of the pricingModels' "closenessQualifiers". |
protected boolean |
didPromotionQualify(RepositoryItem pPricingModel,
PricingContext pPricingContext,
java.util.Map pExtraParameters)
Determines if a promotion qualified or not. |
protected java.lang.String |
getCurrencyCode(Order pOrder,
java.util.Collection pPricingModels,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Return the currency code that should be used in the context of this pricing request |
OrderPricingCalculator[] |
getPostCalculators()
Returns property PostCalculators |
OrderPricingCalculator[] |
getPreCalculators()
Returns property PreCalculators |
atg.commerce.pricing.PromotionProcessingComponent[] |
getPrePromotionProcessing()
Returns property PrePromotionProcessing |
protected java.util.List<AmountInfo> |
getPriceInfoDetails(PricingContext pPricingContext,
java.util.Map pExtraParameters)
Returns price info details for each item. |
java.util.Collection |
getPricingModels(RepositoryItem pProfile)
Returns a List of pricing models (e.g. |
protected java.lang.String |
getStackingRuleOrderLimitReachedMessageIdentifier()
Value for stacking rule order limit reached message identifier. |
protected java.lang.String |
getStackingRulePromotionExcludedMessageIdentifier()
Value for stacking rule promotion excluded message identifier. |
OrderPriceInfo |
priceOrder(Order pOrder,
java.util.Collection pPricingModels,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Price an order within a context |
void |
setPostCalculators(OrderPricingCalculator[] pPostCalculators)
Sets property PostCalculators |
void |
setPreCalculators(OrderPricingCalculator[] pPreCalculators)
Sets property PreCalculators |
void |
setPrePromotionProcessing(atg.commerce.pricing.PromotionProcessingComponent[] pPrePromotionProcessing)
Sets property PrePromotionProcessing |
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 java.lang.String CLASS_VERSION
Constructor Detail |
---|
public OrderPricingEngineImpl()
Method Detail |
---|
public void setPreCalculators(OrderPricingCalculator[] pPreCalculators)
public OrderPricingCalculator[] getPreCalculators()
public void setPrePromotionProcessing(atg.commerce.pricing.PromotionProcessingComponent[] pPrePromotionProcessing)
public atg.commerce.pricing.PromotionProcessingComponent[] getPrePromotionProcessing()
public void setPostCalculators(OrderPricingCalculator[] pPostCalculators)
public OrderPricingCalculator[] getPostCalculators()
public java.util.Collection getPricingModels(RepositoryItem pProfile)
getPricingModels
in interface PricingEngine
pProfile
- The user's profile from which the engine will extract promotions
protected java.lang.String getCurrencyCode(Order pOrder, java.util.Collection pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters) throws PricingException
PricingException
- if an error occurs while attempting to determine the currency codepublic OrderPriceInfo priceOrder(Order pOrder, java.util.Collection pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters) throws PricingException
priceOrder
in interface OrderPricingEngine
pOrder
- The order to pricepPricingModels
- A Collection of RepositoryItems representing PricingModelspLocale
- The Locale to use for pricingpProfile
- The user's profilepExtraParameters
- A Map of extra parameters to be used in the pricing, may be null
PricingException
- if an error occurs while attempting to priceprotected java.util.Collection<RepositoryItem> applyPromotions(java.util.Collection pPricingModels, OrderPriceInfo pOrderPriceQuote, PricingContext pPricingContext, java.util.Map pExtraParameters) throws PricingException
pPricingModels
- Collection of PricingModel itemspOrderPriceQuote
- OrderPriceInfo for the Order being pricedpPricingContext
- PricingContextpExtraParameters
- Map of extra parameters, may be null
PricingException
protected void applyCalculator(java.lang.Object pCalc, OrderPriceInfo pOrderPriceQuote, PricingContext pPricingContext, java.util.Map pExtraParameters) throws PricingException
pCalc
- OrderPricingCalculator to callpOrderPriceQuote
- OrderPriceInfo for the OrderpPricingContext
- PricingContextpExtraParameters
- Map of extra parameters
PricingException
public void checkPromotionsForCloseness(OrderPriceInfo pPriceInfo, Order pOrder, java.util.Collection pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters) throws PricingException
pPriceInfo
- The OrderPriceInfo object associated with the order.pOrder
- The item to checkpPricingModels
- A Collection of RepositoryItems representing PricingModelspLocale
- The Locale to use for pricingpProfile
- The user's profilepExtraParameters
- A Map of extra parameters to be used in the pricing,
may be null
PricingException
protected boolean didPromotionQualify(RepositoryItem pPricingModel, PricingContext pPricingContext, java.util.Map pExtraParameters) throws PricingException
true
if the promotion qualified,
false
otherwise.
didPromotionQualify
in class PricingEngineService
pPricingModel
- promotion to checkpPricingContext
- PricingContextpExtraParameters
- Map of extra parameters, may be null
true
if the promotion qualified, false
otherwise
PricingException
- if something went wrongprotected java.util.List<AmountInfo> getPriceInfoDetails(PricingContext pPricingContext, java.util.Map pExtraParameters)
getPriceInfoDetails
in class PricingEngineService
pPricingContext
- PricingContextpExtraParameters
- Map of extra parameters, may be null
true
if the promotion qualified, false
otherwiseprotected java.lang.String getStackingRuleOrderLimitReachedMessageIdentifier()
getStackingRuleOrderLimitReachedMessageIdentifier
in class PricingEngineService
protected java.lang.String getStackingRulePromotionExcludedMessageIdentifier()
getStackingRulePromotionExcludedMessageIdentifier
in class PricingEngineService
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |