// plugins that were considered for inheritance.
if ( handleAsInheritance )
{
for ( Iterator it = parentPlugins.iterator(); it.hasNext(); )
{
ReportPlugin plugin = (ReportPlugin) it.next();
String inherited = plugin.getInherited();
if ( ( inherited != null ) && !Boolean.valueOf( inherited ).booleanValue() )
{
it.remove();
}
}
}
List assembledPlugins = new ArrayList();
Map childPlugins = child.getReportPluginsAsMap();
for ( Iterator it = parentPlugins.iterator(); it.hasNext(); )
{
ReportPlugin parentPlugin = (ReportPlugin) it.next();
String parentInherited = parentPlugin.getInherited();
// only merge plugin definition from the parent if at least one
// of these is true:
// 1. we're not processing the plugins in an inheritance-based merge
// 2. the parent's <inherited/> flag is not set
// 3. the parent's <inherited/> flag is set to true
if ( !handleAsInheritance || ( parentInherited == null ) ||
Boolean.valueOf( parentInherited ).booleanValue() )
{
ReportPlugin childPlugin = (ReportPlugin) childPlugins.get( parentPlugin.getKey() );
if ( ( childPlugin != null ) && !assembledPlugins.contains( childPlugin ) )
{
ReportPlugin assembledPlugin = childPlugin;
mergeReportPluginDefinitions( childPlugin, parentPlugin, handleAsInheritance );
// fix for MNG-2221 (assembly cache was not being populated for later reference):
assembledPlugins.add( assembledPlugin );