|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.plugins.directory.service.upload.DirectoryAsynchronousUploadHandler
public class DirectoryAsynchronousUploadHandler
Handler for asynchronous uploads.
Files are stored using SubForm#addFileItem(String, String, FileItem).
The jessionid parameter should be the REAL session id,
not the flash player one.
The uploaded files are deleted by SubForm when filling fields.
| Field Summary | |
|---|---|
static java.util.Map<java.lang.String,java.util.Map<java.lang.String,org.apache.commons.fileupload.FileItem>> |
_mapAsynchronousUpload
contains uploaded file items |
| Method Summary | |
|---|---|
void |
doRemoveFile(RecordField recordField,
IEntry entry,
java.lang.String strWSRestUrl)
Do remove a file from a given record field |
void |
doRemoveFile(Record record,
IEntry entry,
java.lang.String strWSRestUrl)
Do remove a file from a given record and entry |
java.lang.String |
doUploadFile(java.lang.String strBaseUrl,
org.apache.commons.fileupload.FileItem fileItem,
java.lang.String strBlobStore)
Do upload a file in the blobstore webapp |
static org.apache.commons.fileupload.FileItem |
getFileItem(java.lang.String strIdEntry,
java.lang.String strSessionId)
Gets the fileItem for the entry and the given session. |
java.lang.String |
getFileName(java.lang.String strUrl)
Get the file name from a given url |
java.lang.String |
getFileUrl(java.lang.String strBaseUrl,
java.lang.String strBlobKey,
java.lang.String strBlobStore)
Get the file url |
static DirectoryAsynchronousUploadHandler |
getHandler()
Get the handler |
boolean |
isInvoked(javax.servlet.http.HttpServletRequest request)
|
void |
process(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
net.sf.json.JSONObject mainObject,
java.util.List<org.apache.commons.fileupload.FileItem> listFileItems)
|
static void |
removeFileItem(java.lang.String strIdEntry,
java.lang.String strSessionId)
Removes the file from the list. |
static void |
removeSessionFiles(java.lang.String strSessionId)
Removes all files associated to the session |
void |
setBlobStoreClientService(fr.paris.lutece.plugins.blobstoreclient.service.IBlobStoreClientService blobStoreClientService)
Set the blobstore client service |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.util.Map<java.lang.String,java.util.Map<java.lang.String,org.apache.commons.fileupload.FileItem>> _mapAsynchronousUpload
| Method Detail |
|---|
public static DirectoryAsynchronousUploadHandler getHandler()
public void setBlobStoreClientService(fr.paris.lutece.plugins.blobstoreclient.service.IBlobStoreClientService blobStoreClientService)
blobStoreClientService - the blob store client servicepublic boolean isInvoked(javax.servlet.http.HttpServletRequest request)
isInvoked in interface fr.paris.lutece.portal.web.upload.IAsynchronousUploadHandler
public void process(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
net.sf.json.JSONObject mainObject,
java.util.List<org.apache.commons.fileupload.FileItem> listFileItems)
process in interface fr.paris.lutece.portal.web.upload.IAsynchronousUploadHandler
public java.lang.String doUploadFile(java.lang.String strBaseUrl,
org.apache.commons.fileupload.FileItem fileItem,
java.lang.String strBlobStore)
throws fr.paris.lutece.plugins.blobstoreclient.util.BlobStoreClientException
strBaseUrl - the base urlfileItem - the filestrBlobStore - the blobstore service name
fr.paris.lutece.plugins.blobstoreclient.util.BlobStoreClientException - Exception if there is an issue
public void doRemoveFile(Record record,
IEntry entry,
java.lang.String strWSRestUrl)
throws fr.paris.lutece.plugins.blobstoreclient.util.BlobStoreClientException
record - the recordentry - the entrystrWSRestUrl - the url of the WS rest
fr.paris.lutece.plugins.blobstoreclient.util.BlobStoreClientException - Exception if there is an issue
public void doRemoveFile(RecordField recordField,
IEntry entry,
java.lang.String strWSRestUrl)
throws fr.paris.lutece.plugins.blobstoreclient.util.BlobStoreClientException
recordField - the record fieldentry - the entrystrWSRestUrl - the url of the WS rest
fr.paris.lutece.plugins.blobstoreclient.util.BlobStoreClientException - Exception if there is an issue
public java.lang.String getFileUrl(java.lang.String strBaseUrl,
java.lang.String strBlobKey,
java.lang.String strBlobStore)
throws fr.paris.lutece.plugins.blobstoreclient.util.BlobStoreClientException
strBaseUrl - the base urlstrBlobKey - the blob keystrBlobStore - the blobstore service name
fr.paris.lutece.plugins.blobstoreclient.util.BlobStoreClientException - Exception if there is an issue
public java.lang.String getFileName(java.lang.String strUrl)
throws fr.paris.lutece.plugins.blobstoreclient.util.BlobStoreClientException
strUrl - the url
fr.paris.lutece.plugins.blobstoreclient.util.BlobStoreClientException - Exception if there is an issue
public static org.apache.commons.fileupload.FileItem getFileItem(java.lang.String strIdEntry,
java.lang.String strSessionId)
strIdEntry - the entrystrSessionId - the session id
null otherwise.
public static void removeFileItem(java.lang.String strIdEntry,
java.lang.String strSessionId)
strIdEntry - the entry idstrSessionId - the session idpublic static void removeSessionFiles(java.lang.String strSessionId)
strSessionId - the session id
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||