public synchronized void loadAllPlugin(Configuration config) {
    	log.debug("loadAllPlugin");
    	this.config = config;

        //mapAllPlugin is ordered by insertion order, so the ordering of plugins in listTest is used 
        //when mapAllPlugin is iterated
        synchronized (mapAllPlugin) {

            mapAllPlugin.clear();
            listAllPlugin.clear();
            mapAllPluginOrderCodeName.clear();

            for (int i = 0; i < getLoadedPlugins().size(); i++) {
                // ZAP: Removed unnecessary cast.
                try {
                    Plugin loadedPlugin = getLoadedPlugins().get(i);
                    if (!loadedPlugin.isVisible()) {
                        log.info("Plugin " + loadedPlugin.getName() + " not visible");
                        continue;
                    }
                    
                    if (loadedPlugin.isDepreciated()) {
                        // ZAP: ignore all depreciated plugins
                        log.info("Plugin " + loadedPlugin.getName() + " depricated");
                        continue;
                    }
                    
                    if (!canAddPlugin(mapAllPlugin, loadedPlugin)) {
                        continue;
                    }

                    Plugin plugin = createNewPlugin(loadedPlugin, config);
                    if (log.isDebugEnabled()) {
                        log.debug("loaded plugin " + plugin.getName() +
                        " with: Threshold=" + plugin.getAlertThreshold().name() +
                        " Strength=" + plugin.getAttackStrength().toString());
                    }
                    
                    // ZAP: Changed to use the method Integer.valueOf.
                    mapAllPlugin.put(plugin.getId(), plugin);
                    mapAllPluginOrderCodeName.put(plugin.getCodeName(), plugin);
                    
                } catch (Exception e) {
                    log.error(e.getMessage(), e);
                }
            }
            Iterator<Plugin> iterator = mapAllPlugin.values().iterator();
            while (iterator.hasNext()) {
                listAllPlugin.add(iterator.next());
            }
        }
    }
public synchronized void loadAllPlugin ( Configuration config ) { log . debug ( "loadAllPlugin" ) ; this . config = config ; synchronized ( mapAllPlugin ) { mapAllPlugin . clear ( ) ; listAllPlugin . clear ( ) ; mapAllPluginOrderCodeName . clear ( ) ; for ( int i = 0 ; i < getLoadedPlugins ( ) . size ( ) ; i ++ ) { try { Plugin loadedPlugin = getLoadedPlugins ( ) . get ( i ) ; if ( ! loadedPlugin . isVisible ( ) ) { log . info ( "Plugin " + loadedPlugin . getName ( ) + " not visible" ) ; continue ; } if ( loadedPlugin . isDepreciated ( ) ) { log . info ( "Plugin " + loadedPlugin . getName ( ) + " depricated" ) ; continue ; } if ( ! canAddPlugin ( mapAllPlugin , loadedPlugin ) ) { continue ; } Plugin plugin = createNewPlugin ( loadedPlugin , config ) ; if ( log . isDebugEnabled ( ) ) { log . debug ( "loaded plugin " + plugin . getName ( ) + " with: Threshold=" + plugin . getAlertThreshold ( ) . name ( ) + " Strength=" + plugin . getAttackStrength ( ) . toString ( ) ) ; } mapAllPlugin . put ( plugin . getId ( ) , plugin ) ; mapAllPluginOrderCodeName . put ( plugin . getCodeName ( ) , plugin ) ; } catch ( Exception e ) { log . error ( e . getMessage ( ) , e ) ; } } Iterator < Plugin > iterator = mapAllPlugin . values ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { listAllPlugin . add ( iterator . next ( ) ) ; } } }
@param config