java.lang.Objectorg.objectweb.telosys.upload.FileManager
File management methods
Constructor Summary | |
FileManager()
|
Method Summary | |
static java.lang.String |
buildFilePath(java.lang.String psUploadDirectory,
java.lang.String psDir,
java.lang.String psFileName)
Builds a file path using the given parameters |
static java.io.File |
getFileFromFilesystem(java.lang.String psUploadDirectory,
java.lang.String psDir,
java.lang.String psFileName)
Returns a File object for the given parameters |
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 |
public FileManager()
Method Detail |
public static final FileUploaded getFileFromHttpSession(javax.servlet.http.HttpServletRequest req, java.lang.String sSessionKey)
req
- sSessionKey
- the session attribute key
public static final FileUploaded getFileFromScreenContext(javax.servlet.http.HttpServletRequest request, int iContextId, java.lang.String sContextAttribute)
request
- iContextId
- sContextAttribute
-
public static final java.io.File getFileFromFilesystem(java.lang.String psUploadDirectory, java.lang.String psDir, java.lang.String psFileName) throws TelosysException
psUploadDirectory
- psDir
- psFileName
-
TelosysException
public static final java.lang.String buildFilePath(java.lang.String psUploadDirectory, java.lang.String psDir, java.lang.String psFileName) throws TelosysException
psUploadDirectory
- the "upload directory" (cannot be null)psDir
- the subdirectory in the "upload directory" ( if null : none )psFileName
- the file name
TelosysException
public static final boolean removeFileFromHttpSession(javax.servlet.http.HttpServletRequest req, java.lang.String sSessionKey)
req
- sSessionKey
- the session attribute key