org.merlotxml.merlot.plugin
Class PluginManager

java.lang.Object
  |
  +--org.merlotxml.merlot.plugin.PluginManager

public class PluginManager
extends java.lang.Object

Merlot Plugin Manager

Responsible for locating and loading all Merlot plugins, and keeping track of them.

Version:
$Id: PluginManager.java,v 1.5 2000/05/27 02:52:39 camk Exp $
Author:
Tim McCune, Kelly Campbell

Field Summary
protected static java.lang.String ERR_PLUGIN_NOT_RECOGNIZED
           
protected static PluginManager instance
           
static java.lang.String PLUGIN_CONFIG_FILE
           
protected  java.util.List plugins
           
 
Constructor Summary
protected PluginManager()
           
 
Method Summary
protected static PluginConfig createPluginConfig(java.io.InputStream input, java.io.File source, java.lang.ClassLoader cl)
           
static PluginManager getInstance()
           
 java.util.List getPlugins()
           
 void loadPlugins()
           
static void main(java.lang.String[] args)
          Tester
protected  void searchForPlugins(java.io.File dir)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERR_PLUGIN_NOT_RECOGNIZED

protected static final java.lang.String ERR_PLUGIN_NOT_RECOGNIZED

PLUGIN_CONFIG_FILE

public static final java.lang.String PLUGIN_CONFIG_FILE

plugins

protected java.util.List plugins

instance

protected static PluginManager instance
Constructor Detail

PluginManager

protected PluginManager()
Method Detail

getInstance

public static PluginManager getInstance()

getPlugins

public java.util.List getPlugins()

loadPlugins

public void loadPlugins()
                 throws PluginManagerException,
                        java.io.IOException,
                        java.lang.InstantiationException,
                        java.lang.IllegalAccessException,
                        java.lang.ClassNotFoundException,
                        DOMLiaisonImplException,
                        java.net.MalformedURLException,
                        org.xml.sax.SAXException,
                        PluginConfigException
Throws:
PluginManagerException - Thrown if a plugin's config file is in an unrecognized format
java.io.IOException - Thrown if a plugin couldn't be read
java.lang.InstantiationException - Thrown if there was a problem creating an XML parser
java.lang.IllegalAccessException - Thrown if there was a problem creating an XML parser
java.lang.ClassNotFoundException - Thrown if there was a problem creating an XML parser
DOMLiaisonImplException - Thrown if there was a problem creating an XML parser
java.net.MalformedURLException - Thrown if a plugin provided a malformed URL in its config file
org.xml.sax.SAXException - Thrown if the plugin config file contains malformed XML
PluginConfigException - Thrown if there was a plugin-specific error

searchForPlugins

protected void searchForPlugins(java.io.File dir)
                         throws PluginManagerException,
                                java.io.IOException,
                                java.lang.InstantiationException,
                                java.lang.IllegalAccessException,
                                java.lang.ClassNotFoundException,
                                DOMLiaisonImplException,
                                java.net.MalformedURLException,
                                org.xml.sax.SAXException,
                                PluginConfigException

createPluginConfig

protected static PluginConfig createPluginConfig(java.io.InputStream input,
                                                 java.io.File source,
                                                 java.lang.ClassLoader cl)
                                          throws PluginManagerException,
                                                 java.lang.InstantiationException,
                                                 java.lang.IllegalAccessException,
                                                 java.lang.ClassNotFoundException,
                                                 DOMLiaisonImplException,
                                                 java.net.MalformedURLException,
                                                 org.xml.sax.SAXException,
                                                 PluginConfigException

main

public static void main(java.lang.String[] args)
Tester