public interface

PluginResourceLocator

com.atlassian.plugin.webresource.PluginResourceLocator
Known Indirect Subclasses

Class Overview

Assists in locating plugin resources in different ways.

Summary

Fields
public static final String[] BATCH_PARAMS
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.
@Deprecated String getResourceUrl(String pluginModuleKey, String resourceName)
This method is deprecated. As of 2.9.0, replaced by getResourceUrl(String, String)
boolean matches(String url)
Returns true if this locator can parse the given url.

Fields

public static final String[] BATCH_PARAMS

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 or the resource cannot be found, 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.

@Deprecated public String getResourceUrl (String pluginModuleKey, String resourceName)

This method is deprecated.
As of 2.9.0, replaced by getResourceUrl(String, String)

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

Parameters
pluginModuleKey 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.