public class

BatchSubResource

extends Object
implements DownloadableResource
java.lang.Object
   ↳ com.atlassian.plugin.webresource.BatchSubResource

Class Overview

Represents a plugin resource that is a subordinate of a batch. This is typically the case for CSS in the superbatch or context batch with relative urls to images. For example: /download/superbatch/css/images/foo.png /download/contextbatch/css/contexta/images/foo.png

Summary

Public Constructors
BatchSubResource(String resourceName, String type, Map<StringString> params)
BatchSubResource(String resourceName, String type, Map<StringString> params, List<DownloadableResource> resources)
Public Methods
String getContentType()
Returns the content type for the resource.
String getResourceName()
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

Public Constructors

public BatchSubResource (String resourceName, String type, Map<StringString> params)

public BatchSubResource (String resourceName, String type, Map<StringString> params, List<DownloadableResource> resources)

Public Methods

public String getContentType ()

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

public String getResourceName ()

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 ()