|
|||||||||
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.ItemPriceCalculator atg.commerce.pricing.ConfigurableItemPriceCalculator
public class ConfigurableItemPriceCalculator
A calculator which calculates the list price of a configurable item and sets the itemPriceInfo to be that amount. This will set the list price with the prices of the subskus that the configurable item is configured with. If the configurable item is on sale then the sale price will also be modified.
ItemPriceInfo
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 | |
---|---|
ConfigurableItemPriceCalculator()
|
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. |
java.util.Map |
getConfigItemSubSkuMap()
Returns property configItemSubSkuMap |
java.lang.String |
getConfigurablePropertiesPropertyName()
Returns property ConfigurablePropertiesPropertyName |
java.lang.String |
getConfigurationOptionSkuPropertyName()
Returns property ConfigurationOptionSkuPropertyName |
java.lang.String |
getConfigurationOptionsPricePropertyName()
Returns property configurationOptionsPricePropertyName |
java.lang.String |
getConfigurationOptionsPropertyName()
Returns property ConfigurationOptionsPropertyName |
java.lang.String |
getOnSalePropertyName()
Returns property OnSalePropertyName |
PricingTools |
getPricingTools()
pricing tools to help with price calculation |
protected double |
getSalePrice(java.lang.Object pPriceSource)
|
java.lang.String |
getSalePricePropertyName()
Returns property salePricePropertyName |
protected boolean |
onSale(java.lang.Object pPriceSource)
Returns true if the commerce item to be priced is on sale |
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 or sale price with the given price in addition to the sum of the sub sku prices. |
void |
priceItem(ItemPriceInfo pPriceQuote,
CommerceItem pItem,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Price a single item in a context |
void |
setConfigurablePropertiesPropertyName(java.lang.String pConfigurablePropertiesPropertyName)
Sets property ConfigurablePropertiesPropertyName |
void |
setConfigurationOptionSkuPropertyName(java.lang.String pConfigurationOptionSkuPropertyName)
Sets property ConfigurationOptionSkuPropertyName |
void |
setConfigurationOptionsPricePropertyName(java.lang.String pConfigurationOptionsPricePropertyName)
Sets property configurationOptionsPricePropertyName |
void |
setConfigurationOptionsPropertyName(java.lang.String pConfigurationOptionsPropertyName)
Sets property ConfigurationOptionsPropertyName |
void |
setOnSalePropertyName(java.lang.String pOnSalePropertyName)
Sets property OnSalePropertyName |
void |
setPricingTools(PricingTools pPricingTools)
pricing tools to help with price calculation |
void |
setSalePricePropertyName(java.lang.String pSalePricePropertyName)
Sets property salePricePropertyName |
Methods inherited from class atg.commerce.pricing.ItemPriceCalculator |
---|
getItemPriceSource, getLoggingIdentifier, getPrice, getPricePropertyName, getPriceSource, getPriceSource, isPriceFromCatalogRef, isRequirePriceValue, populateItemPriceSource, priceEachItem, priceItems, setLoggingIdentifier, setPriceFromCatalogRef, setPricePropertyName, setRequirePriceValue, shouldConsumeSource |
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 |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public ConfigurableItemPriceCalculator()
Method Detail |
---|
public void setPricingTools(PricingTools pPricingTools)
setPricingTools
in class ItemPriceCalculator
pPricingTools
- new value to setpublic PricingTools getPricingTools()
getPricingTools
in class ItemPriceCalculator
public java.lang.String getSalePricePropertyName()
public void setSalePricePropertyName(java.lang.String pSalePricePropertyName)
pSalePricePropertyName
- the value to set for property salePricePropertyNamepublic void setOnSalePropertyName(java.lang.String pOnSalePropertyName)
public java.lang.String getOnSalePropertyName()
public java.lang.String getConfigurationOptionsPricePropertyName()
public void setConfigurationOptionsPricePropertyName(java.lang.String pConfigurationOptionsPricePropertyName)
pConfigurationOptionsPricePropertyName
- the value to set for property configurationOptionsPricePropertyNamepublic java.lang.String getConfigurablePropertiesPropertyName()
public void setConfigurablePropertiesPropertyName(java.lang.String pConfigurablePropertiesPropertyName)
pConfigurablePropertiesPropertyName
- the value to set for property ConfigurablePropertiesPropertyNamepublic java.lang.String getConfigurationOptionsPropertyName()
public void setConfigurationOptionsPropertyName(java.lang.String pConfigurationOptionsPropertyName)
pConfigurationOptionsPropertyName
- the value to set for property ConfigurationOptionsPropertyNamepublic java.lang.String getConfigurationOptionSkuPropertyName()
public void setConfigurationOptionSkuPropertyName(java.lang.String pConfigurationOptionSkuPropertyName)
pConfigurationOptionSkuPropertyName
- the value to set for property ConfigurationOptionSkuPropertyNamepublic java.util.Map getConfigItemSubSkuMap()
protected double getSalePrice(java.lang.Object pPriceSource) throws PricingException
PricingException
public void priceItem(ItemPriceInfo pPriceQuote, CommerceItem pItem, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters) throws PricingException
priceItem
in interface ItemPricingCalculator
priceItem
in class ItemPriceCalculator
pPriceQuote
- ItemPriceInfo representing the current price quote for the itempItem
- The item to pricepPricingModel
- A RepositoryItem representing a PricingModelpProfile
- The user's profilepExtraParameters
- A Map of extra parameters to be used in the pricing, may be null
PricingException
ItemPriceCalculator.getPriceSource(ItemPriceInfo, CommerceItem, RepositoryItem, Locale, RepositoryItem, Map)
protected void priceItem(double pPrice, ItemPriceInfo pPriceQuote, CommerceItem pItem, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters) throws PricingException
priceItem
in class ItemPriceCalculator
pPrice
- the price as extracted from the itempPriceQuote
- ItemPriceInfo representing the current price quote for the itempItem
- The item to pricepPricingModel
- A RepositoryItem representing a PricingModelpLocale
- the locale in which this item should be pricedpProfile
- The user's profilepExtraParameters
- A Map of extra parameters to be used in the pricing, may be null
PricingException
- if there was a problem pricing the input pItemprotected boolean onSale(java.lang.Object pPriceSource) throws PricingException
PricingException
public void doStartService() throws ServiceException
GenericService
doStartService
in class GenericService
ServiceException
- if the Service had a problem starting up
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |