|
|||||||||
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.priceLists.PriceListManager
public class PriceListManager
Helper class to ease creation and manipulation of PriceLists. It's main purpose is to retrieve a price for a given product/sku pair. Created: Thu Jan 29 10:50:58 2001
Field Summary | |
---|---|
static java.lang.String |
BASE_PRICE_LIST_PROPERTY_NAME
|
static int |
BULK_PRICE
|
static java.lang.String |
BULK_PRICE_STRING
|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
COMPLEX_PRICE_ITEM_TYPE
|
static java.lang.String |
COMPLEX_PRICE_LEVELS_PROPERTY_NAME
|
static java.lang.String |
COMPLEX_PRICE_PROPERTY_NAME
|
static java.lang.String |
LEVEL_PRICE_PROPERTY_NAME
|
static int |
LIST_PRICE
|
static java.lang.String |
LIST_PRICE_PROPERTY_NAME
|
static java.lang.String |
LIST_PRICE_STRING
|
static java.lang.String |
LOCALE_PROPERTY_NAME
|
static java.lang.String |
PARENT_SKU_ID_PROPERTY_NAME
|
static java.lang.String |
PRICE_ITEM_TYPE
|
static java.lang.String |
PRICE_LEVEL_ITEM_TYPE
|
static java.lang.String |
PRICE_LIST_ID_PROPERTY_NAME
|
static java.lang.String |
PRICE_LIST_ITEM_TYPE
|
static java.lang.String |
PRICE_LIST_PROPERTY_NAME
|
static java.lang.String |
PRICE_LIST_VIEW_NAME
|
static java.lang.String |
PRICE_VIEW_NAME
|
static java.lang.String |
PRICING_SCHEME_PROPERTY_NAME
|
static java.lang.String |
PRODUCT_ID_PROPERTY_NAME
|
static java.lang.String |
PROFILE_PRICE_LIST_PROPERTY_NAME
|
static java.lang.String |
QUANTITY_PROPERTY_NAME
|
static java.lang.String |
SALE_COMPLEX_PRICE_PROPERTY_NAME
Deprecated. This property is not used anymore |
static java.lang.String |
SALE_PRICE_PROPERTY_NAME
Deprecated. This property is not used anymore |
static java.lang.String |
SKU_ID_PROPERTY_NAME
|
static int |
TIERED_PRICE
|
static java.lang.String |
TIERED_PRICE_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 | |
---|---|
PriceListManager()
|
Method Summary | |
---|---|
RepositoryItem |
addPriceLevel(RepositoryItem pComplexPrice,
long pQuantity,
double pPrice)
add a price level to the given complex price This could be intelligent and squeeze this into the list based on the quantity, but should probably leave that to the user, and just place it at the end. |
RepositoryItem |
addPriceLevel(RepositoryItem pComplexPrice,
java.lang.Long pQuantity,
java.lang.Double pPrice)
add a price level to the given complex price This could be intelligent and squeeze this into the list based on the quantity, but should probably leave that to the user, and just place it at the end. |
RepositoryItem |
createComplexPrice()
Creates an empty complex price in the repository The complexPriceItemType is used. |
RepositoryItem |
createComplexPrice(java.util.List pQuantities,
java.util.List pLevelPrices)
Creates an empty complex price in the repository The complexPriceItemType is used. |
RepositoryItem |
createListPrice(RepositoryItem pPriceList,
java.lang.String pProductId,
java.lang.String pSkuId,
double pListPrice)
Create a price for the given product/sku pair with a list price and store it in the price list. |
RepositoryItem |
createPrice(RepositoryItem pPriceList,
java.lang.String pPricingScheme)
create a new price with the given pricing scheme The price isn't actually set |
RepositoryItem |
createPrice(RepositoryItem pPriceList,
java.lang.String pPricingScheme,
java.lang.String pProductId,
java.lang.String pSkuId)
Create a new price with the given pricing scheme. |
RepositoryItem |
createPriceList()
Creates a new price list in the priceListRepository The priceListItemType is used. |
RepositoryItem |
createPriceWithComplexPrice(RepositoryItem pPriceList,
java.lang.String pProductId,
java.lang.String pSkuId,
java.util.List pLevelQuantities,
java.util.List pLevelPrices,
java.lang.String pPricingScheme)
Create a price for the given product/sku pair with a complex price and store it in the price list. |
RepositoryItem |
createSubSkuPrice(RepositoryItem pPriceList,
java.lang.String pProductId,
java.lang.String pSkuId,
java.lang.String pParentSkuId,
double pListPrice)
Create a price for the given product/sku/parentSku set with a list price and store it in the price list. |
void |
doStartService()
GenericService override |
RepositoryItem[] |
getAllPrices(java.lang.String pPriceListId)
This will execute a query within a single priceList for all prices directly attached to this pricelist. |
java.util.List |
getAncestorPriceLists(RepositoryItem pPriceList)
Given a price list, this method will return all the ancestor price lists. |
java.lang.String |
getBasePriceListPropertyName()
The name of the property in priceList that contains the basePriceList |
RepositoryItem |
getComplexPrice(java.lang.String pComplexPriceId)
Get the repository item for the complex price with the given id |
java.lang.String |
getComplexPriceItemType()
The name of the item-descriptor useb for complex prices |
java.lang.String |
getComplexPriceLevelsPropertyName()
The name of the property in complex price that stores the list of levels |
java.lang.String |
getComplexPricePropertyName()
The name of the property in price that identifies the complex price |
RepositoryItem |
getDefaultPriceList()
The default price list |
java.lang.String |
getDefaultPriceListId()
The id of the default price list |
java.util.Collection |
getDescendantPriceLists(RepositoryItem pPriceList)
Given a price list, this method will return all the descendant price lists. |
java.util.Collection |
getFirstDescendantPriceLists(RepositoryItem pPriceList)
Given a price list, this method will return all the first level of descendant price lists. |
java.lang.String |
getLevelPricePropertyName()
The name of the property in price levels for storing the price |
java.lang.String |
getListPricePropertyName()
The name of the property in price that identifies the list price |
java.lang.String |
getParentSkuIdPropertyName()
The name of the property in price that identifies the sku id |
RepositoryItem |
getPrice(RepositoryItem pPriceList,
RepositoryItem pProduct,
RepositoryItem pSku)
According to the value of ignoreProductFirst calls
the various getPrice methods until a price is found or all the
methods have been tried. |
RepositoryItem |
getPrice(RepositoryItem pPriceList,
RepositoryItem pProduct,
RepositoryItem pSku,
boolean pUseCache)
According to the value of ignoreProductFirst calls
the various getPrice methods until a price is found or all the
methods have been tried. |
RepositoryItem |
getPrice(RepositoryItem pPriceList,
RepositoryItem pProduct,
RepositoryItem pSku,
RepositoryItem pParentSku)
According to the value of ignoreProductFirst calls
the various getPrice methods until a price is found or all the
methods have been tried. |
RepositoryItem |
getPrice(RepositoryItem pPriceList,
RepositoryItem pProduct,
RepositoryItem pSku,
RepositoryItem pParentSku,
boolean pUseCache)
According to the value of ignoreProductFirst calls
the various getPrice methods until a price is found or all the
methods have been tried. |
RepositoryItem |
getPrice(RepositoryItem pPriceList,
java.lang.String pProductId,
java.lang.String pSkuId)
According to the value of ignoreProductFirst calls
the various getPrice methods until a price is found or all the
methods have been tried. |
RepositoryItem |
getPrice(RepositoryItem pPriceList,
java.lang.String pProductId,
java.lang.String pSkuId,
boolean pUseCache)
According to the value of ignoreProductFirst calls
the various getPrice methods until a price is found or all the
methods have been tried. |
RepositoryItem |
getPrice(RepositoryItem pPriceList,
java.lang.String pProductId,
java.lang.String pSkuId,
java.lang.String pParentSkuId)
According to the value of ignoreProductFirst calls
the various getPrice methods until a price is found or all the
methods have been tried. |
RepositoryItem |
getPrice(RepositoryItem pPriceList,
java.lang.String pProductId,
java.lang.String pSkuId,
java.lang.String pParentSkuId,
boolean pUseCache)
According to the value of ignoreProductFirst calls
the various getPrice methods until a price is found or all the
methods have been tried. |
RepositoryItem |
getPrice(java.lang.String pPriceListId,
java.lang.String pProductId,
java.lang.String pSkuId)
According to the value of ignoreProductFirst calls
the various getPrice methods until a price is found or all the
methods have been tried. |
RepositoryItem |
getPrice(java.lang.String pPriceListId,
java.lang.String pProductId,
java.lang.String pSkuId,
boolean pUseCache)
According to the value of ignoreProductFirst calls
the various getPrice methods until a price is found or all the
methods have been tried. |
RepositoryItem |
getPrice(java.lang.String pPriceListId,
java.lang.String pProductId,
java.lang.String pSkuId,
java.lang.String pParentSkuId)
According to the value of ignoreProductFirst calls
the various getPrice methods until a price is found or all the
methods have been tried. |
RepositoryItem |
getPrice(java.lang.String pPriceListId,
java.lang.String pProductId,
java.lang.String pSkuId,
java.lang.String pParentSkuId,
boolean pUseCache)
According to the value of ignoreProductFirst calls
the various getPrice methods until a price is found or all the
methods have been tried. |
RepositoryItem |
getPriceAdmin(java.lang.String pPriceListId,
java.lang.String pProductId,
java.lang.String pSkuId,
java.lang.String pParentSkuId)
This method is similar to LookForPrice except that it will continue to look in the base price list if the price is not found. |
Cache |
getPriceCache()
This object caches price objects |
java.lang.String |
getPriceItemType()
The name of the item-descriptor used for prices |
java.lang.String |
getPriceLevelItemType()
The name of the item-descriptor used for price levels |
RepositoryItem |
getPriceList(RepositoryItem pProfile,
java.lang.String pProfilePropertyName)
Return the price list from the profile. |
RepositoryItem |
getPriceList(RepositoryItem pProfile,
java.lang.String pProfilePropertyName,
boolean pUseDefaultPriceList)
Return the price list from the profile. |
RepositoryItem |
getPriceList(java.lang.String pId)
Get the price list with the given id from the repository The priceListItemType is used as the item-descriptor name |
java.lang.String |
getPriceListIdPropertyName()
The name of the property in priceList that contains the Id of the priceList. |
java.lang.String |
getPriceListItemType()
The name of the item-descriptor used for price lists |
java.lang.String |
getPriceListPropertyName()
The name of the property in price that refers to the priceList |
MutableRepository |
getPriceListRepository()
The repository that contains all the price lists |
java.util.Collection |
getPriceLists()
Get all the price lists. |
java.lang.String |
getPriceListViewName()
The name of the view in the priceListRepository to use when searching for a price list |
java.lang.String |
getPriceViewName()
The name of the view in the priceListRepository to use when searching for a price |
java.lang.String |
getPricingSchemePropertyName()
The name of the property in price that identifies the pricing scheme |
java.lang.String |
getProductIdPropertyName()
The name of the property in price that identifies the product id |
RepositoryItem |
getProductPrice(RepositoryItem pPriceList,
java.lang.String pProductId)
Return the price repository item for the given product id in the given priceList. |
java.util.Collection |
getProductPrices(java.lang.String pPriceListId,
java.util.List pProductIds,
boolean pIncludeSkuPrices)
Return all the prices where the sku id is null, and the product id is in the given list, for the given priceList. |
java.util.Collection |
getProductPrices(java.lang.String pPriceListId,
java.util.List pProductIds,
boolean pIncludeSkuPrices,
boolean pUseCache)
Return all the prices where the sku id is null, and the product id is in the given list, for the given priceList. |
java.lang.String |
getQuantityPropertyName()
The name of the property in price levels for the quantity |
java.lang.String |
getSaleComplexPricePropertyName()
Deprecated. This property is not used anymore |
java.lang.String |
getSalePricePropertyName()
Deprecated. This property is not used anymore |
java.lang.String |
getSkuIdPropertyName()
The name of the property in price that identifies the sku id |
RepositoryItem |
getSkuPrice(RepositoryItem pPriceList,
java.lang.String pSkuId)
Return the price repository item for the given sku id in the given priceList. |
RepositoryItem |
getSkuPrice(RepositoryItem pPriceList,
java.lang.String pProductId,
java.lang.String pSkuId)
Return the price repository item for the given product id and sku id in the given priceList. |
RepositoryItem |
getSkuPrice(RepositoryItem pPriceList,
java.lang.String pProductId,
java.lang.String pSkuId,
java.lang.String pParentSkuId)
Return the price repository item for the given product id, sku id, and parent sku id in the given priceList. |
java.util.Collection |
getSkuPrices(java.lang.String pPriceListId,
java.util.List pSkuIds,
boolean pExpandConfigurableSkus)
Return all the prices where the sku id is in the given list. |
java.util.Collection |
getSkuPrices(java.lang.String pPriceListId,
java.util.List pSkuIds,
boolean pExpandConfigurableSkus,
boolean pUseCache)
Return all the prices where the sku id is in the given list. |
protected RepositoryItem |
getUncachedPrice(RepositoryItem pPriceList,
java.lang.String pProductId,
java.lang.String pSkuId,
java.lang.String pParentSkuId)
According to the value of ignoreProductFirst calls
the various getPrice methods until a price is found or all the
methods have been tried. |
protected RepositoryItem[] |
getUncachedProductPrices(java.lang.String pPriceListId,
java.util.List pProductIds,
boolean pIncludeSkuPrices)
This will execute a query within a single priceList for product prices. |
protected RepositoryItem[] |
getUncachedSkuPrices(java.lang.String pPriceListId,
java.util.List pSkuIds,
boolean pExpandConfigurableSkus)
This will execute a query within a single priceList for sku prices. |
boolean |
isAutomaticallyUseDefaultPriceList()
If this is true, and the profiles price list is null, then the default price list is automatically used The default is true |
boolean |
isIgnoreProductFirst()
This property controls the order that is used when looking for a price. |
boolean |
isItemInPriceList(java.lang.String pProductId,
java.lang.String pSkuId,
java.lang.String pPriceListId)
Determines if a product/sku can be priced using a specific price list. |
boolean |
isUseBasePriceList()
If this is true, then the basePriceList will automatically be searched if the requested price is not found in the current price list. |
boolean |
isUseCache()
If this is true, then the priceCache is used |
boolean |
isUseSkuOnly()
This property controls whether or not a price is searched for using the sku only. |
protected RepositoryItem |
lookForPrice(RepositoryItem pPriceList,
java.lang.String pProductId,
java.lang.String pSkuId,
java.lang.String pParentSkuId)
Build the query that searches the priceList for the price. |
void |
propertiesChanged(PropertiesChangedEvent pEvent)
Listen for changes to price items |
void |
setAutomaticallyUseDefaultPriceList(boolean pAutomaticallyUseDefaultPriceList)
|
void |
setBasePriceListPropertyName(java.lang.String pBasePriceListPropertyName)
|
void |
setComplexPriceItemType(java.lang.String pComplexPriceItemType)
|
void |
setComplexPriceLevelsPropertyName(java.lang.String pComplexPriceLevelsPropertyName)
|
void |
setComplexPricePropertyName(java.lang.String pComplexPricePropertyName)
|
void |
setDefaultPriceListId(java.lang.String pDefaultPriceListId)
|
void |
setIgnoreProductFirst(boolean pIgnoreProductFirst)
|
void |
setLevelPricePropertyName(java.lang.String pLevelPricePropertyName)
|
void |
setListPricePropertyName(java.lang.String pListPricePropertyName)
|
void |
setParentSkuIdPropertyName(java.lang.String pParentSkuIdPropertyName)
|
void |
setPriceCache(Cache pPriceCache)
|
void |
setPriceItemType(java.lang.String pPriceItemType)
|
void |
setPriceLevelItemType(java.lang.String pPriceLevelItemType)
|
void |
setPriceListIdPropertyName(java.lang.String pPriceListIdPropertyName)
|
void |
setPriceListItemType(java.lang.String pPriceListItemType)
|
void |
setPriceListPropertyName(java.lang.String pPriceListPropertyName)
|
void |
setPriceListRepository(MutableRepository pPriceListRepository)
|
void |
setPriceListViewName(java.lang.String pPriceListViewName)
|
void |
setPriceViewName(java.lang.String pPriceViewName)
|
void |
setPricingSchemePropertyName(java.lang.String pPricingSchemePropertyName)
|
void |
setProductIdPropertyName(java.lang.String pProductIdPropertyName)
|
void |
setQuantityPropertyName(java.lang.String pQuantityPropertyName)
|
void |
setSaleComplexPrice(MutableRepositoryItem pPrice,
java.util.List pLevelQuantities,
java.util.List pLevelPrices)
Deprecated. This method should not be used anymore. See the docs for instructions on implementing sales pricing |
void |
setSaleComplexPrice(MutableRepositoryItem pPrice,
RepositoryItem pComplexPrice)
Deprecated. This method should not be used anymore. See the docs for instructions on implementing sales pricing |
void |
setSaleComplexPricePropertyName(java.lang.String pSaleComplexPricePropertyName)
Deprecated. This property is not used anymore |
void |
setSaleListPrice(MutableRepositoryItem pPrice,
double pSalePrice)
Deprecated. This method should not be used anymore. See the docs for instructions on implementing sales pricing |
void |
setSalePricePropertyName(java.lang.String pSalePricePropertyName)
Deprecated. This property is not used anymore |
void |
setSaleSubSkuPrice(MutableRepositoryItem pPrice,
double pSalePrice)
Deprecated. This method should not be used anymore. See the docs for instructions on implementing sales pricing |
void |
setSkuIdPropertyName(java.lang.String pSkuIdPropertyName)
|
void |
setUseBasePriceList(boolean pUseBasePriceList)
|
void |
setUseCache(boolean pUseCache)
|
void |
setUseSkuOnly(boolean pUseSkuOnly)
|
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 final java.lang.String CLASS_VERSION
public static int LIST_PRICE
public static int BULK_PRICE
public static int TIERED_PRICE
public static java.lang.String LIST_PRICE_STRING
public static java.lang.String BULK_PRICE_STRING
public static java.lang.String TIERED_PRICE_STRING
public static java.lang.String PROFILE_PRICE_LIST_PROPERTY_NAME
public static java.lang.String PRICE_LIST_ITEM_TYPE
public static java.lang.String PRICE_ITEM_TYPE
public static java.lang.String COMPLEX_PRICE_ITEM_TYPE
public static java.lang.String PRICE_LEVEL_ITEM_TYPE
public static java.lang.String PRICE_LIST_ID_PROPERTY_NAME
public static java.lang.String BASE_PRICE_LIST_PROPERTY_NAME
public static java.lang.String PRICE_LIST_PROPERTY_NAME
public static java.lang.String PRICING_SCHEME_PROPERTY_NAME
public static java.lang.String PRODUCT_ID_PROPERTY_NAME
public static java.lang.String SKU_ID_PROPERTY_NAME
public static java.lang.String PARENT_SKU_ID_PROPERTY_NAME
public static java.lang.String LIST_PRICE_PROPERTY_NAME
public static java.lang.String COMPLEX_PRICE_PROPERTY_NAME
public static java.lang.String LOCALE_PROPERTY_NAME
public static java.lang.String SALE_PRICE_PROPERTY_NAME
public static java.lang.String SALE_COMPLEX_PRICE_PROPERTY_NAME
public static java.lang.String COMPLEX_PRICE_LEVELS_PROPERTY_NAME
public static java.lang.String QUANTITY_PROPERTY_NAME
public static java.lang.String LEVEL_PRICE_PROPERTY_NAME
public static java.lang.String PRICE_VIEW_NAME
public static java.lang.String PRICE_LIST_VIEW_NAME
Constructor Detail |
---|
public PriceListManager()
Method Detail |
---|
public void setPriceCache(Cache pPriceCache)
public Cache getPriceCache()
public void setUseCache(boolean pUseCache)
public boolean isUseCache()
public void setAutomaticallyUseDefaultPriceList(boolean pAutomaticallyUseDefaultPriceList)
public boolean isAutomaticallyUseDefaultPriceList()
public java.lang.String getDefaultPriceListId()
public void setDefaultPriceListId(java.lang.String pDefaultPriceListId)
public RepositoryItem getDefaultPriceList()
public void setPriceListRepository(MutableRepository pPriceListRepository)
public MutableRepository getPriceListRepository()
public void setPriceListItemType(java.lang.String pPriceListItemType)
public java.lang.String getPriceListItemType()
public void setPriceItemType(java.lang.String pPriceItemType)
public java.lang.String getPriceItemType()
public void setComplexPriceItemType(java.lang.String pComplexPriceItemType)
public java.lang.String getComplexPriceItemType()
public void setPriceLevelItemType(java.lang.String pPriceLevelItemType)
public java.lang.String getPriceLevelItemType()
public void setUseBasePriceList(boolean pUseBasePriceList)
public boolean isUseBasePriceList()
PriceListManager
to check the basePriceList.
The default is true.
public void setIgnoreProductFirst(boolean pIgnoreProductFirst)
public boolean isIgnoreProductFirst()
public void setUseSkuOnly(boolean pUseSkuOnly)
public boolean isUseSkuOnly()
public void setPriceListIdPropertyName(java.lang.String pPriceListIdPropertyName)
public java.lang.String getPriceListIdPropertyName()
public void setBasePriceListPropertyName(java.lang.String pBasePriceListPropertyName)
public java.lang.String getBasePriceListPropertyName()
public void setPriceListPropertyName(java.lang.String pPriceListPropertyName)
public java.lang.String getPriceListPropertyName()
public void setPricingSchemePropertyName(java.lang.String pPricingSchemePropertyName)
public java.lang.String getPricingSchemePropertyName()
public void setProductIdPropertyName(java.lang.String pProductIdPropertyName)
public java.lang.String getProductIdPropertyName()
public void setSkuIdPropertyName(java.lang.String pSkuIdPropertyName)
public java.lang.String getSkuIdPropertyName()
public void setParentSkuIdPropertyName(java.lang.String pParentSkuIdPropertyName)
public java.lang.String getParentSkuIdPropertyName()
public void setListPricePropertyName(java.lang.String pListPricePropertyName)
public java.lang.String getListPricePropertyName()
public void setComplexPricePropertyName(java.lang.String pComplexPricePropertyName)
public java.lang.String getComplexPricePropertyName()
public void setSalePricePropertyName(java.lang.String pSalePricePropertyName)
public java.lang.String getSalePricePropertyName()
public void setSaleComplexPricePropertyName(java.lang.String pSaleComplexPricePropertyName)
public java.lang.String getSaleComplexPricePropertyName()
public void setComplexPriceLevelsPropertyName(java.lang.String pComplexPriceLevelsPropertyName)
public java.lang.String getComplexPriceLevelsPropertyName()
public void setQuantityPropertyName(java.lang.String pQuantityPropertyName)
public java.lang.String getQuantityPropertyName()
public void setLevelPricePropertyName(java.lang.String pLevelPricePropertyName)
public java.lang.String getLevelPricePropertyName()
public void setPriceListViewName(java.lang.String pPriceListViewName)
public java.lang.String getPriceListViewName()
public void setPriceViewName(java.lang.String pPriceViewName)
public java.lang.String getPriceViewName()
public RepositoryItem createPriceList() throws PriceListException
PriceListException
public RepositoryItem getPriceList(RepositoryItem pProfile, java.lang.String pProfilePropertyName) throws PriceListException
automaticallyUseDefaultPriceList
is true, then return the
default price list.
pProfile
- the profile to usepProfilePropertyName
- The name of the property in the profile that contains the price list
PriceListException
public RepositoryItem getPriceList(RepositoryItem pProfile, java.lang.String pProfilePropertyName, boolean pUseDefaultPriceList) throws PriceListException
pProfile
- the profile to usepProfilePropertyName
- The name of the property in the profile that contains the price listpUseDefaultPriceList
- If true, use the default price list, if the profile contains null.
PriceListException
public java.util.Collection getPriceLists() throws PriceListException
PriceListException
public RepositoryItem getPriceList(java.lang.String pId) throws PriceListException
pId
- the id of the price list
PriceListException
public RepositoryItem createPrice(RepositoryItem pPriceList, java.lang.String pPricingScheme) throws PriceListException
pPriceList
- The price lists containing this price.pPricingScheme
- the type of price (LIST_PRICE_STRING, BULK_PRICE_STRING, or TIERED_PRICE_STRING)
PriceListException
public RepositoryItem createPrice(RepositoryItem pPriceList, java.lang.String pPricingScheme, java.lang.String pProductId, java.lang.String pSkuId) throws PriceListException
pPriceList
- The price list containing this price.pProductId
- The product id that this price applies topSkuId
- The sku id that this price applies topPricingScheme
- the type of price (LIST_PRICE_STRING, BULK_PRICE_STRING, or TIERED_PRICE_STRING)
PriceListException
public RepositoryItem createListPrice(RepositoryItem pPriceList, java.lang.String pProductId, java.lang.String pSkuId, double pListPrice) throws PriceListException
pPriceList
- The price list containing this pricepProductId
- The product id that this price applies topSkuId
- The sku id that this price applies topListPrice
- The list price
PriceListException
public RepositoryItem createSubSkuPrice(RepositoryItem pPriceList, java.lang.String pProductId, java.lang.String pSkuId, java.lang.String pParentSkuId, double pListPrice) throws PriceListException
pPriceList
- The price list containing this pricepProductId
- The product id that this price applies topSkuId
- The sku id that this price applies topParentSkuId
- The sku id of the parent item that this price applies topListPrice
- The list price
PriceListException
public RepositoryItem createPriceWithComplexPrice(RepositoryItem pPriceList, java.lang.String pProductId, java.lang.String pSkuId, java.util.List pLevelQuantities, java.util.List pLevelPrices, java.lang.String pPricingScheme) throws PriceListException
pPriceList
- The price list containing this price.pProductId
- The product id that this price applies topSkuId
- The sku id that this price applies topLevelQuantities
- An array with the list of quantities for each level.pLevelPrices
- An array of the same length as
pLevelQuantities with the list of prices for each level.pPricingScheme
- the type of price (LIST_PRICE_STRING, BULK_PRICE_STRING, or TIERED_PRICE_STRING)
PriceListException
- if pPricingScheme is not bulk or tieredpublic RepositoryItem createComplexPrice() throws PriceListException
PriceListException
public RepositoryItem createComplexPrice(java.util.List pQuantities, java.util.List pLevelPrices) throws PriceListException
pQuantities
- The list of quantities for each levelpLevelPrice
- The list of prices for each level
PriceListException
public void setSaleListPrice(MutableRepositoryItem pPrice, double pSalePrice) throws PriceListException
pPrice
- the price repository itempSalePrice
- The sale price
PriceListException
public void setSaleSubSkuPrice(MutableRepositoryItem pPrice, double pSalePrice) throws PriceListException
pPrice
- the price repository itempSalePrice
- The sale price
PriceListException
public void setSaleComplexPrice(MutableRepositoryItem pPrice, RepositoryItem pComplexPrice) throws PriceListException
pPrice
- the price repository itempComplexPrice
- The sale complex price
PriceListException
public void setSaleComplexPrice(MutableRepositoryItem pPrice, java.util.List pLevelQuantities, java.util.List pLevelPrices) throws PriceListException
pPrice
- the price repository itempLevelQuantities
- the quantities for each of the levels in the complex pricepLevelPrices
- the prices for each of the levels in the complex pricepSalePrice
- The sale price
PriceListException
public RepositoryItem addPriceLevel(RepositoryItem pComplexPrice, long pQuantity, double pPrice) throws PriceListException
pComplexPrice
- The repository item to add the level topQuantity
- the quantity for the levelpPrice
- the price of the level
PriceListException
public RepositoryItem addPriceLevel(RepositoryItem pComplexPrice, java.lang.Long pQuantity, java.lang.Double pPrice) throws PriceListException
pComplexPrice
- The repository item to add the level topQuantity
- the quantity for the levelpPrice
- the price of the level
PriceListException
public RepositoryItem getPrice(java.lang.String pPriceListId, java.lang.String pProductId, java.lang.String pSkuId) throws PriceListException
ignoreProductFirst
calls
the various getPrice methods until a price is found or all the
methods have been tried. If useBasePriceList
is
true then the basePriceList is searched if a price is not found
in the current priceList.
pPriceListId
- The if of the priceList to look inpProductId
- The id of the product we are interested in. Can be nullpSkuId
- The id of the sku we are interested in. Can be null.
PriceListException
public RepositoryItem getPrice(java.lang.String pPriceListId, java.lang.String pProductId, java.lang.String pSkuId, boolean pUseCache) throws PriceListException
ignoreProductFirst
calls
the various getPrice methods until a price is found or all the
methods have been tried. If useBasePriceList
is
true then the basePriceList is searched if a price is not found
in the current priceList.
pPriceListId
- The if of the priceList to look inpProductId
- The id of the product we are interested in. Can be nullpSkuId
- The id of the sku we are interested in. Can be null.pUseCache
- If this is true, get the cached value.
PriceListException
public RepositoryItem getPrice(java.lang.String pPriceListId, java.lang.String pProductId, java.lang.String pSkuId, java.lang.String pParentSkuId) throws PriceListException
ignoreProductFirst
calls
the various getPrice methods until a price is found or all the
methods have been tried. If useBasePriceList
is
true then the basePriceList is searched if a price is not found
in the current priceList.
pPriceListId
- The if of the priceList to look inpProductId
- The id of the product we are interested in. Can be nullpSkuId
- The id of the sku we are interested in. Can be null.pParentSkuId
- The id of the parent sku we are interested in. Can be null.
PriceListException
public RepositoryItem getPrice(java.lang.String pPriceListId, java.lang.String pProductId, java.lang.String pSkuId, java.lang.String pParentSkuId, boolean pUseCache) throws PriceListException
ignoreProductFirst
calls
the various getPrice methods until a price is found or all the
methods have been tried. If useBasePriceList
is
true then the basePriceList is searched if a price is not found
in the current priceList.
pPriceListId
- The if of the priceList to look inpProductId
- The id of the product we are interested in. Can be nullpSkuId
- The id of the sku we are interested in. Can be null.pParentSkuId
- The id of the parent sku we are interested in. Can be null.pUseCache
- If this is true, get the cached value.
PriceListException
public RepositoryItem getPrice(RepositoryItem pPriceList, RepositoryItem pProduct, RepositoryItem pSku) throws PriceListException
ignoreProductFirst
calls
the various getPrice methods until a price is found or all the
methods have been tried. If useBasePriceList
is
true then the basePriceList is searched if a price is not found
in the current priceList.
pPriceList
- The priceList to look inpProduct
- The product we are interested in. Can be nullpSku
- The sku we are interested in. Can be null.
PriceListException
public RepositoryItem getPrice(RepositoryItem pPriceList, RepositoryItem pProduct, RepositoryItem pSku, boolean pUseCache) throws PriceListException
ignoreProductFirst
calls
the various getPrice methods until a price is found or all the
methods have been tried. If useBasePriceList
is
true then the basePriceList is searched if a price is not found
in the current priceList.
pPriceList
- The priceList to look inpProduct
- The product we are interested in. Can be nullpSku
- The sku we are interested in. Can be null.pUseCache
- If this is true, get the cached value.
PriceListException
public RepositoryItem getPrice(RepositoryItem pPriceList, RepositoryItem pProduct, RepositoryItem pSku, RepositoryItem pParentSku) throws PriceListException
ignoreProductFirst
calls
the various getPrice methods until a price is found or all the
methods have been tried. If useBasePriceList
is
true then the basePriceList is searched if a price is not found
in the current priceList.
pPriceList
- The priceList to look inpProduct
- The product we are interested in. Can be nullpSku
- The sku we are interested in. Can be null.pParentSku
- The sku of the parent we are interested in. Can be null.
PriceListException
public RepositoryItem getPrice(RepositoryItem pPriceList, RepositoryItem pProduct, RepositoryItem pSku, RepositoryItem pParentSku, boolean pUseCache) throws PriceListException
ignoreProductFirst
calls
the various getPrice methods until a price is found or all the
methods have been tried. If useBasePriceList
is
true then the basePriceList is searched if a price is not found
in the current priceList.
pPriceList
- The priceList to look inpProduct
- The product we are interested in. Can be nullpSku
- The sku we are interested in. Can be null.pParentSku
- The sku of the parent we are interested in. Can be null.pUseCache
- If this is true, get the cached value.
PriceListException
public RepositoryItem getPrice(RepositoryItem pPriceList, java.lang.String pProductId, java.lang.String pSkuId) throws PriceListException
ignoreProductFirst
calls
the various getPrice methods until a price is found or all the
methods have been tried. If useBasePriceList
is
true then the basePriceList is searched if a price is not found
in the current priceList.
pPriceList
- The priceList to look inpProductId
- The id of the product we are interested in. Can be nullpSkuId
- The id of the sku we are interested in. Can be null.
PriceListException
public RepositoryItem getPrice(RepositoryItem pPriceList, java.lang.String pProductId, java.lang.String pSkuId, boolean pUseCache) throws PriceListException
ignoreProductFirst
calls
the various getPrice methods until a price is found or all the
methods have been tried. If useBasePriceList
is
true then the basePriceList is searched if a price is not found
in the current priceList.
pPriceList
- The priceList to look inpProductId
- The id of the product we are interested in. Can be nullpSkuId
- The id of the sku we are interested in. Can be null.pUseCache
- If this is true, get the cached value.
PriceListException
public RepositoryItem getPrice(RepositoryItem pPriceList, java.lang.String pProductId, java.lang.String pSkuId, java.lang.String pParentSkuId) throws PriceListException
ignoreProductFirst
calls
the various getPrice methods until a price is found or all the
methods have been tried. If useBasePriceList
is
true then the basePriceList is searched if a price is not found
in the current priceList.
pPriceList
- The priceList to look inpProductId
- The id of the product we are interested in. Can be nullpSkuId
- The id of the sku we are interested in. Can be null.pParentSku
- The sku of the parent we are interested in.
PriceListException
public RepositoryItem getPrice(RepositoryItem pPriceList, java.lang.String pProductId, java.lang.String pSkuId, java.lang.String pParentSkuId, boolean pUseCache) throws PriceListException
ignoreProductFirst
calls
the various getPrice methods until a price is found or all the
methods have been tried. If useBasePriceList
is
true then the basePriceList is searched if a price is not found
in the current priceList.
pPriceList
- The priceList to look inpProductId
- The id of the product we are interested in. Can be nullpSkuId
- The id of the sku we are interested in. Can be null.pParentSku
- The sku of the parent we are interested in.pUseCache
- If this is true, get the cached value.
PriceListException
protected RepositoryItem getUncachedPrice(RepositoryItem pPriceList, java.lang.String pProductId, java.lang.String pSkuId, java.lang.String pParentSkuId) throws PriceListException
ignoreProductFirst
calls
the various getPrice methods until a price is found or all the
methods have been tried. If useBasePriceList
is
true then the basePriceList is searched if a price is not found
in the current priceList.
pPriceList
- The priceList to look inpProductId
- The id of the product we are interested in. Can be nullpSkuId
- The id of the sku we are interested in. Can be null.pParentSku
- The sku of the parent we are interested in.
PriceListException
lookForPrice(atg.repository.RepositoryItem, java.lang.String, java.lang.String, java.lang.String)
public RepositoryItem getSkuPrice(RepositoryItem pPriceList, java.lang.String pSkuId) throws PriceListException
pPriceList
- The priceList to search inpSkuId
- The sku id to search for
PriceListException
public RepositoryItem getSkuPrice(RepositoryItem pPriceList, java.lang.String pProductId, java.lang.String pSkuId) throws PriceListException
pPriceList
- The priceList to search inpProductId
- The product id to search forpSkuId
- The sku id to search for
PriceListException
public RepositoryItem getProductPrice(RepositoryItem pPriceList, java.lang.String pProductId) throws PriceListException
pPriceList
- The priceList to search inpProductId
- The product id to search for
PriceListException
public RepositoryItem getSkuPrice(RepositoryItem pPriceList, java.lang.String pProductId, java.lang.String pSkuId, java.lang.String pParentSkuId) throws PriceListException
pPriceList
- The priceList to search inpProductId
- The product id to search forpSkuId
- The sku id to search forpParentSkuId
- The parent sku id to search for
PriceListException
protected RepositoryItem lookForPrice(RepositoryItem pPriceList, java.lang.String pProductId, java.lang.String pSkuId, java.lang.String pParentSkuId) throws PriceListException
pPriceList
- The pricelist to search inpProductId
- The product value to use. May be nullpSkuId
- The sku value to use. May be nullpParentSkuId
- The parent sku value to use. May be null
PriceListException
public RepositoryItem getComplexPrice(java.lang.String pComplexPriceId) throws PriceListException
PriceListException
public java.util.Collection getProductPrices(java.lang.String pPriceListId, java.util.List pProductIds, boolean pIncludeSkuPrices) throws PriceListException
pPriceListId
- The priceList whose prices will be returnedpProductIds
- The list of product ids whose prices are returnedpIncudeSkuPrices
- If false, then only prices with a null skuId are returned
PriceListException
public java.util.Collection getProductPrices(java.lang.String pPriceListId, java.util.List pProductIds, boolean pIncludeSkuPrices, boolean pUseCache) throws PriceListException
pPriceListId
- The priceList whose prices will be returnedpProductIds
- The list of product ids whose prices are returnedpIncudeSkuPrices
- If false, then only prices with a null skuId are returnedpUseCache
- If this is true, get the cached value.
PriceListException
public RepositoryItem getPriceAdmin(java.lang.String pPriceListId, java.lang.String pProductId, java.lang.String pSkuId, java.lang.String pParentSkuId) throws PriceListException
pPriceListId
- The priceList whose price will be returned (or its base price)pProductId
- The product id whose price is returnedpSkuId
- The sku id whose price is returnedpParentSkuId
- The parent sku id for the price returned.
PriceListException
protected RepositoryItem[] getUncachedProductPrices(java.lang.String pPriceListId, java.util.List pProductIds, boolean pIncludeSkuPrices) throws PriceListException
pIncludeSkuPrices
is false then the sku of each
price will be null.
pPriceListId
- The priceList whose prices will be returnedpProductIds
- The list of product ids whose prices are returnedpIncudeSkuPrices
- If false, then only prices with a null skuId are returned
PriceListException
public java.util.Collection getSkuPrices(java.lang.String pPriceListId, java.util.List pSkuIds, boolean pExpandConfigurableSkus) throws PriceListException
pPriceListId
- The priceList whose prices will be returnedpSkuIds
- The list of sku ids whose prices are returnedpExpandConfigurableSkus
- If true, then prices with a parent sku in the list are also returned
PriceListException
public java.util.Collection getSkuPrices(java.lang.String pPriceListId, java.util.List pSkuIds, boolean pExpandConfigurableSkus, boolean pUseCache) throws PriceListException
pPriceListId
- The priceList whose prices will be returnedpSkuIds
- The list of sku ids whose prices are returnedpExpandConfigurableSkus
- If true, then prices with a parent sku in the list are also returnedpUseCache
- If this is true, get the cached value.
PriceListException
protected RepositoryItem[] getUncachedSkuPrices(java.lang.String pPriceListId, java.util.List pSkuIds, boolean pExpandConfigurableSkus) throws PriceListException
pExpandConfigurableSkus
is true then
prices where the parentSkuId is in the list will also be returned. Only prices with
a null product id are returned.
pPriceListId
- The priceList whose prices will be returnedpSkuIds
- The list of sku ids whose prices are returnedpExpandConfigurableSkus
- If true, then prices with a parent sku in the list are also returned
PriceListException
public RepositoryItem[] getAllPrices(java.lang.String pPriceListId) throws PriceListException
pPriceListId
- The priceList whose prices will be returned
PriceListException
public java.util.Collection getDescendantPriceLists(RepositoryItem pPriceList) throws PriceListException
pPriceList
- The priceList whose descendants will be returned
PriceListException
public java.util.Collection getFirstDescendantPriceLists(RepositoryItem pPriceList) throws PriceListException
pPriceList
- The priceList whose descendants will be returned
PriceListException
public java.util.List getAncestorPriceLists(RepositoryItem pPriceList) throws PriceListException
pPriceList
- The priceList whose ancestors will be returned
PriceListException
public void propertiesChanged(PropertiesChangedEvent pEvent)
propertiesChanged
in interface PropertiesChangedListener
public void doStartService() throws ServiceException
doStartService
in class GenericService
ServiceException
- if the Service had a problem starting uppublic boolean isItemInPriceList(java.lang.String pProductId, java.lang.String pSkuId, java.lang.String pPriceListId)
pProductId
- pSkuId
- pPriceListId
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |