org.sovt.xml
Class ValidatorFactory

java.lang.Object
  extended byorg.apache.commons.digester.AbstractObjectCreationFactory
      extended byorg.sovt.xml.ValidatorFactory
All Implemented Interfaces:
org.apache.commons.digester.ObjectCreationFactory

public class ValidatorFactory
extends org.apache.commons.digester.AbstractObjectCreationFactory

Factory of Validator objects for digister.

Author:
Vilmantas Baranauskas (vilmantas_baranauskas@yahoo.com)

Field Summary
 
Fields inherited from class org.apache.commons.digester.AbstractObjectCreationFactory
digester
 
Constructor Summary
ValidatorFactory()
          Creates instance of ValidatorFactory.
 
Method Summary
 java.lang.Object createObject(org.xml.sax.Attributes attributes)
          Creates Validator for given attributes.
 
Methods inherited from class org.apache.commons.digester.AbstractObjectCreationFactory
getDigester, setDigester
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidatorFactory

public ValidatorFactory()
Creates instance of ValidatorFactory.

Method Detail

createObject

public java.lang.Object createObject(org.xml.sax.Attributes attributes)
                              throws java.lang.Exception
Creates Validator for given attributes. Validator creation order is following:
  1. Named transforer is returned if "ref" attribute is present.
  2. Class instance is returned if "class" attribute is present.
  3. Instance of GroupValidator.

Parameters:
attributes - Attribute of xml validator definition.
Returns:
instance of Validator.
Throws:
java.lang.Exception - If unable to instantiate Validator class.


Copyright © 2003-2005 . All Rights Reserved.