atg.projects.store.pricing
Class StoreItemDiscountCalculator

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.commerce.pricing.DiscountCalculatorService
              extended by atg.commerce.pricing.ItemDiscountCalculator
                  extended by atg.projects.store.pricing.StoreItemDiscountCalculator
All Implemented Interfaces:
atg.commerce.pricing.ItemPricingCalculator, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, java.util.EventListener

public class StoreItemDiscountCalculator
extends atg.commerce.pricing.ItemDiscountCalculator

Extends the original to allow the pricing model to determine what qualifier service to use.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string.
 
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, 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
StoreItemDiscountCalculator()
           
 
Method Summary
protected  java.util.Collection findQualifyingItems(java.util.List pPriceQuotes, java.util.List pItems, atg.repository.RepositoryItem pPricingModel, atg.repository.RepositoryItem pProfile, java.util.Locale pLocale, atg.commerce.order.Order pOrder, java.util.Map pExtraParameters)
          Overrides the original to retrieve the qualifier service from the pricing model's optional 'qualifier' property.
protected  java.util.HashMap getQualifierMap()
           
protected  atg.commerce.pricing.Qualifier getQualifierService(atg.repository.RepositoryItem pPricingModel)
          Get the qualifier from the pricing model.
 
Methods inherited from class atg.commerce.pricing.ItemDiscountCalculator
determineDiscountNumber, doStartService, findAdjustedPrice, getAmountToDiscount, getPricingTools, getRangeComparator, priceDetailedItemPriceInfo, priceEachItem, priceItem, priceItems, priceQualifyingItem, priceQualifyingItems, setPricingTools, setRangeComparator, updateDetailedPriceInfos
 
Methods inherited from class atg.commerce.pricing.DiscountCalculatorService
adjust, adjustAmount, getDiscountType, getPricingModelProperties, getQualifierService, isNegativeAmountException, setNegativeAmountException, setPricingModelProperties, setQualifierService
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, 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

StoreItemDiscountCalculator

public StoreItemDiscountCalculator()
Method Detail

getQualifierMap

protected java.util.HashMap getQualifierMap()
Returns:
qualifier map.

getQualifierService

protected atg.commerce.pricing.Qualifier getQualifierService(atg.repository.RepositoryItem pPricingModel)
                                                      throws atg.commerce.pricing.PricingException
Get the qualifier from the pricing model. If none found use the default qualifier delivered by qualifierService

Parameters:
pPricingModel - pricing model repository item
Returns:
qualifier from the pricing model
Throws:
atg.commerce.pricing.PricingException - if unable to find qualifier for the given name

findQualifyingItems

protected java.util.Collection findQualifyingItems(java.util.List pPriceQuotes,
                                                   java.util.List pItems,
                                                   atg.repository.RepositoryItem pPricingModel,
                                                   atg.repository.RepositoryItem pProfile,
                                                   java.util.Locale pLocale,
                                                   atg.commerce.order.Order pOrder,
                                                   java.util.Map pExtraParameters)
                                            throws atg.commerce.pricing.PricingException
Overrides the original to retrieve the qualifier service from the pricing model's optional 'qualifier' property.

Overrides:
findQualifyingItems in class atg.commerce.pricing.ItemDiscountCalculator
Throws:
atg.commerce.pricing.PricingException