public class PluggableDownloadStrategy extends Object implements DownloadStrategy
DownloadStrategyModuleDescriptors
and delegates to them in order.DownloadStrategyModuleDescriptor,
DownloadStrategy| Constructor and Description |
|---|
PluggableDownloadStrategy(PluginEventManager pluginEventManager) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
matches(String urlPath)
Returns true if the DownloadStrategy is supported for the given url path.
|
void |
pluginModuleDisabled(PluginModuleDisabledEvent event) |
void |
pluginModuleEnabled(PluginModuleEnabledEvent event) |
void |
register(String key,
DownloadStrategy strategy) |
void |
serveFile(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Serves the file for the given request and response.
|
void |
unregister(String key) |
public PluggableDownloadStrategy(PluginEventManager pluginEventManager)
public boolean matches(String urlPath)
DownloadStrategymatches in interface DownloadStrategyurlPath - the result of HttpServletRequest.getRequestURI() converted to lowercasepublic void serveFile(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws DownloadException
DownloadStrategyserveFile in interface DownloadStrategyDownloadException - if there was an error during serving of the file.public void register(String key, DownloadStrategy strategy)
public void unregister(String key)
public void pluginModuleEnabled(PluginModuleEnabledEvent event)
public void pluginModuleDisabled(PluginModuleDisabledEvent event)
Copyright © 2019 Atlassian. All rights reserved.