public class ConfigurableItemPriceListCalculator extends ItemPriceCalculator
ItemPriceInfo
,
ConfigurableCommerceItem
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 |
---|
ConfigurableItemPriceListCalculator() |
Modifier and Type | Method and Description |
---|---|
double |
getConfigurableItemListPrice(ItemPriceInfo pPriceQuote,
CommerceItem pItem,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Get the list price of the parent item
|
double |
getConfigurableItemPrice(ItemPriceInfo pPriceQuote,
CommerceItem pItem,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Get the current working price of the parent item
|
double |
getConfigurableItemRawTotalPrice(ItemPriceInfo pPriceQuote,
CommerceItem pItem,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Get the raw total price of the parent item
|
double |
getConfigurableItemSalePrice(ItemPriceInfo pPriceQuote,
CommerceItem pItem,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Get the sale price of the parent item.
|
java.lang.String |
getListPricePropertyName()
the name of the property for the ListPrice
|
RepositoryItem |
getPriceList(ItemPriceInfo pPriceQuote,
CommerceItem pItem,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Gets the price list.
|
java.lang.String |
getProfilePriceListPropertyName()
The name of the property in the profile that stores the price list.
|
double |
getSubSkuPrice(CommerceItem pSubItem,
CommerceItem pParentItem,
RepositoryItem pPriceList,
RepositoryItem pPrice)
Get the current price for the given subsku
|
long |
getSubSkuQuantity(CommerceItem pSubItem)
Get the quantity for the given subsku.
|
double |
getSubSkuQuantityDerivedAsFloatingPoint(CommerceItem pSubItem)
Get the quantity for the given subsku.
|
double |
getSubSkuQuantityWithFraction(CommerceItem pSubItem)
Get the quantity (with fraction) for the given subsku.
|
boolean |
isNoPriceIsError()
If this is true, and the price list is null or there is not price in
the price list, then an error is thrown.
|
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.
|
protected void |
priceItem(ItemPriceInfo pPriceQuote,
ConfigurableCommerceItem pItem,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters,
RepositoryItem pPriceList)
Updates the list price of any configurable item within a tree by adding all of its sub sku prices.
|
void |
setListPricePropertyName(java.lang.String pListPricePropertyName)
the name of the property for the ListPrice
|
void |
setNoPriceIsError(boolean pNoPriceIsError)
If this is true, and the price list is null or there is not price in
the price list, then an error is thrown.
|
void |
setProfilePriceListPropertyName(java.lang.String pProfilePriceListPropertyName)
The name of the property in the profile that stores the price list.
|
getDifferentPriceList, getItemPriceSource, getLoggingIdentifier, getNoPriceCalculator, getPriceListManager, getPricingScheme, getPricingSchemeNames, getPricingSchemePropertyName, getPricingTools, isUseDefaultPriceList, populateItemPriceSource, priceEachItem, priceItems, setLoggingIdentifier, setNoPriceCalculator, setPriceListManager, setPricingSchemeNames, setPricingSchemePropertyName, setPricingTools, setUseDefaultPriceList, shouldConsumeSource
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
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public void setListPricePropertyName(java.lang.String pListPricePropertyName)
pListPricePropertyName
- new value to setpublic java.lang.String getListPricePropertyName()
public void setProfilePriceListPropertyName(java.lang.String pProfilePriceListPropertyName)
setProfilePriceListPropertyName
in class ItemPriceCalculator
pProfilePriceListPropertyName
- The new value to setpublic java.lang.String getProfilePriceListPropertyName()
getProfilePriceListPropertyName
in class ItemPriceCalculator
public void setNoPriceIsError(boolean pNoPriceIsError)
setNoPriceIsError
in class ItemPriceCalculator
pNoPriceIsError
- The new value to setpublic boolean isNoPriceIsError()
isNoPriceIsError
in class ItemPriceCalculator
public void priceItem(ItemPriceInfo pPriceQuote, CommerceItem pItem, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters) throws PricingException
profilePriceListPropertyName
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 PricingModelpLocale
- The user's localepProfile
- The user's profilepExtraParameters
- A Map of extra parameters to be used in the pricing, may be null.
You may override the price list in the profile by providing a price
list (or price list id) in this map. Use profilePriceListPropertyName
as the keyPricingException
ItemPriceCalculator.getItemPriceSource(ItemPriceInfo, CommerceItem, RepositoryItem, Locale, RepositoryItem, Map)
,
ItemPriceCalculator.shouldConsumeSource(ItemPriceSource)
protected void priceItem(ItemPriceInfo pPriceQuote, ConfigurableCommerceItem pItem, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters, RepositoryItem pPriceList) throws PricingException
Each subitem contributes a PricingAdjustment to the parent item's ItemPriceInfo and to all of its DetailedItemPriceInfos. The subitem also gets its own ItemPriceInfo, a DetailedItemPriceInfo, and a single PricingAdjustment on each. All of the PricingAdjustments contain the same information.
pPriceQuote
- ItemPriceInfo representing the current price quote for the item without sub skuspItem
- The parent 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 nullpPriceList
- The price list in which to look up pricesPricingException
- if there was a problem pricing the input pItempublic RepositoryItem getPriceList(ItemPriceInfo pPriceQuote, CommerceItem pItem, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters) throws PricingException
pPriceQuote
- ItemPriceInfo representing the current price quote for the itempItem
- The item to pricepPricingModel
- A RepositoryItem representing a PricingModelpLocale
- The user's localepProfile
- The user's profilepExtraParameters
- A Map of extra parameters to be used in the pricing, may be null.
You may override the price list in the profile by providing a price
list (or price list id) in this map. Use profilePriceListPropertyName
as the keyPricingException
public double getConfigurableItemPrice(ItemPriceInfo pPriceQuote, CommerceItem pItem, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters)
pPriceQuote
- ItemPriceInfo representing the current price quote for the itempItem
- The item to price (currently ignored)pPricingModel
- A RepositoryItem representing a PricingModel (currently ignored)pLocale
- The user's locale (currently ignored)pProfile
- The user's profile (currently ignored)pExtraParameters
- A Map of extra parameters to be used in the pricing, may be null (currently ignored)public double getConfigurableItemListPrice(ItemPriceInfo pPriceQuote, CommerceItem pItem, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters)
pPriceQuote
- ItemPriceInfo representing the current price quote for the itempItem
- The item to price (currently ignored)pPricingModel
- A RepositoryItem representing a PricingModel (currently ignored)pLocale
- The user's locale (currently ignored)pProfile
- The user's profile (currently ignored)pExtraParameters
- A Map of extra parameters to be used in the pricing, may be null (currently ignored)public double getConfigurableItemSalePrice(ItemPriceInfo pPriceQuote, CommerceItem pItem, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters)
onSale
then return the list price.pPriceQuote
- ItemPriceInfo representing the current price quote for the itempItem
- The item to price (currently ignored)pPricingModel
- A RepositoryItem representing a PricingModel (currently ignored)pLocale
- The locale of the user (currently ignored)pProfile
- The user's profile (currently ignored)pExtraParameters
- A Map of extra parameters to be used in the pricing, may be null (currently ignored)public double getConfigurableItemRawTotalPrice(ItemPriceInfo pPriceQuote, CommerceItem pItem, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters)
pPriceQuote
- ItemPriceInfo representing the current price quote for the itempItem
- The item to price (currently ignored)pPricingModel
- A RepositoryItem representing a PricingModel (currently ignored)pLocale
- The user's locale (currently ignored)pProfile
- The user's profile (currently ignored)pExtraParameters
- A Map of extra parameters to be used in the pricing, may be null (currently ignored)public double getSubSkuPrice(CommerceItem pSubItem, CommerceItem pParentItem, RepositoryItem pPriceList, RepositoryItem pPrice)
pSubItem
- The CommerceItem object for the sub skupParentItem
- The CommerceItem object for the parent skupPriceList
- The price list used to get the pricepPrice
- The price
repository item for the sub skulistPricePropertyName
public long getSubSkuQuantity(CommerceItem pSubItem)
pSubItem
- The CommerceItem object for the sub skupublic double getSubSkuQuantityWithFraction(CommerceItem pSubItem)
pSubItem
- The CommerceItem object for the sub skupublic double getSubSkuQuantityDerivedAsFloatingPoint(CommerceItem pSubItem)
If the subsku's quantity is fractional, then that value will be returned, otherwise a double representation of the subsku's quantity value.
pSubItem
- The CommerceItem object for the sub sku