Class PluggableDownloadStrategy

java.lang.Object
com.atlassian.plugin.servlet.download.plugin.PluggableDownloadStrategy
All Implemented Interfaces:
DownloadStrategy

public class PluggableDownloadStrategy extends Object implements DownloadStrategy
A download strategy which maintains a list of DownloadStrategyModuleDescriptors and delegates to them in order.
Since:
2.2.0
See Also:
  • Constructor Details

    • PluggableDownloadStrategy

      public PluggableDownloadStrategy(com.atlassian.plugin.event.PluginEventManager pluginEventManager)
  • Method Details

    • matches

      public boolean matches(String urlPath)
      Description copied from interface: DownloadStrategy
      Returns true if the DownloadStrategy is supported for the given url path.
      Specified by:
      matches in interface DownloadStrategy
      Parameters:
      urlPath - the result of HttpServletRequest.getRequestURI() converted to lowercase
    • serveFile

      public void serveFile(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws DownloadException
      Description copied from interface: DownloadStrategy
      Serves the file for the given request and response.
      Specified by:
      serveFile in interface DownloadStrategy
      Throws:
      DownloadException - if there was an error during serving of the file.
    • register

      public void register(String key, DownloadStrategy strategy)
    • unregister

      public void unregister(String key)
    • pluginModuleEnabled

      public void pluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
    • pluginModuleDisabled

      public void pluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)