com.ibm.commerce.marketing.promotion.condition

Class TotalCostPatternFilter

  • java.lang.Object
    • com.ibm.commerce.marketing.promotion.condition.TotalCostPatternFilter
  • All Implemented Interfaces:
    PatternFilter, XMLizable, java.io.Serializable


    public class TotalCostPatternFilter
    extends java.lang.Object
    implements PatternFilter
    TotalCostPatternFilter class filters LineItemSet based on the Total Cost of the items LineItemSet. If the total cost of all items exceeds the cost specified in the Filter it returns true else it returns false.This class implements PatternFilter interface. XML Snippet for this type of PatternFilter.
            <PatternFilter impl="com.ibm.commerce.marketing.promotion.condition.TotalCostPatternFilter">
                    <TotalCost>200</TotalCost>
                    <Currency>CAD</Currency>
            </PatternFilter>
     
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Constructor Summary

      Constructors 
      Constructor and Description
      TotalCostPatternFilter()
      Constructor for TotalCostPatternFilter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean evaluate(LineItemSet input, PromotionContext context)
      This method checks if the LineItemSet passed as input satisfies the condition specified in the filter.
      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 _currency)
      This method sets the currency
      void setTotalCost(java.math.BigDecimal _cost)
      This method sets the TotalCost.
      java.lang.String toXML()
      Converts the object into its corresponding XML format representation.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TotalCostPatternFilter

        public TotalCostPatternFilter()
        Constructor for TotalCostPatternFilter.
    • Method Detail

      • getCurrency

        public java.lang.String getCurrency()
        This method gets the Currency.
        Returns:
        java.lang.String Currency
      • getTotalCost

        public java.math.BigDecimal getTotalCost()
        This method gets the TotalCost.
        Returns:
        java.math.BigDecimal TotalCost
      • setCurrency

        public void setCurrency(java.lang.String _currency)
        This method sets the currency
        Parameters:
        _currency - java.lang.String
      • setTotalCost

        public void setTotalCost(java.math.BigDecimal _cost)
        This method sets the TotalCost.
        Parameters:
        _cost - java.math.BigDecimal