com.atlassian.plugin.webresource
Class WebResourceModuleDescriptor
java.lang.Object
com.atlassian.plugin.descriptors.AbstractModuleDescriptor<java.lang.Void>
com.atlassian.plugin.webresource.WebResourceModuleDescriptor
- All Implemented Interfaces:
- ModuleDescriptor<java.lang.Void>, Resourced, StateAware
public class WebResourceModuleDescriptor
- extends AbstractModuleDescriptor<java.lang.Void>
A way of linking to web 'resources', such as javascript or css. This allows us to include resources once
on any given page, as well as ensuring that plugins can declare resources, even if they are included
at the bottom of a page.
|
Method Summary |
java.util.List<java.lang.String> |
getDependencies()
Returns a list of dependencies on other web resources. |
java.lang.Void |
getModule()
As this descriptor just handles resources, you should never call this |
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, destroy, disabled, enabled, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getName, getParams, getPlugin, getPluginKey, getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation, isEnabledByDefault, isSingleton, isSingletonByDefault, isSystemModule, loadClass, loadClass, provideValidationRules, satisfiesMinJavaVersion, setPlugin, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
WebResourceModuleDescriptor
public WebResourceModuleDescriptor()
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<java.lang.Void>- Overrides:
init in class AbstractModuleDescriptor<java.lang.Void>
- Parameters:
plugin - The plugin that the module belongs to.element - XML element representing the module.
- Throws:
PluginParseException - Can be thrown if an error occurs while parsing the XML element.
getModule
public java.lang.Void getModule()
- As this descriptor just handles resources, you should never call this
- Specified by:
getModule in interface ModuleDescriptor<java.lang.Void>- Specified by:
getModule in class AbstractModuleDescriptor<java.lang.Void>
- Returns:
- The module object created by this plugin.
- See Also:
ModuleDescriptor.getModuleClass()
getDependencies
public java.util.List<java.lang.String> getDependencies()
- Returns a list of dependencies on other web resources.
- Returns:
- a list of module complete keys
Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.