com.ibm.commerce.discount.rules
Class DiscountContext

java.lang.Object
  com.ibm.commerce.discount.rules.DiscountContext
All Implemented Interfaces:
IncentiveContext

public class DiscountContext
extends java.lang.Object
implements IncentiveContext

DiscountContext is the interface between rules based discount runtime and order subsystem runtime. It is an invocation context for passing data in/out of the rule service and processing the output data .


Field Summary
static java.lang.String COPYRIGHT
IBM copyright notice field.
Constructor Summary
DiscountContext(CommandContext cmdCtx, java.lang.String currency, OrderItemAccessBean[] itemABs, java.math.BigDecimal orderTotalAmount, java.util.Calendar currentTime)
Constructor for DiscountContext
Method Summary
CommandContext getCommandContext()
Get the CommandContext.
java.lang.String getCurrency()
Get the Currency
java.util.Calendar getCurrentTime()
Get the CurrentTime
Discount[] getDiscounts()
Get the Discounts
OrderItemAccessBean[] getOrderItems()
Get the OrderItems
java.math.BigDecimal getOrderTotalAmount()
Get the OrderTotalAmount
protected void setCommandContext(CommandContext newCommandContext)
Set CommandContext
protected void setCurrency(java.lang.String newCurrency)
Set Currency
void setCurrentTime(java.util.Calendar newCurrentTime)
Set CurrentTime
void setDiscounts(Discount[] newDiscounts)
Set Discounts
protected void setOrderItems(OrderItemAccessBean[] newOrderItems)
Set OrderItems
protected void setOrderTotalAmount(java.math.BigDecimal newOrderTotalAmount)
Set OrderTotalAmount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail

COPYRIGHT

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

DiscountContext

public DiscountContext(CommandContext cmdCtx,
                       java.lang.String currency,
                       OrderItemAccessBean[] itemABs,
                       java.math.BigDecimal orderTotalAmount,
                       java.util.Calendar currentTime)
Constructor for DiscountContext
Parameters:
cmdCtx - com.ibm.commerce.command.CommandContext
currency - java.lang.String
itemABs - com.ibm.commerce.order.objects.OrderItemAccessBean[]
orderTotalAmount - java.math.BigDecimal
currentTime - java.util.Calendar
Method Detail

getCommandContext

public CommandContext getCommandContext()
Get the CommandContext.
Returns:
com.ibm.commerce.command.CommandContext

getCurrency

public java.lang.String getCurrency()
Get the Currency
Returns:
java.lang.String

getCurrentTime

public java.util.Calendar getCurrentTime()
Get the CurrentTime
Returns:
java.util.Calendar

getDiscounts

public Discount[] getDiscounts()
Get the Discounts
Returns:
com.ibm.commerce.discount.rules.Discount[]

getOrderItems

public OrderItemAccessBean[] getOrderItems()
Get the OrderItems
Returns:
com.ibm.commerce.order.objects.OrderItemAccessBean[]

getOrderTotalAmount

public java.math.BigDecimal getOrderTotalAmount()
Get the OrderTotalAmount
Returns:
java.math.BigDecimal

setCommandContext

protected void setCommandContext(CommandContext newCommandContext)
Set CommandContext
Parameters:
newCommandContext - com.ibm.commerce.command.CommandContext

setCurrency

protected void setCurrency(java.lang.String newCurrency)
Set Currency
Parameters:
newCurrency - java.lang.String

setCurrentTime

public void setCurrentTime(java.util.Calendar newCurrentTime)
Set CurrentTime
Parameters:
newCurrentTime - java.util.Calendar

setDiscounts

public void setDiscounts(Discount[] newDiscounts)
Set Discounts
Parameters:
newDiscounts - com.ibm.commerce.discount.rules.Discount[]

setOrderItems

protected void setOrderItems(OrderItemAccessBean[] newOrderItems)
Set OrderItems
Parameters:
newOrderItems - com.ibm.commerce.order.objects.OrderItemAccessBean[]

setOrderTotalAmount

protected void setOrderTotalAmount(java.math.BigDecimal newOrderTotalAmount)
Set OrderTotalAmount
Parameters:
newOrderTotalAmount - java.math.BigDecimal

Feedback