|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.portlet.filter.PortletRequestWrapper
public class PortletRequestWrapper
The PortletRequestWrapper provides a convenient
implementation of the PortletRequest interface
and is extended by other request wrappers.
This class implements the Wrapper or Decorator pattern.
Methods default to calling through to the wrapped request object.
PortletRequest| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface javax.portlet.PortletRequest |
|---|
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 | |
|---|---|
PortletRequestWrapper(PortletRequest request)
Creates an PortletRequest adaptor
wrapping the given request object. |
|
| Method Summary | |
|---|---|
java.lang.Object |
getAttribute(java.lang.String name)
The default behavior of this method is to call getAttribute(String name) on the wrapped request object. |
java.util.Enumeration<java.lang.String> |
getAttributeNames()
The default behavior of this method is to call getAttributeNames() on the wrapped request object. |
java.lang.String |
getAuthType()
The default behavior of this method is to call getAuthType() on the wrapped request object. |
java.lang.String |
getContextPath()
The default behavior of this method is to call getContextPath() on the wrapped request object. |
javax.servlet.http.Cookie[] |
getCookies()
The default behavior of this method is to call getCookies() on the wrapped request object. |
java.util.Locale |
getLocale()
The default behavior of this method is to call getLocale() on the wrapped request object. |
java.util.Enumeration<java.util.Locale> |
getLocales()
The default behavior of this method is to call getLocales() on the wrapped request object. |
java.lang.String |
getParameter(java.lang.String name)
The default behavior of this method is to call getParameter(String name) on the wrapped request object. |
java.util.Map<java.lang.String,java.lang.String[]> |
getParameterMap()
The default behavior of this method is to call getParameterMap() on the wrapped request object. |
java.util.Enumeration<java.lang.String> |
getParameterNames()
The default behavior of this method is to call getParameterNames() on the wrapped request object. |
java.lang.String[] |
getParameterValues(java.lang.String name)
The default behavior of this method is to call getParameterValues(name) on the wrapped request object. |
PortalContext |
getPortalContext()
The default behavior of this method is to call getPortalContext() on the wrapped request object. |
PortletMode |
getPortletMode()
The default behavior of this method is to call getPortletMode() on the wrapped request object. |
PortletSession |
getPortletSession()
The default behavior of this method is to call getPortletSession() on the wrapped request object. |
PortletSession |
getPortletSession(boolean create)
The default behavior of this method is to call getPortletSession(create) on the wrapped request object. |
PortletPreferences |
getPreferences()
The default behavior of this method is to call getPreferences() on the wrapped request object. |
java.util.Map<java.lang.String,java.lang.String[]> |
getPrivateParameterMap()
The default behavior of this method is to call getPrivateParameterMap() on the wrapped request object. |
java.util.Enumeration<java.lang.String> |
getProperties(java.lang.String name)
The default behavior of this method is to call getProperteis(name) on the wrapped request object. |
java.lang.String |
getProperty(java.lang.String name)
The default behavior of this method is to call getProperty(name) on the wrapped request object. |
java.util.Enumeration<java.lang.String> |
getPropertyNames()
The default behavior of this method is to call getPropertyNames() on the wrapped request object. |
java.util.Map<java.lang.String,java.lang.String[]> |
getPublicParameterMap()
The default behavior of this method is to call getPublicParameterMap() on the wrapped request object. |
java.lang.String |
getRemoteUser()
The default behavior of this method is to call getRemoteUser() on the wrapped request object. |
PortletRequest |
getRequest()
Return the wrapped request object. |
java.lang.String |
getRequestedSessionId()
The default behavior of this method is to call getRequestedSessionId() on the wrapped request object. |
java.lang.String |
getResponseContentType()
The default behavior of this method is to call getResponseContentType() on the wrapped request object. |
java.util.Enumeration<java.lang.String> |
getResponseContentTypes()
The default behavior of this method is to call getResponseContentTypes() on the wrapped request object. |
java.lang.String |
getScheme()
The default behavior of this method is to call getScheme() on the wrapped request object. |
java.lang.String |
getServerName()
The default behavior of this method is to call getServerName() on the wrapped request object. |
int |
getServerPort()
The default behavior of this method is to call getServerPort() on the wrapped request object. |
java.security.Principal |
getUserPrincipal()
The default behavior of this method is to call getUserPrincipal() on the wrapped request object. |
java.lang.String |
getWindowID()
The default behavior of this method is to call getWindowId() on the wrapped request object. |
WindowState |
getWindowState()
The default behavior of this method is to call getWindowState() on the wrapped request object. |
boolean |
isPortletModeAllowed(PortletMode mode)
The default behavior of this method is to call isPortletModeAllowed(mode) on the wrapped request object. |
boolean |
isRequestedSessionIdValid()
The default behavior of this method is to call isRequestedSessionIdValid() on the wrapped request object. |
boolean |
isSecure()
The default behavior of this method is to call isSecure() on the wrapped request object. |
boolean |
isUserInRole(java.lang.String role)
The default behavior of this method is to call isUserInRole(role) on the wrapped request object. |
boolean |
isWindowStateAllowed(WindowState state)
The default behavior of this method is to call isWindowStateAllowed(state) on the wrapped request object. |
void |
removeAttribute(java.lang.String name)
The default behavior of this method is to call removeAttribute(name) on the wrapped request object. |
void |
setAttribute(java.lang.String name,
java.lang.Object o)
The default behavior of this method is to call setAttribute(name, o) on the wrapped request object. |
void |
setRequest(PortletRequest request)
Sets the request object being wrapped. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PortletRequestWrapper(PortletRequest request)
PortletRequest adaptor
wrapping the given request object.
request - the portlet request to wrap
java.lang.IllegalArgumentException - if the request is null| Method Detail |
|---|
public java.lang.Object getAttribute(java.lang.String name)
getAttribute(String name) on the wrapped request object.
getAttribute in interface PortletRequestname - a String specifying the name of
the attribute
Object containing the value
of the attribute, or null if
the attribute does not exist.public java.util.Enumeration<java.lang.String> getAttributeNames()
getAttributeNames() on the wrapped request object.
getAttributeNames in interface PortletRequestEnumeration of strings
containing the names
of the request attributes, or an empty
Enumeration if the request
has no attributes available to it.public java.lang.String getAuthType()
getAuthType() on the wrapped request object.
getAuthType in interface PortletRequestBASIC_AUTH,
FORM_AUTH, CLIENT_CERT_AUTH,
DIGEST_AUTH (suitable for == comparison)
indicating the authentication scheme,
a custom one, or
null if the request was
not authenticated.public java.lang.String getContextPath()
getContextPath() on the wrapped request object.
getContextPath in interface PortletRequestString specifying the
portion of the request URL that indicates the context
of the requestPortletResponse.encodeURL(java.lang.String)public java.util.Locale getLocale()
getLocale() on the wrapped request object.
getLocale in interface PortletRequestpublic java.util.Enumeration<java.util.Locale> getLocales()
getLocales() on the wrapped request object.
getLocales in interface PortletRequestpublic java.lang.String getParameter(java.lang.String name)
getParameter(String name) on the wrapped request object.
getParameter in interface PortletRequestname - a String specifying the
name of the parameter
String representing the
single value of the parameterPortletRequest.getParameterValues(java.lang.String)public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
getParameterMap() on the wrapped request object.
getParameterMap in interface PortletRequestMap 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.util.Enumeration<java.lang.String> getParameterNames()
getParameterNames() on the wrapped request object.
getParameterNames in interface PortletRequestEnumeration 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)
getParameterValues(name) on the wrapped request object.
getParameterValues in interface PortletRequestname - 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 PortalContext getPortalContext()
getPortalContext() on the wrapped request object.
getPortalContext in interface PortletRequestpublic PortletMode getPortletMode()
getPortletMode() on the wrapped request object.
getPortletMode in interface PortletRequestpublic PortletSession getPortletSession()
getPortletSession() on the wrapped request object.
getPortletSession in interface PortletRequestpublic PortletSession getPortletSession(boolean create)
getPortletSession(create) on the wrapped request object.
getPortletSession in interface PortletRequestcreate - true to create a new session, false to return null if there
is no current session
public PortletPreferences getPreferences()
getPreferences() on the wrapped request object.
getPreferences in interface PortletRequestpublic java.util.Enumeration<java.lang.String> getProperties(java.lang.String name)
getProperteis(name) on the wrapped request object.
getProperties in interface PortletRequestname - a String specifying the
property name
Enumeration containing
the values of the requested property. If
the request does not have any properties of
that name return an empty Enumeration.public java.lang.String getProperty(java.lang.String name)
getProperty(name) on the wrapped request object.
getProperty in interface PortletRequestname - a String specifying the
property name
String containing the
value of the requested
property, or null
if the request does not
have a property of that name.public java.util.Enumeration<java.lang.String> getPropertyNames()
getPropertyNames() on the wrapped request object.
getPropertyNames in interface PortletRequestEnumeration of all the
property names sent with this
request; if the request has
no properties, an empty Enumeration.public java.lang.String getRemoteUser()
getRemoteUser() on the wrapped request object.
getRemoteUser in interface PortletRequestString specifying the login
of the user making this request, or null
if the user login is not known.public java.lang.String getRequestedSessionId()
getRequestedSessionId() on the wrapped request object.
getRequestedSessionId in interface PortletRequestString specifying the session
ID, or null if the request did
not specify a session IDPortletRequest.isRequestedSessionIdValid()public java.lang.String getResponseContentType()
getResponseContentType() on the wrapped request object.
getResponseContentType in interface PortletRequestpublic java.util.Enumeration<java.lang.String> getResponseContentTypes()
getResponseContentTypes() on the wrapped request object.
getResponseContentTypes in interface PortletRequestpublic java.lang.String getScheme()
getScheme() on the wrapped request object.
getScheme in interface PortletRequestString containing the name
of the scheme used to make this requestpublic java.lang.String getServerName()
getServerName() on the wrapped request object.
getServerName in interface PortletRequestString containing the name
of the server to which the request was sentpublic int getServerPort()
getServerPort() on the wrapped request object.
getServerPort in interface PortletRequestpublic java.security.Principal getUserPrincipal()
getUserPrincipal() on the wrapped request object.
getUserPrincipal in interface PortletRequestjava.security.Principal containing
the name of the user making this request, or
null if the user has not been
authenticated.public java.lang.String getWindowID()
getWindowId() on the wrapped request object.
getWindowID in interface PortletRequestpublic WindowState getWindowState()
getWindowState() on the wrapped request object.
getWindowState in interface PortletRequestpublic boolean isPortletModeAllowed(PortletMode mode)
isPortletModeAllowed(mode) on the wrapped request object.
isPortletModeAllowed in interface PortletRequestmode - portlet mode to check
public boolean isRequestedSessionIdValid()
isRequestedSessionIdValid() on the wrapped request object.
isRequestedSessionIdValid in interface PortletRequesttrue if this
request has an id for a valid session
in the current session context;
false otherwisePortletRequest.getRequestedSessionId(),
PortletRequest.getPortletSession()public boolean isSecure()
isSecure() on the wrapped request object.
isSecure in interface PortletRequestpublic boolean isUserInRole(java.lang.String role)
isUserInRole(role) on the wrapped request object.
isUserInRole in interface PortletRequestrole - a String specifying the name
of the role
boolean indicating whether
the user making this request belongs to a given role;
false if the user has not been
authenticated.public boolean isWindowStateAllowed(WindowState state)
isWindowStateAllowed(state) on the wrapped request object.
isWindowStateAllowed in interface PortletRequeststate - window state to checked
public void removeAttribute(java.lang.String name)
removeAttribute(name) on the wrapped request object.
removeAttribute in interface PortletRequestname - a String specifying
the name of the attribute to be removed
public void setAttribute(java.lang.String name,
java.lang.Object o)
setAttribute(name, o) on the wrapped request object.
setAttribute in interface PortletRequestname - a String specifying
the name of the attributeo - the Object to be storedpublic PortletRequest getRequest()
public void setRequest(PortletRequest request)
request - the request to set
java.lang.IllegalArgumentException - if the request is null.public javax.servlet.http.Cookie[] getCookies()
getCookies() on the wrapped request object.
getCookies in interface PortletRequestnull if no cookies exist.PortletResponse.addProperty(Cookie)public java.util.Map<java.lang.String,java.lang.String[]> getPrivateParameterMap()
getPrivateParameterMap() on the wrapped request object.
getPrivateParameterMap in interface PortletRequestMap containing private parameter names as
keys and private parameter values as map values, or an empty Map
if no private 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.util.Map<java.lang.String,java.lang.String[]> getPublicParameterMap()
getPublicParameterMap() on the wrapped request object.
getPublicParameterMap in interface PortletRequestMap containing public parameter names as
keys and public parameter values as map values, or an empty Map
if no public parameters exist. The keys in the parameter
map are of type String. The values in the parameter map are of type
String array (String[]).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||