com.atlassian.plugin.osgi.factory.descriptor
Class ComponentModuleDescriptor

java.lang.Object
  extended by com.atlassian.plugin.descriptors.AbstractModuleDescriptor<java.lang.Object>
      extended by com.atlassian.plugin.osgi.factory.descriptor.ComponentModuleDescriptor
All Implemented Interfaces:
ModuleDescriptor<java.lang.Object>, Resourced, StateAware

public class ComponentModuleDescriptor
extends AbstractModuleDescriptor<java.lang.Object>

Module descriptor for components. Shouldn't be directly used outside providing read-only information.

Since:
2.2.0

Field Summary
 
Fields inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
key, moduleClass, moduleClassName, moduleFactory, name, plugin, resources, singleton
 
Constructor Summary
ComponentModuleDescriptor()
           
 
Method Summary
 java.lang.Object getModule()
          The particular module object created by this plugin.
 java.lang.String getModuleClassName()
          Deprecated. - BEWARE that this is a temporary method that will not exist for long. Deprecated since 2.3.0
 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 loadClass(Plugin plugin, java.lang.String clazz)
          Loads the module class that this descriptor provides, and will not necessarily be the implementation class.
 
Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
assertModuleClassImplements, checkPermissions, destroy, destroy, disabled, enabled, equals, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getName, getParams, getPlugin, getPluginKey, getRequiredPermissions, getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation, hashCode, isEnabledByDefault, isSingleton, isSingletonByDefault, isSystemModule, loadClass, provideValidationRules, satisfiesMinJavaVersion, setPlugin, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComponentModuleDescriptor

public ComponentModuleDescriptor()
Method Detail

init

public void init(@NotNull
                 Plugin plugin,
                 @NotNull
                 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<java.lang.Object>
Overrides:
init in class AbstractModuleDescriptor<java.lang.Object>
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.

loadClass

protected void loadClass(Plugin plugin,
                         java.lang.String clazz)
                  throws PluginParseException
Description copied from class: AbstractModuleDescriptor
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.

Overrides:
loadClass in class AbstractModuleDescriptor<java.lang.Object>
clazz - The module class name to load
Throws:
PluginParseException

getModule

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

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

getModuleClassName

public java.lang.String getModuleClassName()
Deprecated. - BEWARE that this is a temporary method that will not exist for long. Deprecated since 2.3.0

Overrides:
getModuleClassName in class AbstractModuleDescriptor<java.lang.Object>
Returns:
Module Class Name
Since:
2.3.0


Copyright © 2013 Atlassian. All Rights Reserved.