public class DiscountCalculationCodeCombineCmdImpl extends CalculationCodeCombineCmdImpl implements DiscountCalculationCodeCombineCmd
The default implementation of CalculationCodeCombineCmd.
If rule based discount is enabled, its behavior is as follows:
If rule based discount is not enabled, its behavior is the same as that of CalculationCodeCombineCmdImpl.
Commands used:
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
The IBM copyright notice field.
|
Constructor and Description |
---|
DiscountCalculationCodeCombineCmdImpl()
Constructor for DiscountCalculationCodeCombineCmdImpl.
|
Modifier and Type | Method and Description |
---|---|
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)
Deprecated.
This method is used for Blaze implementation, which has been removed from product. We use the new command PromotionEngineDiscountCalculationCodeCombineCmdImpl to support the new Promotion Engine implementation.
|
void | performExecute()
This method performs 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().
|
public static final java.lang.String COPYRIGHT
public DiscountCalculationCodeCombineCmdImpl()
public void reset()
protected java.math.BigDecimal[] getRunningNetPrices() throws ECException
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