com.atlassian.plugin.webresource
Interface PluginResourceLocator

All Known Implementing Classes:
PluginResourceLocatorImpl

public interface PluginResourceLocator

Assists in locating plugin resources in different ways.

Since:
2.2

Field Summary
static String[] BATCH_PARAMS
           
 
Method Summary
 DownloadableResource getDownloadableResource(String url, Map<String,String> 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 pluginModuleKey, String resourceName)
          Deprecated. As of 2.9.0, replaced by WebResourceUrlProvider.getResourceUrl(String, String)
 boolean matches(String url)
          Returns true if this locator can parse the given url.
 

Field Detail

BATCH_PARAMS

static final String[] BATCH_PARAMS
Method Detail

matches

boolean matches(String url)
Returns true if this locator can parse the given url.


getDownloadableResource

DownloadableResource getDownloadableResource(String url,
                                             Map<String,String> 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.


getPluginResources

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.


getResourceUrl

@Deprecated
String getResourceUrl(String pluginModuleKey,
                                 String resourceName)
Deprecated. As of 2.9.0, replaced by WebResourceUrlProvider.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


Copyright © 2013 Atlassian. All Rights Reserved.