com.rapidminer.tools.plugin
Class Plugin

java.lang.Object
  extended by com.rapidminer.tools.plugin.Plugin

public class Plugin
extends java.lang.Object

The class for RapidMiner plugins. This class is used to encapsulate the .jar file which must be in the lib/plugins subdirectory of RapidMiner. Provides methods for plugin checks, operator registering, and getting information about the plugin.

Plugin dependencies must be defined in the form
plugin_name1 (plugin_version1) # ... # plugin_nameM (plugin_versionM) < /br> of the manifest parameter Plugin-Dependencies. You must define both the name and the version of the desired plugins and separate them with "#".

Author:
Simon Fischer, Ingo Mierswa

Field Summary
static java.lang.String RAPIDMINER_TYPE
          The name for the manifest entry RapidMiner-Type which can be used to indicate that a jar file is a RapidMiner plugin.
static java.lang.String RAPIDMINER_TYPE_PLUGIN
          The value for the manifest entry RapidMiner-Type which indicates that a jar file is a RapidMiner plugin.
 
Constructor Summary
Plugin(java.io.File file)
          Creates a new plugin based on the plugin .jar file.
 
Method Summary
 AboutBox createAboutBox(java.awt.Frame owner, java.awt.Image productLogo)
          Creates the about box for this plugin.
static void findPlugins(java.io.File pluginDir, boolean showWarningForNonPluginJars)
          Returns a list of plugins found in the plugins directory.
static java.util.List<Plugin> getAllPlugins()
          Returns the collection of all plugins.
 java.util.List<BuildingBlock> getBuildingBlocks()
          Returns a list of building blocks.
 java.lang.ClassLoader getClassLoader()
          Returns the class loader of this plugin.
static java.lang.ClassLoader getMajorClassLoader()
          Returns a class loader which is able to load all classes (core _and_ all plugins).
 java.lang.String getName()
          Returns the name of the plugin.
 java.lang.String getNecessaryRapidMinerVersion()
          Returns the necessary RapidMiner version.
 java.lang.ClassLoader getOriginalClassLoader()
          Returns the class loader of this plugin.
static Plugin getPlugin(java.lang.String name)
          Returns the desired plugin.
 java.util.List getPluginDependencies()
          Returns the plugin dependencies of this plugin.
 java.lang.String getVersion()
          Returns the version of this plugin.
static void initAboutTexts(java.util.Properties properties)
           
static void initFinalChecks()
           
static void initPluginGuis(MainFrame mainframe)
          This method will try to invoke the method void initGui(MainFrame) of PluginInit class of every plugin.
static void initPlugins()
          This method will try to invoke the public static method initPlugin() of the class com.rapidminer.PluginInit for arbitrary initializations of the plugins.
static void initPluginSplashTexts()
           
static void initPluginUpdateManager()
           
protected  void mergeClassLoader(Plugin other)
          Adds the URLs of the given Plugin to class loader of this one.
 void register()
          Register the operators of this plugin in RapidMiner.
static void registerAllPlugins(java.io.File pluginDirectory, boolean showWarningForNonPluginJars)
          Returns a list of Plugins found in the given plugins directory.
 boolean showAboutBox()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RAPIDMINER_TYPE

public static final java.lang.String RAPIDMINER_TYPE
The name for the manifest entry RapidMiner-Type which can be used to indicate that a jar file is a RapidMiner plugin.

See Also:
Constant Field Values

RAPIDMINER_TYPE_PLUGIN

public static final java.lang.String RAPIDMINER_TYPE_PLUGIN
The value for the manifest entry RapidMiner-Type which indicates that a jar file is a RapidMiner plugin.

See Also:
Constant Field Values
Constructor Detail

Plugin

public Plugin(java.io.File file)
       throws java.io.IOException
Creates a new plugin based on the plugin .jar file.

Throws:
java.io.IOException
Method Detail

getName

public java.lang.String getName()
Returns the name of the plugin.


getVersion

public java.lang.String getVersion()
Returns the version of this plugin.


getNecessaryRapidMinerVersion

public java.lang.String getNecessaryRapidMinerVersion()
Returns the necessary RapidMiner version.


getPluginDependencies

public java.util.List getPluginDependencies()
Returns the plugin dependencies of this plugin.


getClassLoader

public java.lang.ClassLoader getClassLoader()
Returns the class loader of this plugin. This class loader should be used in cases where Class.forName(...) should be used, e.g. for implementation finding in all classes (including the core and the plugins).


getOriginalClassLoader

public java.lang.ClassLoader getOriginalClassLoader()
Returns the class loader of this plugin. This class loader should be used in cases where Class.forName(...) should find a class explicitly defined in this plugin jar.


register

public void register()
Register the operators of this plugin in RapidMiner.


getBuildingBlocks

public java.util.List<BuildingBlock> getBuildingBlocks()
Returns a list of building blocks. If this plugin does not define any building blocks, an empty list will be returned.


createAboutBox

public AboutBox createAboutBox(java.awt.Frame owner,
                               java.awt.Image productLogo)
Creates the about box for this plugin.


findPlugins

public static void findPlugins(java.io.File pluginDir,
                               boolean showWarningForNonPluginJars)
Returns a list of plugins found in the plugins directory.


mergeClassLoader

protected void mergeClassLoader(Plugin other)
Adds the URLs of the given Plugin to class loader of this one. This method should only be used to resolve plugin dependencies.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

registerAllPlugins

public static void registerAllPlugins(java.io.File pluginDirectory,
                                      boolean showWarningForNonPluginJars)
Returns a list of Plugins found in the given plugins directory. If the given directory is null, then RapidMiner tries to find plugins in the directory rapidminer.home/lib/plugins.


getMajorClassLoader

public static java.lang.ClassLoader getMajorClassLoader()
Returns a class loader which is able to load all classes (core _and_ all plugins).


getAllPlugins

public static java.util.List<Plugin> getAllPlugins()
Returns the collection of all plugins.


getPlugin

public static Plugin getPlugin(java.lang.String name)
Returns the desired plugin.


initPluginGuis

public static void initPluginGuis(MainFrame mainframe)
This method will try to invoke the method void initGui(MainFrame) of PluginInit class of every plugin.


initPlugins

public static void initPlugins()
This method will try to invoke the public static method initPlugin() of the class com.rapidminer.PluginInit for arbitrary initializations of the plugins. It is called directly after registering the plugins.


initPluginUpdateManager

public static void initPluginUpdateManager()

initFinalChecks

public static void initFinalChecks()

initPluginSplashTexts

public static void initPluginSplashTexts()

initAboutTexts

public static void initAboutTexts(java.util.Properties properties)

showAboutBox

public boolean showAboutBox()


Copyright © 2001-2009 by Rapid-I