com.atlassian.bamboo.plugin.servlet
Class ArtifactDownloadStrategy

java.lang.Object
  extended by com.atlassian.bamboo.plugin.servlet.ArtifactDownloadStrategy
All Implemented Interfaces:
com.atlassian.plugin.servlet.DownloadStrategy

public class ArtifactDownloadStrategy
extends java.lang.Object
implements com.atlassian.plugin.servlet.DownloadStrategy

Download strategy that matches any url starting with /download/. Used for downloading Bamboo's artifacts and logs.


Field Summary
static java.lang.String URI_ARTIFACT_PREFIX
           
static int URI_ARTIFACT_PREFIX_LENGTH
           
static java.lang.String URI_DOWNLOAD_PREFIX
           
static int URI_DOWNLOAD_PREFIX_LENGTH
           
 
Constructor Summary
ArtifactDownloadStrategy(BambooPermissionManager bambooPermissionManager, BambooContentTypeResolver bambooContentTypeResolver)
           
 
Method Summary
 boolean matches(java.lang.String requestUri)
           
 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
 

Field Detail

URI_DOWNLOAD_PREFIX

public static final java.lang.String URI_DOWNLOAD_PREFIX
See Also:
Constant Field Values

URI_ARTIFACT_PREFIX

public static final java.lang.String URI_ARTIFACT_PREFIX
See Also:
Constant Field Values

URI_DOWNLOAD_PREFIX_LENGTH

public static final int URI_DOWNLOAD_PREFIX_LENGTH

URI_ARTIFACT_PREFIX_LENGTH

public static final int URI_ARTIFACT_PREFIX_LENGTH
Constructor Detail

ArtifactDownloadStrategy

public ArtifactDownloadStrategy(BambooPermissionManager bambooPermissionManager,
                                BambooContentTypeResolver bambooContentTypeResolver)
Method Detail

matches

public boolean matches(java.lang.String requestUri)
Specified by:
matches in interface com.atlassian.plugin.servlet.DownloadStrategy

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


Copyright © 2011 Atlassian. All Rights Reserved.