
Public Types | |
| enum | Constraint { MINIMUM, MAXIMUM, MINMAX, EXACT, STRING_WILDCHAR } |
Public Member Functions | |
| Filter (LogField field, boolean isLethal, Comparable minimum, Comparable maximum, boolean notFilter) throws InvalidFilterConstraintException | |
| Filter (LogField field, boolean isLethal, Integer exact, boolean notFilter) throws InvalidFilterConstraintException | |
| Filter (LogField field, boolean isLethal, Integer minimum, Integer maximum, boolean notFilter) throws InvalidFilterConstraintException | |
| Filter (LogField field, boolean isLethal, Object exact, boolean notFilter) throws InvalidFilterConstraintException | |
| Filter (LogField field, boolean isLethal, String regularExpression, boolean notFilter) throws InvalidFilterConstraintException, PatternSyntaxException | |
| Filter (LogField field, boolean isLethal, String minimum, String maximum, boolean notFilter) throws InvalidFilterConstraintException | |
| Filter (LogField field, boolean isLethal, Date minimum, Date maximum, boolean notFilter) throws InvalidFilterConstraintException | |
| boolean | applyTo (ILogEntry logEntry, boolean lethalCircumstances) |
| boolean | applyTo (Object obj) |
| String | toString () |
| String | toXMLString () |
| boolean | notPolicyApplyed () |
| boolean | getIsLethal () |
| LogField | getField () |
Static Public Member Functions | |
| static Filter | buildFilter (LogField field, String lethal, String not, String min, String minType, String max, String maxType, String exact, String exactType, String wildChar) throws Exception |
Public Attributes | |
| LogField | field = null |
| Constraint | constraint = null |
| String | regularExpression = null |
| Comparable | minimum = null |
| Comparable | maximum = null |
| Object | exact = null |
Private Member Functions | |
| Filter (LogField field, Constraint constraint, boolean isLethal, boolean notFilter) | |
Private Attributes | |
| boolean | isLethal = false |
| boolean | notFilter = false |
A Filter is a class used for filtering LogEntries. It has the following characteristics:
| com::cosylab::logging::engine::Filter::Filter | ( | LogField | field, | |
| Constraint | constraint, | |||
| boolean | isLethal, | |||
| boolean | notFilter | |||
| ) | [inline, private] |
Constructor
| field | The field | |
| constraint | The constraint | |
| isLethal | The activation state of the filter | |
| notFilter | Usage of the filter (normal or not) |
Referenced by buildFilter(), and com::cosylab::logging::settings::FilterStringPanel::getFilter().
| com::cosylab::logging::engine::Filter::Filter | ( | LogField | field, | |
| boolean | isLethal, | |||
| Comparable | minimum, | |||
| Comparable | maximum, | |||
| boolean | notFilter | |||
| ) | throws InvalidFilterConstraintException [inline] |
| com::cosylab::logging::engine::Filter::Filter | ( | LogField | field, | |
| boolean | isLethal, | |||
| Integer | exact, | |||
| boolean | notFilter | |||
| ) | throws InvalidFilterConstraintException [inline] |
| com::cosylab::logging::engine::Filter::Filter | ( | LogField | field, | |
| boolean | isLethal, | |||
| Integer | minimum, | |||
| Integer | maximum, | |||
| boolean | notFilter | |||
| ) | throws InvalidFilterConstraintException [inline] |
| com::cosylab::logging::engine::Filter::Filter | ( | LogField | field, | |
| boolean | isLethal, | |||
| Object | exact, | |||
| boolean | notFilter | |||
| ) | throws InvalidFilterConstraintException [inline] |
| com::cosylab::logging::engine::Filter::Filter | ( | LogField | field, | |
| boolean | isLethal, | |||
| String | regularExpression, | |||
| boolean | notFilter | |||
| ) | throws InvalidFilterConstraintException, PatternSyntaxException [inline] |
Build a filter with a regular expression Check if the string is a valid regular expression
References field, isLethal, notFilter, and regularExpression.
| com::cosylab::logging::engine::Filter::Filter | ( | LogField | field, | |
| boolean | isLethal, | |||
| String | minimum, | |||
| String | maximum, | |||
| boolean | notFilter | |||
| ) | throws InvalidFilterConstraintException [inline] |
| com::cosylab::logging::engine::Filter::Filter | ( | LogField | field, | |
| boolean | isLethal, | |||
| Date | minimum, | |||
| Date | maximum, | |||
| boolean | notFilter | |||
| ) | throws InvalidFilterConstraintException [inline] |
| boolean com::cosylab::logging::engine::Filter::applyTo | ( | Object | obj | ) | [inline] |
Apply the filter to the passed object.
| obj | The object to apply the filter to |
true if the object matches the filter References constraint, exact, field, maximum, minimum, notFilter, and regularExpression.
| boolean com::cosylab::logging::engine::Filter::applyTo | ( | ILogEntry | logEntry, | |
| boolean | lethalCircumstances | |||
| ) | [inline] |
The most imporant method of this class. Returns true if LogEntryXML passes through the filter and false otherwise.
If this instance is a non-lethal filter and is called in lethal circumstances (at an engine level), this filter always returns true.
If this instance is a lethal filter and is called in non-lethal circumstances (at a GUI level), this filter always returns true.
References field, com::cosylab::logging::engine::log::ILogEntry::getField(), and isLethal.
Referenced by alma::acs::logging::table::LogTableRowFilter::include().
| static Filter com::cosylab::logging::engine::Filter::buildFilter | ( | LogField | field, | |
| String | lethal, | |||
| String | not, | |||
| String | min, | |||
| String | minType, | |||
| String | max, | |||
| String | maxType, | |||
| String | exact, | |||
| String | exactType, | |||
| String | wildChar | |||
| ) | throws Exception [inline, static] |
Build a Filter object All the parameters are String objects. Before building the object, the value of each parameter is checked This method is too long (and boring) for my taste but it is very easy
| field | The filed parameter fo Filter | |
| lethal | The isLethal parameter of Filter | |
| not | The applyAsNOT parameter of Filter | |
| min | The minimum parameter of Filter | |
| minType | The type of minimum | |
| max | The max parameter of Filter | |
| maxType | The type of max | |
| exact | The exact parameter of Filter | |
| exactType | The type of exact | |
| wildChar | The regularExpression parameter of Filter |
| Exception | in case of error building the filter |
| LogField com::cosylab::logging::engine::Filter::getField | ( | ) | [inline] |
| boolean com::cosylab::logging::engine::Filter::getIsLethal | ( | ) | [inline] |
References isLethal.
| boolean com::cosylab::logging::engine::Filter::notPolicyApplyed | ( | ) | [inline] |
Return the NOT policy
References notFilter.
Referenced by com::cosylab::logging::settings::FilterTypePanel::setFilter(), and com::cosylab::logging::settings::FilterIntegerPanel::setFilter().
| String com::cosylab::logging::engine::Filter::toString | ( | ) | [inline] |
Build a description of the filter
References constraint, exact, field, maximum, minimum, notFilter, and regularExpression.
| String com::cosylab::logging::engine::Filter::toXMLString | ( | ) | [inline] |
Build an XML representation of the filter
References constraint, exact, field, isLethal, maximum, minimum, notFilter, and regularExpression.
| Object com::cosylab::logging::engine::Filter::exact = null |
| LogField com::cosylab::logging::engine::Filter::field = null |
boolean com::cosylab::logging::engine::Filter::isLethal = false [private] |
Referenced by applyTo(), buildFilter(), Filter(), getIsLethal(), and toXMLString().
| Comparable com::cosylab::logging::engine::Filter::maximum = null |
| Comparable com::cosylab::logging::engine::Filter::minimum = null |
boolean com::cosylab::logging::engine::Filter::notFilter = false [private] |
Referenced by applyTo(), Filter(), notPolicyApplyed(), toString(), and toXMLString().
| String com::cosylab::logging::engine::Filter::regularExpression = null |
Referenced by applyTo(), Filter(), toString(), and toXMLString().
1.6.2