com.atlassian.plugin.web.descriptors
Class WebPanelRendererModuleDescriptor

java.lang.Object
  extended by com.atlassian.plugin.descriptors.AbstractModuleDescriptor<WebPanelRenderer>
      extended by com.atlassian.plugin.web.descriptors.WebPanelRendererModuleDescriptor
All Implemented Interfaces:
ModuleDescriptor<WebPanelRenderer>, Resourced, StateAware

public class WebPanelRendererModuleDescriptor
extends AbstractModuleDescriptor<WebPanelRenderer>

The web panel renderer module is used to add web panel renderers to the plugin system.

Since:
2.5.0

Field Summary
static String XML_ELEMENT_NAME
          Host applications should use this string when registering the WebPanelRendererModuleDescriptor.
 
Fields inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
moduleClass, moduleClassName, moduleFactory, plugin, resources, singleton
 
Constructor Summary
WebPanelRendererModuleDescriptor(ModuleFactory moduleClassFactory)
           
 
Method Summary
 void enabled()
          Enables the descriptor by loading the module class.
 WebPanelRenderer getModule()
          The particular module object created by this plugin.
 void init(Plugin plugin, org.dom4j.Element element)
          Initialise a module given it's parent plugin and the XML element representing the module.
protected  void provideValidationRules(ValidationPattern pattern)
          Provides validation rules for the pattern
 
Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
assertModuleClassImplements, destroy, disabled, equals, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getName, getParams, getPlugin, getPluginKey, getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation, hashCode, isEnabledByDefault, isSingleton, isSingletonByDefault, isSystemModule, loadClass, loadClass, satisfiesMinJavaVersion, setPlugin, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

XML_ELEMENT_NAME

public static final String XML_ELEMENT_NAME
Host applications should use this string when registering the WebPanelRendererModuleDescriptor.

See Also:
Constant Field Values
Constructor Detail

WebPanelRendererModuleDescriptor

public WebPanelRendererModuleDescriptor(ModuleFactory moduleClassFactory)
Method Detail

init

public void init(Plugin plugin,
                 org.dom4j.Element element)
          throws PluginParseException
Description copied from interface: ModuleDescriptor
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 AbstractModuleDescriptor.enabled() method instead.

Specified by:
init in interface ModuleDescriptor<WebPanelRenderer>
Overrides:
init in class AbstractModuleDescriptor<WebPanelRenderer>
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.

provideValidationRules

protected void provideValidationRules(ValidationPattern pattern)
Description copied from class: AbstractModuleDescriptor
Provides validation rules for the pattern

Overrides:
provideValidationRules in class AbstractModuleDescriptor<WebPanelRenderer>
Parameters:
pattern - The validation pattern

enabled

public void enabled()
Description copied from class: AbstractModuleDescriptor
Enables the descriptor by loading the module class. Classes overriding this method MUST call super.enabled() before their own enabling code.

Specified by:
enabled in interface StateAware
Overrides:
enabled in class AbstractModuleDescriptor<WebPanelRenderer>

getModule

public WebPanelRenderer getModule()
Description copied from interface: ModuleDescriptor
The particular module object created by this plugin.

Specified by:
getModule in interface ModuleDescriptor<WebPanelRenderer>
Specified by:
getModule in class AbstractModuleDescriptor<WebPanelRenderer>
Returns:
The module object created by this plugin.
See Also:
ModuleDescriptor.getModuleClass()


Copyright © 2013 Atlassian. All Rights Reserved.