public abstract class Plugin
extends java.lang.Object
getActions
method
to return the actions that will be available to user.
This class should be packed in a JAR file with a family of properties file named
ApplicationPlugin.properties
at its root or in one of its subfolders.
This file describes a plug-in with the following keys (all of them are mandatory
except id
):
id
key gives an optional id to the plug-in,
which can be useful to determine if an update for this plug-in is available
during libraries updates checking.name
key specifies the name of the plug-in.class
key specifies the fully qualified class name
of the plug-in.description
key specifies the description of
the plug-in.version
key specifies the version of the plug-in.
license
key specifies the license under which
the plug-in is distributed.provider
key specifies the provider, the developer
and/or the editor of the plug-in.applicationMinimumVersion
key specifies the
minimum application version under which this plug-in may work. Note that
only the first two groups of digits will be used for the comparison
with current JVM version, and that plug-ins were available from
version 1.5.javaMinimumVersion
key specifies the
minimum Java version under which this plug-in may work. Note that
only the first two groups of digits will be used for the comparison
with current JVM version.com.mycompany.mypackage.MyPlugin
will become a plug-in if it's packed in a JAR file with the following
ApplicationPlugin.properties
file:
name=My plug-in class=com.mycompany.mypackage.MyPlugin description=This plug-in rocks! version=1.0 license=GNU GPL provider=MyCompany applicationMinimumVersion=1.5 javaMinimumVersion=1.5
Constructor and Description |
---|
Plugin() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
This method will be called when the home referenced by this plug-in will be deleted.
|
abstract PluginAction[] |
getActions()
Returns the actions available on this plug-in.
|
java.lang.String |
getDescription()
Returns the description of this plug-in.
|
Home |
getHome()
Returns the home associated to this plug-in instance.
|
HomeController |
getHomeController()
Returns the controller of the home of this plug-in.
|
java.lang.String |
getLicense()
Returns the license of this plug-in.
|
java.lang.String |
getName()
Returns the name of this plug-in.
|
java.lang.ClassLoader |
getPluginClassLoader()
Returns the class loader used to load this plug-in.
|
java.lang.String |
getProvider()
Returns the provider of this plug-in.
|
javax.swing.undo.UndoableEditSupport |
getUndoableEditSupport()
Returns the undoable edit support that records undoable modifications made on a home.
|
UserPreferences |
getUserPreferences()
Returns the user preferences of the current application.
|
java.lang.String |
getVersion()
Returns the version of this plug-in.
|
void |
init()
This method will be called once the properties of this plug-in are initialized.
|
public final java.lang.ClassLoader getPluginClassLoader()
public final java.lang.String getName()
public final java.lang.String getDescription()
public final java.lang.String getVersion()
public final java.lang.String getLicense()
public java.lang.String getProvider()
public final UserPreferences getUserPreferences()
public final Home getHome()
public HomeController getHomeController()
public final javax.swing.undo.UndoableEditSupport getUndoableEditSupport()
public void init()
public void destroy()
public abstract PluginAction[] getActions()
PluginAction.Property
enumeration.
© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License