}
//Get the uri of configuration schema type
try
{
final ConfigValidator validator = ComponentConfigUtil
.getComponentConfigValidator( classname,
classLoader,
schema.getLocation(),
schema.getType() );
if( null == validator )
{
final String message =
"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 DefaultConfiguration newConfiguration =
new DefaultConfiguration( "root",
configuration.getPath(),
configuration.getLocation() );
ConfigUtil.copy( newConfiguration, configuration );
final Element element = ConfigurationUtil.toElement(
newConfiguration );
final ValidationResult result = validator.validate( element );
ConfigurationBuilder.processValidationResults( result,
getLogger() );
return true;
}
catch( Exception e )