com.atlassian.plugin.Plugin |
Known Indirect Subclasses |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
NAME_COMPARATOR | This field is deprecated. since 2.2.0. This comparator only takes into account the plugin name and assumes it is not null, yet a) that constraint is not validated anywhere in plugin loading and b) the plugin could have used the i18n name, and only the application can resolve that to a name useful for comparisons. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
Since 2.2.0, use
uninstall() instead
| |||||||||||
Disables the plugin.
| |||||||||||
Enables the plugin.
| |||||||||||
Get the classloader for the plugin.
| |||||||||||
The date this plugin was loaded into the system.
| |||||||||||
Returns the i18nKey used to get an internationalised name for this plugin.
| |||||||||||
Get the
ModuleDescriptor for a particular key. | |||||||||||
Get the
Collection of descriptors . | |||||||||||
Get the
descriptors whose module class implements or is assignable from the supplied Class . | |||||||||||
Returns the non-localised name of this plugin if defined.
| |||||||||||
Returns this plugin's current state.
| |||||||||||
Gets the version of the plugins system to handle this plugin
| |||||||||||
Retrieve the URL of the resource from the plugin.
| |||||||||||
Load a given resource from the plugin.
| |||||||||||
Installs the plugin into any internal, managing container.
| |||||||||||
Whether the plugin is a "bundled" plugin that can't be removed.
| |||||||||||
Should the plugin file be deleted on unistall?
| |||||||||||
Whether or not this plugin is loaded dynamically at runtime.
| |||||||||||
This method is deprecated.
since 2.2.0, use
getPluginState() instead | |||||||||||
Whether the plugin is a "system" plugin that shouldn't be made visible to the user.
| |||||||||||
Whether or not this plugin can be 'uninstalled'.
| |||||||||||
Get the plugin to load a specific class.
| |||||||||||
Sets the i18nKey used to get an internationalised name for this plugin.
| |||||||||||
Sets the non-localised name of this plugin.
| |||||||||||
Sets the version of the plugins system
| |||||||||||
Uninstalls the plugin from any internal container.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.atlassian.plugin.Resourced
| |||||||||||
From interface
java.lang.Comparable
|
This field is deprecated.
since 2.2.0. This comparator only takes into account the plugin name and assumes it is not null,
yet a) that constraint is not validated anywhere in plugin loading and b) the plugin could have used the i18n
name, and only the application can resolve that to a name useful for comparisons.
This method is deprecated.
Since 2.2.0, use uninstall()
instead
Free any resources held by this plugin. To be called during uninstallation of the Plugin
.
Disables the plugin. Unless an exception is thrown, the plugin should be in the DISABLED
state. If the plugin is already in the DISABLED
state, nothing will happen.
PluginException | If the plugin could not be disabled |
---|
Enables the plugin. Unless an exception is thrown, the plugin should then be in either the
ENABLING
or ENABLED
state. If the plugin is already in the
ENABLING
or ENABLED
state, nothing will happen.
PluginException | If the plugin could not be enabled |
---|
Get the classloader for the plugin.
The date this plugin was loaded into the system.
Returns the i18nKey used to get an internationalised name for this plugin.
This corresponds to the value of the i18n-name-key
field in the plugin's XML configuration file.
You would expect a plugin developer to fill in one of either name
, or i18n-name-key
,
but the framework does no validation and makes no guarantees that this is the case.
Get the ModuleDescriptor
for a particular key. Returns null if the plugin does not exist.
Note: The getModule()
may throw ClassCastException if the expected type is incorrect.
key | the String complete key of the module, in the form "org.example.plugin:module-key". |
---|
ModuleDescriptor
of the expected type.
Get the Collection
of descriptors
.
The iteration order of the collection is the order that the modules will be enabled, and should be the same order that the modules appear in the plugin descriptor.
Get the descriptors
whose module class implements or is assignable from the supplied Class
.
Note: The getModule()
may throw ClassCastException if the expected type is incorrect.
Normally this method would not be supplied with anything other than Object
or <?>, unless you are
confident in the super type of the module classes this Plugin
provides.
moduleClass | the super class the descriptors return. |
---|
List
of descriptors
of the expected type.
Returns the non-localised name of this plugin if defined.
This corresponds to the value of the name
field in the plugin's XML configuration file.
You would expect a plugin developer to fill in one of either name
, or i18n-name-key
,
but the framework does no validation and makes no guarantees that this is the case.
Returns this plugin's current state.
Gets the version of the plugins system to handle this plugin
Retrieve the URL of the resource from the plugin.
path | the name of the resource to be loaded |
---|
Load a given resource from the plugin. Plugins that are loaded dynamically will need to implement this in a way that loads the resource from the same context as the plugin. Static plugins can just pull them from their own classloader.
name | The name of the resource to be loaded. |
---|
Installs the plugin into any internal, managing container. This method will be called on every startup. Unless
an exception is thrown, the plugin should be in the INSTALLED
state. If the plugin is already
in the INSTALLED
state, nothing will happen.
PluginException | If the plugin could not be installed |
---|
Whether the plugin is a "bundled" plugin that can't be removed.
true
if this plugin is a "bundled" plugin.
Should the plugin file be deleted on unistall?
true
if this plugin file should be deleted on unistall.
Whether or not this plugin is loaded dynamically at runtime.
true
if this plugin is loaded dynamically at runtime.
This method is deprecated.
since 2.2.0, use getPluginState()
instead
true
if this plugin is enabled.
Whether the plugin is a "system" plugin that shouldn't be made visible to the user.
true
if this plugin is a "system" plugin.
Whether or not this plugin can be 'uninstalled'.
true
if this plugin can be 'uninstalled'.
Get the plugin to load a specific class.
clazz | The name of the class to be loaded |
---|---|
callingClass | The class calling the loading (used to help find a classloader) |
ClassNotFoundException | if the class cannot be located. |
---|
Sets the i18nKey used to get an internationalised name for this plugin.
i18nNameKey | the i18n Name Key. |
---|
Sets the version of the plugins system
version | The version |
---|
Uninstalls the plugin from any internal container. This method will be called on every shutdown. Unless an
exception is thrown, the plugin should be in the UNINSTALLED
state. If the plugin is already
in the UNINSTALLED
state, nothing will happen.
PluginException | If the plugin could not be uninstalled |
---|