atg.commerce.pricing.priceLists
Class ItemSalePriceCalculator

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.commerce.pricing.priceLists.ItemPriceCalculator
              extended by atg.commerce.pricing.priceLists.ItemSalePriceCalculator
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 ItemSalePriceCalculator
extends ItemPriceCalculator

Extends the super class to perform extended logic specific to handling an ItemPriceSource for sale prices.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
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
ItemSalePriceCalculator()
           
 
Method Summary
 boolean populateItemPriceSource(ItemPriceSource pItemPriceSource, Order pOrder, CommerceItem pCommerceItem, CommerceItem pParentCommerceItem, java.util.Map pExtraParameters)
          Extends the super implementation to set the onSale to true when the super implementation returns true.
 boolean shouldConsumeSource(ItemPriceSource pItemPriceSource)
          Extends the base implemenation to check if the onSale property is set to true.
 
Methods inherited from class atg.commerce.pricing.priceLists.ItemPriceCalculator
getDifferentPriceList, getItemPriceSource, getLoggingIdentifier, getNoPriceCalculator, getPriceListManager, getPricingScheme, getPricingSchemeNames, getPricingSchemePropertyName, getPricingTools, getProfilePriceListPropertyName, isNoPriceIsError, isUseDefaultPriceList, priceEachItem, priceItem, priceItems, setLoggingIdentifier, setNoPriceCalculator, setNoPriceIsError, setPriceListManager, setPricingSchemeNames, setPricingSchemePropertyName, setPricingTools, setProfilePriceListPropertyName, setUseDefaultPriceList
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, 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
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

ItemSalePriceCalculator

public ItemSalePriceCalculator()
Method Detail

populateItemPriceSource

public boolean populateItemPriceSource(ItemPriceSource pItemPriceSource,
                                       Order pOrder,
                                       CommerceItem pCommerceItem,
                                       CommerceItem pParentCommerceItem,
                                       java.util.Map pExtraParameters)
Extends the super implementation to set the onSale to true when the super implementation returns true.

Specified by:
populateItemPriceSource in interface ItemPriceSourceHandler
Overrides:
populateItemPriceSource in 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:
return true if any of the ItemPriceSource properties were updated

shouldConsumeSource

public boolean shouldConsumeSource(ItemPriceSource pItemPriceSource)
Extends the base implemenation to check if the onSale property is set to true.

Specified by:
shouldConsumeSource in interface ItemPriceSourceHandler
Overrides:
shouldConsumeSource in class ItemPriceCalculator
Returns:
true if the calcualtor should attempt to consume the price source that was provided for the item.