java.lang.Object | |
↳ | com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T> |
Known Indirect Subclasses |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
moduleClassName | |||||||||||
moduleFactory | |||||||||||
plugin | |||||||||||
resources | |||||||||||
singleton | This field is deprecated. since 2.2.0 |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Override this if your plugin needs to clean up when it's been removed.
| |||||||||||
Disables the module descriptor.
| |||||||||||
Enables the descriptor by loading the module class.
| |||||||||||
The complete key for this module, including the plugin key.
| |||||||||||
A simple description of this descriptor.
| |||||||||||
Key used to override
getDescription() when using
internationalisation. | |||||||||||
Key used to override
getName() when using internationalisation. | |||||||||||
The key for this module, unique within the plugin.
| |||||||||||
The particular module object created by this plugin.
| |||||||||||
The class of the module this descriptor creates.
| |||||||||||
A simple string name for this descriptor.
| |||||||||||
The plugin key for this module, derived from the complete key.
| |||||||||||
Get a
ResourceDescriptor of a particular type and name. | |||||||||||
Get a
List of all the descriptors
. | |||||||||||
Get a list of all
descriptors of a particular
type. | |||||||||||
Get a
ResourceLocation of a particular type and name. | |||||||||||
Initialise a module given it's parent plugin and the XML element
representing the module.
| |||||||||||
Whether or not this plugin module is enabled by default.
| |||||||||||
This method is deprecated.
Since 2.2.0
| |||||||||||
Whether or not this plugin module is a "system" plugin that shouldn't be
made visible/disableable to the user.
| |||||||||||
If a min java version has been specified this will return true if the
running jvm is >= to the specified version.
| |||||||||||
Sets the plugin for the ModuleDescriptor
| |||||||||||
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Check that the module class of this descriptor implements a given
interface, or extends a given class.
| |||||||||||
This method is deprecated.
Since 2.2.0
| |||||||||||
Loads the module class that this descriptor provides, and will not
necessarily be the implementation class.
| |||||||||||
This method is deprecated.
Since 2.1.0, use
loadClass(Plugin, String) instead
| |||||||||||
Provides validation rules for the pattern
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.atlassian.plugin.ModuleDescriptor
| |||||||||||
From interface
com.atlassian.plugin.Resourced
| |||||||||||
From interface
com.atlassian.plugin.StateAware
|
This field is deprecated.
since 2.2.0
Override this if your plugin needs to clean up when it's been removed.
plugin | TODO: The plugin parameter is redundant. The ModuleDescriptor must know its parent plugin in order to implement getPlugin() |
---|
Disables the module descriptor. Classes overriding this method MUST call super.disabled() after their own disabling code.
Enables the descriptor by loading the module class. Classes overriding this method MUST call super.enabled() before their own enabling code.
The complete key for this module, including the plugin key.
Format is plugin.key:module.key
A simple description of this descriptor.
Key used to override getDescription()
when using
internationalisation.
Key used to override getName()
when using internationalisation.
The key for this module, unique within the plugin.
The particular module object created by this plugin.
The class of the module this descriptor creates.
A simple string name for this descriptor.
The plugin key for this module, derived from the complete key.
Get a ResourceDescriptor
of a particular type and name.
Get a List
of all the descriptors
.
Note: since 2.2 this list must be immutable, previously modifying this list could modify the underlying list.
Get a list of all descriptors
of a particular
type.
Note: since 2.2 this list must be immutable, previously this list was modifiable but modifications would not be reflected in the underlying list.
Get a ResourceLocation
of a particular type and name.
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.
plugin | The plugin that the module belongs to. Must not be null. |
---|---|
element | XML element representing the module. Must not be null. |
PluginParseException |
---|
Whether or not this plugin module is enabled by default.
true
if this plugin module is enabled by default.
This method is deprecated.
Since 2.2.0
Whether or not this plugin module is a "system" plugin that shouldn't be made visible/disableable to the user.
true
if this plugin module is a "system" plugin that
shouldn't be made visible/disableable to the user.
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.
Check that the module class of this descriptor implements a given interface, or extends a given class.
requiredModuleClazz | The class this module's class must implement or extend. |
---|
PluginParseException | If the module class does not implement or extend the given class. |
---|
This method is deprecated.
Since 2.2.0
Loads the module class that this descriptor provides, and will not necessarily be the implementation class. Override this for module descriptors whose type cannot be determined via generics.
clazz | The module class name to load |
---|
IllegalStateException | If the module class cannot be determined and the descriptor doesn't define a module type via generics |
---|---|
PluginParseException |
This method is deprecated.
Since 2.1.0, use loadClass(Plugin, String)
instead
Override this for module descriptors which don't expect to be able to load a class successfully
PluginParseException |
---|
Provides validation rules for the pattern
pattern | The validation pattern |
---|