|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.mflow.impl.PluginLocator
Used to locate plugins within JAR files. Plugins must have an activator, which serves as the entry point to the plugin. All attributes of plugins are specified in the manifest of their JAR file.
Example:
Name: net.sourceforge.mflow.folder.sftp.Activator.class PluginName: SFTP Folder Type: Folder DescriptionFile: net/sourceforge/mflow/folder/sftp/description.txt IconFile: net/sourceforge/mflow/folder/sftp/images/icon.gif ConfigurationDialog: net.sourceforge.mflow.folder.sftp.ConfigurationDialog Version: 1.0
The Name
field identifies the Activator class file in the
JAR. The PluginName
field provides a textual name for the
plugin, and the Type
field identifies the type of the plugin.
These fields must be present in the entry, whereas the remaining fields are
optional.
The DescriptionFile
field identifies a text file in the JAR
that contains a detailed description of the plugin (and may optionally
include a copyright message or other related information).
IconFile
identifies an icon image for the plugin.
ConfigurationDialog
is the fully-qualified name of a class
within the JAR that provides a GUI for configuring the plugin.
Finally, Version
specifies the version number of the plugin.
The PluginLocator
reads a JAR Manifest, searching for entries
that include a PluginName
field. For each valid entry that is
found, a Plugin
object is constructed which encapsulates all
of the information specified in the entry.
Method Summary | |
---|---|
void |
addFiles(java.util.List files)
|
java.util.Iterator |
findPlugins(java.io.File file)
Find all plugins in the specified JAR file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void addFiles(java.util.List files)
files
- public java.util.Iterator findPlugins(java.io.File file)
file
- The path of a JAR file.
Iterator
of Plugin
objects representing the plugins found in the JAR file.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |