java.lang.ObjectCacheableCommandImpl
com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.command.TaskCommandImpl
com.ibm.commerce.command.BusinessPolicyCommandImpl
com.ibm.commerce.price.commands.RetrievePricesCmdImpl
This RetrievePricesCmd Task Command Implementation retrieves all the qualified offers for one or more catalog entries from the price lists which are referenced by the entitled contracts.
If the command is successful in retreiving offers, it will return a list of qualified offers that can provide the offer prices.
If unsuccessful, it wil return an empty list.
Behaviour
Obtain all the qualified offers for each catalog entries, each offer to be retrieved to find the price of a catalog entry must satisfy certain criteria.
If no valid offer can be found, the parent product offers will be searched providing the catalog entry and the parent product is not excluded from the trading agreements.
This command calls the following TaskCommands:
This command uses the following AccessBeans:Field Summary | |
static java.lang.String | CLASS_NAME class name field |
static java.lang.String | COPYRIGHT IBM copyright notice field. |
Fields inherited from class com.ibm.commerce.command.BusinessPolicyCommandImpl |
policyId, requestProperties |
Fields inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.price.commands.RetrievePricesCmd |
defaultCommandClassName, NAME |
Fields inherited from interface com.ibm.commerce.command.ECCommand |
defaultCommandClassName |
Constructor Summary | |
RetrievePricesCmdImpl() Constructor. |
Method Summary | |
protected java.lang.String | getCurrency() Returns the currency to be used for the price. |
java.util.Hashtable[] | getItemOffers() Returns all the qualified offers retrieved for each of the input items. |
protected QuantityAmount | getQuantityAmount(QuantityAmount aQuantity, java.lang.Long aCatEntryId) Returns the quantity amount of the input catalog entry for price. |
protected boolean | isValidOffer(OfferAccessBean aOfferAB, QuantityAmount aQuantity) Verifies if the offer is valid given the requested quantity amount. |
void | performExecute() Executes main business logic of the command. |
void | reset() This method should be called after a command has been executed to reset its states variables. |
protected java.util.Hashtable[] | retrieveOffersForCatentries(java.lang.Integer storeId) Obtains all the qualified offers for the input catalog entries and their parent products. |
void | setCatEntryIds(java.lang.Long[] aCatEntryIds) Sets the ids of the input catentries whose prices are to be calculated. |
void | setCurrency(java.lang.String astrCurrency) Sets the currency to be used for finding the price (Optional). |
void | setItemOffers(java.util.Hashtable[] aItemOffers) Sets the qualified offers retrieved for each of the items. |
void | setOfferIds(java.lang.Long[] aOfferIds) Sets the ids of the input offers to be used for retrieving the offer prices (Optional). |
void | setPriceListIds(java.lang.Long[] aPriceListIds) Sets the ids of the input price lists to be used for retrieving the offers. |
void | setPSExclusionList(java.lang.Integer[] aPSExclusionList) Sets the list of product sets excluded from the trading agreements. |
void | setPSInclusionList(java.lang.Integer[] aPSInclusionList) Sets the list of product sets included in the trading agreements. |
void | setQuantities(QuantityAmount[] aQuantities) Sets the quantities of the catentries to be used for calculating the prices. |
void | setRequestProperties(TypedProperty requestProperties) Sets the request properties for the policy. |
void | setStoreId(java.lang.Integer aStoreId) Sets the id of the input store to be used for calculating the price (Optional). |
void | validateParameters() Checks mandatory parameters. |
Methods inherited from class com.ibm.commerce.command.BusinessPolicyCommandImpl |
getPolicyId, getRequestProperties, setPolicyId |
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.commerce.command.BusinessPolicyCommand |
getPolicyId, getRequestProperties, setPolicyId |
Field Detail |
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASS_NAME
Constructor Detail |
public RetrievePricesCmdImpl()
Method Detail |
protected java.lang.String getCurrency()
public java.util.Hashtable[] getItemOffers()
protected QuantityAmount getQuantityAmount(QuantityAmount aQuantity, java.lang.Long aCatEntryId) throws ECSystemException
protected boolean isValidOffer(OfferAccessBean aOfferAB, QuantityAmount aQuantity) throws ECException
public void performExecute() throws ECException
public void reset()
protected java.util.Hashtable[] retrieveOffersForCatentries(java.lang.Integer storeId) throws ECException
The inclusion and exclusion product sets are taken into account when searching the offers.
public void setCatEntryIds(java.lang.Long[] aCatEntryIds)
public void setCurrency(java.lang.String astrCurrency)
public void setItemOffers(java.util.Hashtable[] aItemOffers)
public void setOfferIds(java.lang.Long[] aOfferIds)
public void setPriceListIds(java.lang.Long[] aPriceListIds)
public void setPSExclusionList(java.lang.Integer[] aPSExclusionList)
public void setPSInclusionList(java.lang.Integer[] aPSInclusionList)
public void setQuantities(QuantityAmount[] aQuantities)
public void setRequestProperties(TypedProperty requestProperties)
public void setStoreId(java.lang.Integer aStoreId)
public void validateParameters() throws ECException
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.