CVS: jcontainer/loom/engine/src/java/org/jcontainer/loom/components/validator DefaultConfigurationValidator.java,1.13,1.14
Peter Donald <pdonald-yCVjj/[email protected]> Sat, 29 Nov 2003 07:45:00 -0600
| Newsgroups | gmane.comp.java.jcontainer.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/validator
In directory hogshead.codehaus.org:/tmp/cvs-serv31016/loom/engine/src/java/org/jcontainer/loom/components/validator
Modified Files:
DefaultConfigurationValidator.java
Log Message:
Remove email addie
Index: DefaultConfigurationValidator.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/validator/DefaultConfigurationValidator.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- DefaultConfigurationValidator.java 3 Nov 2003 06:43:16 -0000 1.13
+++ DefaultConfigurationValidator.java 29 Nov 2003 13:44:27 -0000 1.14
@@ -23,10 +23,10 @@
import org.w3c.dom.Element;
/**
- * This component validates the components configuration using
- * the ConfigKit toolkit.
+ * This component validates the components configuration using the ConfigKit
+ * toolkit.
*
- * @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
+ * @author Peter Donald
* @author <a href="mailto:proyal at apache.org">Peter Royal</a>
* @version $Revision$ $Date$
* @dna.component
@@ -47,7 +47,8 @@
final ClassLoader classLoader )
throws ConfigurationException
{
- final SchemaDescriptor schema = component.getInfo().getConfigurationSchema();
+ final SchemaDescriptor schema = component.getInfo()
+ .getConfigurationSchema();
if( null == schema )
{
return true;
@@ -58,9 +59,14 @@
if( getLogger().isDebugEnabled() )
{
final String message =
- "Validating component " + component.getTemplate().getName() +
- " of type " + classname +
- " with schema " + schema.getLocation() + " of type " + schema.getType();
+ "Validating component " +
+ component.getTemplate().getName() +
+ " of type " +
+ classname +
+ " with schema " +
+ schema.getLocation() +
+ " of type " +
+ schema.getType();
getLogger().debug( message );
}
@@ -75,26 +81,35 @@
if( null == validator )
{
final String message =
- "Missing schema for component " + component.getTemplate().getName() +
- " of type " + classname +
- " with schema " + schema.getLocation() + " of type " + schema.getType();
+ "Missing schema for component " +
+ component.getTemplate().getName() +
+ " of type " +
+ classname +
+ " with schema " +
+ schema.getLocation() +
+ " of type " +
+ schema.getType();
getLogger().warn( message );
return false;
}
- final Configuration configuration = component.getTemplate().getConfiguration();
+ final Configuration configuration = component.getTemplate()
+ .getConfiguration();
final DefaultConfiguration newConfiguration =
new DefaultConfiguration( "root",
configuration.getPath(),
configuration.getLocation() );
ConfigUtil.copy( newConfiguration, configuration );
- final Element element = ConfigurationUtil.toElement( newConfiguration );
+ final Element element = ConfigurationUtil.toElement(
+ newConfiguration );
final ValidationResult result = validator.validate( element );
- ConfigurationBuilder.processValidationResults( result, getLogger() );
+ ConfigurationBuilder.processValidationResults( result,
+ getLogger() );
return true;
}
catch( Exception e )
{
- final String msg = component.getTemplate().getName() + " failed validation due to: "
+ final String msg = component.getTemplate().getName() +
+ " failed validation due to: "
+ e.getMessage();
getLogger().warn( msg, e );
return false;