Package weka.gui.beans
Class PluginManager
- java.lang.Object
-
- weka.gui.beans.PluginManager
-
@Deprecated public class PluginManager extends java.lang.ObjectDeprecated.Use weka.core.PluginManager insteadClass 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: 12407 $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
-
-
Constructor Summary
Constructors Constructor Description PluginManager()Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidaddFromProperties(java.io.File propsFile)Deprecated.Add all key value pairs from the supplied property filestatic voidaddFromProperties(java.io.File propsFile, boolean maintainInsertionOrder)Deprecated.Add all key value pairs from the supplied property filestatic voidaddFromProperties(java.io.InputStream propsStream)Deprecated.Add all key value pairs from the supplied properties streamstatic voidaddFromProperties(java.io.InputStream propsStream, boolean maintainInsertionOrder)Deprecated.Add all key value pairs from the supplied properties streamstatic voidaddFromProperties(java.util.Properties props)Deprecated.Add all key value pairs from the supplied properties objectstatic voidaddFromProperties(java.util.Properties props, boolean maintainInsertionOrder)Deprecated.Add all key value pairs from the supplied properties objectstatic voidaddPlugin(java.lang.String interfaceName, java.lang.String name, java.lang.String concreteType)Deprecated.Add a plugin.static voidaddPlugin(java.lang.String interfaceName, java.lang.String name, java.lang.String concreteType, boolean maintainInsertionOrder)Deprecated.Add a plugin.static voidaddPluginResource(java.lang.String resourceGroupID, java.lang.String resourceDescription, java.lang.String resourcePath)Deprecated.Add a resource.static voidaddToDisabledList(java.lang.String classname)Deprecated.Add the supplied fully qualified class name to the list of disabled pluginsstatic voidaddToDisabledList(java.util.List<java.lang.String> classnames)Deprecated.Add the supplied list of fully qualified class names to the disabled liststatic java.lang.ObjectgetPluginInstance(java.lang.String interfaceType, java.lang.String name)Deprecated.Get an instance of a concrete implementation of a plugin typestatic java.util.Set<java.lang.String>getPluginNamesOfType(java.lang.String interfaceName)Deprecated.Get a set of names of plugins that implement the supplied interface.static java.io.InputStreamgetPluginResourceAsStream(java.lang.String resourceGroupID, java.lang.String resourceDescription)Deprecated.Get an input stream for a named resource under a given resource group ID.static java.util.Map<java.lang.String,java.lang.String>getResourcesWithGroupID(java.lang.String resourceGroupID)Deprecated.Get a map of resources (description,path) registered under a given resource group ID.static booleanisInDisabledList(java.lang.String classname)Deprecated.Returns true if the supplied fully qualified class name is in the disabled liststatic intnumResourcesForWithGroupID(java.lang.String resourceGroupID)Deprecated.Get the number of resources available under a given resource group ID.static voidremoveFromDisabledList(java.lang.String classname)Deprecated.Remove the supplied fully qualified class name from the list of disabled pluginsstatic voidremoveFromDisabledList(java.util.List<java.lang.String> classnames)Deprecated.Remove the supplied list of fully qualified class names to the disabled liststatic voidremovePlugin(java.lang.String interfaceName, java.lang.String name)Deprecated.Remove a plugin.static voidremovePlugins(java.lang.String interfaceName, java.util.List<java.lang.String> names)Deprecated.Remove plugins of a specific type.
-
-
-
Method Detail
-
addToDisabledList
public static void addToDisabledList(java.util.List<java.lang.String> classnames)
Deprecated.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)
Deprecated.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)
Deprecated.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)
Deprecated.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)
Deprecated.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.ExceptionDeprecated.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.File propsFile, boolean maintainInsertionOrder) throws java.lang.ExceptionDeprecated.Add all key value pairs from the supplied property file- Parameters:
propsFile- the properties file to addmaintainInsertionOrder- true if the order of insertion of implementations is to be preserved (rather than sorted order)- Throws:
java.lang.Exception- if a problem occurs
-
addFromProperties
public static void addFromProperties(java.io.InputStream propsStream) throws java.lang.ExceptionDeprecated.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.io.InputStream propsStream, boolean maintainInsertionOrder) throws java.lang.ExceptionDeprecated.Add all key value pairs from the supplied properties stream- Parameters:
propsStream- an input stream to a properties filemaintainInsertionOrder- true if the order of insertion of implementations is to be preserved (rather than sorted order)- Throws:
java.lang.Exception- if a problem occurs
-
addFromProperties
public static void addFromProperties(java.util.Properties props) throws java.lang.ExceptionDeprecated.Add all key value pairs from the supplied properties object- Parameters:
props- a Properties object- Throws:
java.lang.Exception- if a problem occurs
-
addFromProperties
public static void addFromProperties(java.util.Properties props, boolean maintainInsertionOrder) throws java.lang.ExceptionDeprecated.Add all key value pairs from the supplied properties object- Parameters:
props- a Properties objectmaintainInsertionOrder- true if the order of insertion of implementations is to be preserved (rather than sorted order)- Throws:
java.lang.Exception- if a problem occurs
-
addPluginResource
public static void addPluginResource(java.lang.String resourceGroupID, java.lang.String resourceDescription, java.lang.String resourcePath)Deprecated.Add a resource.- Parameters:
resourceGroupID- the ID of the group under which the resource should be storedresourceDescription- the description/ID of the resourceresourcePath- the path to the resource
-
getPluginResourceAsStream
public static java.io.InputStream getPluginResourceAsStream(java.lang.String resourceGroupID, java.lang.String resourceDescription) throws java.io.IOExceptionDeprecated.Get an input stream for a named resource under a given resource group ID.- Parameters:
resourceGroupID- the group ID that the resource falls underresourceDescription- the description/ID of the resource- Returns:
- an InputStream for the resource
- Throws:
java.io.IOException- if the group ID or resource description/ID are not known to the PluginManager, or a problem occurs while trying to open an input stream
-
numResourcesForWithGroupID
public static int numResourcesForWithGroupID(java.lang.String resourceGroupID)
Deprecated.Get the number of resources available under a given resource group ID.- Parameters:
resourceGroupID- the group ID of the resources- Returns:
- the number of resources registered under the supplied group ID
-
getResourcesWithGroupID
public static java.util.Map<java.lang.String,java.lang.String> getResourcesWithGroupID(java.lang.String resourceGroupID)
Deprecated.Get a map of resources (description,path) registered under a given resource group ID.- Parameters:
resourceGroupID- the group ID of the resources to get- Returns:
- a map of resources registered under the supplied group ID, or null if the resourceGroupID is not known to the plugin manager
-
getPluginNamesOfType
public static java.util.Set<java.lang.String> getPluginNamesOfType(java.lang.String interfaceName)
Deprecated.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)Deprecated.Add a plugin.- Parameters:
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 implementation
-
addPlugin
public static void addPlugin(java.lang.String interfaceName, java.lang.String name, java.lang.String concreteType, boolean maintainInsertionOrder)Deprecated.Add a plugin.- Parameters:
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)
-
removePlugins
public static void removePlugins(java.lang.String interfaceName, java.util.List<java.lang.String> names)Deprecated.Remove plugins of a specific type.- Parameters:
interfaceName- the fully qualified interface name that the plugins to be remove implementnames- a list of named plugins to remove
-
removePlugin
public static void removePlugin(java.lang.String interfaceName, java.lang.String name)Deprecated.Remove a plugin.- Parameters:
interfaceName- the fully qualified interface name that the plugin implementsname- 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.ExceptionDeprecated.Get an instance of a concrete implementation of a plugin type- Parameters:
interfaceType- the fully qualified interface name of the plugin typename- 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
-
-