com.atlassian.plugin
Interface ModuleDescriptor<T>

All Superinterfaces:
Resourced
All Known Subinterfaces:
WebFragmentModuleDescriptor, WebItemModuleDescriptor, WebSectionModuleDescriptor
All Known Implementing Classes:
AbstractModuleDescriptor, AbstractWebFragmentModuleDescriptor, BaseServletModuleDescriptor, DefaultAbstractWebFragmentModuleDescriptor, DefaultWebItemModuleDescriptor, DefaultWebSectionModuleDescriptor, ResourcedModuleDescriptor, ServletContextListenerModuleDescriptor, ServletContextParamModuleDescriptor, ServletFilterModuleDescriptor, ServletModuleDescriptor, ServletModuleDescriptor, SimpleContextListenerModuleDescriptor, SimpleFilterModuleDescriptor, SimpleServletModuleDescriptor, UnloadableModuleDescriptor, UnrecognisedModuleDescriptor, WebResourceModuleDescriptor

public interface ModuleDescriptor<T>
extends Resourced


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

Method Detail

getCompleteKey

java.lang.String getCompleteKey()
The complete key for this module, including the plugin key.

Format is plugin.key:module.key


getPluginKey

java.lang.String getPluginKey()
The plugin key for this module, derived from the complete key


getKey

java.lang.String getKey()
The key for this module, unique within the plugin.


getName

java.lang.String getName()
A simple string name for this descriptor.


getDescription

java.lang.String getDescription()
A simple description of this descriptor.


getModuleClass

java.lang.Class<T> getModuleClass()
The class of the module this descriptor creates.


getModule

T getModule()
The particular module object created by this plugin.


init

void init(Plugin plugin,
          org.dom4j.Element element)
          throws PluginParseException
Initialise a module given it's parent plugin and the XML element representing the module.

Throws:
PluginParseException

isEnabledByDefault

boolean isEnabledByDefault()
Whether or not this plugin module is enabled by default.

Returns:

isSystemModule

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

Returns:

destroy

void destroy(Plugin plugin)
Override this if your plugin needs to clean up when it's been removed.

Parameters:
plugin -

getMinJavaVersion

java.lang.Float getMinJavaVersion()

satisfiesMinJavaVersion

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.

getParams

java.util.Map getParams()

getI18nNameKey

java.lang.String getI18nNameKey()
Key used to override getName() when using internationalisation.

Returns:
the i18n key. May be null.

getDescriptionKey

java.lang.String getDescriptionKey()
Key used to override getDescription() when using internationalisation.

Returns:
the i18n key. May be null.

getPlugin

Plugin getPlugin()
Returns:
The plugin this module descriptor is associated with


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.