com.atlassian.confluence.servlet.download
Class AttachmentDownload
java.lang.Object
com.atlassian.confluence.servlet.download.ServeAfterTransactionDownload
com.atlassian.confluence.servlet.download.AttachmentDownload
- All Implemented Interfaces:
- com.atlassian.plugin.servlet.DownloadStrategy
- Direct Known Subclasses:
- ThumbnailDownload
public class AttachmentDownload
- extends ServeAfterTransactionDownload
Method Summary |
protected void |
getEventToPublish(Attachment attachment)
|
java.io.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 java.lang.String |
getUrlPrefix()
|
boolean |
matches(java.lang.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(java.io.InputStream contents,
java.lang.String name,
long contentLength,
java.lang.String contentType,
javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
|
protected void |
setHeadersForAttachment(java.lang.String name,
long contentLength,
java.lang.String contentType,
javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
Deprecated. Since 5.5.4. Use
setHeadersForAttachment(java.io.InputStream, String, long, String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
instead. |
void |
setTokenGenerator(com.atlassian.xwork.XsrfTokenGenerator tokenGenerator)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AttachmentDownload
public AttachmentDownload()
matches
public boolean matches(java.lang.String urlPath)
setDownloadResourceManager
public void setDownloadResourceManager(DownloadResourceManager downloadResourceManager)
setAttachmentUrlParser
public void setAttachmentUrlParser(AttachmentUrlParser attachmentUrlParser)
setEventPublisher
public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
setTokenGenerator
public void setTokenGenerator(com.atlassian.xwork.XsrfTokenGenerator tokenGenerator)
getStreamForDownload
public java.io.InputStream getStreamForDownload(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
throws java.io.IOException
- Description copied from class:
ServeAfterTransactionDownload
- Get the input stream to serve to the client outside of the database transaction.
The inputstream must be useable outside of the database transaction that created it
- Specified by:
getStreamForDownload
in class ServeAfterTransactionDownload
- Returns:
- The input stream to serve, or null if nothing to serve.
- Throws:
java.io.IOException
getEventToPublish
protected void getEventToPublish(Attachment attachment)
getUrlPrefix
protected java.lang.String getUrlPrefix()
setHeadersForAttachment
protected void setHeadersForAttachment(java.io.InputStream contents,
java.lang.String name,
long contentLength,
java.lang.String contentType,
javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
throws java.io.IOException
- Throws:
java.io.IOException
setHeadersForAttachment
@Deprecated
protected void setHeadersForAttachment(java.lang.String name,
long contentLength,
java.lang.String contentType,
javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
- Deprecated. Since 5.5.4. Use
setHeadersForAttachment(java.io.InputStream, String, long, String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
instead.
setAttachmentSafeContentHeaderGuesser
public void setAttachmentSafeContentHeaderGuesser(SafeContentHeaderGuesser attachmentSafeContentHeaderGuesser)
Copyright © 2003-2014 Atlassian. All Rights Reserved.