|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.ServletRequestWrapper
javax.servlet.http.HttpServletRequestWrapper
org.apache.pluto.wrappers.PortletRequestWrapper
org.apache.pluto.wrappers.ActionRequestWrapper
public class ActionRequestWrapper
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface javax.portlet.PortletRequest |
|---|
PortletRequest.P3PUserInfos |
| Field Summary |
|---|
| Fields inherited from interface javax.portlet.ActionRequest |
|---|
ACTION_NAME |
| Fields inherited from interface javax.portlet.PortletRequest |
|---|
ACTION_PHASE, ACTION_SCOPE_ID, BASIC_AUTH, CCPP_PROFILE, CLIENT_CERT_AUTH, DIGEST_AUTH, EVENT_PHASE, FORM_AUTH, LIFECYCLE_PHASE, RENDER_HEADERS, RENDER_MARKUP, RENDER_PART, RENDER_PHASE, RESOURCE_PHASE, USER_INFO |
| Fields inherited from interface javax.servlet.http.HttpServletRequest |
|---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
| Constructor Summary | |
|---|---|
ActionRequestWrapper(ActionRequest actionRequest)
Creates a ServletRequest adaptor wrapping the given request object. |
|
| Method Summary | |
|---|---|
ActionRequest |
getActionRequest()
Return the wrapped ServletRequest object. |
java.lang.String |
getCharacterEncoding()
Returns the name of the character encoding used in the body of this request. |
int |
getContentLength()
Returns the length, in bytes, of the request body which is made available by the input stream, or -1 if the length is not known. |
java.lang.String |
getContentType()
Returns the MIME type of the body of the request, or null if the type is not known. |
java.io.InputStream |
getPortletInputStream()
Retrieves the body of the HTTP request from client to portal as binary data using an InputStream. |
java.io.BufferedReader |
getReader()
Retrieves the body of the HTTP request from the client to the portal as character data using a BufferedReader. |
void |
setCharacterEncoding(java.lang.String enc)
Overrides the name of the character encoding used in the body of this request. |
| Methods inherited from class javax.servlet.http.HttpServletRequestWrapper |
|---|
getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRequestURI, getRequestURL, getServletPath, getSession, getSession, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL |
| Methods inherited from class javax.servlet.ServletRequestWrapper |
|---|
getInputStream, getLocalAddr, getLocalName, getLocalPort, getProtocol, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, setRequest |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.portlet.ClientDataRequest |
|---|
getMethod |
| Methods inherited from interface javax.servlet.ServletRequest |
|---|
getInputStream, getLocalAddr, getLocalName, getLocalPort, getProtocol, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher |
| Constructor Detail |
|---|
public ActionRequestWrapper(ActionRequest actionRequest)
java.lang.IllegalArgumentException - if the request is null.| Method Detail |
|---|
public java.io.InputStream getPortletInputStream()
throws java.io.IOException
ClientDataRequestInputStream. Either this method or
ClientDataRequest.getReader() may be called to read the body, but not both.
For HTTP POST data of type application/x-www-form-urlencoded
this method throws an IllegalStateException
as this data has been already processed by the
portal/portlet-container and is available as request parameters.
getPortletInputStream in interface ClientDataRequestjava.io.IOException - if an input or output exception occurred
public void setCharacterEncoding(java.lang.String enc)
throws java.io.UnsupportedEncodingException
ClientDataRequestClientDataRequest.getReader() or ClientDataRequest.getPortletInputStream().
This method only sets the character set for the Reader that the
ClientDataRequest.getReader() method returns.
setCharacterEncoding in interface ClientDataRequestsetCharacterEncoding in interface javax.servlet.ServletRequestsetCharacterEncoding in class javax.servlet.ServletRequestWrapperenc - a String containing the name of
the character encoding.
java.io.UnsupportedEncodingException - if this is not a valid encoding
public java.io.BufferedReader getReader()
throws java.io.UnsupportedEncodingException,
java.io.IOException
ClientDataRequestBufferedReader. The reader translates the character
data according to the character encoding used on the body.
Either this method or ClientDataRequest.getPortletInputStream() may be called to read the
body, not both.
For HTTP POST data of type application/x-www-form-urlencoded
this method throws an IllegalStateException
as this data has been already processed by the
portal/portlet-container and is available as request parameters.
getReader in interface ClientDataRequestgetReader in interface javax.servlet.ServletRequestgetReader in class javax.servlet.ServletRequestWrapperBufferedReader
containing the body of the request
java.io.UnsupportedEncodingException - if the character set encoding used is
not supported and the text cannot be decoded
java.io.IOException - if an input or output exception occurredClientDataRequest.getPortletInputStream()public java.lang.String getCharacterEncoding()
ClientDataRequestnull if the request
does not specify a character encoding.
getCharacterEncoding in interface ClientDataRequestgetCharacterEncoding in interface javax.servlet.ServletRequestgetCharacterEncoding in class javax.servlet.ServletRequestWrapperString containing the name of
the character encoding, or null
if the request does not specify a character encoding.public java.lang.String getContentType()
ClientDataRequest
getContentType in interface ClientDataRequestgetContentType in interface javax.servlet.ServletRequestgetContentType in class javax.servlet.ServletRequestWrapperString containing the name
of the MIME type of the request, or null
if the type is not known.public int getContentLength()
ClientDataRequest
getContentLength in interface ClientDataRequestgetContentLength in interface javax.servlet.ServletRequestgetContentLength in class javax.servlet.ServletRequestWrapperpublic ActionRequest getActionRequest()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||