public abstract class AbstractAsynchronousUploadHandler extends Object implements IAsyncUploadHandler
Constructor and Description |
---|
AbstractAsynchronousUploadHandler() |
Modifier and Type | Method and Description |
---|---|
void |
addFileItemToPartialUploadedFilesList(org.apache.commons.fileupload.FileItem fileItem,
String strFieldName,
javax.servlet.http.HttpServletRequest request)
Add file item to the list of partial uploaded files
|
void |
addFilesUploadedSynchronously(javax.servlet.http.HttpServletRequest request,
String strFieldName)
Add files uploaded synchronously for a given field
|
void |
doRemoveFile(javax.servlet.http.HttpServletRequest request,
String strFieldName)
Do remove a file of a given entry if a flag is present in the request.
|
String |
doRemoveUploadedFile(javax.servlet.http.HttpServletRequest request,
String strFieldName,
List<Integer> listIndexesFilesToRemove)
Do remove a list of files from uploaded files.
|
byte[] |
doRetrieveUploadedFile(javax.servlet.http.HttpServletRequest request)
Do retrieve a file from uploaded files.
|
List<org.apache.commons.fileupload.FileItem> |
getListPartialUploadedFiles(String strFieldName,
javax.servlet.http.HttpSession session)
Gets the list of partial upload files for a given field and a given session.
|
String |
getUploadAction(javax.servlet.http.HttpServletRequest request)
Checks the request parameters to see if an upload submit has been called.
|
String |
getUploadCheckboxPrefix()
Get the upload checkbox prefix
|
String |
getUploadDeletePrefix()
Get the upload delete prefix
|
String |
getUploadSubmitPrefix()
Get the upload submit prefix
|
boolean |
hasAddFileFlag(javax.servlet.http.HttpServletRequest request,
String strFieldName)
Check if the request has the flag to submit a file without submitting the
form.
|
boolean |
hasRemoveFlag(javax.servlet.http.HttpServletRequest request,
String strFieldName)
Check if the request has a remove flag for a given entry.
|
boolean |
isInvoked(javax.servlet.http.HttpServletRequest request) |
boolean |
isManagePartialContent() |
void |
process(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Map<String,Object> map,
List<org.apache.commons.fileupload.FileItem> listFileItemsToUpload) |
void |
removeAllFileItem(javax.servlet.http.HttpSession session)
Remove all file Item for a given session
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addFileItemToUploadedFilesList, canUploadFiles, getHandlerName, getListUploadedFiles, removeFileItem
public void process(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Map<String,Object> map, List<org.apache.commons.fileupload.FileItem> listFileItemsToUpload)
process
in interface fr.paris.lutece.portal.web.upload.IAsynchronousUploadHandler2
public String getUploadAction(javax.servlet.http.HttpServletRequest request)
request
- the HTTP requestpublic void doRemoveFile(javax.servlet.http.HttpServletRequest request, String strFieldName)
doRemoveFile
in interface IAsyncUploadHandler
request
- The requeststrFieldName
- The field namepublic String doRemoveUploadedFile(javax.servlet.http.HttpServletRequest request, String strFieldName, List<Integer> listIndexesFilesToRemove)
doRemoveUploadedFile
in interface IAsyncUploadHandler
request
- The requeststrFieldName
- The field name of the files to removelistIndexesFilesToRemove
- The list of indexes of files to removepublic boolean hasRemoveFlag(javax.servlet.http.HttpServletRequest request, String strFieldName)
hasRemoveFlag
in interface IAsyncUploadHandler
request
- The requeststrFieldName
- The field namepublic boolean isInvoked(javax.servlet.http.HttpServletRequest request)
isInvoked
in interface fr.paris.lutece.portal.web.upload.IAsynchronousUploadHandler2
public boolean hasAddFileFlag(javax.servlet.http.HttpServletRequest request, String strFieldName)
hasAddFileFlag
in interface IAsyncUploadHandler
request
- The requeststrFieldName
- The id of the entrypublic void addFilesUploadedSynchronously(javax.servlet.http.HttpServletRequest request, String strFieldName)
addFilesUploadedSynchronously
in interface IAsyncUploadHandler
request
- The requeststrFieldName
- The name of the field to add files ofpublic String getUploadSubmitPrefix()
getUploadSubmitPrefix
in interface IAsyncUploadHandler
public String getUploadDeletePrefix()
getUploadDeletePrefix
in interface IAsyncUploadHandler
public String getUploadCheckboxPrefix()
getUploadCheckboxPrefix
in interface IAsyncUploadHandler
public byte[] doRetrieveUploadedFile(javax.servlet.http.HttpServletRequest request)
doRetrieveUploadedFile
in interface IAsyncUploadHandler
request
- The requestpublic List<org.apache.commons.fileupload.FileItem> getListPartialUploadedFiles(String strFieldName, javax.servlet.http.HttpSession session)
getListPartialUploadedFiles
in interface IAsyncUploadHandler
strFieldName
- the field namesession
- The session of the current usernull
otherwise.public void addFileItemToPartialUploadedFilesList(org.apache.commons.fileupload.FileItem fileItem, String strFieldName, javax.servlet.http.HttpServletRequest request)
addFileItemToPartialUploadedFilesList
in interface IAsyncUploadHandler
fileItem
- the file itemstrFieldName
- the field namerequest
- the requestpublic boolean isManagePartialContent()
isManagePartialContent
in interface IAsyncUploadHandler
public void removeAllFileItem(javax.servlet.http.HttpSession session)
removeAllFileItem
in interface IAsyncUploadHandler
session
- The session of the current userCopyright © 2020 City of Paris. All rights reserved.