public class PluginManager
extends java.lang.Object
| Constructor and Description |
|---|
PluginManager() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addFromProperties(java.io.File propsFile)
Add all key value pairs from the supplied property file
|
static void |
addFromProperties(java.io.File propsFile,
boolean maintainInsertionOrder)
Add all key value pairs from the supplied property file
|
static void |
addFromProperties(java.io.InputStream propsStream)
Add all key value pairs from the supplied properties stream
|
static void |
addFromProperties(java.io.InputStream propsStream,
boolean maintainInsertionOrder)
Add all key value pairs from the supplied properties stream
|
static void |
addFromProperties(java.util.Properties props)
Add all key value pairs from the supplied properties object
|
static void |
addFromProperties(java.util.Properties props,
boolean maintainInsertionOrder)
Add all key value pairs from the supplied properties object
|
static void |
addPlugin(java.lang.String interfaceName,
java.lang.String name,
java.lang.String concreteType)
Add a plugin.
|
static void |
addPlugin(java.lang.String interfaceName,
java.lang.String name,
java.lang.String concreteType,
boolean maintainInsertionOrder)
Add a plugin.
|
static void |
addToDisabledList(java.util.List<java.lang.String> classnames)
Add the supplied list of fully qualified class names to the disabled list
|
static void |
addToDisabledList(java.lang.String classname)
Add the supplied fully qualified class name to the list of disabled plugins
|
static java.lang.Object |
getPluginInstance(java.lang.String interfaceType,
java.lang.String name)
Get an instance of a concrete implementation of a plugin type
|
static java.util.Set<java.lang.String> |
getPluginNamesOfType(java.lang.String interfaceName)
Get a set of names of plugins that implement the supplied interface.
|
static boolean |
isInDisabledList(java.lang.String classname)
Returns true if the supplied fully qualified class name is in the disabled
list
|
static void |
removeFromDisabledList(java.util.List<java.lang.String> classnames)
Remove the supplied list of fully qualified class names to the disabled
list
|
static void |
removeFromDisabledList(java.lang.String classname)
Remove the supplied fully qualified class name from the list of disabled
plugins
|
static void |
removePlugin(java.lang.String interfaceName,
java.lang.String name)
Remove a plugin.
|
static void |
removePlugins(java.lang.String interfaceName,
java.util.List<java.lang.String> names)
Remove plugins of a specific type.
|
public static void addToDisabledList(java.util.List<java.lang.String> classnames)
classnames - a list of class names to addpublic static void addToDisabledList(java.lang.String classname)
classname - the fully qualified name of a class to addpublic static void removeFromDisabledList(java.util.List<java.lang.String> classnames)
classnames - a list of class names to removepublic static void removeFromDisabledList(java.lang.String classname)
classname - the fully qualified name of a class to removepublic static boolean isInDisabledList(java.lang.String classname)
classname - the name of the class to checkpublic static void addFromProperties(java.io.File propsFile)
throws java.lang.Exception
propsFile - the properties file to addjava.lang.Exception - if a problem occurspublic static void addFromProperties(java.io.File propsFile,
boolean maintainInsertionOrder)
throws java.lang.Exception
propsFile - the properties file to addmaintainInsertionOrder - true if the order of insertion of
implementations is to be preserved (rather than sorted order)java.lang.Exception - if a problem occurspublic static void addFromProperties(java.io.InputStream propsStream)
throws java.lang.Exception
propsStream - an input stream to a properties filejava.lang.Exception - if a problem occurspublic static void addFromProperties(java.io.InputStream propsStream,
boolean maintainInsertionOrder)
throws java.lang.Exception
propsStream - an input stream to a properties filemaintainInsertionOrder - true if the order of insertion of
implementations is to be preserved (rather than sorted order)java.lang.Exception - if a problem occurspublic static void addFromProperties(java.util.Properties props)
throws java.lang.Exception
props - a Properties objectjava.lang.Exception - if a problem occurspublic static void addFromProperties(java.util.Properties props,
boolean maintainInsertionOrder)
throws java.lang.Exception
props - a Properties objectmaintainInsertionOrder - true if the order of insertion of
implementations is to be preserved (rather than sorted order)java.lang.Exception - if a problem occurspublic static java.util.Set<java.lang.String> getPluginNamesOfType(java.lang.String interfaceName)
interfaceName - the fully qualified name of the interface to list
plugins forpublic static void addPlugin(java.lang.String interfaceName,
java.lang.String name,
java.lang.String concreteType)
interfaceName - the fully qualified interface name that the plugin
implementsname - the name/short description of the pluginconcreteType - the fully qualified class name of the actual concrete
implementationpublic static void addPlugin(java.lang.String interfaceName,
java.lang.String name,
java.lang.String concreteType,
boolean maintainInsertionOrder)
interfaceName - the fully qualified interface name that the plugin
implementsname - the name/short description of the pluginconcreteType - the fully qualified class name of the actual concrete
implementationmaintainInsertionOrder - true if the order of insertion of
implementations is to be preserved (rather than sorted order)public static void removePlugins(java.lang.String interfaceName,
java.util.List<java.lang.String> names)
interfaceName - the fully qualified interface name that the plugins to
be remove implementnames - a list of named plugins to removepublic static void removePlugin(java.lang.String interfaceName,
java.lang.String name)
interfaceName - the fully qualified interface name that the plugin
implementsname - the name/short description of the pluginpublic static java.lang.Object getPluginInstance(java.lang.String interfaceType,
java.lang.String name)
throws java.lang.Exception
interfaceType - the fully qualified interface name of the plugin typename - the name/short description of the plugin to getjava.lang.Exception - if the plugin can't be found or instantiated