public class SelectContractPricesCmdImpl extends com.ibm.commerce.command.TaskCommandImpl implements SelectContractPricesCmd
SelectContractPricesCmd Task Command Implementation
selects the best offer among all the qualified offers for the input catalog
entry.
If the command is successful retrieving the price, it will return the best price, the offer id and access bean. And it will return the T&C id and the trading agreement id that determined the price.
If unsuccessful, the command throws the ECApplicationException specifying an Error Message (ERR_RETRIEVE_PRICE), an Error Code (ERR_CODE_NO_PRICE) and the Error View (RetrievePriceErrorView).
Behaviour The best offer will be selected based on the following criteria:
Exception Conditions
If ErrorMode is false, these errors will be ignored and a null value price will be passed back to the caller.
This command calls the following TaskCommands:
StoreAccessBeanOfferAccessBeanTradingPositionContainerAccessBean| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_NAME
the class name.
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName, NAME| Constructor and Description |
|---|
SelectContractPricesCmdImpl()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ItemPriceInfo[] |
getItemPriceInfo()
Returns the internal item info structure.
|
void |
performExecute()
Executes main business logic of the command.
|
void |
setCurrency(java.lang.String astrCurrency)
Sets the currency to be used for finding the price (Optional).
|
void |
setErrorMode(boolean aErrorMode)
Sets the flag to indicate if exception will be thrown when the price cannot be found
for the input catentry (Optional).
|
void |
setItemPriceInfo(ItemPriceInfo[] aItemPriceInfo)
Sets the item info structure for internal use on calculating the prices.
|
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, waitaccessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiescheckIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiespublic static final java.lang.String CLASS_NAME
public static final java.lang.String COPYRIGHT
public ItemPriceInfo[] getItemPriceInfo()
getItemPriceInfo in interface SelectContractPricesCmdpublic void performExecute()
throws com.ibm.commerce.exception.ECException
performExecute in interface com.ibm.commerce.command.ECCommandperformExecute in class com.ibm.commerce.command.AbstractECTargetableCommandcom.ibm.commerce.exception.ECExceptionpublic void setCurrency(java.lang.String astrCurrency)
setCurrency in interface SelectContractPricesCmdastrCurrency - the currencypublic void setErrorMode(boolean aErrorMode)
setErrorMode in interface SelectContractPricesCmdaErrorMode - the error modepublic void setItemPriceInfo(ItemPriceInfo[] aItemPriceInfo)
setItemPriceInfo in interface SelectContractPricesCmdaItemPriceInfo - the internal data structurepublic void setStoreId(java.lang.Integer aStoreId)
setStoreId in interface SelectContractPricesCmdaStoreId - the store IDpublic void validateParameters()
throws com.ibm.commerce.exception.ECException
validateParameters in interface com.ibm.commerce.command.ECCommandvalidateParameters in class com.ibm.commerce.command.AbstractECTargetableCommandcom.ibm.commerce.exception.ECException