weka.gui.beans

## Class PluginManager

- java.lang.Object
- - weka.gui.beans.PluginManager

-     public class PluginManager
      extends java.lang.Object

  Class that manages a global map of plugins. The knowledge flow uses this to manage plugins other than step components and perspectives. Is general purpose, so can be used by other Weka components. Provides static methods for registering and instantiating plugins.
  Version:
    $Revision: 10221 $
  Author:
    Mark Hall (mhall{[at]}pentaho{[dot]}com)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PluginManager()`

  - ### Method Summary

    Methods
    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.InputStream propsStream)` 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` | `addPlugin(java.lang.String interfaceName, java.lang.String name, java.lang.String concreteType)` 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.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PluginManager

          public PluginManager()

  - ### Method Detail

    - #### addToDisabledList

          public static void addToDisabledList(java.util.List<java.lang.String> classnames)

      Add the supplied list of fully qualified class names to the disabled list
      Parameters:
        `classnames` - a list of class names to add

    - #### addToDisabledList

          public static void addToDisabledList(java.lang.String classname)

      Add the supplied fully qualified class name to the list of disabled plugins
      Parameters:
        `classname` - the fully qualified name of a class to add

    - #### removeFromDisabledList

          public static void removeFromDisabledList(java.util.List<java.lang.String> classnames)

      Remove the supplied list of fully qualified class names to the disabled list
      Parameters:
        `classnames` - a list of class names to remove

    - #### removeFromDisabledList

          public static void removeFromDisabledList(java.lang.String classname)

      Remove the supplied fully qualified class name from the list of disabled plugins
      Parameters:
        `classname` - the fully qualified name of a class to remove

    - #### isInDisabledList

          public static boolean isInDisabledList(java.lang.String classname)

      Returns true if the supplied fully qualified class name is in the disabled list
      Parameters:
        `classname` - the name of the class to check
      Returns:
        true if the supplied class name is in the disabled list

    - #### addFromProperties

          public static void addFromProperties(java.io.File propsFile)
                                        throws java.lang.Exception

      Add all key value pairs from the supplied property file
      Parameters:
        `propsFile` - the properties file to add
      Throws:
        `java.lang.Exception` - if a problem occurs

    - #### addFromProperties

          public static void addFromProperties(java.io.InputStream propsStream)
                                        throws java.lang.Exception

      Add all key value pairs from the supplied properties stream
      Parameters:
        `propsStream` - an input stream to a properties file
      Throws:
        `java.lang.Exception` - if a problem occurs

    - #### addFromProperties

          public static void addFromProperties(java.util.Properties props)
                                        throws java.lang.Exception

      Add all key value pairs from the supplied properties object
      Parameters:
        `props` - a Properties object
      Throws:
        `java.lang.Exception` - if a problem occurs

    - #### getPluginNamesOfType

          public static java.util.Set<java.lang.String> getPluginNamesOfType(java.lang.String interfaceName)

      Get a set of names of plugins that implement the supplied interface.
      Parameters:
        `interfaceName` - the fully qualified name of the interface to list plugins for
      Returns:
        a set of names of plugins

    - #### addPlugin

          public static void addPlugin(java.lang.String interfaceName,
                       java.lang.String name,
                       java.lang.String concreteType)

      Add a plugin.
      Parameters:
        `interfaceName` - the fully qualified interface name that the plugin implements
        `name` - the name/short description of the plugin
        `concreteType` - the fully qualified class name of the actual concrete implementation

    - #### removePlugins

          public static void removePlugins(java.lang.String interfaceName,
                           java.util.List<java.lang.String> names)

      Remove plugins of a specific type.
      Parameters:
        `interfaceName` - the fully qualified interface name that the plugins to be remove implement
        `names` - a list of named plugins to remove

    - #### removePlugin

          public static void removePlugin(java.lang.String interfaceName,
                          java.lang.String name)

      Remove a plugin.
      Parameters:
        `interfaceName` - the fully qualified interface name that the plugin implements
        `name` - the name/short description of the plugin

    - #### getPluginInstance

          public static java.lang.Object getPluginInstance(java.lang.String interfaceType,
                                           java.lang.String name)
                                                    throws java.lang.Exception

      Get an instance of a concrete implementation of a plugin type
      Parameters:
        `interfaceType` - the fully qualified interface name of the plugin type
        `name` - the name/short description of the plugin to get
      Returns:
        the concrete plugin or null if the plugin is disabled
      Throws:
        `java.lang.Exception` - if the plugin can't be found or instantiated