com.ibm.commerce.order.calculation
Class CalculationCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.command.BusinessPolicyCommandImpl
                          |
                          +--com.ibm.commerce.order.calculation.CalculationCmdImpl
All Implemented Interfaces:
BusinessPolicyCommand, CalculationCmd, ECCommand, ECTargetableCommand, TaskCommand
Direct Known Subclasses:
ApplyCalculationUsageCmdImpl, ApplyCouponUsageCmdImpl, ApplyShippingChargeByCarrierCmdImpl, ApplyShippingCmdImpl, CalculateDiscountAmtCmdImpl, CalculationCodeCalculateCmdImpl, CalculationCodeCombineCmdImpl, CalculationCodeQualifyCmdImpl, CalculationRuleCalculateCmdImpl, CalculationRuleCombineCmdImpl, DiscountCalculationCodeApplyCmdImpl, DiscountCalculationRuleQualifyCmdImpl, FinalizeCouponUsageCmdImpl, FixedAmountCalculationRangeCmdImpl, InitializeAdjustmentCmdImpl, InitializeCouponUsageCmdImpl, InitializeSalesTaxCmdImpl, InitializeShippingCmdImpl, InitializeShippingTaxCmdImpl, NonDiscountedPriceCalculationScaleLookupCmdImpl, PercentageCalculationRangeCmdImpl, PerUnitAmountCalculationRangeCmdImpl, QuantityCalculationScaleLookupCmdImpl, QuantitySpreadByNetPriceCalculationScaleLookupCmdImpl, ShippingCalculationCodeApplyCmdImpl, ShippingCalculationRuleQualifyCmdImpl, SummarizeAdjustmentCmdImpl, SummarizeSalesTaxCmdImpl, SummarizeShippingCmdImpl, SummarizeShippingTaxCmdImpl, TaxCalculationCodeApplyCmdImpl, TaxCalculationRuleQualifyCmdImpl, TaxCalculationUsageTIKCmdImpl, UnitPriceCalculationScaleLookupCmdImpl

public abstract class CalculationCmdImpl
extends BusinessPolicyCommandImpl
implements CalculationCmd

This is an abstract command implementation that implements the base interface CalculationCmd.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          The IBM copyright notice field.
 
Fields inherited from class com.ibm.commerce.command. BusinessPolicyCommandImpl
policyId, requestProperties
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.order.calculation. CalculationCmd
NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
CalculationCmdImpl()
          Constructor for CalculationCmdImpl.
 
Method Summary
protected   CalculationCmd createCommand(CalculationMethodAccessBean aabMethod)
          Creates the command corresponding to a calculation method.
 java.lang.String getCurrency()
          Returns the currency to use during execution.
 java.util.HashMap getCustomProperties()
          Returns the custom properties as a HashMap.
 java.lang.Object getCustomProperty(java.lang.String astrName)
          Returns the value of a custom property.
 java.sql.Timestamp getTimestamp()
          Returns the timestamp to use during execution.
 java.lang.Integer getUsageId()
          Returns the calculation usage.
 void reset()
          This method should be called after a command has been executed to reset its states variables.
 void setCurrency(java.lang.String astrCurrency)
          Sets the currency to use during execution.
 void setCustomProperties(java.util.HashMap ahshCustomProperties)
          Sets the custom properties.
 void setCustomProperty(java.lang.String astrName, java.lang.Object aValue)
          Sets the value of a custom property.
 void setTimestamp(java.sql.Timestamp aTimestamp)
          Sets the timestamp to use during execution.
 void setUsageId(java.lang.Integer anUsageId)
          Sets the calculation usage.
 
Methods inherited from class com.ibm.commerce.command. BusinessPolicyCommandImpl
getPolicyId, getRequestProperties, setPolicyId, setRequestProperties
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, performExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
 
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, setRequestProperties
 

Field Detail
public static final java.lang.String COPYRIGHT
The IBM copyright notice field.
See Also:
Constant Field Values
Constructor Detail

CalculationCmdImpl

public CalculationCmdImpl()
Constructor for CalculationCmdImpl.
Method Detail

createCommand

protected CalculationCmd createCommand(CalculationMethodAccessBean aabMethod)
                                throws ECException
Creates the command corresponding to a calculation method. The following properties are set automatically:
Parameters:
aabMethod - the calculation method.
Returns:
the command.
ECException

getCurrency

public java.lang.String getCurrency()
Returns the currency to use during execution.
Specified by:
getCurrency in interface CalculationCmd
Returns:
the currency.

getCustomProperties

public java.util.HashMap getCustomProperties()
Returns the custom properties as a HashMap.
Specified by:
getCustomProperties in interface CalculationCmd
Returns:
the custom properties. Key: property name (class: String). Value: property value (class: Object).

getCustomProperty

public java.lang.Object getCustomProperty(java.lang.String astrName)
Returns the value of a custom property.
Specified by:
getCustomProperty in interface CalculationCmd
Parameters:
astrName - the property name.
Returns:
the property value.

getTimestamp

public java.sql.Timestamp getTimestamp()
Returns the timestamp to use during execution.
Specified by:
getTimestamp in interface CalculationCmd
Returns:
the timestamp.

getUsageId

public java.lang.Integer getUsageId()
Returns the calculation usage.
Specified by:
getUsageId in interface CalculationCmd
Returns:
the calculation usage ID.

reset

public void reset()
Description copied from class: AbstractECTargetableCommand
This method should be called after a command has been executed to reset its states variables. After the call to reset, we should be able to execute the command again.
Overrides:
reset in class AbstractECTargetableCommand
See Also:
com.ibm.websphere.command.Command#reset()

setCurrency

public void setCurrency(java.lang.String astrCurrency)
Sets the currency to use during execution.
Specified by:
setCurrency in interface CalculationCmd
Parameters:
astrCurrency - the currency.

setCustomProperties

public void setCustomProperties(java.util.HashMap ahshCustomProperties)
Sets the custom properties.
Specified by:
setCustomProperties in interface CalculationCmd
Parameters:
ahshCustomProperties - the custom properties. Key: property name (class: String). Value: property value (class: Object).

setCustomProperty

public void setCustomProperty(java.lang.String astrName,
                              java.lang.Object aValue)
Sets the value of a custom property.
Specified by:
setCustomProperty in interface CalculationCmd
Parameters:
astrName - the property name.
aValue - the property value.

setTimestamp

public void setTimestamp(java.sql.Timestamp aTimestamp)
Sets the timestamp to use during execution.
Specified by:
setTimestamp in interface CalculationCmd
Parameters:
aTimestamp - the timestamp.

setUsageId

public void setUsageId(java.lang.Integer anUsageId)
Sets the calculation usage.
Specified by:
setUsageId in interface CalculationCmd
Parameters:
anUsageId - the calculation usage ID.