public class GetDisplayTaxesCmdImpl extends TaskCommandImpl implements GetDisplayTaxesCmd
GetDisplayTaxesCmd Task Command.
It can be called by any commands and databeans to set the different categories of tax
amounts (for example GST,
PSTand so forth) for the input catalog entry. It uses
CalculationCodeswith calculationUsage of Taxation to calculate the tax amounts for each of the tax categories that have been marked for display.
If the command is successful, it will populate two hashtables:
iCategorizedTaxAmount: contains the tax categories' Ids/names and tax amounts.
ihshTaxDescriptionHash: contains the tax categories' Ids/names and descriptions.
If unsuccessful, the two hashtables will be empty.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COPYRIGHT |
defaultCommandClassName, NAME| Constructor and Description |
|---|
GetDisplayTaxesCmdImpl() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Hashtable |
getCategorizedTaxAmount()
Returns the monetary amounts of all tax categories and their names.
|
java.util.Hashtable |
getTaxDescriptionHash()
Gets the descriptions of all tax categories.
|
java.util.HashMap |
getTaxRateHash()
Gets the rates of all tax categories.
|
void |
performExecute()
Executes main business logic of the command.
|
void |
reset()
Resets the command properties.
|
void |
setAddressId(java.lang.Long aAddressId)
Sets the id of the input ship-to address (Optional).
|
void |
setCatEntryId(java.lang.Long aCatEntryId)
Sets the id of the input catalog entry.
|
void |
setCurrency(java.lang.String aCurrency)
Sets the currency of the input price amount.
|
void |
setDisplayOnly(boolean abDisplayOnly)
Sets the flag to indicate if the taxes are calculated for display purpose (Optional).
|
void |
setFulfillmentCenterId(java.lang.Integer aFulfillmentCenterId)
Sets the id of the fulfillment center (Optional).
|
void |
setPrice(java.math.BigDecimal aPrice)
Sets the product price for calculating the taxes.
|
void |
setQuantity(java.lang.Double aQuantity)
Sets the product quantity for calculating the taxes.
|
void |
setShippingCharge(java.math.BigDecimal aShippingCharge)
Sets the shipping charge for the shipping the product.
|
void |
setUOM(java.lang.String astrUOM)
Sets the unit of measure for the product.
|
void |
validateParameters()
Checks mandatory parameters.
|
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultPropertiesexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCachegetCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicyequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCachegetCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputPropertiescheckIsAllowed, 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 COPYRIGHT
public void reset()
reset in interface com.ibm.websphere.command.Commandreset in class AbstractECTargetableCommandpublic java.util.Hashtable getCategorizedTaxAmount()
getCategorizedTaxAmount in interface GetDisplayTaxesCmdpublic java.util.Hashtable getTaxDescriptionHash()
getTaxDescriptionHash in interface GetDisplayTaxesCmdpublic java.util.HashMap getTaxRateHash()
getTaxRateHash in interface GetDisplayTaxesCmdpublic void performExecute()
throws ECException
performExecute in interface ECCommandperformExecute in interface com.ibm.websphere.command.TargetableCommandperformExecute in class AbstractECTargetableCommandECExceptionpublic void setAddressId(java.lang.Long aAddressId)
setAddressId in interface GetDisplayTaxesCmdaAddressId - The reference number of the ship-to address.public void setCatEntryId(java.lang.Long aCatEntryId)
setCatEntryId in interface GetDisplayTaxesCmdaCatEntryId - The reference number of the catalog entry.public void setCurrency(java.lang.String aCurrency)
setCurrency in interface GetDisplayTaxesCmdaCurrency - The currency of the input price amount.public void setDisplayOnly(boolean abDisplayOnly)
setDisplayOnly in interface GetDisplayTaxesCmdabDisplayOnly - To indicate if it is for display use only.
A true value (default) means for display.
A false value means not for display.public void setFulfillmentCenterId(java.lang.Integer aFulfillmentCenterId)
setFulfillmentCenterId in interface GetDisplayTaxesCmdaFulfillmentCenterId - The reference number of the fulfillment center.public void setPrice(java.math.BigDecimal aPrice)
setPrice in interface GetDisplayTaxesCmdaPrice - The product price for calculating the taxes.public void setQuantity(java.lang.Double aQuantity)
setQuantity in interface GetDisplayTaxesCmdaQuantity - The product quantity for calculating the taxes.public void setShippingCharge(java.math.BigDecimal aShippingCharge)
setShippingCharge in interface GetDisplayTaxesCmdaShippingCharge - The product shipping charge.public void setUOM(java.lang.String astrUOM)
setUOM in interface GetDisplayTaxesCmdastrUOM - The unit of measure for the product.public void validateParameters()
throws ECException
validateParameters in interface ECCommandvalidateParameters in class AbstractECTargetableCommandECException