org.objectweb.telosys.upload
Class FileManager

java.lang.Object
  extended byorg.objectweb.telosys.upload.FileManager

public class FileManager
extends java.lang.Object


Constructor Summary
FileManager()
           
 
Method Summary
static boolean generateFileContent(javax.servlet.http.HttpServletResponse response, javax.servlet.ServletOutputStream out, FileUploaded file)
          Generates the Http Response from the file content
static FileUploaded getFileFromHttpSession(javax.servlet.http.HttpServletRequest req, java.lang.String sSessionKey)
          Retuns the FileUploaded object stored in the Http Session
static FileUploaded getFileFromScreenContext(javax.servlet.http.HttpServletRequest request, int iContextId, java.lang.String sContextAttribute)
          Retuns the FileUploaded object stored as a Screen Context attribute
static boolean removeFileFromHttpSession(javax.servlet.http.HttpServletRequest req, java.lang.String sSessionKey)
          Removes the FileUploaded object from the Http Session if any
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileManager

public FileManager()
Method Detail

getFileFromHttpSession

public static final FileUploaded getFileFromHttpSession(javax.servlet.http.HttpServletRequest req,
                                                        java.lang.String sSessionKey)
Retuns the FileUploaded object stored in the Http Session

Parameters:
req -
sSessionKey - the session attribute key
Returns:

getFileFromScreenContext

public static final FileUploaded getFileFromScreenContext(javax.servlet.http.HttpServletRequest request,
                                                          int iContextId,
                                                          java.lang.String sContextAttribute)
Retuns the FileUploaded object stored as a Screen Context attribute

Parameters:
request -
iContextId -
sContextAttribute -
Returns:

removeFileFromHttpSession

public static final boolean removeFileFromHttpSession(javax.servlet.http.HttpServletRequest req,
                                                      java.lang.String sSessionKey)
Removes the FileUploaded object from the Http Session if any

Parameters:
req -
sSessionKey - the session attribute key
Returns:

generateFileContent

public static final boolean generateFileContent(javax.servlet.http.HttpServletResponse response,
                                                javax.servlet.ServletOutputStream out,
                                                FileUploaded file)
                                         throws java.io.IOException
Generates the Http Response from the file content

Parameters:
response -
out -
file -
Returns:
true if the response has been generated, false if nothing done
Throws:
java.io.IOException