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 java.lang.Object
- implements com.atlassian.plugin.servlet.DownloadStrategy
Method Summary |
protected abstract com.atlassian.fugue.Pair<java.io.File,com.atlassian.fugue.Option<java.lang.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 |
AbstractArtifactDownloadStrategy
protected AbstractArtifactDownloadStrategy(BambooContentTypeResolver bambooContentTypeResolver)
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<java.io.File,com.atlassian.fugue.Option<java.lang.String>> getFileToServe(javax.servlet.http.HttpServletRequest httpServletRequest)
throws org.acegisecurity.AccessDeniedException,
java.io.FileNotFoundException
- Parameters:
httpServletRequest
-
- Returns:
- pair of file to served and optional display name if file is a directory
- Throws:
org.acegisecurity.AccessDeniedException
java.io.FileNotFoundException
isCompressionEnabled
protected boolean isCompressionEnabled()
Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.