com.atlassian.plugin.webresource
Class SuperBatchPluginResource

java.lang.Object
  extended by com.atlassian.plugin.webresource.SuperBatchPluginResource
All Implemented Interfaces:
PluginResource

public class SuperBatchPluginResource
extends Object
implements PluginResource

Creates a batch of all like-typed resources that are declared as "super-batch="true"" in their plugin definitions.

The URL for batch resources is /download/superbatch/<type>/batch.<type. The additional type part in the path is simply there to make the number of path-parts identical with other resources, so relative URLs will still work in CSS files.


Constructor Summary
protected SuperBatchPluginResource(com.atlassian.plugin.webresource.ResourceKey resource, Map<String,String> params)
           
  SuperBatchPluginResource(String type, Map<String,String> params)
           
 
Method Summary
static SuperBatchPluginResource createBatchFor(PluginResource pluginResource)
           
 Set<com.atlassian.plugin.webresource.BatchedWebResourceDescriptor> getBatchedWebResourceDescriptors()
          This method provides the mechanism for discovering the contents of a PluginResource.
 String getModuleCompleteKey()
           
 Map<String,String> getParams()
           
 String getResourceName()
           
 String getType()
           
 String getUrl()
           
 String getVersion(WebResourceIntegration integration)
           
 boolean isCacheSupported()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SuperBatchPluginResource

public SuperBatchPluginResource(String type,
                                Map<String,String> params)

SuperBatchPluginResource

protected SuperBatchPluginResource(com.atlassian.plugin.webresource.ResourceKey resource,
                                   Map<String,String> params)
Method Detail

createBatchFor

public static SuperBatchPluginResource createBatchFor(PluginResource pluginResource)

getUrl

public String getUrl()
Specified by:
getUrl in interface PluginResource
Returns:
the url for this plugin resource.

getParams

public Map<String,String> getParams()
Specified by:
getParams in interface PluginResource
Returns:
a map of parameter key and value pairs for this resource.

getVersion

public String getVersion(WebResourceIntegration integration)
Specified by:
getVersion in interface PluginResource
Returns:
the version prefix string for a cached resource

getType

public String getType()
Specified by:
getType in interface PluginResource
Returns:
the type (e.g. file extension) of the resource.

isCacheSupported

public boolean isCacheSupported()
Specified by:
isCacheSupported in interface PluginResource
Returns:
true if caching for this resource is supported. Use this check to append a static caching url prefix to this resource's url.

getResourceName

public String getResourceName()
Specified by:
getResourceName in interface PluginResource
Returns:
the resource name for the plugin resource.

getModuleCompleteKey

public String getModuleCompleteKey()
Specified by:
getModuleCompleteKey in interface PluginResource
Returns:
the plugin module's complete key for which this resource belongs to.

getBatchedWebResourceDescriptors

public Set<com.atlassian.plugin.webresource.BatchedWebResourceDescriptor> getBatchedWebResourceDescriptors()
Description copied from interface: PluginResource
This method provides the mechanism for discovering the contents of a PluginResource.

The primary use of this method is in providing a representation of the contents (for dependency tracking) when formatting a PluginResource.

Specified by:
getBatchedWebResourceDescriptors in interface PluginResource
Returns:
a Set of descriptors providing information about the contents of this PluginResource.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 Atlassian. All Rights Reserved.