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
Download strategy that matches any url starting with /artifact/. Used for downloading build artifacts.
-
Field Summary
Fields inherited from class com.atlassian.bamboo.plugin.servlet.AbstractDownloadStrategy
authenticationContext, bambooContentTypeResolver, bambooPermissionManager
-
Constructor Summary
ConstructorDescriptionArtifactDownloadStrategy
(AdministrationConfigurationAccessor administrationConfigurationAccessor, BambooPermissionManager bambooPermissionManager, BambooAuthenticationContext bambooAuthenticationContext, BambooContentTypeResolver bambooContentTypeResolver, CachedPlanManager planManager, ResultsSummaryManager resultsSummaryManager) -
Method Summary
Modifier and TypeMethodDescription@NotNull TitledFile
getFileToServe
(RequestPath requestPath, javax.servlet.http.HttpServletRequest request) protected String
Returns the servlet path handled by this download strategy.void
Methods inherited from class com.atlassian.bamboo.plugin.servlet.AbstractDownloadStrategy
generateETag, isByteRangeRequest, isCompressionEnabled, matches, processRangeHeader, serveFile, serveOrdinaryFile, throwPermissionException
-
Field Details
-
SERVLET_PATH
- See Also:
-
-
Constructor Details
-
ArtifactDownloadStrategy
public ArtifactDownloadStrategy(AdministrationConfigurationAccessor administrationConfigurationAccessor, BambooPermissionManager bambooPermissionManager, BambooAuthenticationContext bambooAuthenticationContext, BambooContentTypeResolver bambooContentTypeResolver, CachedPlanManager planManager, ResultsSummaryManager resultsSummaryManager)
-
-
Method Details
-
postConstruct
@PostConstruct public void postConstruct() -
getServletPath
Description copied from class:AbstractDownloadStrategy
Returns the servlet path handled by this download strategy. Includes the leading "/" but no trailing "/", e.g. "/download" or "/artifact".- Specified by:
getServletPath
in classAbstractDownloadStrategy
-
getFileToServe
@NotNull public @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
-