com.vaadin.server
Class VaadinPortlet.VaadinHttpAndPortletRequest

java.lang.Object
  extended by javax.portlet.filter.PortletRequestWrapper
      extended by com.vaadin.server.VaadinPortletRequest
          extended by com.vaadin.server.VaadinPortlet.VaadinHttpAndPortletRequest
All Implemented Interfaces:
VaadinRequest, java.io.Serializable, javax.portlet.PortletRequest
Direct Known Subclasses:
VaadinPortlet.VaadinGateInRequest, VaadinPortlet.VaadinLiferayRequest, VaadinPortlet.VaadinWebSpherePortalRequest
Enclosing class:
VaadinPortlet

public abstract static class VaadinPortlet.VaadinHttpAndPortletRequest
extends VaadinPortletRequest

Base class for portlet requests that need access to HTTP servlet requests.

See Also:
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
VaadinPortlet.VaadinHttpAndPortletRequest(javax.portlet.PortletRequest request, VaadinPortletService vaadinService)
          Constructs a new VaadinPortlet.VaadinHttpAndPortletRequest.
 
Method Summary
 java.lang.String getHeader(java.lang.String name)
          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.lang.String getParameter(java.lang.String name)
          Gets the named request parameter This is typically a HTTP GET or POST parameter, though other request types might have other ways of representing parameters.
 java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
          Gets all the parameters of the request.
 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.
protected abstract  javax.servlet.http.HttpServletRequest getServletRequest(javax.portlet.PortletRequest request)
          Returns the original HTTP servlet request for this portlet request.
 
Methods inherited from class com.vaadin.server.VaadinPortletRequest
getCharacterEncoding, getContentLength, getContentType, getCurrent, getCurrentPortletRequest, getDateHeader, getInputStream, getMethod, getPathInfo, getPortalProperty, getPortletPreference, getPortletRequest, getReader, getService, getWrappedSession, getWrappedSession
 
Methods inherited from class javax.portlet.filter.PortletRequestWrapper
getAttribute, getAttributeNames, getAuthType, getContextPath, getCookies, getLocale, getLocales, 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, getRemoteUser, getUserPrincipal, isSecure, isUserInRole, removeAttribute, setAttribute
 

Constructor Detail

VaadinPortlet.VaadinHttpAndPortletRequest

public VaadinPortlet.VaadinHttpAndPortletRequest(javax.portlet.PortletRequest request,
                                                 VaadinPortletService vaadinService)
Constructs a new VaadinPortlet.VaadinHttpAndPortletRequest.

Parameters:
request - PortletRequest to be wrapped
vaadinService - VaadinPortletService associated with this request
Since:
7.2
Method Detail

getServletRequest

protected abstract javax.servlet.http.HttpServletRequest getServletRequest(javax.portlet.PortletRequest request)
Returns the original HTTP servlet request for this portlet request.

Parameters:
request - PortletRequest used to
Returns:
the original HTTP servlet request
Since:
7.2

getParameter

public java.lang.String getParameter(java.lang.String name)
Description copied from interface: VaadinRequest
Gets the named request parameter This is typically a HTTP GET or POST parameter, though other request types might have other ways of representing parameters.

Specified by:
getParameter in interface VaadinRequest
Specified by:
getParameter in interface javax.portlet.PortletRequest
Overrides:
getParameter in class javax.portlet.filter.PortletRequestWrapper
Parameters:
name - the name of the parameter
Returns:
The paramter value, or null if no parameter with the given name is present
See Also:
ServletRequest.getParameter(String), PortletRequest.getParameter(String)

getRemoteAddr

public java.lang.String getRemoteAddr()
Description copied from interface: VaadinRequest
Returns the IP address from which the request came. This might also be the address of a proxy between the server and the original requester.

Specified by:
getRemoteAddr in interface VaadinRequest
Overrides:
getRemoteAddr in class VaadinPortletRequest
Returns:
a string containing the IP address, or null if the address is not available
See Also:
ServletRequest.getRemoteAddr()

getRemoteHost

public java.lang.String getRemoteHost()
Description copied from interface: VaadinRequest
Returns the fully qualified name of the client or the last proxy that sent the request. If the engine cannot or chooses not to resolve the hostname (to improve performance), this method returns the dotted-string form of the IP address.

Specified by:
getRemoteHost in interface VaadinRequest
Overrides:
getRemoteHost in class VaadinPortletRequest
Returns:
a String containing the fully qualified name of the client, or null if the information is not available.
See Also:
ServletRequest.getRemoteHost()

getRemotePort

public int getRemotePort()
Description copied from interface: VaadinRequest
Returns the Internet Protocol (IP) source port of the client or last proxy that sent the request.

Specified by:
getRemotePort in interface VaadinRequest
Overrides:
getRemotePort in class VaadinPortletRequest
Returns:
an integer specifying the port number, or -1 if the information is not available.
See Also:
ServletRequest.getRemotePort()

getHeader

public java.lang.String getHeader(java.lang.String name)
Description copied from interface: VaadinRequest
Gets the value of a request header, e.g. a http header for a HttpServletRequest.

Specified by:
getHeader in interface VaadinRequest
Overrides:
getHeader in class VaadinPortletRequest
Parameters:
name - the name of the header
Returns:
the header value, or null if the header is not present in the request
See Also:
HttpServletRequest.getHeader(String)

getHeaderNames

public java.util.Enumeration<java.lang.String> getHeaderNames()
Description copied from interface: VaadinRequest
Returns an enumeration of all the header names this request contains. If the request has no headers, this method returns an empty enumeration.

Some implementations do not allow access headers using this method, in which case this method returns null

Specified by:
getHeaderNames in interface VaadinRequest
Overrides:
getHeaderNames in class VaadinPortletRequest
Returns:
an enumeration of all the header names sent with this request; if the request has no headers, an empty enumeration; if the implementation does not allow this method, null
See Also:
HttpServletRequest.getHeaderNames()

getHeaders

public java.util.Enumeration<java.lang.String> getHeaders(java.lang.String name)
Description copied from interface: VaadinRequest
Returns all the values of the specified request header as an Enumeration of String objects.

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.

Specified by:
getHeaders in interface VaadinRequest
Overrides:
getHeaders in class VaadinPortletRequest
Parameters:
name - a String specifying the header name
Returns:
an Enumeration containing the values of the requested header. If the request does not have any headers of that name return an empty enumeration. If the header information is not available, return null
See Also:
HttpServletRequest.getHeaders(String)

getParameterMap

public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
Description copied from interface: VaadinRequest
Gets all the parameters of the request. Framework's internal init parameters have prefix "v-" (does not include such parameters as "theme" and "debug").

Specified by:
getParameterMap in interface VaadinRequest
Specified by:
getParameterMap in interface javax.portlet.PortletRequest
Overrides:
getParameterMap in class javax.portlet.filter.PortletRequestWrapper
Returns:
A mapping of parameter names to arrays of parameter values
See Also:
VaadinRequest.getParameter(String), ServletRequest.getParameterMap(), PortletRequest.getParameter(String)


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.