com.atlassian.bamboo.plugin.servlet
Class AbstractArtifactDownloadStrategy
java.lang.Object
com.atlassian.bamboo.plugin.servlet.AbstractArtifactDownloadStrategy
- All Implemented Interfaces:
- com.atlassian.plugin.servlet.DownloadStrategy
- Direct Known Subclasses:
- ArtifactDownloadStrategy, EnvironmentArtifactDownloadStrategy, GlobalArtifactDownloadStrategy
public abstract class AbstractArtifactDownloadStrategy
- extends Object
- implements com.atlassian.plugin.servlet.DownloadStrategy
Method Summary |
protected abstract com.atlassian.fugue.Pair<File,com.atlassian.fugue.Option<String>> |
getFileToServe(javax.servlet.http.HttpServletRequest httpServletRequest)
|
protected boolean |
isCompressionEnabled()
|
void |
serveFile(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.plugin.servlet.DownloadStrategy |
matches |
authenticationContext
protected final BambooAuthenticationContext authenticationContext
AbstractArtifactDownloadStrategy
protected AbstractArtifactDownloadStrategy(AdministrationConfigurationAccessor administrationConfigurationAccessor,
BambooContentTypeResolver bambooContentTypeResolver,
BambooAuthenticationContext authenticationContext)
serveFile
public void serveFile(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
throws com.atlassian.plugin.servlet.DownloadException
- Specified by:
serveFile
in interface com.atlassian.plugin.servlet.DownloadStrategy
- Throws:
com.atlassian.plugin.servlet.DownloadException
getFileToServe
@NotNull
protected abstract com.atlassian.fugue.Pair<File,com.atlassian.fugue.Option<String>> getFileToServe(javax.servlet.http.HttpServletRequest httpServletRequest)
throws org.acegisecurity.AccessDeniedException,
FileNotFoundException,
UserNotLoggedInException
- Parameters:
httpServletRequest
-
- Returns:
- pair of file to served and optional display name if file is a directory
- Throws:
org.acegisecurity.AccessDeniedException
FileNotFoundException
UserNotLoggedInException
isCompressionEnabled
protected boolean isCompressionEnabled()
Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.