net.sourceforge.sqlunit.handlers
Class ClassifiersHandler

java.lang.Object
  extended by net.sourceforge.sqlunit.handlers.ClassifiersHandler
All Implemented Interfaces:
IHandler

public class ClassifiersHandler
extends java.lang.Object
implements IHandler

The ClassifiersHandler processes a JDOM Element representing the classifiers element. The ClassifiersHandler is responsible for classifying a test, i.e. whether the current test meets givens some user-defined criterea. These criterea can be given as a set of external (to the test) properties. The handler works in the following way: it iterates over the nested tags of classifiers tag, calls their corresponding handlers, which compare their content with the criterea. If one of them return false, the test does not meet the criterea and is not executed and is reported as skipped; otherwise is executed.
Note that you can nest arbitrary tags in classifiers handler (and update sqlunit.dtd too), as long as method process(org.jdom.Element) of their corresponding handlers return Boolean.

Version:
$Revision: 1.3 $
Author:
Ivan Ivanov

Constructor Summary
ClassifiersHandler()
           
 
Method Summary
 java.lang.Object process(org.jdom.Element elClassifiers)
          Processes the Classifiers JDOM Element and returns a Boolean TRUE or FALSE depending on whether the test matched the criteria specified for it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassifiersHandler

public ClassifiersHandler()
Method Detail

process

public java.lang.Object process(org.jdom.Element elClassifiers)
                         throws java.lang.Exception
Processes the Classifiers JDOM Element and returns a Boolean TRUE or FALSE depending on whether the test matched the criteria specified for it. Delegates to the respective Severity and Category handlers to determine the result of the match. If one or both properties are not set, the handler will assume that all tests match.

Specified by:
process in interface IHandler
Parameters:
elClassifiers - the JDOM Element representing the classifiers tag.
Returns:
a Boolean.TRUE or FALSE. Caller must cast appropriately.
Throws:
java.lang.Exception - if there was a problem processing the element.