public class ItemSortingFilter extends java.lang.Object implements Filter
<Filter impl="com.ibm.commerce.marketing.promotion.condition.ItemSortingFilter"> <!-- PriceHighToLow or PriceLowToHigh --> <SortingMethod>PriceLowToHigh</SortingMethod> <SplitMethod>SplitStartToEnd</SplitMethod> </Filter>
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
static java.lang.String | SORTING_METHOD_PRICE_HIGH_TO_LOW
XML value 'PriceHighToLow'.
|
static java.lang.String | SORTING_METHOD_PRICE_LOW_TO_HIGH
XML value 'PriceLowToHigh'.
|
static java.lang.String | SPLIT_METHOD_END_TO_START
XML value 'SplitEndToStart'.
|
static java.lang.String | SPLIT_METHOD_START_TO_END
XML value 'SplitStartToEnd'.
|
static java.lang.String | TAG_FILTER
XML Tag 'Filter'.
|
static java.lang.String | TAG_SORTING_METHOD
XML Tag 'SortingMethod'.
|
static java.lang.String | TAG_SPLIT_METHOD
XML Tag 'SplitMethod'.
|
Constructor and Description |
---|
ItemSortingFilter()
Constructor for ItemSortingFilter.
|
Modifier and Type | Method and Description |
---|---|
LineItemSet | filter(LineItemSet input, PromotionContext context)
This filter method calls the getSortedLineItemSet() method with the AssociatedOrderItems obtained from the input LineItemSet.
|
void | fromXML(org.w3c.dom.Node anXMLNode)
Transforms the XML node into its corresponding real Object.
|
LineItemSet | getSortedLineItemSet(AssociatedOrderItem[] items)
This method takes as input an array of AssociatedOrderItems and sorts them according to their prices.
|
java.lang.String | getSortingMethod()
This method gets the sorting method.
|
java.lang.String | getSplitMethod()
This method gets the split method.
|
void | setSortingMethod(java.lang.String newSortingMethod)
This method sets the sorting method.
|
void | setSplitMethod(java.lang.String newSplitMethod)
This method sets the split method.
|
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.String TAG_FILTER
public static final java.lang.String TAG_SORTING_METHOD
public static final java.lang.String TAG_SPLIT_METHOD
public static final java.lang.String SORTING_METHOD_PRICE_HIGH_TO_LOW
public static final java.lang.String SORTING_METHOD_PRICE_LOW_TO_HIGH
public static final java.lang.String SPLIT_METHOD_START_TO_END
public static final java.lang.String SPLIT_METHOD_END_TO_START
public java.lang.String getSortingMethod()
public void setSortingMethod(java.lang.String newSortingMethod)
public java.lang.String getSplitMethod()
public void setSplitMethod(java.lang.String newSplitMethod)
public LineItemSet filter(LineItemSet input, PromotionContext context)
public LineItemSet getSortedLineItemSet(AssociatedOrderItem[] items)
public java.lang.String toXML() throws XMLizationException
public void fromXML(org.w3c.dom.Node anXMLNode) throws DeXMLizationException