public class QuantityBasedGroupingFilter extends java.lang.Object implements Filter
QuantityBasedGroupingFilter
selects a sub set of order items based on defined
quantity related selection logic.
Parameters to this filter include: BaseQuantity
MaxGroupCount
SelectionQuantity
BaseSelectionPosition
SelectionPosition
<Filter impl="com.ibm.commerce.marketing.promotion.condition.QuantityBasedGroupingFilter"> <BaseQuantity>3</BaseQuantity> <MaxGroupCount>2</MaxGroupCount> <SelectPosition>1</SelectPosition> <SelectionQuantity>3</SelectionQuantity> <BaseSelectionPosition>1</BaseSelectionPosition> </Filter>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
static java.lang.Integer |
HIGHEST
Indicates select at end
|
static java.lang.Integer |
HIGHEST_WITHIN_GROUP
Indicates select in Random way
|
static java.lang.Integer |
LOWEST
Indicates select from Beginning
|
static java.lang.Integer |
LOWEST_WITHIN_GROUP
Indicates select in Random way
|
Constructor and Description |
---|
QuantityBasedGroupingFilter()
Constructor for QuantityBasedGroupingFilter.
|
Modifier and Type | Method and Description |
---|---|
LineItemSet |
filter(LineItemSet input,
PromotionContext context)
This method performs the business logic to filter the input LineItemSet
and return a subset of the original LineItemSet.
|
void |
fromXML(org.w3c.dom.Node anXMLNode)
Transforms the XML node into its corresponding real Object.
|
int |
getBaseQuantity()
Returns the base quantity of the filter.
|
int |
getBaseSelectionPosition()
Returns the base selection position of the filter.
|
int |
getMaxGroupCount()
Returns the maximum group count of the filter.
|
int |
getSelectionPosition()
Returns the selection position of the filter.
|
int |
getSelectionQuantity()
Returns the selection quantity of the filter.
|
void |
setBaseQuantity(int i)
Sets the base quantity of the filter.
|
void |
setBaseSelectionPosition(int i)
Sets the base selection position of the filter.
|
void |
setMaxGroupCount(int i)
Sets the maximum group count size of the filter.
|
void |
setSelectionPosition(int i)
Sets the selection position of the filter.
|
void |
setSelectionQuantity(int i)
Sets the selection quantity of the filter.
|
java.lang.String |
toXML()
Converts the object into its corresponding XML format representation.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.Integer LOWEST
public static final java.lang.Integer HIGHEST
public static final java.lang.Integer LOWEST_WITHIN_GROUP
public static final java.lang.Integer HIGHEST_WITHIN_GROUP
public QuantityBasedGroupingFilter()
public LineItemSet filter(LineItemSet input, PromotionContext context)
Filter
filter
in interface Filter
input
- LineItemSet
context
- PromotionContext
LineItemSet
Filter.filter(LineItemSet, PromotionContext)
public java.lang.String toXML() throws XMLizationException
XMLizable
toXML
in interface XMLizable
XMLizationException
- when this process failsXMLizable.toXML()
public void fromXML(org.w3c.dom.Node anXMLNode) throws DeXMLizationException
XMLizable
fromXML
in interface XMLizable
anXMLNode
- The node that represents an XMLizable objectDeXMLizationException
- when this process failsXMLizable.fromXML(Node)
public int getBaseQuantity()
public int getBaseSelectionPosition()
public int getMaxGroupCount()
public int getSelectionQuantity()
public int getSelectionPosition()
public void setBaseQuantity(int i)
i
- The base quantity to set the filter to.public void setBaseSelectionPosition(int i)
i
- The base selection position to set the filter to.public void setMaxGroupCount(int i)
i
- The maximum group count to set the filter to.public void setSelectionQuantity(int i)
i
- The selection quantity to set the filter to.public void setSelectionPosition(int i)
i
- The selection position to set the filter to.