public class

WebResourceModuleDescriptor

extends AbstractModuleDescriptor<T>
java.lang.Object
   ↳ com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
     ↳ com.atlassian.plugin.webresource.WebResourceModuleDescriptor

Class Overview

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.

Summary

[Expand]
Inherited Fields
From class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
Public Constructors
WebResourceModuleDescriptor()
Public Methods
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, Element element)
Initialise a module given it's parent plugin and the XML element representing the module.
boolean isDisableMinification()
[Expand]
Inherited Methods
From class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
From class java.lang.Object
From interface com.atlassian.plugin.ModuleDescriptor
From interface com.atlassian.plugin.Resourced
From interface com.atlassian.plugin.StateAware

Public Constructors

public WebResourceModuleDescriptor ()

Public Methods

public Set<String> getContexts ()

Returns the web resource contexts this resource is associated with.

Returns
  • the web resource contexts this resource is associated with.

public List<String> getDependencies ()

Returns a list of dependencies on other web resources.

Returns
  • a list of module complete keys

public Void getModule ()

As this descriptor just handles resources, you should never call this

Returns
  • The module object created by this plugin.

public List<WebResourceTransformation> getTransformations ()

public void init (Plugin plugin, Element element)

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 enabled() method instead.

Parameters
plugin The plugin that the module belongs to. Must not be null.
element XML element representing the module. Must not be null.

public boolean isDisableMinification ()

Returns
  • true if resource minification should be skipped, false otherwise.