|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.nimx.nuggets.iplanetset.FilterCondition
public class FilterCondition
The data object of a filter condition.
Each filter condition is composed of three parts:
Constant Name | Display As | Description | Actual Key Stored | Supported Comparator | Valid Values |
---|---|---|---|---|---|
KEY_TO | To | ["To","Cc","Bcc","Resent-to","Resent-cc","Resent-bcc"] | COMP_CONTAINS, COMP_BEGINS_WITH, COMP_ENDS_WITH, COMP_MATCHES, COMP_EXACT, COMP_EXISTS | Any string. If your "exact" value contains characters "*", "?" or """, make sure you escape them by perpending "\\" before the character. | |
KEY_FROM | From | ["From","Sender","Resent-from","Resent-sender","Return-path"] | COMP_CONTAINS, COMP_BEGINS_WITH, COMP_ENDS_WITH, COMP_MATCHES, COMP_EXACT, COMP_EXISTS | Any string. If your "exact" value contains characters "*", "?" or """, make sure you escape them by perpending "\\" before the character. | |
KEY_SUBJECT | Subject | ["Subject","Comments","Keywords"] | COMP_CONTAINS, COMP_BEGINS_WITH, COMP_ENDS_WITH, COMP_MATCHES, COMP_EXACT, COMP_EXISTS | Any string. If your "exact" value contains characters "*", "?" or """, make sure you escape them by perpending "\\" before the character. | |
KEY_PRIORITY | Priority | The priority of email | ["X-Priority","X-MSMail-Priority"] | COMP_BEGINS_WITH | 1 to 5, where 1 is highest priority |
KEY_SIZE | Size | This is a pseudo key to indicate we are comparing the size. | - no real key stored - | COMP_OVER, COMP_UNDER | An integer number that can follows the quantifier "K", "M" or "G". (which stands for Kilo, Mega and Giga). If no quantifier is specified, it assumes the unit to be octet. |
- | - | You may also specify any key identifier that complies RFC 3028 | - | - |
The comparator identify what kind of relationship that we are evaluating between the key and value. The valid comparators are:
Constant Name | Display As | Actual Comparator Stored | Additional action |
---|---|---|---|
COMP_CONTAINS | contains | header :contains | - |
COMP_BEGINS_WITH | begins with | header :matches | prepends "*" before the value. |
COMP_ENDS_WITH | ends with | header :matches | appends "*" after the value. |
COMP_MATCHES | matches | header :matches | - |
COMP_EXACT | is exactly | header :is | - |
COMP_OVER | over | size :over | - |
COMP_UNDER | under | size :under | - |
COMP_EXISTS | exists | exists | - |
Field Summary | |
---|---|
protected java.lang.String |
_comparator
|
protected boolean |
_isPositive
|
protected java.lang.String |
_key
|
protected java.lang.String |
_value
|
static java.lang.String |
COMP_BEGINS_WITH
|
static java.lang.String |
COMP_CONTAINS
|
static java.lang.String |
COMP_ENDS_WITH
|
static java.lang.String |
COMP_EXACT
|
static java.lang.String |
COMP_EXISTS
|
static java.lang.String |
COMP_MATCHES
|
static java.lang.String |
COMP_OVER
|
static java.lang.String |
COMP_UNDER
|
static java.lang.String |
KEY_FROM
|
static java.lang.String |
KEY_PRIORITY
|
static java.lang.String |
KEY_SIZE
|
static java.lang.String |
KEY_SUBJECT
|
static java.lang.String |
KEY_TO
|
Constructor Summary | |
---|---|
FilterCondition(boolean isPositive,
java.lang.String key,
java.lang.String comparator,
java.lang.String value)
Default constructor. |
|
FilterCondition(java.lang.String ldapStr)
Parser constructor. |
Method Summary | |
---|---|
java.lang.String |
getComparator()
|
boolean |
getIsPositive()
|
java.lang.String |
getKey()
|
java.lang.String |
getValue()
|
void |
setComparator(java.lang.String comparator)
|
void |
setIsPositive(boolean isPositive)
|
void |
setKey(java.lang.String key)
|
void |
setValue(java.lang.String value)
|
java.lang.String |
toLdapString()
Returns the string that is actually stored to LDAP. |
java.lang.String |
toString()
Returns the displayable representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean _isPositive
protected java.lang.String _key
protected java.lang.String _comparator
protected java.lang.String _value
public static final java.lang.String KEY_FROM
public static final java.lang.String KEY_TO
public static final java.lang.String KEY_SUBJECT
public static final java.lang.String KEY_SIZE
public static final java.lang.String KEY_PRIORITY
public static final java.lang.String COMP_CONTAINS
public static final java.lang.String COMP_BEGINS_WITH
public static final java.lang.String COMP_ENDS_WITH
public static final java.lang.String COMP_MATCHES
public static final java.lang.String COMP_EXACT
public static final java.lang.String COMP_OVER
public static final java.lang.String COMP_UNDER
public static final java.lang.String COMP_EXISTS
Constructor Detail |
---|
public FilterCondition(boolean isPositive, java.lang.String key, java.lang.String comparator, java.lang.String value)
isPositive
- indicates whether this condition is evaluated as is. If this
parameter is set to false, the condition will be evaluated as the
opposite value.
key
- the key string. This is the display key string (i.e. the shorter
version).
comparator
- A string object of the comparator.
value
- The value of the evaluation.
public FilterCondition(java.lang.String ldapStr)
ldapStr
- The string from the storage. This string should have all the
special command key words and separator removed.Method Detail |
---|
public void setKey(java.lang.String key)
public java.lang.String getKey()
public void setComparator(java.lang.String comparator)
public java.lang.String getComparator()
public void setValue(java.lang.String value)
public java.lang.String getValue()
public void setIsPositive(boolean isPositive)
public boolean getIsPositive()
public java.lang.String toString()
key comparator "value"
toString
in class java.lang.Object
public java.lang.String toLdapString()
|
Nitido NiM 2.5 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2009 Nitido Inc. Proprietary and Confidential. All Rights Reserved.