public class ValidateDelegatedPriceCmdImpl extends com.ibm.commerce.command.TaskCommandImpl implements ValidateDelegatedPriceCmd
ValidateDelegatedPriceCmdImpl
Task Command Implementation
checks the lower limit of the negotiated price (which is the price TSR and the
customer agreed with) for a given catalog entry.
Retrieve the floor price for the product. the relevant ones are
ECApplicationException
Then check if the delegated price is lower than the floor price, if yes, it is an invalid delegated price, otherwise ok.
This command calls the following TaskCommands:
This command uses the following AccessBeans:CatalogEntryShippingAccessBean
OrderItemAccessBean
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
defaultCommandClassName, NAME
Constructor and Description |
---|
ValidateDelegatedPriceCmdImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.Long |
getCatEntryId()
Gets the catalog entry ID whose delegated price is to be checked for limit violation.
|
java.lang.String |
getConfigurationID()
Gets the configuration ID of a dynamic-kit
|
java.lang.String |
getCurrency()
Gets the currency to be used for finding the price.
|
java.lang.String |
getCustomPartnumber()
Returns the custom partnumber.
|
java.math.BigDecimal |
getNegotiatedPrice()
Gets the negotiated price.
|
QuantityAmount |
getQuantity()
Gets a quantity object of the catalog entry.
|
java.lang.Integer |
getStoreId()
Gets the store ID to which the catalog entry belongs.
|
java.lang.Long |
getTSRId()
Get a TSR ID
|
boolean |
hasFloorPrice()
Check if there exists a floor price for the input catalog.
|
boolean |
isValid()
Check if the delegated price is in the proper range.
|
void |
performExecute()
Retrieve the floor price of the catalog entry for the TSR,
then check if the delegated price is in the proper range.
|
void |
reset() |
void |
setCatEntryId(java.lang.Long aCatEntryId)
Sets the catalog entry ID whose delegated price is to be checked for limit violation.
|
void |
setConfigurationID(java.lang.String aConfigID)
Sets the configuration ID, if this catalog entry is a DynamicKit.
|
void |
setCurrency(java.lang.String aCurrency)
Set the currency to be used for finding the price.
|
void |
setCustomPartnumber(java.lang.String aCustomPartnumber)
Sets the custom partnumber whose delegated price is to be checked for limit violation.
|
void |
setNegotiatedPrice(java.math.BigDecimal negotiatedPrice)
Set the negotiated price.
|
void |
setQuantity(QuantityAmount aQuantityAmount)
Sets the quantity amount of the input catalog entry that is to be priced (Optional).
|
void |
setStoreId(java.lang.Integer aStoreId)
Set the store ID to which the catalog entry belongs.
|
void |
setTSRId(java.lang.Long aTSRId)
Set TSR ID who helps customer on shopping
|
void |
validateParameters() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public static final java.lang.String COPYRIGHT
public java.lang.Long getCatEntryId()
public java.lang.String getConfigurationID()
public java.lang.String getCurrency()
public java.lang.String getCustomPartnumber()
public java.math.BigDecimal getNegotiatedPrice()
public QuantityAmount getQuantity()
public java.lang.Integer getStoreId()
getStoreId
in interface com.ibm.commerce.command.ECCommand
getStoreId
in class com.ibm.commerce.command.AbstractECTargetableCommand
public java.lang.Long getTSRId()
public boolean hasFloorPrice()
hasFloorPrice
in interface ValidateDelegatedPriceCmd
public boolean isValid()
isValid
in interface ValidateDelegatedPriceCmd
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
com.ibm.websphere.command.Command#reset()
public void setCatEntryId(java.lang.Long aCatEntryId)
setCatEntryId
in interface ValidateDelegatedPriceCmd
catEntryId
- A reference number of catalog entry.public void setConfigurationID(java.lang.String aConfigID)
setConfigurationID
in interface ValidateDelegatedPriceCmd
aConfigID
- A String of pre-configuration ID for a DynamicKitpublic void setCurrency(java.lang.String aCurrency)
setCurrency
in interface ValidateDelegatedPriceCmd
aCurrency
- A currency.public void setCustomPartnumber(java.lang.String aCustomPartnumber)
setCustomPartnumber
in interface ValidateDelegatedPriceCmd
customPartnumber
- The custom partnumber.public void setNegotiatedPrice(java.math.BigDecimal negotiatedPrice)
setNegotiatedPrice
in interface ValidateDelegatedPriceCmd
negotiatedPrice
- A negotiated price.public void setQuantity(QuantityAmount aQuantityAmount)
setQuantity
in interface ValidateDelegatedPriceCmd
aQuantityAmount
- The quantity amount of the catalog entry.public void setStoreId(java.lang.Integer aStoreId)
setStoreId
in interface ValidateDelegatedPriceCmd
storeId
- A store IDpublic void setTSRId(java.lang.Long aTSRId)
setTSRId
in interface ValidateDelegatedPriceCmd
aTSRId
- Long A TSR 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
ECCommand.validateParameters()