Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

com::cosylab::logging::engine::Filter Class Reference

List of all members.

Public Types

enum  Constraint {
  MINIMUM, MAXIMUM, MINMAX, EXACT,
  STRING_WILDCHAR
}

Public Member Functions

 Filter (Field field, boolean isLethal, Comparable minimum, Comparable maximum, boolean notFilter) throws InvalidFilterConstraintException
 Filter (Field field, boolean isLethal, Integer exact, boolean notFilter) throws InvalidFilterConstraintException
 Filter (Field field, boolean isLethal, Integer minimum, Integer maximum, boolean notFilter) throws InvalidFilterConstraintException
 Filter (Field field, boolean isLethal, Object exact, boolean notFilter) throws InvalidFilterConstraintException
 Filter (Field field, boolean isLethal, String regularExpression, boolean notFilter) throws InvalidFilterConstraintException, PatternSyntaxException
 Filter (Field field, boolean isLethal, String minimum, String maximum, boolean notFilter) throws InvalidFilterConstraintException
 Filter (Field 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 ()
Field getField ()

Static Public Member Functions

Filter buildFilter (Field field, String lethal, String not, String min, String minType, String max, String maxType, String exact, String exactType, String wildChar) throws Exception

Public Attributes

Field field = null
Constraint constraint = null
String regularExpression = null
Comparable minimum = null
Comparable maximum = null
Object exact = null

Package Types


Private Member Functions

 Filter (Field field, Constraint constraint, boolean isLethal, boolean notFilter)

Private Attributes

boolean isLethal = false
boolean notFilter = false

Detailed Description

A Filter is a class used for filtering LogEntries. It has the following characteristics:


Member Enumeration Documentation

enum com::cosylab::logging::engine::Filter::Constraint
 

The possible comparison types

Author:
acaproni
Enumeration values:
MINIMUM 
MAXIMUM 
MINMAX 
EXACT 
STRING_WILDCHAR 


Constructor & Destructor Documentation

com::cosylab::logging::engine::Filter::Filter Field  field,
Constraint  constraint,
boolean  isLethal,
boolean  notFilter
[inline, private]
 

Constructor

Parameters:
field The field
constraint The constraint
isLethal The activation state of the filter
notFilter Usage of the filter (normal or not)

com::cosylab::logging::engine::Filter::Filter Field  field,
boolean  isLethal,
Comparable  minimum,
Comparable  maximum,
boolean  notFilter
throws InvalidFilterConstraintException [inline]
 

Constructor

com::cosylab::logging::engine::Filter::Filter Field  field,
boolean  isLethal,
Integer  exact,
boolean  notFilter
throws InvalidFilterConstraintException [inline]
 

com::cosylab::logging::engine::Filter::Filter Field  field,
boolean  isLethal,
Integer  minimum,
Integer  maximum,
boolean  notFilter
throws InvalidFilterConstraintException [inline]
 

Insert the method's description here. Creation date: (2/7/02 2:46:21 PM)

Parameters:
field int
isLethal boolean
minimum java.lang.Integer
maximum java.lang.Integer

com::cosylab::logging::engine::Filter::Filter Field  field,
boolean  isLethal,
Object  exact,
boolean  notFilter
throws InvalidFilterConstraintException [inline]
 

com::cosylab::logging::engine::Filter::Filter Field  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

com::cosylab::logging::engine::Filter::Filter Field  field,
boolean  isLethal,
String  minimum,
String  maximum,
boolean  notFilter
throws InvalidFilterConstraintException [inline]
 

Insert the method's description here. Creation date: (2/7/02 2:48:18 PM)

Parameters:
field int
isLethal boolean
minimum java.lang.String
maximum java.lang.String

com::cosylab::logging::engine::Filter::Filter Field  field,
boolean  isLethal,
Date  minimum,
Date  maximum,
boolean  notFilter
throws InvalidFilterConstraintException [inline]
 

Insert the method's description here. Creation date: (2/7/02 2:47:35 PM)

Parameters:
field int
isLethal boolean
minimum java.util.Date
maximum java.util.Date


Member Function Documentation

boolean com::cosylab::logging::engine::Filter::applyTo Object  obj  )  [inline]
 

Apply the filter to the passed object.

Parameters:
obj The object to apply the filter to
Returns:
true if the object matches the filter

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.

Filter com::cosylab::logging::engine::Filter::buildFilter Field  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

Parameters:
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
Returns:
The Filter object built or null if an error occurred decoding the parameters
Exceptions:
Exception in case of error building the filter

Field com::cosylab::logging::engine::Filter::getField  )  [inline]
 

Return the type of the filter

Returns:
The type of the filter

boolean com::cosylab::logging::engine::Filter::getIsLethal  )  [inline]
 

Returns:
The value of IsLethal

boolean com::cosylab::logging::engine::Filter::notPolicyApplyed  )  [inline]
 

Return the NOT policy

Returns:
True if the filter is used with not policy (i.e. The log entries that pass are those who do NOT satify the constraints)

String com::cosylab::logging::engine::Filter::toString  )  [inline]
 

Build a description of the filter

Returns:
The description of the filter

String com::cosylab::logging::engine::Filter::toXMLString  )  [inline]
 

Build an XML representation of the filter

Returns:
The XML representing the filter


Member Data Documentation

Constraint com::cosylab::logging::engine::Filter::constraint = null
 

Object com::cosylab::logging::engine::Filter::exact = null
 

Field com::cosylab::logging::engine::Filter::field = null
 

boolean com::cosylab::logging::engine::Filter::isLethal = false [private]
 

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]
 

String com::cosylab::logging::engine::Filter::regularExpression = null
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:13:06 2009 for ACS Java API by doxygen 1.3.8