public class

PluginResourceDownload

extends Object
implements DownloadStrategy
java.lang.Object
   ↳ com.atlassian.plugin.servlet.PluginResourceDownload

Class Overview

A downloadable plugin resource, as described here: http://confluence.atlassian.com/display/JIRA/Downloadable+plugin+resource It supports the download of single plugin resources as well as batching.

The URL that it parses for a single resource looks like this:
{server root}/download/resources/{plugin key}:{module key}/{resource name} The URL that it parses for a batch looks like this:
{server root}/download/batch/{plugin key}:{module key}/all.css?ieonly=true

Summary

Public Constructors
PluginResourceDownload()
PluginResourceDownload(PluginResourceLocator pluginResourceLocator, ContentTypeResolver contentTypeResolver, String characterEncoding)
Public Methods
boolean matches(String urlPath)
Returns true if the DownloadStrategy is supported for the given url path.
void serveFile(HttpServletRequest request, HttpServletResponse response)
Serves the file for the given request and response.
void setCharacterEncoding(String characterEncoding)
void setContentTypeResolver(ContentTypeResolver contentTypeResolver)
void setPluginResourceLocator(PluginResourceLocator pluginResourceLocator)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.plugin.servlet.DownloadStrategy

Public Constructors

public PluginResourceDownload ()

public PluginResourceDownload (PluginResourceLocator pluginResourceLocator, ContentTypeResolver contentTypeResolver, String characterEncoding)

Public Methods

public boolean matches (String urlPath)

Returns true if the DownloadStrategy is supported for the given url path.

Parameters
urlPath the result of getRequestURI() converted to lowercase

public void serveFile (HttpServletRequest request, HttpServletResponse response)

Serves the file for the given request and response.

public void setCharacterEncoding (String characterEncoding)

public void setContentTypeResolver (ContentTypeResolver contentTypeResolver)

public void setPluginResourceLocator (PluginResourceLocator pluginResourceLocator)