public Map<String,PluginDescriptor> parsePluginFolder(String[] pluginFolders){
  Map<String,PluginDescriptor> map=new HashMap<String,PluginDescriptor>();
  if (pluginFolders == null) {
    throw new IllegalArgumentException("plugin.folders is not defined");
  }
  for (  String name : pluginFolders) {
    File directory=getPluginFolder(name);
    if (directory == null) {
      continue;
    }
    LOG.info("Plugins: looking in: " + directory.getAbsolutePath());
    for (    File oneSubFolder : directory.listFiles()) {
      if (oneSubFolder.isDirectory()) {
        String manifestPath=oneSubFolder.getAbsolutePath() + File.separator + "plugin.xml";
        try {
          LOG.debug("parsing: " + manifestPath);
          PluginDescriptor p=parseManifestFile(manifestPath);
          map.put(p.getPluginId(),p);
        }
 catch (        MalformedURLException e) {
          LOG.warn(e.toString());
        }
catch (        SAXException e) {
          LOG.warn(e.toString());
        }
catch (        IOException e) {
          LOG.warn(e.toString());
        }
catch (        ParserConfigurationException e) {
          LOG.warn(e.toString());
        }
      }
    }
  }
  return map;
}

public Map < String , PluginDescriptor > parsePluginFolder ( String [ ] pluginFolders ) { Map < String , PluginDescriptor > map = new HashMap < String , PluginDescriptor > ( ) ; if ( pluginFolders == null ) { throw new IllegalArgumentException ( "plugin.folders is not defined" ) ; } for ( String name : pluginFolders ) { File directory = getPluginFolder ( name ) ; if ( directory == null ) { continue ; } LOG . info ( "Plugins: looking in: " + directory . getAbsolutePath ( ) ) ; for ( File oneSubFolder : directory . listFiles ( ) ) { if ( oneSubFolder . isDirectory ( ) ) { String manifestPath = oneSubFolder . getAbsolutePath ( ) + File . separator + "plugin.xml" ; try { LOG . debug ( "parsing: " + manifestPath ) ; PluginDescriptor p = parseManifestFile ( manifestPath ) ; map . put ( p . getPluginId ( ) , p ) ; } catch ( MalformedURLException e ) { LOG . warn ( e . toString ( ) ) ; } catch ( SAXException e ) { LOG . warn ( e . toString ( ) ) ; } catch ( IOException e ) { LOG . warn ( e . toString ( ) ) ; } catch ( ParserConfigurationException e ) { LOG . warn ( e . toString ( ) ) ; } } } } return map ; }
returns a list of all found plugin descriptors .
