com.atlassian.plugin.schema.impl
Class DescribedModuleTypeModuleDescriptor
java.lang.Object
com.atlassian.plugin.descriptors.AbstractModuleDescriptor<DescribedModuleDescriptorFactory>
com.atlassian.plugin.schema.impl.DescribedModuleTypeModuleDescriptor
- All Implemented Interfaces:
- ModuleDescriptor<DescribedModuleDescriptorFactory>, Resourced, StateAware
public final class DescribedModuleTypeModuleDescriptor
- extends AbstractModuleDescriptor<DescribedModuleDescriptorFactory>
Descriptor that allows described module descriptor factories to be configured in XML. Main value
is the ability to reuse the name and description of the module descriptor configuration.
|
Method Summary |
void |
enabled()
Enables the descriptor by loading the module class. |
DescribedModuleDescriptorFactory |
getModule()
The particular module object created by this plugin. |
static java.lang.String |
getOptionalAttribute(org.dom4j.Element e,
java.lang.String name,
java.lang.Object defaultValue)
|
void |
init(Plugin plugin,
org.dom4j.Element element)
Initialise a module given it's parent plugin and the XML element
representing the module. |
| Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor |
assertModuleClassImplements, checkPermissions, destroy, destroy, disabled, equals, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getModuleClassName, getName, getParams, getPlugin, getPluginKey, getRequiredPermissions, getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation, hashCode, isEnabled, isEnabledByDefault, isSingleton, isSingletonByDefault, isSystemModule, loadClass, loadClass, provideValidationRules, satisfiesMinJavaVersion, setPlugin, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
DescribedModuleTypeModuleDescriptor
public DescribedModuleTypeModuleDescriptor(ModuleFactory moduleFactory)
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<DescribedModuleDescriptorFactory>- Overrides:
init in class AbstractModuleDescriptor<DescribedModuleDescriptorFactory>
- 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.
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<DescribedModuleDescriptorFactory>
getModule
public DescribedModuleDescriptorFactory getModule()
- Description copied from interface:
ModuleDescriptor
- The particular module object created by this plugin.
- Specified by:
getModule in interface ModuleDescriptor<DescribedModuleDescriptorFactory>- Specified by:
getModule in class AbstractModuleDescriptor<DescribedModuleDescriptorFactory>
- Returns:
- The module object created by this plugin.
- See Also:
ModuleDescriptor.getModuleClass()
getOptionalAttribute
public static java.lang.String getOptionalAttribute(org.dom4j.Element e,
java.lang.String name,
java.lang.Object defaultValue)
Copyright © 2013 Atlassian. All Rights Reserved.