public abstract class AbstractDownloadStrategy extends Object implements com.atlassian.plugin.servlet.DownloadStrategy
| Modifier and Type | Field and Description |
|---|---|
protected BambooAuthenticationContext |
authenticationContext |
protected BambooContentTypeResolver |
bambooContentTypeResolver |
protected BambooPermissionManager |
bambooPermissionManager |
protected static org.apache.log4j.Logger |
log |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDownloadStrategy(AdministrationConfigurationAccessor administrationConfigurationAccessor,
BambooContentTypeResolver bambooContentTypeResolver,
BambooAuthenticationContext authenticationContext,
BambooPermissionManager bambooPermissionManager) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract @NotNull TitledFile |
getFileToServe(RequestPath requestPath,
javax.servlet.http.HttpServletRequest request) |
protected abstract String |
getServletPath()
Returns the servlet path handled by this download strategy.
|
protected boolean |
isCompressionEnabled() |
boolean |
matches(String requestUri) |
void |
serveFile(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse) |
protected void |
throwPermissionException(RequestPath requestPath)
Throws an exception indicating that the current user does not have permission to access the requested item.
|
protected static final org.apache.log4j.Logger log
protected final BambooContentTypeResolver bambooContentTypeResolver
protected final BambooAuthenticationContext authenticationContext
protected final BambooPermissionManager bambooPermissionManager
protected AbstractDownloadStrategy(AdministrationConfigurationAccessor administrationConfigurationAccessor, BambooContentTypeResolver bambooContentTypeResolver, BambooAuthenticationContext authenticationContext, BambooPermissionManager bambooPermissionManager)
public boolean matches(String requestUri)
matches in interface com.atlassian.plugin.servlet.DownloadStrategyprotected abstract String getServletPath()
public void serveFile(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
throws com.atlassian.plugin.servlet.DownloadException
serveFile in interface com.atlassian.plugin.servlet.DownloadStrategycom.atlassian.plugin.servlet.DownloadException@NotNull protected abstract @NotNull TitledFile getFileToServe(RequestPath requestPath, javax.servlet.http.HttpServletRequest request) throws org.acegisecurity.AccessDeniedException, FileNotFoundException, UserNotLoggedInException, WebValidationException
org.acegisecurity.AccessDeniedExceptionFileNotFoundExceptionUserNotLoggedInExceptionWebValidationExceptionprotected void throwPermissionException(RequestPath requestPath) throws UserNotLoggedInException, org.acegisecurity.AccessDeniedException
UserNotLoggedInExceptionorg.acegisecurity.AccessDeniedExceptionprotected boolean isCompressionEnabled()
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.