View Javadoc

1   package com.atlassian.plugin.webresource;
2   
3   import java.util.Map;
4   
5   /**
6    * Represents a plugin resource.
7    * @since 2.2
8    */
9   public interface PluginResource
10  {
11      /**
12       * @return true if caching for this resource is supported. Use this check to append a static
13       * caching url prefix to this resource's url.
14       */
15      boolean isCacheSupported();
16  
17      /**
18       * @return the url for this plugin resource.
19       */
20      String getUrl();
21  
22      /**
23       * @return the resource name for the plugin resource.
24       */
25      String getResourceName();
26  
27      /**
28       * @return the plugin module's complete key for which this resource belongs to.
29       */
30      String getModuleCompleteKey();
31  
32      /**
33       * @return a map of parameter key and value pairs for this resource.
34       */
35      Map<String, String> getParams();
36  
37      /**
38       * @return the version prefix string for a cached resource
39       */
40      String getVersion(WebResourceIntegration integration);
41  }