protected void startParsing(final Attributes attrs) throws SAXException
{
final String preprocessorClass = attrs.getValue(getUri(), "class");
if (preprocessorClass == null)
{
throw new ParseException("Required attribute 'class' is missing");
}
preProcessor = (ReportPreProcessor) ObjectUtilities.loadAndInstantiate
(CompatibilityMapperUtil.mapClassName(preprocessorClass),
LayoutPreprocessorReadHandler.class, ReportPreProcessor.class);
if (preProcessor == null)
{
throw new ParseException("Failed to instantiate the specified preprocessor '" + preprocessorClass + '\'',
getLocator());
}
try
{
this.beanUtility = new BeanUtility(preProcessor);
}
catch (IntrospectionException e)
{
throw new ParseException("Failed to introspect the specified preprocessor '" + preprocessorClass + '\'',
getLocator());
}
}