public class

DefaultAbstractWebFragmentModuleDescriptor

extends Object
implements StateAware WebFragmentModuleDescriptor<T>
java.lang.Object
   ↳ com.atlassian.plugin.web.descriptors.DefaultAbstractWebFragmentModuleDescriptor<T>

Class Overview

Wrapper for WebFragmentModuleDescriptor, so that it could be extended by application specific wrappers to provide additional methods.

Summary

[Expand]
Inherited Constants
From interface com.atlassian.plugin.web.descriptors.WebFragmentModuleDescriptor
Public Constructors
DefaultAbstractWebFragmentModuleDescriptor(WebFragmentModuleDescriptor<T> abstractDescriptor)
Public Methods
void destroy(Plugin plugin)
Override this if your plugin needs to clean up when it's been removed.
void disabled()
Called by the plugin manager when the plugin or module is deactivated.
void enabled()
Called by the plugin manager when a plugin or module is activated.
String getCompleteKey()
The complete key for this module, including the plugin key.
Condition getCondition()
ContextProvider getContextProvider()
Returns the ContextProvider that augments the context used to render a web module.
String getDescription()
A simple description of this descriptor.
String getDescriptionKey()
Key used to override getDescription() when using internationalisation.
String getI18nNameKey()
Key used to override getName() when using internationalisation.
String getKey()
The key for this module, unique within the plugin.
Float getMinJavaVersion()
T getModule()
The particular module object created by this plugin.
Class<T> getModuleClass()
The class of the module this descriptor creates.
String getName()
A simple string name for this descriptor.
Map<StringString> getParams()
Plugin getPlugin()
String getPluginKey()
The plugin key for this module, derived from the complete key.
ResourceDescriptor getResourceDescriptor(String type, String name)
Get a ResourceDescriptor of a particular type and name.
List<ResourceDescriptor> getResourceDescriptors()
Get a List of all the descriptors .
@Deprecated List<ResourceDescriptor> getResourceDescriptors(String type)
This method is deprecated. since 2.5.0 use getResourceDescriptors() and filter as required
ResourceLocation getResourceLocation(String type, String name)
Get a ResourceLocation of a particular type and name.
WebLabel getTooltip()
WebLabel getWebLabel()
WebParam getWebParams()
int getWeight()
void init(Plugin plugin, 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.
void setWebInterfaceManager(WebInterfaceManager webInterfaceManager)
String toString()
Protected Methods
WebFragmentModuleDescriptor getDecoratedDescriptor()
[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
From interface com.atlassian.plugin.web.descriptors.ConditionalDescriptor
From interface com.atlassian.plugin.web.descriptors.ContextAware
From interface com.atlassian.plugin.web.descriptors.WebFragmentModuleDescriptor
From interface com.atlassian.plugin.web.descriptors.WeightedDescriptor

Public Constructors

public DefaultAbstractWebFragmentModuleDescriptor (WebFragmentModuleDescriptor<T> abstractDescriptor)

Public Methods

public 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 void disabled ()

Called by the plugin manager when the plugin or module is deactivated. This method will only be called if the plugin is deactivated while the application is running: stopping the server will not cause this method to be called on any plugins.

public void enabled ()

Called by the plugin manager when a plugin or module is activated. Any exceptions thrown should be interpreted as the plugin is unloadable.

public 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 Condition getCondition ()

public ContextProvider getContextProvider ()

Returns the ContextProvider that augments the context used to render a web module.

public String getDescription ()

A simple description of this descriptor.

Returns
  • The description for this ModuleDescriptor.

public String getDescriptionKey ()

Key used to override getDescription() when using internationalisation.

Returns
  • the i18n key. May be null.

public String getI18nNameKey ()

Key used to override getName() when using internationalisation.

Returns
  • the i18n key. May be null.

public String getKey ()

The key for this module, unique within the plugin.

Returns
  • The key for this module.

public Float getMinJavaVersion ()

public T getModule ()

The particular module object created by this plugin.

Returns
  • The module object created by this plugin.

public Class<T> getModuleClass ()

The class of the module this descriptor creates.

Returns
  • The class of the module this descriptor creates.

public String getName ()

A simple string name for this descriptor.

Returns
  • The name for this ModuleDescriptor.

public Map<StringString> getParams ()

public Plugin getPlugin ()

public String getPluginKey ()

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

Returns
  • The plugin key for this module.

public ResourceDescriptor getResourceDescriptor (String type, String name)

Get a ResourceDescriptor of a particular type and name.

Returns
  • the specified resource descriptor if found, null otherwise.

public List<ResourceDescriptor> getResourceDescriptors ()

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.

Returns
  • all resource descriptors this object supports.

@Deprecated public List<ResourceDescriptor> getResourceDescriptors (String type)

This method is deprecated.
since 2.5.0 use getResourceDescriptors() and filter as required

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.

Returns
  • all resource descriptors this object supports.

public ResourceLocation getResourceLocation (String type, String name)

Get a ResourceLocation of a particular type and name.

Returns
  • the specified resource location if found, null otherwise.

public WebLabel getTooltip ()

public WebLabel getWebLabel ()

public WebParam getWebParams ()

public int getWeight ()

public 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.

public boolean isEnabledByDefault ()

Whether or not this plugin module is enabled by default.

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

public 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 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.

public void setWebInterfaceManager (WebInterfaceManager webInterfaceManager)

public String toString ()

Protected Methods

protected WebFragmentModuleDescriptor getDecoratedDescriptor ()