|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.commerce.command.AbstractECCommand | +--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.
Field Summary | |
static java.lang.String |
COPYRIGHT
|
Fields inherited from class com.ibm.commerce.command.BusinessPolicyCommandImpl |
policyId, requestProperties |
Fields inherited from class com.ibm.commerce.command.AbstractECCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.price.commands.RetrievePricesCmd |
defaultCommandClassName, NAME |
Constructor Summary | |
RetrievePricesCmdImpl()
|
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. |
void |
performExecute()
Executes main business logic of the command. |
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.AbstractECCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, 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 |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Field Detail |
public static final java.lang.String COPYRIGHT
Constructor Detail |
public RetrievePricesCmdImpl()
Method Detail |
protected java.lang.String getCurrency()
public java.util.Hashtable[] getItemOffers()
getItemOffers
in interface RetrievePricesCmd
com.ibm.commerce.price.commands.RetrievePricesCmd
protected QuantityAmount getQuantityAmount(QuantityAmount aQuantity, java.lang.Long aCatEntryId) throws ECSystemException
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in class AbstractECCommand
com.ibm.commerce.command.ECCommand
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.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.
storeId
- The id of the store for search.
public void setCatEntryIds(java.lang.Long[] aCatEntryIds)
setCatEntryIds
in interface RetrievePricesCmd
com.ibm.commerce.price.commands.RetrievePricesCmd
aCatEntryIds
- The reference number of one or more catalog entries for
which the qualified offers are to be retrieved.public void setCurrency(java.lang.String astrCurrency)
setCurrency
in interface RetrievePricesCmd
com.ibm.commerce.price.commands.RetrievePricesCmd
astrCurrency
- The currency to look up the price.
If the currency is not specified then the "negotiated" currency is used for
the store Id and shopper's preferred currency. (The negotiated currency is
the currency returned from the getCurrency() method of the currency manager).public void setItemOffers(java.util.Hashtable[] aItemOffers)
public void setOfferIds(java.lang.Long[] aOfferIds)
setOfferIds
in interface RetrievePricesCmd
com.ibm.commerce.price.commands.RetrievePricesCmd
aOfferIds
- The reference number of one or more offers that are to be used
for determining the price. If no offer ids are supplied, then the "best" of
all qualifying offers will be used. Otherwise, the "best" of the specified
offers will be returned.public void setPriceListIds(java.lang.Long[] aPriceListIds)
setPriceListIds
in interface RetrievePricesCmd
com.ibm.commerce.price.commands.RetrievePricesCmd
aPriceListIds
- The reference number of one or more price lists that are
to be used for retrieving the offers.public void setPSExclusionList(java.lang.Integer[] aPSExclusionList)
setPSExclusionList
in interface RetrievePricesCmd
com.ibm.commerce.price.commands.RetrievePricesCmd
aPSExclusionList
- The list of product sets excluded from the trading agreements.public void setPSInclusionList(java.lang.Integer[] aPSInclusionList)
setPSInclusionList
in interface RetrievePricesCmd
com.ibm.commerce.price.commands.RetrievePricesCmd
aPSExclusionList
- The list of product sets included in the trading agreements.public void setQuantities(QuantityAmount[] aQuantities)
setQuantities
in interface RetrievePricesCmd
com.ibm.commerce.price.commands.RetrievePricesCmd
aQuantityAmount
- The quantity amount of the catalog entry.
The quantity amount helps determine which offers are valid. If the quantity
amount is not specified then the nominal quantity (rounded up to the nearest
multiple as specified in the quantityMultiple attribute) of the Catalog entry
is assumed to be the requested quantity.public void setRequestProperties(TypedProperty requestProperties)
setRequestProperties
in interface BusinessPolicyCommand
setRequestProperties
in class BusinessPolicyCommandImpl
requestProperties
- the request properties for the policypublic void setStoreId(java.lang.Integer aStoreId)
setStoreId
in interface RetrievePricesCmd
com.ibm.commerce.price.commands.RetrievePricesCmd
aStoreId
- The reference number of a store to be used for calculating the
price. If the store id is not specified then the store id of the command context
will be used.public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECCommand
com.ibm.commerce.command.ECCommand
ECException.
-
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |