|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.eventgnosis.filters.Condition
Implements a set of expressions connected by logical operators to be built and evaluated against an incoming event.
Each expression has input values and can utilize operators form the following table.
Valid Valuetype for operators:
string and number: equal, not equal, greater than, less than, less than or equal, greater than or equal, exists, is empty.
STRING ONLY: contains, isContainedinString, matchesRegularExpression, inList.
Condition Phrase |
<negate> |
<operator> |
<valueType> |
numerically equal |
false |
eq |
number |
equal to string |
false |
eq |
string |
equal to case insensitive string |
false |
eq |
stringIgnoreCase |
|
|
|
|
numerically not equal |
false |
neq |
number |
not equal to string |
false |
neq |
string |
not equal to case insensitive string |
false |
neq |
stringIgnoreCase |
|
|
|
|
numerically greater than |
false |
gt |
number |
ASCII greater than |
false |
gt |
string |
ASCII case insensitive greater than |
false |
gt |
stringIgnoreCase |
|
|
|
|
numerically greater than or equal to |
false |
geq |
number |
ASCII greater than or equal to |
false |
geq |
string |
ASCII case insensitive greater than or equal to |
false |
geq |
stringIgnoreCase |
|
|
|
|
numerically less than |
false |
lt |
number |
ASCII less than |
false |
lt |
string |
ASCII case insensitive less than |
false |
lt |
stringIgnoreCase |
|
|
|
|
numerically less than or equal to |
false |
leq |
number |
ASCII less than or equal to |
false |
leq |
string |
ASCII case insensitive less than or equal to |
false |
leq |
stringIgnoreCase |
|
|
|
|
contains string |
false |
containsString |
string |
contains string case insensitive |
false |
containsString |
stringIgnoreCase |
does not contain string |
true |
containsString |
string |
does not contain string case insensitive string |
true |
containsString |
stringIgnoreCase |
|
|
|
|
is substring of |
false |
isContainedInString |
string |
is case insensitive substring of |
false |
isContainedInString |
stringIgnoreCase |
is not substring of |
true |
isContainedInString |
string |
is not case insensitive substring of |
true |
isContainedInString |
stringIgnoreCase |
|
|
|
|
matches regular expression |
false |
matchesRegExp |
string |
does not match regular expression |
true |
matchesRegExp |
stringIgnoreCase |
|
|
|
|
matches one of value list |
false |
isInList |
string |
matches one of value case insensitive list |
false |
isInList |
stringIgnoreCase |
does not match one of value list |
true |
isInList |
string |
does not match one of value case insensitive list |
true |
isInList |
stringIgnoreCase |
|
|
|
|
exists |
false |
exists |
n/a |
does not exist |
true |
exists |
n/a |
|
|
|
|
is empty |
false |
isEmpty |
n/a |
is not empty |
true |
isEmpty |
n/a |
If there is more than one fieldName in the event, only the first will be considered.
Number
String or StringIgnoreCase
Field Summary | |
static int |
COND_ALL
|
static int |
COND_ANY
|
static java.lang.String |
COND_ANY_STR
|
static int |
DEF_COND_REL
|
static java.lang.String |
DEF_COND_REL_STR
|
Constructor Summary | |
Condition()
|
|
Condition(boolean negPrim,
int condRel,
java.util.ArrayList condList)
|
Method Summary | |
java.lang.String |
build(Log log,
com.eventgnosis.config.ConfigurationManager configMgr,
org.w3c.dom.Element elem)
After object is instantiated this method is called to parse the EMML DOM element, setting its internal state to the parsed values. |
java.util.ArrayList |
getConditionList()
|
int |
getConditionListSize()
|
int |
getConditionRelation()
|
java.lang.String |
getConditionRelationAsString()
|
java.lang.String |
getConfigXml()
|
static Condition |
getDefault()
|
boolean |
getNegatePrimaryCondition()
|
boolean |
match(Event event)
Evaluates the incoming event against logically connected set of expressions. |
static Condition |
parse(Log log,
com.eventgnosis.config.ConfigurationManager configMgr,
org.w3c.dom.Element elem)
Parses emml dom element creating the Condition object. |
void |
setConditionList(java.util.ArrayList condList)
|
void |
setConditionRelation(int condRel)
|
void |
setNegatePrimaryCondition(boolean negPrim)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int COND_ALL
public static final int COND_ANY
public static java.lang.String COND_ANY_STR
public static final int DEF_COND_REL
public static final java.lang.String DEF_COND_REL_STR
Constructor Detail |
public Condition()
public Condition(boolean negPrim, int condRel, java.util.ArrayList condList)
Method Detail |
public java.lang.String build(Log log, com.eventgnosis.config.ConfigurationManager configMgr, org.w3c.dom.Element elem)
EmmlParmBuilder
build
in interface EmmlParmBuilder
log
- logger instance for tracking error, warning and info messages.configMgr
- holds configuration data structure used to properly configure runtime setup based on input ECA(s).elem
- emml(dom) node to be parsed
public java.util.ArrayList getConditionList()
public int getConditionListSize()
public int getConditionRelation()
public java.lang.String getConditionRelationAsString()
public java.lang.String getConfigXml()
public static Condition getDefault()
public boolean getNegatePrimaryCondition()
public boolean match(Event event)
event
- incoming event to be evaluated
public static Condition parse(Log log, com.eventgnosis.config.ConfigurationManager configMgr, org.w3c.dom.Element elem)
log
- logger instance for tracking error, warning and info messages.configMgr
- holds configuration data structure used to properly configure runtime setup based on input ECA(s).elem
- emml(dom) node to parse
public void setConditionList(java.util.ArrayList condList)
public void setConditionRelation(int condRel)
public void setNegatePrimaryCondition(boolean negPrim)
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |