public interface

ModuleDescriptor

implements Resourced
com.atlassian.plugin.ModuleDescriptor<T>
Known Indirect Subclasses

Summary

Public Methods
abstract void destroy(Plugin plugin)
Override this if your plugin needs to clean up when it's been removed.
abstract String getCompleteKey()
The complete key for this module, including the plugin key.
abstract String getDescription()
A simple description of this descriptor.
abstract String getDescriptionKey()
Key used to override getDescription() when using internationalisation.
abstract String getI18nNameKey()
Key used to override getName() when using internationalisation.
abstract String getKey()
The key for this module, unique within the plugin.
abstract Float getMinJavaVersion()
abstract T getModule()
The particular module object created by this plugin.
abstract Class<T> getModuleClass()
The class of the module this descriptor creates.
abstract String getName()
A simple string name for this descriptor.
abstract Map<StringString> getParams()
abstract Plugin getPlugin()
abstract String getPluginKey()
The plugin key for this module, derived from the complete key.
abstract void init(Plugin plugin, Element element)
Initialise a module given it's parent plugin and the XML element representing the module.
abstract boolean isEnabledByDefault()
Whether or not this plugin module is enabled by default.
abstract boolean isSystemModule()
Whether or not this plugin module is a "system" plugin that shouldn't be made visible/disableable to the user.
abstract boolean satisfiesMinJavaVersion()
If a min java version has been specified this will return true if the running jvm is >= to the specified version.
[Expand]
Inherited Methods
From interface com.atlassian.plugin.Resourced

Public Methods

public abstract void destroy (Plugin plugin)

Override this if your plugin needs to clean up when it's been removed.

Parameters
plugin TODO: The plugin parameter is redundant. The ModuleDescriptor must know its parent plugin in order to implement getPlugin()

public abstract String getCompleteKey ()

The complete key for this module, including the plugin key.

Format is plugin.key:module.key

Returns
  • The complete key for this module.

public abstract String getDescription ()

A simple description of this descriptor.

Returns
  • The description for this ModuleDescriptor.

public abstract String getDescriptionKey ()

Key used to override getDescription() when using internationalisation.

Returns
  • the i18n key. May be null.

public abstract String getI18nNameKey ()

Key used to override getName() when using internationalisation.

Returns
  • the i18n key. May be null.

public abstract String getKey ()

The key for this module, unique within the plugin.

Returns
  • The key for this module.

public abstract Float getMinJavaVersion ()

public abstract T getModule ()

The particular module object created by this plugin.

Returns
  • The module object created by this plugin.
See Also

public abstract Class<T> getModuleClass ()

The class of the module this descriptor creates.

Returns
  • The class of the module this descriptor creates.
See Also

public abstract String getName ()

A simple string name for this descriptor.

Returns
  • The name for this ModuleDescriptor.

public abstract Map<StringString> getParams ()

public abstract Plugin getPlugin ()

Returns
  • The plugin this module descriptor is associated with

public abstract String getPluginKey ()

The plugin key for this module, derived from the complete key.

Returns
  • The plugin key for this module.

public abstract void init (Plugin plugin, Element element)

Initialise a module given it's parent plugin and the XML element representing the module.

Since atlassian-plugins v2.2, you can no longer load classes from the plugin in this method, because the OSGi bundle that they will live in is not built yet. Load classes in the enabled() method instead.

Parameters
plugin The plugin that the module belongs to. Must not be null.
element XML element representing the module. Must not be null.
Throws
PluginParseException Can be thrown if an error occurs while parsing the XML element.

public abstract boolean isEnabledByDefault ()

Whether or not this plugin module is enabled by default.

Returns
  • true if this plugin module is enabled by default.

public abstract boolean isSystemModule ()

Whether or not this plugin module is a "system" plugin that shouldn't be made visible/disableable to the user.

Returns
  • true if this plugin module is a "system" plugin that shouldn't be made visible/disableable to the user.

public abstract boolean satisfiesMinJavaVersion ()

If a min java version has been specified this will return true if the running jvm is >= to the specified version. If this is not set then it is treated as not having a preference.

Returns
  • true if satisfied, false otherwise.