public class Distribution
extends java.lang.Object
implements com.ibm.commerce.marketing.promotion.reward.GenericDistribution
<Distribution impl="com.ibm.commerce.marketing.promotion.reward.Distribution"> <!-- Multiple Pattern Filters can go here --> <PatternFilter></PatternFilter> <!-- Volume or Tiered --> <Type>Volume</Type> <!-- Quantity or Cost --> <Base>Quantity</Base> <!-- 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> </Distribution>
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
static int | COST
The base of the distribution is Cost.
|
static int | QUANTITY
The base of the distribution is Quantity.
|
static int | TIERED
The type of the distribution is Tiered.
|
static int | VOLUME
The type of the distribution is Volume.
|
Constructor and Description |
---|
Distribution()
Constructor for Distribution.
|
Modifier and Type | Method and Description |
---|---|
boolean | distribute(LineItemSet[] inputItems, PromotionContext context)
This method distributes the LineItemSets between different ranges 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 | getBase()
This method gets the quantity-based or cost-based type of the Distribution.
|
java.lang.String | getCurrency()
This method gets the Currency used for defining ranges in Cost based Distribution.
|
PatternFilter[] | getPatternFilters()
This method gets the PatternFilters of the Distribution.
|
DistributionRange[] | getRanges()
This method gets the Ranges of the Distribution.
|
int | getType()
This method gets the type of the Distribution (either Volume or Tiered).
|
void | setBase(int aBase)
This methods sets the base of the Distribution.
|
void | setCurrency(java.lang.String aCurrency)
This method sets the Currency used for defining ranges in Cost based Distribution.
|
void | setPatternFilters(PatternFilter[] filters)
This method sets the PatternFilters for the Distribution.
|
void | setRanges(DistributionRange[] aRanges)
This method sets the Ranges of the Distribution.
|
void | setType(int aType)
This methods sets the type of the Distribution.
|
java.lang.String | toXML()
Converts the object into its corresponding XML format representation.
|
public static final java.lang.String COPYRIGHT
public static final int QUANTITY
public static final int COST
public static final int VOLUME
public static final int TIERED
public int getType()
public java.lang.String getCurrency()
public int getBase()
public PatternFilter[] getPatternFilters()
public void setPatternFilters(PatternFilter[] filters)
public void setType(int aType)
public void setBase(int aBase)
public void setCurrency(java.lang.String aCurrency)
public DistributionRange[] getRanges()
public void setRanges(DistributionRange[] aRanges)
public boolean distribute(LineItemSet[] inputItems, PromotionContext context)
public java.lang.String toXML() throws XMLizationException
public void fromXML(org.w3c.dom.Node anXMLNode) throws DeXMLizationException