java.lang.Object | +--com.ibm.commerce.discount.rules.DiscountContext
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 |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public DiscountContext(CommandContext cmdCtx, java.lang.String currency, OrderItemAccessBean[] itemABs, java.math.BigDecimal orderTotalAmount, java.util.Calendar currentTime)
cmdCtx
- com.ibm.commerce.command.CommandContextcurrency
- java.lang.StringitemABs
-
com.ibm.commerce.order.objects.OrderItemAccessBean[]orderTotalAmount
- java.math.BigDecimalcurrentTime
- java.util.CalendarMethod Detail |
---|
public CommandContext getCommandContext()
public java.lang.String getCurrency()
public java.util.Calendar getCurrentTime()
public Discount[] getDiscounts()
public OrderItemAccessBean[] getOrderItems()
public java.math.BigDecimal getOrderTotalAmount()
protected void setCommandContext(CommandContext newCommandContext)
newCommandContext
-
com.ibm.commerce.command.CommandContextprotected void setCurrency(java.lang.String newCurrency)
newCurrency
- java.lang.Stringpublic void setCurrentTime(java.util.Calendar newCurrentTime)
newCurrentTime
- java.util.Calendarpublic void setDiscounts(Discount[] newDiscounts)
newDiscounts
-
com.ibm.commerce.discount.rules.Discount[]protected void setOrderItems(OrderItemAccessBean[] newOrderItems)
newOrderItems
-
com.ibm.commerce.order.objects.OrderItemAccessBean[]protected void setOrderTotalAmount(java.math.BigDecimal newOrderTotalAmount)
newOrderTotalAmount
- java.math.BigDecimal