public class FixedAmountOffAdjustment extends java.lang.Object implements MonetaryAdjustment
<Adjustment impl="com.ibm.commerce.marketing.promotion.reward.FixedAmountOffAdjustment"> <AmountOff>15</AmountOff> <Currency>CAD</Currency> <!-- wholeOrder or AllAffectedItems or IndividualAffectedItems --> <AdjustmentType>wholeOrder</AdjustmentType> </Adjustment>
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
protected static java.lang.String | TAG_ADJUSTMENT
XML Tag names
|
protected static java.lang.String | TAG_ADJUSTMENT_TYPE
XML Tag names
|
protected static java.lang.String | TAG_AMOUNT_OFF
XML Tag names
|
protected static java.lang.String | TAG_CURRENCY
XML Tag names
|
Constructor and Description |
---|
FixedAmountOffAdjustment()
Constructor for FixedAmountOffAdjustment.
|
Modifier and Type | Method and Description |
---|---|
boolean | apply(LineItemSet targeted, java.math.BigDecimal targetedAmount, int targetedAmountTypes, LineItemSet affected, java.util.Vector affectedVector, java.util.Vector adjustmentVector, PromotionContext context)
This method evaluates the targeted order items to see if they fulfill the conditions of this adjustment ( for example, if the quantity of the order items falls into one of the ranges of the adjustment).
|
java.lang.Object | clone()
Returns null if the CloneNotSupportedException is thrown.
|
void | fromXML(org.w3c.dom.Node anXMLNode)
Transforms the XML node into its corresponding real Object.
|
java.lang.Integer | getAdjustmentType()
This method gets the type of Adjustment.
|
java.math.BigDecimal | getAmountOff()
This method gets the Fixed amount to be given as discount.
|
java.lang.String | getCurrency()
This method gets the Currency.
|
java.math.BigDecimal | getPerUnitAdjustment(AssociatedOrderItem one, AssociatedOrderItem[] all, PromotionContext context)
This method returns the monetary adjustment that needs to be applied to each unit.
|
int | getTheTypeOfMonetaryValueToBeAdjusted()
Returns the value of PRICE=1
|
void | setAdjustmentType(java.lang.Integer _adjustmentType)
This method sets the type of Adjustment.
|
void | setAmountOff(java.math.BigDecimal newAmountOff)
This method sets the Fixed Amount to be given as discount.
|
void | setCurrency(java.lang.String newCurrency)
This method sets Currency.
|
java.lang.String | toXML()
Converts the object into its corresponding XML format representation.
|
public static final java.lang.String COPYRIGHT
protected static final java.lang.String TAG_ADJUSTMENT
protected static final java.lang.String TAG_AMOUNT_OFF
protected static final java.lang.String TAG_CURRENCY
protected static final java.lang.String TAG_ADJUSTMENT_TYPE
public FixedAmountOffAdjustment()
public java.math.BigDecimal getAmountOff()
public java.lang.String getCurrency()
public void setAmountOff(java.math.BigDecimal newAmountOff)
public void setCurrency(java.lang.String newCurrency)
public java.lang.Integer getAdjustmentType()
public void setAdjustmentType(java.lang.Integer _adjustmentType)
public java.lang.String toXML() throws XMLizationException
public void fromXML(org.w3c.dom.Node anXMLNode) throws DeXMLizationException
public java.lang.Object clone()
public int getTheTypeOfMonetaryValueToBeAdjusted()
public java.math.BigDecimal getPerUnitAdjustment(AssociatedOrderItem one, AssociatedOrderItem[] all, PromotionContext context)
public boolean apply(LineItemSet targeted, java.math.BigDecimal targetedAmount, int targetedAmountTypes, LineItemSet affected, java.util.Vector affectedVector, java.util.Vector adjustmentVector, PromotionContext context) throws PromotionRuntimeException