|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.descriptors.AbstractModuleDescriptor<Void>
com.atlassian.plugin.webresource.WebResourceModuleDescriptor
public class WebResourceModuleDescriptor
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.
| Field Summary |
|---|
| Fields inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor |
|---|
moduleClass, moduleClassName, moduleFactory, plugin, resources, singleton |
| Constructor Summary | |
|---|---|
WebResourceModuleDescriptor(HostContainer hostContainer)
|
|
| Method Summary | |
|---|---|
void |
disabled()
Disables the module descriptor. |
void |
enabled()
Enables the descriptor by loading the module class. |
Condition |
getCondition()
|
Set<String> |
getContexts()
Returns the web resource contexts this resource is associated with. |
List<String> |
getDependencies()
Returns a list of dependencies on other web resources. |
Void |
getModule()
As this descriptor just handles resources, you should never call this |
List<WebResourceTransformation> |
getTransformations()
|
void |
init(Plugin plugin,
org.dom4j.Element element)
Initialise a module given it's parent plugin and the XML element representing the module. |
boolean |
isDisableMinification()
|
boolean |
shouldDisplay()
|
| Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor |
|---|
assertModuleClassImplements, destroy, equals, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getName, getParams, getPlugin, getPluginKey, getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation, hashCode, 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 |
| Constructor Detail |
|---|
public WebResourceModuleDescriptor(HostContainer hostContainer)
| Method Detail |
|---|
public void init(Plugin plugin,
org.dom4j.Element element)
throws PluginParseException
ModuleDescriptor
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.
init in interface ModuleDescriptor<Void>init in class AbstractModuleDescriptor<Void>plugin - The plugin that the module belongs to. Must not be null.element - XML element representing the module. Must not be null.
PluginParseException - Can be thrown if an error occurs while
parsing the XML element.public Void getModule()
getModule in interface ModuleDescriptor<Void>getModule in class AbstractModuleDescriptor<Void>ModuleDescriptor.getModuleClass()public void enabled()
AbstractModuleDescriptor
enabled in interface StateAwareenabled in class AbstractModuleDescriptor<Void>public void disabled()
AbstractModuleDescriptor
disabled in interface StateAwaredisabled in class AbstractModuleDescriptor<Void>public Set<String> getContexts()
public List<String> getDependencies()
public List<WebResourceTransformation> getTransformations()
public boolean isDisableMinification()
true if resource minification should be skipped, false otherwise.public Condition getCondition()
getCondition in interface ConditionalDescriptorpublic boolean shouldDisplay()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||