Class PluggableDownloadStrategy
java.lang.Object
com.atlassian.plugin.servlet.download.plugin.PluggableDownloadStrategy
- All Implemented Interfaces:
DownloadStrategy
A download strategy which maintains a list of
DownloadStrategyModuleDescriptors
and delegates to them in order.- Since:
- 2.2.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPluggableDownloadStrategy(com.atlassian.plugin.event.PluginEventManager pluginEventManager) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if the DownloadStrategy is supported for the given url path.voidpluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event) voidpluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event) voidregister(String key, DownloadStrategy strategy) voidserveFile(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Serves the file for the given request and response.voidunregister(String key)
-
Constructor Details
-
PluggableDownloadStrategy
public PluggableDownloadStrategy(com.atlassian.plugin.event.PluginEventManager pluginEventManager)
-
-
Method Details
-
matches
Description copied from interface:DownloadStrategyReturns true if the DownloadStrategy is supported for the given url path.- Specified by:
matchesin interfaceDownloadStrategy- Parameters:
urlPath- the result ofHttpServletRequest.getRequestURI()converted to lowercase
-
serveFile
public void serveFile(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws DownloadException Description copied from interface:DownloadStrategyServes the file for the given request and response.- Specified by:
serveFilein interfaceDownloadStrategy- Throws:
DownloadException- if there was an error during serving of the file.
-
register
-
unregister
-
pluginModuleEnabled
public void pluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event) -
pluginModuleDisabled
public void pluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
-