|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.Request org.apache.wicket.protocol.http.WebRequest org.apache.wicket.protocol.http.servlet.ServletWebRequest org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest
public class MultipartServletWebRequest
Servlet specific WebRequest subclass for multipart content uploads.
Constructor Summary | |
---|---|
MultipartServletWebRequest(javax.servlet.http.HttpServletRequest request,
Bytes maxSize)
Constructor. |
|
MultipartServletWebRequest(javax.servlet.http.HttpServletRequest request,
Bytes maxSize,
FileItemFactory factory)
Constructor |
Method Summary | |
---|---|
FileItem |
getFile(String fieldName)
Gets the file that was uploaded using the given field name. |
Map<String,FileItem> |
getFiles()
|
String |
getParameter(String key)
Gets the request parameter with the given key. |
Map |
getParameterMap()
Gets the request parameters. |
String[] |
getParameters(String key)
Gets the request parameters with the given key. |
protected void |
onUploadCompleted()
Upload completed callback |
protected void |
onUploadStarted(int totalBytes)
Upload start callback |
protected void |
onUploadUpdate(int bytesUploaded,
int total)
Upload status update callback |
protected boolean |
wantUploadProgressUpdates()
Subclasses that want to receive upload notifications should return true |
Methods inherited from class org.apache.wicket.protocol.http.servlet.ServletWebRequest |
---|
getDepthRelativeToWicketHandler, getHttpServletRequest, getLocale, getPath, getQueryString, getRelativePathPrefixToContextRoot, getRelativePathPrefixToWicketHandler, getServletPath, getURL, isAjax, mergeVersion, newMultipartWebRequest, setAjax, setForceNewVersion, setWicketRedirectUrl, toString |
Methods inherited from class org.apache.wicket.protocol.http.WebRequest |
---|
getCookie, getCookies |
Methods inherited from class org.apache.wicket.Request |
---|
decodeURL, getPage, getRelativeURL, getRequestParameters, setPage, setRequestParameters |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MultipartServletWebRequest(javax.servlet.http.HttpServletRequest request, Bytes maxSize) throws FileUploadException
DiskFileItemFactory
to store uploads.
maxSize
- the maximum size allowed for this requestrequest
- the servlet request
FileUploadException
- Thrown if something goes wrong with uploadpublic MultipartServletWebRequest(javax.servlet.http.HttpServletRequest request, Bytes maxSize, FileItemFactory factory) throws FileUploadException
maxSize
- the maximum size allowed for this requestrequest
- the servlet requestfactory
- DiskFileItemFactory
to use when creating file items used to represent
uploaded files
FileUploadException
- Thrown if something goes wrong with uploadMethod Detail |
---|
public Map<String,FileItem> getFiles()
getFiles
in interface IMultipartWebRequest
public FileItem getFile(String fieldName)
getFile
in interface IMultipartWebRequest
fieldName
- the field name that was used for the upload
public String getParameter(String key)
ServletWebRequest
getParameter
in class ServletWebRequest
key
- Parameter name
WebRequest.getParameter(java.lang.String)
public Map getParameterMap()
ServletWebRequest
getParameterMap
in class ServletWebRequest
WebRequest.getParameterMap()
public String[] getParameters(String key)
ServletWebRequest
getParameters
in class ServletWebRequest
key
- Parameter name
WebRequest.getParameters(java.lang.String)
protected boolean wantUploadProgressUpdates()
protected void onUploadStarted(int totalBytes)
totalBytes
- protected void onUploadUpdate(int bytesUploaded, int total)
bytesUploaded
- total
- protected void onUploadCompleted()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |