Add onload attribute to plugin in plugins.xml to create the plugin at load time instead of lazy loading.

This commit is contained in:
Bryce Curtis 2011-11-15 14:29:32 -06:00
parent 7ce2a8cb71
commit bfef72a7c4

View File

@ -90,6 +90,11 @@ public final class PluginManager {
pluginName = xml.getAttributeValue(null, "name"); pluginName = xml.getAttributeValue(null, "name");
//System.out.println("Plugin: "+name+" => "+value); //System.out.println("Plugin: "+name+" => "+value);
this.addService(pluginName, pluginClass); this.addService(pluginName, pluginClass);
// Create plugin at load time if attribute "onload"
if ("true".equals(xml.getAttributeValue(null, "onload"))) {
this.getPlugin(pluginName);
}
} else if (strNode.equals("url-filter")) { } else if (strNode.equals("url-filter")) {
this.urlMap.put(xml.getAttributeValue(null, "value"), pluginName); this.urlMap.put(xml.getAttributeValue(null, "value"), pluginName);
} }