com.atlassian.plugin.servlet.download.plugin
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:
DownloadStrategyModuleDescriptor,
DownloadStrategy
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PluggableDownloadStrategy
public PluggableDownloadStrategy(PluginEventManager pluginEventManager)
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(javax.servlet.http.HttpServletRequest request,
javax.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(PluginModuleEnabledEvent event)
pluginModuleDisabled
public void pluginModuleDisabled(PluginModuleDisabledEvent event)
Copyright © 2014 Atlassian. All rights reserved.