public class RetrievePricesCmdImpl extends com.ibm.commerce.command.BusinessPolicyCommandImpl implements RetrievePricesCmd
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 retrieving offers, it will return a list of qualified offers that can provide the offer prices.
If unsuccessful, it will 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:
StoreAccessBean
CatalogHelperAccessBean
CatalogEntryAccessBean
OfferAccessBean
ProductSetCeRelAccessBean
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_NAME
class name field
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName, NAME
Constructor and Description |
---|
RetrievePricesCmdImpl()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.Hashtable[] |
getItemOffers()
Returns all the qualified offers retrieved for each of the input items.
|
void |
performExecute()
Executes main business logic of the command.
|
void |
reset()
Prepare this command for re-execution.
|
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 |
setOutputProperties(TargetableCommand aCachedCommand)
Sets the output properties by copying results from a previously cached command.
|
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(com.ibm.commerce.datatype.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.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPolicyId, getRequestProperties, setPolicyId
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
getPolicyId, getRequestProperties, setPolicyId
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public static final java.lang.String CLASS_NAME
public static final java.lang.String COPYRIGHT
public java.util.Hashtable[] getItemOffers()
getItemOffers
in interface RetrievePricesCmd
public void performExecute() throws com.ibm.commerce.exception.ECException
performExecute
in interface com.ibm.commerce.command.ECCommand
performExecute
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException
public void reset()
reset
in class com.ibm.commerce.command.AbstractECTargetableCommand
public void setCatEntryIds(java.lang.Long[] aCatEntryIds)
setCatEntryIds
in interface RetrievePricesCmd
aCatEntryIds
- the catalog entry IDspublic void setCurrency(java.lang.String astrCurrency)
setCurrency
in interface RetrievePricesCmd
astrCurrency
- the currencypublic void setItemOffers(java.util.Hashtable[] aItemOffers)
aItemOffers
- the offers for itemspublic void setOfferIds(java.lang.Long[] aOfferIds)
setOfferIds
in interface RetrievePricesCmd
aOfferIds
- the input offer IDspublic void setOutputProperties(TargetableCommand aCachedCommand)
aCachedCommand
- the previously cached command.public void setPriceListIds(java.lang.Long[] aPriceListIds)
setPriceListIds
in interface RetrievePricesCmd
aPriceListIds
- the input price list IDspublic void setPSExclusionList(java.lang.Integer[] aPSExclusionList)
setPSExclusionList
in interface RetrievePricesCmd
aPSExclusionList
- the product set exclusion listpublic void setPSInclusionList(java.lang.Integer[] aPSInclusionList)
setPSInclusionList
in interface RetrievePricesCmd
aPSInclusionList
- the product set inclusion listspublic void setQuantities(QuantityAmount[] aQuantities)
setQuantities
in interface RetrievePricesCmd
aQuantities
- the quantities of the catentriespublic void setRequestProperties(com.ibm.commerce.datatype.TypedProperty requestProperties)
setRequestProperties
in interface com.ibm.commerce.command.BusinessPolicyCommand
setRequestProperties
in class com.ibm.commerce.command.BusinessPolicyCommandImpl
requestProperties
- the request properties for the policypublic void setStoreId(java.lang.Integer aStoreId)
setStoreId
in interface RetrievePricesCmd
aStoreId
- the store IDpublic void validateParameters() throws com.ibm.commerce.exception.ECException
validateParameters
in interface com.ibm.commerce.command.ECCommand
validateParameters
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException