public class

SuperBatchPluginResource

extends Object
implements DownloadableResource BatchResource PluginResource
java.lang.Object
   ↳ com.atlassian.plugin.webresource.SuperBatchPluginResource

Class Overview

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.

Summary

Public Constructors
SuperBatchPluginResource(String type, Map<StringString> params)
Creates a super batch resource without the included resources
SuperBatchPluginResource(String type, Map<StringString> params, Iterable<DownloadableResource> resources)
Protected Constructors
SuperBatchPluginResource(String resourceName, String type, Map<StringString> params, Iterable<DownloadableResource> resources)
Public Methods
static SuperBatchPluginResource createBatchFor(PluginResource pluginResource)
String getContentType()
Returns the content type for the resource.
String getModuleCompleteKey()
Map<StringString> getParams()
String getResourceName()
String getType()
String getUrl()
String getVersion(WebResourceIntegration integration)
boolean isCacheSupported()
boolean isEmpty()
boolean isResourceModified(HttpServletRequest request, HttpServletResponse response)
Returns true if the plugin resource has been modified.
void serveResource(HttpServletRequest request, HttpServletResponse response)
Writes the resource content out into the response.
void streamResource(OutputStream out)
Write the resource to the supplied OutputStream.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.plugin.servlet.DownloadableResource
From interface com.atlassian.plugin.webresource.BatchResource
From interface com.atlassian.plugin.webresource.PluginResource

Public Constructors

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

Creates a super batch resource without the included resources

Parameters
type the type of resource (CSS/JS)
params the parameters (ieOnly,media)

public SuperBatchPluginResource (String type, Map<StringString> params, Iterable<DownloadableResource> resources)

Protected Constructors

protected SuperBatchPluginResource (String resourceName, String type, Map<StringString> params, Iterable<DownloadableResource> resources)

Public Methods

public static SuperBatchPluginResource createBatchFor (PluginResource pluginResource)

public String getContentType ()

Returns the content type for the resource. May return null if it cannot resolve its own content type.

public String getModuleCompleteKey ()

public Map<StringString> getParams ()

public String getResourceName ()

public String getType ()

public String getUrl ()

public String getVersion (WebResourceIntegration integration)

public boolean isCacheSupported ()

public boolean isEmpty ()

public boolean isResourceModified (HttpServletRequest request, HttpServletResponse response)

Returns true if the plugin resource has been modified. The implementing class is responsible for setting any appropriate response codes or headers on the response. If the resource has been modified, the resource shouldn't be served.

public void serveResource (HttpServletRequest request, HttpServletResponse response)

Writes the resource content out into the response.

public void streamResource (OutputStream out)

Write the resource to the supplied OutputStream. Note that the OutputStream will not be closed by this method.

Parameters
out the stream to write to

public String toString ()