public class MultiSKUFilter extends java.lang.Object implements Filter
MultiSKUFilter
class filters LineItemSet based on CatalogEntry
and parent CatalogEntry
s of the LineItems. It returns all the LineItem
whose CatalogEntry
or parent CatalogEntry
s 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>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
MultiSKUFilter()
Constructor for MultiSKUFilter.
|
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.
|
public static final java.lang.String COPYRIGHT
public CatalogEntryKey[] getSKUsFromInclList()
CatalogEntryKey
in the inclusion SKUs list.CatalogEntryKey
public CatalogEntryKey[] getSKUsFromExclList()
CatalogEntryKey
in the exclusion SKUs list.CatalogEntryKey
public void addSKUToInclList(java.lang.String aDN, java.lang.String aSKU)
CatalogEntryKey
identified by it's DN
and identifier to the inclusion SKUs list.aDN
- The DN
of the CatalogEntryKeyaSKU
- The SKU of the CatalogEntryKeypublic void addSKUToInclList(CatalogEntryKey key)
CatalogEntryKey
to the inclusion SKUs list.key
- The CatalogEntryKey to add to the inclusion list.public void addSKUToExclList(java.lang.String aDN, java.lang.String aSKU)
CatalogEntryKey
identified by it's DN
and SKU to the exclusion SKUs list.aDN
- The DN
of the CatalogEntryKeyaSKU
- The SKU of the CatalogEntryKeypublic void addSKUToExclList(CatalogEntryKey key)
CatalogEntryKey
to the exclusion SKUs list.key
- The CatalogEntryKey to add to the exclusion list.public void removeSKUFromExclList(java.lang.String aDN, java.lang.String aSKU)
CatalogEntryKey
identified by it's DN
and SKU from the exclusion SKUs list.aDN
- The DN of the CatalogEntryKeyaSKU
- The SKU of the CatalogEntryKeypublic void removeSKUFromExclList(CatalogEntryKey key)
CatalogEntryKey
from the exclusion SKUs list.key
- The CatalogEntryKey to remove from the exclusion list.public void removeSKUFromInclList(java.lang.String aDN, java.lang.String aSKU)
CatalogEntryKey
identified by it's DN
and SKU from the inclusion SKUs list.aDN
- The DN
of the CatalogEntryKeyaSKU
- The SKU of the CatalogEntryKeypublic void removeSKUFromInclList(CatalogEntryKey key)
CatalogEntryKey
from the inclusion SKUs list.key
- The CatalogEntryKey to remove from the inclusion list.public boolean containsInInclList(java.lang.String aDN, java.lang.String aSKU)
CatalogEntryKey
identified by it's DN
and SKU belongs to the inclusion SKUs list.aDN
- The DN
of the CatalogEntryKeyaSKU
- The SKU of the CatalogEntryKeytrue
if belongs to inclusion list,
false
otherwise;public boolean containsInInclList(CatalogEntryKey key)
CatalogEntryKey
belongs to the inclusion SKUs list.key
- The CatalogEntryKey to check in the inclusion list.true
if belongs to inclusion list,
false
otherwise;public boolean containsInExclList(java.lang.String aDN, java.lang.String aSKU)
CatalogEntryKey
identified by it's DN
and SKU belongs to the exclusion SKUs list.aDN
- The DN of the CatalogEntryKeyaSKU
- The SKU of the CatalogEntryKeytrue
if belongs to exclusion list,
false
otherwise;public boolean containsInExclList(CatalogEntryKey key)
CatalogEntryKey
belongs to the exclusion SKUs list.key
- The CatalogEntryKey
true
if belongs to exclusion list,
false
otherwise;public int getInclListCount()
public int getExclListCount()
public LineItemSet filter(LineItemSet input, PromotionContext context)
Filter
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)