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}

The URL that it parses for a batch looks like this:
{server root}/download/batch/{plugin key}:{module key}/batch.css?urlreadingparam=true
  • Constructor Details

    • PluginResourceDownload

      public PluginResourceDownload()
    • PluginResourceDownload

      public PluginResourceDownload(Globals globals, com.atlassian.plugin.servlet.ContentTypeResolver contentTypeResolver, String characterEncoding)
  • Method Details

    • matches

      public boolean matches(String urlPath)
      Specified by:
      matches in interface com.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:
      serveFile in interface com.atlassian.plugin.servlet.DownloadStrategy
      Throws:
      com.atlassian.plugin.servlet.DownloadException
    • setCharacterEncoding

      public void setCharacterEncoding(String characterEncoding)
    • setContentTypeResolver

      public void setContentTypeResolver(com.atlassian.plugin.servlet.ContentTypeResolver contentTypeResolver)
    • setGlobals

      public void setGlobals(Globals globals)