Package com.vaadin.portlet
Class VaadinPortletRequest
- java.lang.Object
-
- javax.portlet.filter.PortletRequestWrapper
-
- com.vaadin.portlet.VaadinPortletRequest
-
- All Implemented Interfaces:
VaadinRequest,Serializable,javax.portlet.PortletRequest
- Direct Known Subclasses:
VaadinPortlet.VaadinHttpAndPortletRequest
public class VaadinPortletRequest extends javax.portlet.filter.PortletRequestWrapper implements VaadinRequest
Wrapper forPortletRequestand its subclasses.- Since:
- 7.0
- Author:
- Vaadin Ltd.
- See Also:
VaadinRequest,VaadinPortletResponse, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description VaadinPortletRequest(javax.portlet.PortletRequest request, VaadinPortletService vaadinService)Wraps a portlet request and an associated vaadin service.
-
Method Summary
-
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
-
VaadinPortletRequest
public VaadinPortletRequest(javax.portlet.PortletRequest request, VaadinPortletService vaadinService)Wraps a portlet request and an associated vaadin service.- Parameters:
request- the portlet request to wrapvaadinService- the associated vaadin service
-
-
Method Detail
-
getContentLength
public int getContentLength()
- Specified by:
getContentLengthin interfaceVaadinRequest- See Also:
ClientDataRequest.getContentLength()
-
getInputStream
public InputStream getInputStream() throws IOException
- Specified by:
getInputStreamin interfaceVaadinRequest- Throws:
IOException
-
getReader
public BufferedReader getReader() throws IOException
- Specified by:
getReaderin interfaceVaadinRequest- Throws:
IOException
-
getPathInfo
public String getPathInfo()
- Specified by:
getPathInfoin interfaceVaadinRequest
-
getWrappedSession
public WrappedSession getWrappedSession()
- Specified by:
getWrappedSessionin interfaceVaadinRequest- See Also:
PortletRequest.getPortletSession()
-
getWrappedSession
public WrappedSession getWrappedSession(boolean allowSessionCreation)
- Specified by:
getWrappedSessionin interfaceVaadinRequest- See Also:
PortletRequest.getPortletSession(boolean)
-
getPortletRequest
public javax.portlet.PortletRequest getPortletRequest()
Gets the original, unwrapped portlet request.- Returns:
- the unwrapped portlet request
-
getContentType
public String getContentType()
- Specified by:
getContentTypein interfaceVaadinRequest
-
getCharacterEncoding
public String getCharacterEncoding()
- Specified by:
getCharacterEncodingin interfaceVaadinRequest
-
getMethod
public String getMethod()
- Specified by:
getMethodin interfaceVaadinRequest
-
getRemoteAddr
public String getRemoteAddr()
- Specified by:
getRemoteAddrin interfaceVaadinRequest
-
getRemoteHost
public String getRemoteHost()
- Specified by:
getRemoteHostin interfaceVaadinRequest
-
getRemotePort
public int getRemotePort()
- Specified by:
getRemotePortin interfaceVaadinRequest
-
getHeader
public String getHeader(String string)
- Specified by:
getHeaderin interfaceVaadinRequest
-
getPortalProperty
public String getPortalProperty(String name)
Reads a portal property from the portal context of the Vaadin request.- Parameters:
name- a string with the name of the portal property to get- Returns:
- a string with the value of the property, or
nullif the property is not defined
-
getPortletPreference
public String getPortletPreference(String name)
Reads a portlet preference from the portlet of the request.- Parameters:
name- The name of the portlet preference. Cannot benull.- Returns:
- The value of the portlet preference,
nullif the preference is not defined.
-
getService
public VaadinPortletService getService()
- Specified by:
getServicein interfaceVaadinRequest
-
getDateHeader
public long getDateHeader(String name)
- Specified by:
getDateHeaderin interfaceVaadinRequest
-
getHeaderNames
public Enumeration<String> getHeaderNames()
- Specified by:
getHeaderNamesin interfaceVaadinRequest
-
getHeaders
public Enumeration<String> getHeaders(String name)
- Specified by:
getHeadersin interfaceVaadinRequest
-
getCurrentPortletRequest
public static javax.portlet.PortletRequest getCurrentPortletRequest()
Gets the currently processed portlet request. The current portlet request is automatically defined when the request is started. The current portlet request can not be used in e.g. background threads because of the way server implementations reuse request instances.- Returns:
- the current portlet request instance if available, otherwise
null - Since:
- 7.3
-
getCurrent
public static VaadinPortletRequest getCurrent()
Gets the currently processed Vaadin portlet request. The current request is automatically defined when the request is started. The current request can not be used in e.g. background threads because of the way server implementations reuse request instances.- Returns:
- the current Vaadin portlet request instance if available,
otherwise
null - Since:
- 7.3
-
-