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 String
SERVLET_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 protected @NotNull TitledFile
getFileToServe(RequestPath requestPath, javax.servlet.http.HttpServletRequest request)
protected String
getServletPath()
Returns the servlet path handled by this download strategy.void
postConstruct()
-
Methods inherited from class com.atlassian.bamboo.plugin.servlet.AbstractDownloadStrategy
isCompressionEnabled, matches, serveFile, 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:AbstractDownloadStrategy
Returns the servlet path handled by this download strategy. Includes the leading "/" but no trailing "/", eg. "/download" or "/artifact".- Specified by:
getServletPath
in classAbstractDownloadStrategy
-
getFileToServe
@NotNull protected @NotNull TitledFile getFileToServe(RequestPath requestPath, javax.servlet.http.HttpServletRequest request) throws org.acegisecurity.AccessDeniedException, FileNotFoundException, UserNotLoggedInException
- Specified by:
getFileToServe
in classAbstractDownloadStrategy
- Returns:
- file to serve, with an optional display name if file is a directory
- Throws:
org.acegisecurity.AccessDeniedException
FileNotFoundException
UserNotLoggedInException
-
-