atg.commerce.pricing
Class ItemListPriceCalculator
java.lang.Object
   atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
       atg.nucleus.GenericService
atg.nucleus.GenericService
           atg.commerce.pricing.ItemPriceCalculator
atg.commerce.pricing.ItemPriceCalculator
               atg.commerce.pricing.ItemListPriceCalculator
atg.commerce.pricing.ItemListPriceCalculator
- All Implemented Interfaces: 
- ItemPriceSourceHandler, ItemPricingCalculator, atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener
- public class ItemListPriceCalculator 
- extends ItemPriceCalculator
A calculator which determines the list price of an item and sets
 the itemPriceInfo to be that amount.  This is typically the first
 in a series of calulations.  This calculator provides a starting price
 for other calculators.
 
 
 The ItemListPriceCalculator sets the input pPriceQuote's listPrice
 property to the input pPrice.
- See Also:
- ItemPriceInfo
| Field Summary | 
| static java.lang.String | CLASS_VERSIONClass version string
 | 
 
 
| Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging | 
| DEFAULT_LOG_TRACE_STATUS | 
 
 
 
| Method Summary | 
|  void | doStartService()This is called after a Service has been created, placed into the
 naming hierarchy, and initialized with its configured property
 values.
 | 
|  boolean | populateItemPriceSource(ItemPriceSource pItemPriceSource,
                        Order pOrder,
                        CommerceItem pCommerceItem,
                        CommerceItem pParentCommerceItem,
                        java.util.Map pExtraParameters)Populates the list price property of the source based on the PricingAdjustment added by this calculator.
 | 
| protected  void | priceItem(double pPrice,
          ItemPriceInfo pPriceQuote,
          CommerceItem pItem,
          RepositoryItem pPricingModel,
          java.util.Locale pLocale,
          RepositoryItem pProfile,
          java.util.Map pExtraParameters)Sets the list price with the given determined price
 | 
|  boolean | shouldConsumeSource(ItemPriceSource pItemPriceSource)If the
 listPriceproperty is null, false is returned. | 
 
| Methods inherited from class atg.commerce.pricing.ItemPriceCalculator | 
| getItemPriceSource, getLoggingIdentifier, getPrice, getPricePropertyName, getPriceSource, getPriceSource, getPricingTools, isPriceFromCatalogRef, isRequirePriceValue, priceEachItem, priceItem, priceItems, setLoggingIdentifier, setPriceFromCatalogRef, setPricePropertyName, setPricingTools, setRequirePriceValue | 
 
| Methods inherited from class atg.nucleus.GenericService | 
| 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 | 
 
| 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 | 
 
CLASS_VERSION
public static java.lang.String CLASS_VERSION
- Class version string
 
 
ItemListPriceCalculator
public ItemListPriceCalculator()
priceItem
protected void priceItem(double pPrice,
                         ItemPriceInfo pPriceQuote,
                         CommerceItem pItem,
                         RepositoryItem pPricingModel,
                         java.util.Locale pLocale,
                         RepositoryItem pProfile,
                         java.util.Map pExtraParameters)
                  throws PricingException
- Sets the list price with the given determined price
 
- 
- Specified by:
- priceItemin class- ItemPriceCalculator
 
- 
- Parameters:
- pPrice- the price as extracted from the item
- pPriceQuote- ItemPriceInfo representing the current price quote for the item
- pItem- The item to price
- pPricingModel- A RepositoryItem representing a PricingModel
- pLocale- the locale in which this item should be priced
- pProfile- The user's profile
- pExtraParameters- A Map of extra parameters to be used in the pricing, may be null
- Throws:
- PricingException- if there was a problem pricing the input pItem
 
doStartService
public void doStartService()
                    throws ServiceException
- Description copied from class: GenericService
- This is called after a Service has been created, placed into the
 naming hierarchy, and initialized with its configured property
 values.  The Service should override this method to start any
 processes it requires.
 
- 
- Overrides:
- doStartServicein class- GenericService
 
- 
- Throws:
- ServiceException- if the Service had a problem starting up
 
populateItemPriceSource
public boolean populateItemPriceSource(ItemPriceSource pItemPriceSource,
                                       Order pOrder,
                                       CommerceItem pCommerceItem,
                                       CommerceItem pParentCommerceItem,
                                       java.util.Map pExtraParameters)
- Populates the list price property of the source based on the PricingAdjustment added by this calculator.
 
- 
- Specified by:
- populateItemPriceSourcein interface- ItemPriceSourceHandler
- Overrides:
- populateItemPriceSourcein class- ItemPriceCalculator
 
- 
- Parameters:
- pItemPriceSource- the source being generated and populated with pricing data.
- pOrder- the Order
- pCommerceItem- the item for which the source is being created
- pParentCommerceItem- the item that contained pCommerceItem
- pExtraParameters- a Map of extra parameters objects that was passed to the initial call to generate the source objects.
- Returns:
- true if the list price value is set.
 
shouldConsumeSource
public boolean shouldConsumeSource(ItemPriceSource pItemPriceSource)
- If the listPriceproperty is null, false is returned. Otherwise
 true.
 
- 
- Specified by:
- shouldConsumeSourcein interface- ItemPriceSourceHandler
- Overrides:
- shouldConsumeSourcein class- ItemPriceCalculator
 
- 
- Parameters:
- pItemPriceSource- the source that was given to price the item.
- Returns:
- true if the source should be consumed by the calculator. false if the calculator should 
 bypass its processing and return normally.