com.atlassian.confluence.servlet.download
Class ExportDownload

java.lang.Object
  extended bycom.atlassian.confluence.servlet.download.ServeAfterTransactionDownload
      extended bycom.atlassian.confluence.servlet.download.ExportDownload
All Implemented Interfaces:
DownloadStrategy

public class ExportDownload
extends ServeAfterTransactionDownload


Nested Class Summary
 
Nested classes inherited from class com.atlassian.confluence.servlet.download.ServeAfterTransactionDownload
ServeAfterTransactionDownload.StreamResultCallback
 
Field Summary
static String CONTENTTYPE_PARAM_NAME
           
 
Constructor Summary
ExportDownload()
           
 
Method Summary
protected  boolean checkSessionPermissionsForDownload(String decodedPath, javax.servlet.http.HttpServletRequest req)
           
static File createTempFile(String prefix, String suffix)
          Create a temporary file in the appropriate location to be returned by this service.
static String getExportRoot()
           
protected  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.
static String getUrl(File f, String contentType)
           
 boolean matches(String urlPath)
           
 void setGateKeeper(DownloadGateKeeper gateKeeper)
           
 void setUserAccessor(UserAccessor userAccessor)
           
 
Methods inherited from class com.atlassian.confluence.servlet.download.ServeAfterTransactionDownload
getDecodedPathInfo, getStreamResultCallback, serveFile, setTransactionManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENTTYPE_PARAM_NAME

public static final String CONTENTTYPE_PARAM_NAME
See Also:
Constant Field Values
Constructor Detail

ExportDownload

public ExportDownload()
Method Detail

matches

public boolean matches(String urlPath)

getStreamForDownload

protected InputStream getStreamForDownload(javax.servlet.http.HttpServletRequest httpServletRequest,
                                           javax.servlet.http.HttpServletResponse httpServletResponse)
                                    throws 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
Parameters:
httpServletRequest -
httpServletResponse -
Returns:
The input stream to serve, or null if nothing to serve.
Throws:
IOException

checkSessionPermissionsForDownload

protected boolean checkSessionPermissionsForDownload(String decodedPath,
                                                     javax.servlet.http.HttpServletRequest req)

createTempFile

public static File createTempFile(String prefix,
                                  String suffix)
                           throws IOException
Create a temporary file in the appropriate location to be returned by this service.

Parameters:
prefix -
suffix -
Returns:
Throws:
IOException

getUrl

public static String getUrl(File f,
                            String contentType)

setGateKeeper

public void setGateKeeper(DownloadGateKeeper gateKeeper)

setUserAccessor

public void setUserAccessor(UserAccessor userAccessor)

getExportRoot

public static String getExportRoot()


Confluence is developed by Atlassian.