public class

PluginResourceLocatorImpl

extends Object
implements PluginResourceLocator
java.lang.Object
   ↳ com.atlassian.plugin.webresource.PluginResourceLocatorImpl

Class Overview

Default implementation of PluginResourceLocator.

Summary

Constants
String PLUGIN_WEBRESOURCE_BATCHING_OFF
[Expand]
Inherited Fields
From interface com.atlassian.plugin.webresource.PluginResourceLocator
Public Constructors
PluginResourceLocatorImpl(WebResourceIntegration webResourceIntegration, ServletContextFactory servletContextFactory)
PluginResourceLocatorImpl(WebResourceIntegration webResourceIntegration, ServletContextFactory servletContextFactory, ResourceBatchingConfiguration resourceBatchingConfiguration)
Public Methods
DownloadableResource getDownloadableResource(String url, Map<StringString> queryParams)
Returns a DownloadableResource represented by the given url and query params.
List<PluginResource> getPluginResources(String moduleCompleteKey)
Returns a list of PluginResources for a given plugin module's complete key.
String getResourceUrl(String moduleCompleteKey, String resourceName)
Constructs and returns url for the given resource.
boolean matches(String url)
Returns true if this locator can parse the given url.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.plugin.webresource.PluginResourceLocator

Constants

public static final String PLUGIN_WEBRESOURCE_BATCHING_OFF

Constant Value: "plugin.webresource.batching.off"

Public Constructors

public PluginResourceLocatorImpl (WebResourceIntegration webResourceIntegration, ServletContextFactory servletContextFactory)

public PluginResourceLocatorImpl (WebResourceIntegration webResourceIntegration, ServletContextFactory servletContextFactory, ResourceBatchingConfiguration resourceBatchingConfiguration)

Public Methods

public DownloadableResource getDownloadableResource (String url, Map<StringString> queryParams)

Returns a DownloadableResource represented by the given url and query params. matches(String) should be called before invoking this method. If the url is not understood by the locator, null will be returned.

public List<PluginResource> getPluginResources (String moduleCompleteKey)

Returns a list of PluginResources for a given plugin module's complete key. If the plugin the module belongs to is not enabled or does not exist, an empty list is returned.

public String getResourceUrl (String moduleCompleteKey, String resourceName)

Constructs and returns url for the given resource. This method is not responsible for adding any static caching url prefixes.

Parameters
moduleCompleteKey a plugin module's complete key
resourceName the name of the resource described in the module

public boolean matches (String url)

Returns true if this locator can parse the given url.