java.lang.ObjectCacheableCommandImpl
com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.command.TaskCommandImpl
com.ibm.commerce.command.BusinessPolicyCommandImpl
com.ibm.commerce.order.calculation.CalculationCmdImpl
com.ibm.commerce.order.calculation.CalculationCodeCombineCmdImpl
com.ibm.commerce.order.calculation.DiscountCalculationCodeCombineCmdImpl
The default implementation of CalculationCodeCombineCmd.
If rule based discount is enabled, its behaviour is as follows:
If rule based discount is not enabled, its behaviour is the same as that of CalculationCodeCombineCmdImpl.
Commands used:
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.DiscountCalculationCodeCombineCmd |
defaultCommandClassName, NAME |
Fields inherited from interface com.ibm.commerce.command.ECCommand |
defaultCommandClassName |
Constructor Summary | |
DiscountCalculationCodeCombineCmdImpl() Constructor for DiscountCalculationCodeCombineCmdImpl. |
Method Summary | |
protected void | addFixedPriceItem(Group aGroup, FixedPriceItem aFixedPriceItem) Processes the specified FixedPriceItem and adds the corresponding discount values to the specified Group. |
protected void | addFreebieItem(Group aGroup, FreebieItem aFreebieItem) Processes the specified FreebieItem and adds the corresponding discount values to the specified Group. |
protected void | addMonetaryDiscount(Group aGroup, MonetaryDiscount aMonetaryDiscount) Processes the specified MonetaryDiscount and adds the corresponding discount values to the specified Group. |
protected void | addServiceDiscount(ServiceDiscount aServiceDiscount) Adds the specified ServiceDiscount to the custom property "vecServiceDiscounts" - a Vector of ServiceDiscounts. |
protected DiscountContext | createDiscountContext() Creates the DiscountContext. |
protected CalculationCodeAccessBean[] | getCodes(Item aItem) Returns the calculation codes attached to an item. |
protected CalculationCodeAccessBean | getRuleBasedDiscountCode(Discount aDiscount) Returns the CalculationCodeAccessBean corresponding to the specified Discount. |
protected java.math.BigDecimal[] | getRunningNetPrices() Returns the running net prices of Items returned by CalculationCodeCombineCmdImpl.getItems(). |
protected void | invokeRuleService(DiscountContext aDiscountContext) Invokes the rule service "Discount Service". |
void | performExecute() The business logic for this command. |
void | reset() Resets the command properties. |
protected void | setRunningNetPrices(java.math.BigDecimal[] adRunningNetPrices) Sets the running net prices of Items returned by CalculationCodeCombineCmdImpl.getItems(). |
Methods inherited from class com.ibm.commerce.order.calculation.CalculationCodeCombineCmdImpl |
addItem, callCodeQualify, createGroupKey, createGroups, getDefaultCode, getDirectlyAttachedCodes, getGroups, getIndirectlyAttachedCodes, getItems, getTaxCategoryIds, isDirectAttachmentsOverride, isRestricted, processItem, setGroups, setItems, setTaxCategoryIds, toString |
Methods inherited from class com.ibm.commerce.order.calculation.CalculationCmdImpl |
createCommand, getCurrency, getCustomProperties, getCustomProperty, getTimestamp, getUsageId, recycleCommand, setCurrency, setCustomProperties, setCustomProperty, setTimestamp, setUsageId |
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, 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.order.calculation.CalculationCodeCombineCmd |
getGroups, setItems, setTaxCategoryIds |
Methods inherited from interface com.ibm.commerce.order.calculation.CalculationCmd |
getCurrency, getCustomProperties, getCustomProperty, getTimestamp, getUsageId, setCurrency, setCustomProperties, setCustomProperty, setTimestamp, setUsageId |
Methods inherited from interface com.ibm.commerce.command.BusinessPolicyCommand |
getPolicyId, getRequestProperties, setPolicyId, setRequestProperties |
Field Detail |
public static final java.lang.String COPYRIGHT
Constructor Detail |
public DiscountCalculationCodeCombineCmdImpl()
Method Detail |
public void reset()
protected java.math.BigDecimal[] getRunningNetPrices()
protected void setRunningNetPrices(java.math.BigDecimal[] adRunningNetPrices)
protected void addFixedPriceItem(Group aGroup, FixedPriceItem aFixedPriceItem) throws ECException
protected void addFreebieItem(Group aGroup, FreebieItem aFreebieItem) throws ECException
protected void addMonetaryDiscount(Group aGroup, MonetaryDiscount aMonetaryDiscount) throws ECException
protected void addServiceDiscount(ServiceDiscount aServiceDiscount) throws ECException
protected DiscountContext createDiscountContext()
protected CalculationCodeAccessBean getRuleBasedDiscountCode(Discount aDiscount) throws ECException
protected void invokeRuleService(DiscountContext aDiscountContext) throws ECException
protected CalculationCodeAccessBean[] getCodes(Item aItem) throws ECException
public void performExecute() throws ECException
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.