Map childPlugins = child.getReportPluginsAsMap();
for ( Iterator it = parentPlugins.iterator(); it.hasNext(); )
{
ReportPlugin parentPlugin = (ReportPlugin) it.next();
String parentInherited = parentPlugin.getInherited();
if ( !handleAsInheritance || ( parentInherited == null ) ||
Boolean.valueOf( parentInherited ).booleanValue() )
{
ReportPlugin assembledPlugin = parentPlugin;
ReportPlugin childPlugin = (ReportPlugin) childPlugins.get( parentPlugin.getKey() );
if ( childPlugin != null )
{
assembledPlugin = childPlugin;
mergeReportPluginDefinitions( childPlugin, parentPlugin, handleAsInheritance );
}
if ( handleAsInheritance && ( parentInherited == null ) )
{
assembledPlugin.unsetInheritanceApplied();
}
assembledPlugins.put( assembledPlugin.getKey(), assembledPlugin );
}
}
for ( Iterator it = childPlugins.values().iterator(); it.hasNext(); )
{
ReportPlugin childPlugin = (ReportPlugin) it.next();
if ( !assembledPlugins.containsKey( childPlugin.getKey() ) )
{
assembledPlugins.put( childPlugin.getKey(), childPlugin );
}
}
child.setPlugins( new ArrayList( assembledPlugins.values() ) );