|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.portlet.filter.PortletRequestWrapper
com.vaadin.server.VaadinPortletRequest
public class VaadinPortletRequest
Wrapper for PortletRequest and its subclasses.
VaadinRequest,
VaadinPortletResponse,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface javax.portlet.PortletRequest |
|---|
javax.portlet.PortletRequest.P3PUserInfos |
| Field Summary |
|---|
| 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 |
| Constructor Summary | |
|---|---|
VaadinPortletRequest(javax.portlet.PortletRequest request,
VaadinPortletService vaadinService)
Wraps a portlet request and an associated vaadin service |
|
| 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 of the request content that can be read from the input stream returned by VaadinRequest.getInputStream(). |
java.lang.String |
getContentType()
Returns the MIME type of the body of the request, or null if the type is not known. |
long |
getDateHeader(java.lang.String name)
Returns the value of the specified request header as a long value that represents a Date object. |
java.lang.String |
getHeader(java.lang.String string)
Gets the value of a request header, e.g. |
java.util.Enumeration<java.lang.String> |
getHeaderNames()
Returns an enumeration of all the header names this request contains. |
java.util.Enumeration<java.lang.String> |
getHeaders(java.lang.String name)
Returns all the values of the specified request header as an Enumeration of String objects. |
java.io.InputStream |
getInputStream()
Returns an input stream from which the request content can be read. |
java.lang.String |
getMethod()
Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT. |
java.lang.String |
getPathInfo()
Gets the path of the requested resource relative to the application. |
java.lang.String |
getPortalProperty(java.lang.String name)
Reads a portal property from the portal context of the Vaadin request. |
javax.portlet.PortletRequest |
getPortletRequest()
Gets the original, unwrapped portlet request. |
java.io.BufferedReader |
getReader()
Retrieves the body of the request as character data using a BufferedReader. |
java.lang.String |
getRemoteAddr()
Returns the IP address from which the request came. |
java.lang.String |
getRemoteHost()
Returns the fully qualified name of the client or the last proxy that sent the request. |
int |
getRemotePort()
Returns the Internet Protocol (IP) source port of the client or last proxy that sent the request. |
VaadinPortletService |
getService()
Gets the vaadin service for the context of this request. |
WrappedSession |
getWrappedSession()
Gets the session associated with this request, creating a new if there is no session. |
WrappedSession |
getWrappedSession(boolean allowSessionCreation)
Gets the session associated with this request, optionally creating a new if there is no session. |
| Methods inherited from class javax.portlet.filter.PortletRequestWrapper |
|---|
getAttribute, getAttributeNames, getAuthType, getContextPath, getCookies, getLocale, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getPortalContext, getPortletMode, getPortletSession, getPortletSession, getPreferences, getPrivateParameterMap, getProperties, getProperty, getPropertyNames, getPublicParameterMap, getRemoteUser, getRequest, getRequestedSessionId, getResponseContentType, getResponseContentTypes, getScheme, getServerName, getServerPort, getUserPrincipal, getWindowID, getWindowState, isPortletModeAllowed, isRequestedSessionIdValid, isSecure, isUserInRole, isWindowStateAllowed, removeAttribute, setAttribute, setRequest |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.vaadin.server.VaadinRequest |
|---|
getAttribute, getAttributeNames, getAuthType, getContextPath, getCookies, getLocale, getLocales, getParameter, getParameterMap, getRemoteUser, getUserPrincipal, isSecure, isUserInRole, removeAttribute, setAttribute |
| Constructor Detail |
|---|
public VaadinPortletRequest(javax.portlet.PortletRequest request,
VaadinPortletService vaadinService)
request - the portlet request to wrapvaadinService - the associated vaadin service| Method Detail |
|---|
public int getContentLength()
VaadinRequestVaadinRequest.getInputStream().
getContentLength in interface VaadinRequestServletRequest.getContentLength(),
ClientDataRequest.getContentLength()
public java.io.InputStream getInputStream()
throws java.io.IOException
VaadinRequestVaadinRequest.getContentLength()
without reading the full stream contents.
getInputStream in interface VaadinRequestjava.io.IOException - if the input stream can not be openedServletRequest.getInputStream(),
ClientDataRequest.getPortletInputStream()
public java.io.BufferedReader getReader()
throws java.io.IOException
VaadinRequestBufferedReader. The reader translates the character data
according to the character encoding used on the body. Either this method
or VaadinRequest.getInputStream() may be called to read the body, not both.
getReader in interface VaadinRequestjava.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 occurredServletRequest.getReader(),
ClientDataRequest.getReader()public java.lang.String getPathInfo()
VaadinRequestnull if no path information is available. Does
always start with / if the path isn't null.
getPathInfo in interface VaadinRequestHttpServletRequest.getPathInfo()public WrappedSession getWrappedSession()
VaadinRequest
getWrappedSession in interface VaadinRequestWrappedSession,
HttpServletRequest.getSession(),
PortletRequest.getPortletSession()public WrappedSession getWrappedSession(boolean allowSessionCreation)
VaadinRequest
getWrappedSession in interface VaadinRequestallowSessionCreation - true to create a new session for this request if
necessary; false to return null if
there's no current session
WrappedSession,
HttpServletRequest.getSession(boolean),
PortletRequest.getPortletSession(boolean)public javax.portlet.PortletRequest getPortletRequest()
public java.lang.String getContentType()
VaadinRequest
getContentType in interface VaadinRequestServletRequest.getContentType(),
ClientDataRequest.getContentType()public java.lang.String getCharacterEncoding()
VaadinRequestnull if the request does not
specify a character encoding.
getCharacterEncoding in interface VaadinRequestServletRequest.getCharacterEncoding(),
ClientDataRequest.getCharacterEncoding()public java.lang.String getMethod()
VaadinRequest
getMethod in interface VaadinRequestHttpServletRequest.getMethod(),
ClientDataRequest.getMethod()public java.lang.String getRemoteAddr()
VaadinRequest
getRemoteAddr in interface VaadinRequestnull if the
address is not availableServletRequest.getRemoteAddr()public java.lang.String getRemoteHost()
VaadinRequest
getRemoteHost in interface VaadinRequestnull if the information is not available.ServletRequest.getRemoteHost()public int getRemotePort()
VaadinRequest
getRemotePort in interface VaadinRequestServletRequest.getRemotePort()public java.lang.String getHeader(java.lang.String string)
VaadinRequestHttpServletRequest.
getHeader in interface VaadinRequeststring - the name of the header
null if the header is not
present in the requestHttpServletRequest.getHeader(String)public java.lang.String getPortalProperty(java.lang.String name)
name - a string with the name of the portal property to get
null if
the property is not definedpublic VaadinPortletService getService()
VaadinRequest
getService in interface VaadinRequestVaadinServicepublic long getDateHeader(java.lang.String name)
VaadinRequestThe date is returned as the number of milliseconds since January 1, 1970 GMT. The header name is case insensitive.
If the request did not have a header of the specified name, this method returns -1. If the header can't be converted to a date, the method throws an IllegalArgumentException.
getDateHeader in interface VaadinRequestname - a String specifying the name of the header
HttpServletRequest.getDateHeader(String)public java.util.Enumeration<java.lang.String> getHeaderNames()
VaadinRequest
Some implementations do not allow access headers using this method, in
which case this method returns null
getHeaderNames in interface VaadinRequestnullHttpServletRequest.getHeaderNames()public java.util.Enumeration<java.lang.String> getHeaders(java.lang.String name)
VaadinRequest
Some headers, such as Accept-Language can be sent by clients
as several headers each with a different value rather than sending the
header as a comma separated list.
If the request did not include any headers of the specified name, this
method returns an empty Enumeration. If the request does not support
accessing headers, this method returns null.
The header name is case insensitive. You can use this method with any request header.
getHeaders in interface VaadinRequestname - a String specifying the header name
nullHttpServletRequest.getHeaders(String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||