Class ArtifactDownloadStrategy
- java.lang.Object
-
- com.atlassian.bamboo.plugin.servlet.AbstractDownloadStrategy
-
- com.atlassian.bamboo.plugin.servlet.ArtifactDownloadStrategy
-
- All Implemented Interfaces:
com.atlassian.plugin.servlet.DownloadStrategy
public class ArtifactDownloadStrategy extends AbstractDownloadStrategy
Download strategy that matches any url starting with /artifact/. Used for downloading build artifacts.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERVLET_PATH-
Fields inherited from class com.atlassian.bamboo.plugin.servlet.AbstractDownloadStrategy
authenticationContext, bambooContentTypeResolver, bambooPermissionManager
-
-
Constructor Summary
Constructors Constructor Description ArtifactDownloadStrategy(AdministrationConfigurationAccessor administrationConfigurationAccessor, BambooPermissionManager bambooPermissionManager, BambooAuthenticationContext bambooAuthenticationContext, BambooContentTypeResolver bambooContentTypeResolver, CachedPlanManager planManager, ResultsSummaryManager resultsSummaryManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull TitledFilegetFileToServe(RequestPath requestPath, javax.servlet.http.HttpServletRequest request)protected StringgetServletPath()Returns the servlet path handled by this download strategy.voidpostConstruct()-
Methods inherited from class com.atlassian.bamboo.plugin.servlet.AbstractDownloadStrategy
generateETag, isByteRangeRequest, isCompressionEnabled, matches, processRangeHeader, serveFile, serveOrdinaryFile, throwPermissionException
-
-
-
-
Field Detail
-
SERVLET_PATH
public static final String SERVLET_PATH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ArtifactDownloadStrategy
public ArtifactDownloadStrategy(AdministrationConfigurationAccessor administrationConfigurationAccessor, BambooPermissionManager bambooPermissionManager, BambooAuthenticationContext bambooAuthenticationContext, BambooContentTypeResolver bambooContentTypeResolver, CachedPlanManager planManager, ResultsSummaryManager resultsSummaryManager)
-
-
Method Detail
-
postConstruct
@PostConstruct public void postConstruct()
-
getServletPath
protected String getServletPath()
Description copied from class:AbstractDownloadStrategyReturns the servlet path handled by this download strategy. Includes the leading "/" but no trailing "/", e.g. "/download" or "/artifact".- Specified by:
getServletPathin classAbstractDownloadStrategy
-
getFileToServe
@NotNull public @NotNull TitledFile getFileToServe(RequestPath requestPath, javax.servlet.http.HttpServletRequest request) throws org.acegisecurity.AccessDeniedException, FileNotFoundException, UserNotLoggedInException
- Specified by:
getFileToServein classAbstractDownloadStrategy- Returns:
- file to serve, with an optional display name if file is a directory
- Throws:
org.acegisecurity.AccessDeniedExceptionFileNotFoundExceptionUserNotLoggedInException
-
-