|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.terminal.gwt.server.WrappedPortletRequest
public class WrappedPortletRequest
Wrapper for PortletRequest and its subclasses.
WrappedRequest,
WrappedPortletResponse,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.vaadin.terminal.WrappedRequest |
|---|
WrappedRequest.BrowserDetails |
| Constructor Summary | |
|---|---|
WrappedPortletRequest(PortletRequest request,
DeploymentConfiguration deploymentConfiguration)
Wraps a portlet request and an associated deployment configuration |
|
| Method Summary | |
|---|---|
static WrappedPortletRequest |
cast(WrappedRequest request)
Helper method to get a WrappedPortlettRequest from a
WrappedRequest. |
Object |
getAttribute(String name)
Gets a request attribute. |
WrappedRequest.BrowserDetails |
getBrowserDetails()
Gets detailed information about the browser from which the request originated. |
int |
getContentLength()
Returns the length of the request content that can be read from the input stream returned by WrappedRequest.getInputStream(). |
String |
getContentType()
Returns the MIME type of the body of the request, or null if the type is not known. |
DeploymentConfiguration |
getDeploymentConfiguration()
Gets the deployment configuration for the context of this request. |
String |
getHeader(String string)
Gets the value of a request header, e.g. |
InputStream |
getInputStream()
Returns an input stream from which the request content can be read. |
Locale |
getLocale()
Gets locale information from the query, e.g. |
String |
getParameter(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. |
Map<String,String[]> |
getParameterMap()
Gets all the parameters of the request. |
String |
getPortalProperty(String name)
Reads a portal property from the portal context of the wrapped request. |
PortletRequest |
getPortletRequest()
Gets the original, unwrapped portlet request. |
String |
getRemoteAddr()
Returns the IP address from which the request came. |
String |
getRequestPathInfo()
Gets the path of the requested resource relative to the application. |
Object |
getSessionAttribute(String name)
Gets an attribute from the session associated with this request. |
int |
getSessionMaxInactiveInterval()
Returns the maximum time interval, in seconds, that the session associated with this request will be kept open between client accesses. |
boolean |
isSecure()
Checks whether the request was made using a secure channel, e.g. |
void |
setAttribute(String name,
Object o)
Defines a request attribute. |
void |
setSessionAttribute(String name,
Object attribute)
Saves an attribute value in the session associated with this request. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WrappedPortletRequest(PortletRequest request,
DeploymentConfiguration deploymentConfiguration)
request - the portlet request to wrapdeploymentConfiguration - the associated deployment configuration| Method Detail |
|---|
public Object getAttribute(String name)
WrappedRequest
getAttribute in interface WrappedRequestname - the name of the attribute
null if there is no
attribute with the given nameServletRequest.getAttribute(String),
javax.portlet.PortletRequest#getAttribute(String)public int getContentLength()
WrappedRequestWrappedRequest.getInputStream().
getContentLength in interface WrappedRequestServletRequest.getContentLength(),
javax.portlet.ClientDataRequest#getContentLength()
public InputStream getInputStream()
throws IOException
WrappedRequestWrappedRequest.getContentLength()
without reading the full stream contents.
getInputStream in interface WrappedRequestIOException - if the input stream can not be openedServletRequest.getInputStream(),
javax.portlet.ClientDataRequest#getPortletInputStream()public String getParameter(String name)
WrappedRequest
getParameter in interface WrappedRequestname - the name of the parameter
null if no parameter with the
given name is presentServletRequest.getParameter(String),
javax.portlet.PortletRequest#getParameter(String)public Map<String,String[]> getParameterMap()
WrappedRequest
getParameterMap in interface WrappedRequestWrappedRequest.getParameter(String),
ServletRequest.getParameterMap(),
javax.portlet.PortletRequest#getParameter(String)
public void setAttribute(String name,
Object o)
WrappedRequest
setAttribute in interface WrappedRequestname - the name of the attributeo - the attribute valueServletRequest.setAttribute(String, Object),
javax.portlet.PortletRequest#setAttribute(String, Object)public String getRequestPathInfo()
WrappedRequestnull if no path information is available. Does
always start with / if the path isn't null.
getRequestPathInfo in interface WrappedRequestHttpServletRequest.getPathInfo()public int getSessionMaxInactiveInterval()
WrappedRequest
getSessionMaxInactiveInterval in interface WrappedRequestHttpSession.getMaxInactiveInterval(),
javax.portlet.PortletSession#getMaxInactiveInterval()public Object getSessionAttribute(String name)
WrappedRequest
getSessionAttribute in interface WrappedRequestname - the name of the attribute
null if the attribute is not
defined in the sessionHttpSession.getAttribute(String),
javax.portlet.PortletSession#getAttribute(String)
public void setSessionAttribute(String name,
Object attribute)
WrappedRequest
setSessionAttribute in interface WrappedRequestname - the name of the attributeattribute - the attribute valueHttpSession.setAttribute(String, Object),
javax.portlet.PortletSession#setAttribute(String, Object)public PortletRequest getPortletRequest()
public String getContentType()
WrappedRequest
getContentType in interface WrappedRequestServletRequest.getContentType(),
javax.portlet.ResourceRequest#getContentType()public WrappedRequest.BrowserDetails getBrowserDetails()
WrappedRequestApplication.getRoot(com.vaadin.terminal.WrappedRequest) is called again
after throwing RootRequiresMoreInformationException or in
Root.init(WrappedRequest) for a Root class not annotated with
EagerInit
getBrowserDetails in interface WrappedRequestnull if details are not
availableWrappedRequest.BrowserDetailspublic Locale getLocale()
WrappedRequest
getLocale in interface WrappedRequestServletRequest.getLocale(),
PortletRequest#getLocale()public String getRemoteAddr()
WrappedRequest
getRemoteAddr in interface WrappedRequestnull if the
address is not availableServletRequest.getRemoteAddr()public boolean isSecure()
WrappedRequest
isSecure in interface WrappedRequestServletRequest.isSecure(),
PortletRequest#isSecure()public String getHeader(String string)
WrappedRequestHttpServletRequest.
getHeader in interface WrappedRequeststring - the name of the header
null if the header is not
present in the requestHttpServletRequest.getHeader(String)public String getPortalProperty(String name)
name - a string with the name of the portal property to get
null if
the property is not definedpublic DeploymentConfiguration getDeploymentConfiguration()
WrappedRequest
getDeploymentConfiguration in interface WrappedRequestDeploymentConfigurationpublic static WrappedPortletRequest cast(WrappedRequest request)
WrappedPortlettRequest from a
WrappedRequest. Aside from casting, this method also takes
care of situations where there's another level of wrapping.
request - a wrapped request
ClassCastException - if the wrapped request doesn't wrap a portlet request
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||