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,
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 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.DownloadStrategy
protected 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.DownloadStrategy
com.atlassian.plugin.servlet.DownloadException
@NotNull protected abstract TitledFile getFileToServe(RequestPath requestPath, javax.servlet.http.HttpServletRequest request) throws org.acegisecurity.AccessDeniedException, FileNotFoundException, UserNotLoggedInException, WebValidationException
org.acegisecurity.AccessDeniedException
FileNotFoundException
UserNotLoggedInException
WebValidationException
protected void throwPermissionException(RequestPath requestPath) throws UserNotLoggedInException, org.acegisecurity.AccessDeniedException
UserNotLoggedInException
org.acegisecurity.AccessDeniedException
protected boolean isCompressionEnabled()
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.