public abstract class AbstractDownloadStrategy extends Object implements com.atlassian.plugin.servlet.DownloadStrategy
| Modifier and Type | Field and Description |
|---|---|
protected BambooAuthenticationContext |
authenticationContext |
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 TitledFile |
getFileToServe(RequestPath requestPath) |
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 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 TitledFile getFileToServe(RequestPath requestPath) throws org.acegisecurity.AccessDeniedException, FileNotFoundException, UserNotLoggedInException
org.acegisecurity.AccessDeniedExceptionFileNotFoundExceptionUserNotLoggedInExceptionprotected void throwPermissionException(RequestPath requestPath) throws UserNotLoggedInException, org.acegisecurity.AccessDeniedException
UserNotLoggedInExceptionorg.acegisecurity.AccessDeniedExceptionprotected boolean isCompressionEnabled()
Copyright © 2016 Atlassian Software Systems Pty Ltd. All rights reserved.