public class ItemCostVolumeDistribution
extends java.lang.Object
implements com.ibm.commerce.marketing.promotion.reward.GenericDistribution
<Distribution impl="com.ibm.commerce.marketing.promotion.reward.ItemCostVolumeDistribution"> <Currency>USD</Currency> <!-- CostBase, 1-Price, 2-Shipping --> <CostBase>1</CostBase> <!-- The item selection Pattern to calculate the total cost --> <Pattern></Pattern> <!-- Multiple Ranges can be specified --> <Range> <LowerBound>1</LowerBound> <UpperBound>5</UpperBound> <Reward></Reward> <Reward></Reward> </Range> <Range> <LowerBound>6</LowerBound> <UpperBound>10</UpperBound> <Reward></Reward> <Reward></Reward> </Range> <!-- Multiple Pattern Filters can go here --> <PatternFilter></PatternFilter> </Distribution>
Modifier and Type | Field and Description |
---|---|
static java.lang.String | ATTR_IMPL
XML attribute name -"impl"
|
static java.lang.String | TAG_COSTBASE
XML tag -"CostBase"
|
static java.lang.String | TAG_CURRENCY
XML tag -"Currency"
|
static java.lang.String | TAG_DISTRIBUTION
XML tag -"Distribution"
|
static java.lang.String | TAG_PATTERN
XML tag -"Pattern"
|
static java.lang.String | TAG_PATTERN_FILTER
XML tag -"PatternFilter"
|
static java.lang.String | TAG_RANGE
XML tag -"Range"
|
Constructor and Description |
---|
ItemCostVolumeDistribution()
Constructor for ItemCostVolumeDistribution.
|
Modifier and Type | Method and Description |
---|---|
boolean | distribute(LineItemSet[] inputItems, PromotionContext context)
This method distributes the LineItemSets according to the range setting and calculates the rewards for all qualified LineItemSets.
|
void | fromXML(org.w3c.dom.Node anXMLNode)
Transforms the XML node into its corresponding real Object.
|
int | getCostBase()
Gets the CostBase of the range.
|
java.lang.String | getCurrency()
This method gets the Currency that is used for defining ranges.
|
java.util.List | getPatternFilters()
This method gets the PatternFilter of this distribution.
|
com.ibm.commerce.marketing.promotion.condition.GenericPattern | getRangePattern()
Gets the pattern object to evaluate the range qualification.
|
java.util.List | getRanges()
This method gets the Ranges of the Distribution.
|
void | setCostBase(int aCostBase)
Sets the type of the value for range.
|
void | setCurrency(java.lang.String aCurrency)
This method sets the Currency used for defining ranges in Cost based Distribution.
|
void | setRangePattern(com.ibm.commerce.marketing.promotion.condition.GenericPattern aPattern)
Sets the pattern object to evaluate the range qualification.
|
java.lang.String | toXML()
Converts the object into its corresponding XML format representation.
|
public static final java.lang.String TAG_DISTRIBUTION
public static final java.lang.String TAG_PATTERN_FILTER
public static final java.lang.String TAG_PATTERN
public static final java.lang.String TAG_RANGE
public static final java.lang.String ATTR_IMPL
public static final java.lang.String TAG_CURRENCY
public static final java.lang.String TAG_COSTBASE
public ItemCostVolumeDistribution()
public java.lang.String getCurrency()
public java.util.List getPatternFilters()
public void setCurrency(java.lang.String aCurrency)
public java.util.List getRanges()
public boolean distribute(LineItemSet[] inputItems, PromotionContext context)
public java.lang.String toXML() throws XMLizationException
public void fromXML(org.w3c.dom.Node anXMLNode) throws DeXMLizationException
public int getCostBase()
public void setCostBase(int aCostBase)
public com.ibm.commerce.marketing.promotion.condition.GenericPattern getRangePattern()
public void setRangePattern(com.ibm.commerce.marketing.promotion.condition.GenericPattern aPattern)