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
abstract DownloadableResource getDownloadableResource(String url, Map<StringString> queryParams)
Returns a DownloadableResource represented by the given url and query params.
abstract List<PluginResource> getPluginResources(String moduleCompleteKey)
Returns a list of PluginResources for a given plugin module's complete key.
abstract String getResourceUrl(String pluginModuleKey, String resourceName)
Constructs and returns url for the given resource.
abstract boolean matches(String url)
Returns true if this locator can parse the given url.

Fields

public static final String[] BATCH_PARAMS

Public Methods

public abstract 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 abstract 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 abstract String getResourceUrl (String pluginModuleKey, String resourceName)

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 abstract boolean matches (String url)

Returns true if this locator can parse the given url.