com.ibm.commerce.marketing.promotion.condition

Class MultiSKUFilter

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


    public class MultiSKUFilter
    extends java.lang.Object
    implements Filter
    MultiSKUFilter class filters LineItemSet based on CatalogEntry and parent CatalogEntrys of the LineItems. It returns all the LineItem whose CatalogEntry or parent CatalogEntrys belongs to the Inclusion List and not the Exclusion List of the Filter. This class implements Filter interface. XML Snippet for this type of Filter.
     

    <Filter impl="com.ibm.commerce.marketing.promotion.condition.MultiSKUFilter"> <IncludeCatEntryKey> <CatalogEntryKey> <SKU>SKU-20101099</SKU> <DN>o=Root Organization</DN> </CatalogEntryKey> </IncludeCatEntryKey> <ExcludeCatEntryKey> <CatalogEntryKey> <SKU>SKU-20101088</SKU> <DN>o=Root Organization</DN> </CatalogEntryKey> </ExcludeCatEntryKey> </Filter>

    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
      MultiSKUFilter()
      Constructor for MultiSKUFilter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addSKUToExclList(CatalogEntryKey key)
      This method adds the CatalogEntryKey to the exclusion SKUs list.
      void addSKUToExclList(java.lang.String aDN, java.lang.String aSKU)
      This method adds the CatalogEntryKey identified by it's DN and SKU to the exclusion SKUs list.
      void addSKUToInclList(CatalogEntryKey key)
      This method adds the CatalogEntryKey to the inclusion SKUs list.
      void addSKUToInclList(java.lang.String aDN, java.lang.String aSKU)
      This method adds the CatalogEntryKey identified by it's DN and identifier to the inclusion SKUs list.
      boolean containsInExclList(CatalogEntryKey key)
      This method checks if CatalogEntryKey belongs to the exclusion SKUs list.
      boolean containsInExclList(java.lang.String aDN, java.lang.String aSKU)
      This method checks if CatalogEntryKey identified by it's DN and SKU belongs to the exclusion SKUs list.
      boolean containsInInclList(CatalogEntryKey key)
      This method checks if CatalogEntryKey belongs to the inclusion SKUs list.
      boolean containsInInclList(java.lang.String aDN, java.lang.String aSKU)
      This method checks if CatalogEntryKey identified by it's DN and SKU belongs to the inclusion SKUs list.
      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 getExclListCount()
      This method returns the number of SKUs in exclusion list.
      int getInclListCount()
      This method returns the number of SKUs in inclusion list.
      CatalogEntryKey[] getSKUsFromExclList()
      This method gets the list of CatalogEntryKey in the exclusion SKUs list.
      CatalogEntryKey[] getSKUsFromInclList()
      This method gets the list of CatalogEntryKey in the inclusion SKUs list.
      void removeSKUFromExclList(CatalogEntryKey key)
      This method removes the CatalogEntryKey from the exclusion SKUs list.
      void removeSKUFromExclList(java.lang.String aDN, java.lang.String aSKU)
      This method removes the CatalogEntryKey identified by it's DN and SKU from the exclusion SKUs list.
      void removeSKUFromInclList(CatalogEntryKey key)
      This method removes the CatalogEntryKey from the inclusion SKUs list.
      void removeSKUFromInclList(java.lang.String aDN, java.lang.String aSKU)
      This method removes the CatalogEntryKey identified by it's DN and SKU from the inclusion SKUs list.
      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

      • MultiSKUFilter

        public MultiSKUFilter()
        Constructor for MultiSKUFilter.
    • Method Detail

      • getSKUsFromInclList

        public CatalogEntryKey[] getSKUsFromInclList()
        This method gets the list of CatalogEntryKey in the inclusion SKUs list.
        Returns:
        list of CatalogEntryKey
      • getSKUsFromExclList

        public CatalogEntryKey[] getSKUsFromExclList()
        This method gets the list of CatalogEntryKey in the exclusion SKUs list.
        Returns:
        list of CatalogEntryKey
      • addSKUToInclList

        public void addSKUToInclList(java.lang.String aDN,
                                     java.lang.String aSKU)
        This method adds the CatalogEntryKey identified by it's DN and identifier to the inclusion SKUs list.
        Parameters:
        aDN - The DN of the CatalogEntryKey
        aSKU - The SKU of the CatalogEntryKey
      • addSKUToInclList

        public void addSKUToInclList(CatalogEntryKey key)
        This method adds the CatalogEntryKey to the inclusion SKUs list.
        Parameters:
        key - The CatalogEntryKey to add to the inclusion list.
      • addSKUToExclList

        public void addSKUToExclList(java.lang.String aDN,
                                     java.lang.String aSKU)
        This method adds the CatalogEntryKey identified by it's DN and SKU to the exclusion SKUs list.
        Parameters:
        aDN - The DN of the CatalogEntryKey
        aSKU - The SKU of the CatalogEntryKey
      • addSKUToExclList

        public void addSKUToExclList(CatalogEntryKey key)
        This method adds the CatalogEntryKey to the exclusion SKUs list.
        Parameters:
        key - The CatalogEntryKey to add to the exclusion list.
      • removeSKUFromExclList

        public void removeSKUFromExclList(java.lang.String aDN,
                                          java.lang.String aSKU)
        This method removes the CatalogEntryKey identified by it's DN and SKU from the exclusion SKUs list.
        Parameters:
        aDN - The DN of the CatalogEntryKey
        aSKU - The SKU of the CatalogEntryKey
      • removeSKUFromExclList

        public void removeSKUFromExclList(CatalogEntryKey key)
        This method removes the CatalogEntryKey from the exclusion SKUs list.
        Parameters:
        key - The CatalogEntryKey to remove from the exclusion list.
      • removeSKUFromInclList

        public void removeSKUFromInclList(java.lang.String aDN,
                                          java.lang.String aSKU)
        This method removes the CatalogEntryKey identified by it's DN and SKU from the inclusion SKUs list.
        Parameters:
        aDN - The DN of the CatalogEntryKey
        aSKU - The SKU of the CatalogEntryKey
      • removeSKUFromInclList

        public void removeSKUFromInclList(CatalogEntryKey key)
        This method removes the CatalogEntryKey from the inclusion SKUs list.
        Parameters:
        key - The CatalogEntryKey to remove from the inclusion list.
      • containsInInclList

        public boolean containsInInclList(java.lang.String aDN,
                                          java.lang.String aSKU)
        This method checks if CatalogEntryKey identified by it's DN and SKU belongs to the inclusion SKUs list.
        Parameters:
        aDN - The DN of the CatalogEntryKey
        aSKU - The SKU of the CatalogEntryKey
        Returns:
        boolean true if belongs to inclusion list, false otherwise;
      • containsInInclList

        public boolean containsInInclList(CatalogEntryKey key)
        This method checks if CatalogEntryKey belongs to the inclusion SKUs list.
        Parameters:
        key - The CatalogEntryKey to check in the inclusion list.
        Returns:
        boolean true if belongs to inclusion list, false otherwise;
      • containsInExclList

        public boolean containsInExclList(java.lang.String aDN,
                                          java.lang.String aSKU)
        This method checks if CatalogEntryKey identified by it's DN and SKU belongs to the exclusion SKUs list.
        Parameters:
        aDN - The DN of the CatalogEntryKey
        aSKU - The SKU of the CatalogEntryKey
        Returns:
        boolean true if belongs to exclusion list, false otherwise;
      • containsInExclList

        public boolean containsInExclList(CatalogEntryKey key)
        This method checks if CatalogEntryKey belongs to the exclusion SKUs list.
        Parameters:
        key - The CatalogEntryKey
        Returns:
        boolean true if belongs to exclusion list, false otherwise;
      • getInclListCount

        public int getInclListCount()
        This method returns the number of SKUs in inclusion list.
        Returns:
        int size of inclusion list
      • getExclListCount

        public int getExclListCount()
        This method returns the number of SKUs in exclusion list.
        Returns:
        int size of exclusion list
      • filter

        public LineItemSet filter(LineItemSet input,
                                  PromotionContext context)
        Description copied from interface: Filter
        This method performs the business logic to filter the input LineItemSet and return a subset of the original LineItemSet. An empty LineItemSet may be returned if no line item matches the filtering condition.
        Specified by:
        filter in interface Filter
        Parameters:
        input - LineItemSet
        context - PromotionContext
        Returns:
        the filtered LineItemSet
        See Also:
        com.ibm.commerce.marketing.promotion.condition.Filter#filter(LineItemSet)