Friday, April 27, 2012

Overview of ItemPricingEngineImpl : ATG


ItemPricingEngineImpl

atg.commerce.pricing.ItemPricingEngineImpl


All Implemented Interfaces:

ItemPricingEngine, PricingEngine, NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, Schedulable, java.util.EventListener


public class ItemPricingEngineImpl extends PricingEngineService 
implements ItemPricingEngine


An ItemPricingEngine implementation which computes the price for an order. It accomplishes this task by invoking a series of ItemPricingCalculators which incrementally compute the items' prices:
  • The first step is to allow the preCalculators to manipulate the price. They are invoked in the order in which they appear in the preCalculators list.
  • The second step is to extract the calculators from any input PricingModels, and invoke them in the order in which they appear in the pPricingModels list.
  • The last step is to invoke the postCalculators in the order in which they appear in the postCalculators list.
Note: if a particular order of calculator invocation is desired, sorting must be done prior to passing discounts/precalculators/postcalculators in to the Engine.
Properties:
  • licenseFileNames is the names of the nucleus components which are the B2B and B2C licenses.
  • preCalculators is a list of ItemPricingCalculators whose pricing methods should be invoked on the input pPriceQuote before any pricing models are evaluated.
  • postCalculators is a list of ItemPricingCalculators whose pricing methods should be invoked on the input pPriceQuote after any pricing models are evaluated.

Important properties:


PriceItem

public ItemPriceInfo priceItem(CommerceItem pItem,
                               java.util.Collection pPricingModels,
                               java.util.Locale pLocale,
                               RepositoryItem pProfile,
                               java.util.Map pExtraParameters)
                        throws PricingException

 

PriceItems

public java.util.List priceItems(java.util.List pItems,
                                 java.util.Collection pPricingModels,
                                 java.util.Locale pLocale,
                                 RepositoryItem pProfile,
                                 Order pOrder,
                                 java.util.Map pExtraParameters)
                          throws PricingException

 

priceEachItem:

public java.util.List priceEachItem(java.util.List pItems,
                                    java.util.Collection pPricingModels,
                                    java.util.Locale pLocale,
                                    RepositoryItem pProfile,
                                    java.util.Map pExtraParameters)
                             throws PricingException

 

checkPromotionsForCloseness:


public void checkPromotionsForCloseness(java.util.List pPriceInfos,
                                        java.util.List pItems,
                                        java.util.Collection pPricingModels,
                                        java.util.Locale pLocale,
                                        RepositoryItem pProfile,
                                        Order pOrder,
                                        java.util.Map pExtraParameters)
                                 throws PricingException





No comments:

Popular Posts