Class PluginResourceDownload
java.lang.Object
com.atlassian.plugin.webresource.servlet.PluginResourceDownload
- All Implemented Interfaces:
com.atlassian.plugin.servlet.DownloadStrategy
public class PluginResourceDownload
extends Object
implements com.atlassian.plugin.servlet.DownloadStrategy
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}
{server root}/download/batch/{plugin key}:{module key}/batch.css?urlreadingparam=true-
Constructor Summary
ConstructorsConstructorDescriptionPluginResourceDownload(Globals globals, com.atlassian.plugin.servlet.ContentTypeResolver contentTypeResolver, String characterEncoding) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidserveFile(javax.servlet.http.HttpServletRequest originalRequest, javax.servlet.http.HttpServletResponse originalResponse) voidsetCharacterEncoding(String characterEncoding) voidsetContentTypeResolver(com.atlassian.plugin.servlet.ContentTypeResolver contentTypeResolver) voidsetGlobals(Globals globals)
-
Constructor Details
-
PluginResourceDownload
public PluginResourceDownload() -
PluginResourceDownload
-
-
Method Details
-
matches
- Specified by:
matchesin interfacecom.atlassian.plugin.servlet.DownloadStrategy
-
serveFile
public void serveFile(javax.servlet.http.HttpServletRequest originalRequest, javax.servlet.http.HttpServletResponse originalResponse) throws com.atlassian.plugin.servlet.DownloadException - Specified by:
serveFilein interfacecom.atlassian.plugin.servlet.DownloadStrategy- Throws:
com.atlassian.plugin.servlet.DownloadException
-
setCharacterEncoding
-
setContentTypeResolver
public void setContentTypeResolver(com.atlassian.plugin.servlet.ContentTypeResolver contentTypeResolver) -
setGlobals
-