public class CatalogEntryAttributeFilter extends java.lang.Object implements Filter
XML Snippet for this type of Filter.
<Filter impl="com.ibm.commerce.marketing.promotion.condition.CatalogEntryAttributeFilter"> <AssociatedLanguage>-1</AssociatedLanguage> <CaseSensitive>false</CaseSensitive> <SupportAttributeWithNoAssociatedLanguage>false</SupportAttributeWithNoAssociatedLanguage> <AttributeRule> <Name>Color</Name> <MatchingType>EqualTo</MatchingType> <Value>Blue</Value> <Value>Red</Value> </AttributeRule> <AttributeRule> <Name>Size</Name> <MatchingType>GreaterThan</MatchingType> <Value>12</Value> </AttributeRule> </Filter>
Modifier and Type | Class and Description |
---|---|
class | CatalogEntryAttributeFilter.AttributeRule
A class that represents the attribute matching rule.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
static int | MATCH_RESULT_FALSE
A constant indicates that the attribute value does not match the rule.
|
static int | MATCH_RESULT_TRUE
A constant indicates that the attribute value matches the rule.
|
static int | MATCH_RESULT_UNKNOWN
A constant indicates that the matching rule is not currently supported.
|
static java.lang.String | TAG_ATTR_RULE
XML tag - "AttributeRule"
|
static java.lang.String | TAG_CASE_SENSITIVE
XML tag - "CaseSensitive"
|
static java.lang.String | TAG_FILTER
XML tag - "Filter"
|
static java.lang.String | TAG_INCLUSION
XML tag - "Inclusion"
|
static java.lang.String | TAG_LANGUAGE
XML tag - "AssociatedLanguage"
|
static java.lang.String | TAG_SUPPORT_NONE_LANGUAGE
XML tag - "SupportAttributeWithNoAssociatedLanguage"
|
Constructor and Description |
---|
CatalogEntryAttributeFilter()
Constructor for CatalogEntryAttributeFilter.
|
Modifier and Type | Method and Description |
---|---|
protected int | checkMatchingResult(java.lang.String sAttributeValue, CatalogEntryAttributeFilter.AttributeRule aAttributeRule)
Check the Attribute value with the matching rule.
|
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 | getAssociatedLanguage()
Gets the language used for the attribute matching rules.
|
java.util.List | getAttributeRules()
Gets list of attribute matching rules.
|
boolean | isCaseSensitive()
Gets the flag indicating whether the name or value of an attribute is case-sensitive or not.
|
boolean | isInclusion()
Gets the flag indicating whether the filtering logic is for inclusion or exclusion.
|
boolean | isSupportAttributeWithNoAssociatedLanguage()
A flag indicates whether the filter will support attributes that does not have associated language.
|
void | setAssociatedLanguage(java.lang.String aLanguageId)
Sets the language used for attribute rules.
|
void | setCaseSensitive(boolean aCaseSensitive)
Sets the case-sensitive flag that indicates whether the value of an attribute is case-sensitive or not.
|
void | setInclusion(boolean aInclusion)
Sets the flag to indicate whether the filtering logic is for inclusion or exclusion.
|
void | setSupportAttributeWithNoAssociatedLanguage(boolean aFlag)
Sets the flag that indicates whether the filter will support language insensitive attributes or not.
|
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_LANGUAGE
public static final java.lang.String TAG_INCLUSION
public static final java.lang.String TAG_SUPPORT_NONE_LANGUAGE
public static final java.lang.String TAG_CASE_SENSITIVE
public static final java.lang.String TAG_ATTR_RULE
public static final int MATCH_RESULT_TRUE
public static final int MATCH_RESULT_FALSE
public static final int MATCH_RESULT_UNKNOWN
public CatalogEntryAttributeFilter()
public java.util.List getAttributeRules()
protected int checkMatchingResult(java.lang.String sAttributeValue, CatalogEntryAttributeFilter.AttributeRule aAttributeRule)
public LineItemSet filter(LineItemSet input, PromotionContext context)
public java.lang.String toXML() throws XMLizationException
public void fromXML(org.w3c.dom.Node anXMLNode) throws DeXMLizationException
public java.lang.String getAssociatedLanguage()
public void setAssociatedLanguage(java.lang.String aLanguageId)
public boolean isSupportAttributeWithNoAssociatedLanguage()
public void setSupportAttributeWithNoAssociatedLanguage(boolean aFlag)
public boolean isCaseSensitive()
public void setCaseSensitive(boolean aCaseSensitive)
public boolean isInclusion()
public void setInclusion(boolean aInclusion)