public class AttachmentDownload extends ServeAfterTransactionDownload
ServeAfterTransactionDownload.StreamResultCallback
Constructor and Description |
---|
AttachmentDownload() |
Modifier and Type | Method and Description |
---|---|
protected void |
getEventToPublish(Attachment attachment) |
InputStream |
getStreamForDownload(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
Get the input stream to serve to the client outside of the database transaction.
|
protected String |
getUrlPrefix() |
boolean |
matches(String urlPath) |
void |
setAttachmentSafeContentHeaderGuesser(SafeContentHeaderGuesser attachmentSafeContentHeaderGuesser) |
void |
setAttachmentUrlParser(AttachmentUrlParser attachmentUrlParser) |
void |
setDownloadResourceManager(DownloadResourceManager downloadResourceManager) |
void |
setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher) |
protected void |
setHeadersForAttachment(InputStream contents,
String name,
long contentLength,
String contentType,
javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse) |
protected void |
setHeadersForAttachment(String name,
long contentLength,
String contentType,
javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
Deprecated.
|
void |
setTokenGenerator(com.atlassian.xwork.XsrfTokenGenerator tokenGenerator) |
getDecodedPathInfo, getStreamResultCallback, serveFile, setTransactionManager
public boolean matches(String urlPath)
public void setDownloadResourceManager(DownloadResourceManager downloadResourceManager)
public void setAttachmentUrlParser(AttachmentUrlParser attachmentUrlParser)
public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
public void setTokenGenerator(com.atlassian.xwork.XsrfTokenGenerator tokenGenerator)
public InputStream getStreamForDownload(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException
ServeAfterTransactionDownload
getStreamForDownload
in class ServeAfterTransactionDownload
IOException
protected void getEventToPublish(Attachment attachment)
protected String getUrlPrefix()
protected void setHeadersForAttachment(InputStream contents, String name, long contentLength, String contentType, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException
IOException
@Deprecated protected void setHeadersForAttachment(String name, long contentLength, String contentType, javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
setHeadersForAttachment(java.io.InputStream, String, long, String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
instead.public void setAttachmentSafeContentHeaderGuesser(SafeContentHeaderGuesser attachmentSafeContentHeaderGuesser)
Copyright © 2003–2017 Atlassian. All rights reserved.