public class AttachmentDownload extends ServeAfterTransactionDownload
ServeAfterTransactionDownload.StreamResultCallback
Modifier and Type | Field and Description |
---|---|
static String |
JWT_REQUEST_USERNAME |
Constructor and Description |
---|
AttachmentDownload() |
Modifier and Type | Method and Description |
---|---|
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 Optional<String> |
getStreamingAnalyticsEventName() |
protected String |
getUrlPrefix() |
boolean |
matches(String urlPath) |
protected void |
publishEvents(Attachment attachment,
boolean download) |
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) |
void |
setTokenGenerator(com.atlassian.xwork.XsrfTokenGenerator tokenGenerator) |
protected void |
streamResponse(InputStream fromStream,
OutputStream toStream)
Captures and publishes analytics about the attachment streaming.
|
getDecodedPathInfo, getStreamResultCallback, serveFile, setTransactionManager
public static final String JWT_REQUEST_USERNAME
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)
@Nullable public InputStream getStreamForDownload(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse) throws IOException
ServeAfterTransactionDownload
getStreamForDownload
in class ServeAfterTransactionDownload
IOException
protected void publishEvents(Attachment attachment, boolean download)
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
public void setAttachmentSafeContentHeaderGuesser(SafeContentHeaderGuesser attachmentSafeContentHeaderGuesser)
protected void streamResponse(InputStream fromStream, OutputStream toStream) throws IOException
streamResponse
in class ServeAfterTransactionDownload
IOException
Copyright © 2003–2021 Atlassian. All rights reserved.