com.atlassian.plugin.eventlistener.descriptors
Class EventListenerModuleDescriptor
java.lang.Object
com.atlassian.plugin.descriptors.AbstractModuleDescriptor<java.lang.Object>
com.atlassian.plugin.eventlistener.descriptors.EventListenerModuleDescriptor
- All Implemented Interfaces:
- ModuleDescriptor<java.lang.Object>, Resourced, StateAware
public class EventListenerModuleDescriptor
- extends AbstractModuleDescriptor<java.lang.Object>
|
Method Summary |
void |
disabled()
Disables the module descriptor. |
void |
enabled()
Enables the descriptor by loading the module class. |
java.lang.Object |
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. |
| Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor |
assertModuleClassImplements, checkPermissions, destroy, destroy, 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 |
EventListenerModuleDescriptor
public EventListenerModuleDescriptor(ModuleFactory moduleFactory,
com.atlassian.event.api.EventPublisher eventPublisher)
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.
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()
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<java.lang.Object>
disabled
public void disabled()
- Description copied from class:
AbstractModuleDescriptor
- Disables the module descriptor. Classes overriding this method MUST call
super.disabled() after their own disabling code.
- Specified by:
disabled in interface StateAware- Overrides:
disabled in class AbstractModuleDescriptor<java.lang.Object>
Copyright © 2013 Atlassian. All Rights Reserved.