public class ConfigurableItemPriceCalculator extends ItemPriceCalculator
ItemPriceInfo
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
ConfigurableItemPriceCalculator() |
Modifier and Type | Method and Description |
---|---|
void |
clearConfigItemSubSkuMap()
Clear the configItemSubSkuMap.
|
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
|
getItemPriceSource, getLoggingIdentifier, getPrice, getPricePropertyName, getPriceSource, getPriceSource, isPriceFromCatalogRef, isRequirePriceValue, populateItemPriceSource, priceEachItem, priceItems, setLoggingIdentifier, setPriceFromCatalogRef, setPricePropertyName, setRequirePriceValue, shouldConsumeSource
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
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
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()
public void clearConfigItemSubSkuMap()
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 nullPricingException
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 nullPricingException
- 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