public class TotalCostFilter extends java.lang.Object implements Filter
TotalCostFilter
class filters LineItemSet based on the total
cost of the items in the LineItemSet. It returns all the LineItems if their
combined price is equal to or more than the price specified in the Filter.
This class implements Filter
interface.
<Filter impl="com.ibm.commerce.marketing.promotion.condition.TotalCostFilter"> <TotalCost>200</TotalCost> <Currency>CAD</Currency> </Filter>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
TotalCostFilter()
Constructor for TotalCostFilter.
|
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.
|
java.lang.String |
getCurrency()
This method gets the Currency.
|
java.math.BigDecimal |
getTotalCost()
This method gets the TotalCost.
|
void |
setCurrency(java.lang.String theCurrency)
This method sets the currency
|
void |
setTotalCost(java.math.BigDecimal theCost)
This method sets the TotalCost.
|
java.lang.String |
toXML()
Converts the object into its corresponding XML format representation.
|
public static final java.lang.String COPYRIGHT
public java.lang.String getCurrency()
public java.math.BigDecimal getTotalCost()
public void setCurrency(java.lang.String theCurrency)
aCurrency
- A currency string.public void setTotalCost(java.math.BigDecimal theCost)
_cost
- java.math.BigDecimalpublic 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)