|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.portal.portlet.impl.PortletRequestImpl org.jboss.portal.portlet.impl.ActionRequestImpl
Field Summary |
Fields inherited from class org.jboss.portal.portlet.impl.PortletRequestImpl |
component, contentTypes, creq, cresp, dreq, instanceContext, invocation, log, portalContext, preferences, psession, requestContext, securityContext, sessionProvider, sessionStatus, userContext, userInfo |
Fields inherited from interface javax.portlet.PortletRequest |
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH, USER_INFO |
Constructor Summary | |
ActionRequestImpl(ActionInvocation invocation)
|
Method Summary | |
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.lang.String |
getParameter(java.lang.String name)
Returns the value of a request parameter as a String ,
or null if the parameter does not exist. |
java.util.Map |
getParameterMap()
Returns a Map of the parameters of this request. |
java.util.Enumeration |
getParameterNames()
Returns an Enumeration of String
objects containing the names of the parameters contained
in this request. |
java.lang.String[] |
getParameterValues(java.lang.String name)
Returns an array of String objects containing
all of the values the given request parameter has, or
null if the parameter does not exist. |
java.io.InputStream |
getPortletInputStream()
Retrieves the body of the HTTP request from client to portal as binary data using an InputStream . |
PortletMode |
getPortletMode()
Returns the current portlet mode of the portlet. |
java.io.BufferedReader |
getReader()
Retrieves the body of the HTTP request from the client to the portal as character data using a BufferedReader . |
WindowState |
getWindowState()
Returns the current window state of the portlet. |
void |
setCharacterEncoding(java.lang.String s)
Overrides the name of the character encoding used in the body of this request. |
Methods inherited from class org.jboss.portal.portlet.impl.PortletRequestImpl |
getAttribute, getAttributeNames, getAuthType, getContextPath, getLocale, getLocales, getPortalContext, getPortletSession, getPortletSession, getPreferences, getProperties, getProperty, getPropertyNames, getRemoteUser, getRequestedSessionId, getResponseContentType, getResponseContentTypes, getScheme, getServerName, getServerPort, getUserPrincipal, isPortletModeAllowed, isRequestedSessionIdValid, isSecure, isUserInRole, isWindowStateAllowed, removeAttribute, setAttribute |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ActionRequestImpl(ActionInvocation invocation)
Method Detail |
public PortletMode getPortletMode()
PortletRequest
getPortletMode
in interface PortletRequest
public WindowState getWindowState()
PortletRequest
getWindowState
in interface PortletRequest
public java.lang.String getParameter(java.lang.String name)
PortletRequest
String
,
or null
if the parameter does not exist. Request parameters
are extra information sent with the request. The returned parameter
are "x-www-form-urlencoded" decoded.
Only parameters targeted to the current portlet are accessible.
This method should only be used if the
parameter has only one value. If the parameter might have
more than one value, use PortletRequest.getParameterValues(java.lang.String)
.
If this method is used with a multivalued
parameter, the value returned is equal to the first value
in the array returned by getParameterValues
.
getParameter
in interface PortletRequest
name
- a String
specifying the
name of the parameter
String
representing the
single value of the parameterPortletRequest.getParameterValues(java.lang.String)
public java.util.Enumeration getParameterNames()
PortletRequest
Enumeration
of String
objects containing the names of the parameters contained
in this request. If the request has
no parameters, the method returns an
empty Enumeration
.
Only parameters targeted to the current portlet are returned.
getParameterNames
in interface PortletRequest
Enumeration
of String
objects, each String
containing
the name of a request parameter; or an
empty Enumeration
if the
request has no parameters.public java.lang.String[] getParameterValues(java.lang.String name)
PortletRequest
String
objects containing
all of the values the given request parameter has, or
null
if the parameter does not exist.
The returned parameters are "x-www-form-urlencoded" decoded.
If the parameter has a single value, the array has a length of 1.
getParameterValues
in interface PortletRequest
name
- a String
containing the name of
the parameter the value of which is requested
String
objects
containing the parameter values.PortletRequest.getParameter(java.lang.String)
public java.util.Map getParameterMap()
PortletRequest
Map
of the parameters of this request.
Request parameters are extra information sent with the request.
The returned parameters are "x-www-form-urlencoded" decoded.
The values in the returned Map
are from type
String array (String[]
).
If no parameters exist this method returns an empty Map
.
getParameterMap
in interface PortletRequest
Map
containing parameter names as
keys and parameter values as map values, or an empty Map
if no parameters exist. The keys in the parameter
map are of type String. The values in the parameter map are of type
String array (String[]
).public java.io.InputStream getPortletInputStream() throws java.io.IOException
ActionRequest
InputStream
. Either this method or
ActionRequest.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 ActionRequest
java.io.IOException
- if an input or output exception occurredpublic void setCharacterEncoding(java.lang.String s) throws java.io.UnsupportedEncodingException
ActionRequest
ActionRequest.getReader()
or ActionRequest.getPortletInputStream()
.
This method only sets the character set for the Reader that the
ActionRequest.getReader()
method returns.
setCharacterEncoding
in interface ActionRequest
s
- a String
containing the name of
the chararacter encoding.
java.io.UnsupportedEncodingException
- if this is not a valid encodingpublic java.io.BufferedReader getReader() throws java.io.UnsupportedEncodingException, java.io.IOException
ActionRequest
BufferedReader
. The reader translates the character
data according to the character encoding used on the body.
Either this method or ActionRequest.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 ActionRequest
BufferedReader
containing the body of the request
java.io.IOException
- if an input or output exception occurred
java.io.UnsupportedEncodingException
- if the character set encoding used is
not supported and the text cannot be decodedActionRequest.getPortletInputStream()
public java.lang.String getCharacterEncoding()
ActionRequest
null
if the request
does not specify a character encoding.
getCharacterEncoding
in interface ActionRequest
String
containing the name of
the chararacter encoding, or null
if the request does not specify a character encoding.public java.lang.String getContentType()
ActionRequest
getContentType
in interface ActionRequest
String
containing the name
of the MIME type of the request, or null
if the type is not known.public int getContentLength()
ActionRequest
getContentLength
in interface ActionRequest
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |