com.objectplanet.survey.plugin
Class PluginManager

java.lang.Object
  extended by com.objectplanet.survey.plugin.PluginManager

public class PluginManager
extends java.lang.Object

This plugin manages the plugins available to opinio. Normally it should not be necessary for a plugin writer to access the methods in this class.

Author:
Torgeir Punnerud
Created:
27. august 2002

Field Summary
static java.util.HashMap pluginsByInterface
          HashMap of all ArrayLists of plugins with interface name as key
 
Constructor Summary
PluginManager()
           
 
Method Summary
static void addPluginJAR(Plugin.JAR plugin)
          Adds a plugin JAR to the editor.
static java.lang.String[] getNotLoadedPluginJARs()
          Returns a list of plugin JARs that are not currently loaded by examining the user and system plugin directories.
static Plugin getPlugin(java.lang.String name)
          Returns the plugin with the specified class name.
static Plugin.JAR getPluginJAR(java.lang.String path)
          Returns the JAR with the specified path name.
static Plugin.JAR[] getPluginJARs()
          Returns an array of installed plugins.
static Plugin[] getPlugins()
          Returns an array of installed plugins.
static java.util.ArrayList getPluginsByInterface(java.lang.String interfaceClass)
          Gets the list of plugins by interface.
static java.util.ArrayList getPluginsByInterface(java.lang.String[] interfaceClasses)
          Gets the list of plugins by interface names.
static void initPlugins()
          Loads plugins.
static void stopAllPlugins()
          Stop all plugins plugins.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pluginsByInterface

public static java.util.HashMap pluginsByInterface
HashMap of all ArrayLists of plugins with interface name as key

Constructor Detail

PluginManager

public PluginManager()
Method Detail

getNotLoadedPluginJARs

public static java.lang.String[] getNotLoadedPluginJARs()
Returns a list of plugin JARs that are not currently loaded by examining the user and system plugin directories.

Returns:
The notLoadedPluginJARs value

getPlugin

public static Plugin getPlugin(java.lang.String name)
Returns the plugin with the specified class name.

Parameters:
name - Description of the Parameter
Returns:
The plugin value

getPluginJAR

public static Plugin.JAR getPluginJAR(java.lang.String path)
Returns the JAR with the specified path name.

Parameters:
path - The path name
Returns:
The pluginJAR value

getPluginJARs

public static Plugin.JAR[] getPluginJARs()
Returns an array of installed plugins.

Returns:
The pluginJARs value

getPlugins

public static Plugin[] getPlugins()
Returns an array of installed plugins.

Returns:
The plugins value

getPluginsByInterface

public static java.util.ArrayList getPluginsByInterface(java.lang.String interfaceClass)
Gets the list of plugins by interface. Return null if there are no plugins implementing the interface name

Returns:
ArrayList of Plugins implementing the interface. ArrayList has size 0 if none was found.

getPluginsByInterface

public static java.util.ArrayList getPluginsByInterface(java.lang.String[] interfaceClasses)
Gets the list of plugins by interface names. Return null if there are no plugins implementing the interface names.

Returns:
ArrayList of Plugins implementing the interfaces. ArrayList has size 0 if none was found.

addPluginJAR

public static void addPluginJAR(Plugin.JAR plugin)
Adds a plugin JAR to the editor.

Parameters:
plugin - The plugin

initPlugins

public static void initPlugins()
Loads plugins.


stopAllPlugins

public static void stopAllPlugins()
Stop all plugins plugins. TODO: should we do something else here? Remove plugins from the list???


Copyright ? ObjectPlanet Inc. All Rights Reserved.

Built on December 20 2016