|
WebSphere Portal 5.0.0.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.ServletRequestWrapper | +--javax.servlet.http.HttpServletRequestWrapper | +--com.ibm.wps.pe.pc.legacy.cmpf.PortletRequestWrapper
Provides a convenient implementation of the PortletRequest interface that can be subclassed by developers who wish to wrap the request to a Portlet. This class implements the Wrapper or Decorator pattern. Methods default to calling through to the wrapped request object.
PortletRequest
Fields inherited from interface javax.servlet.http.HttpServletRequest |
---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
Constructor Summary | |
---|---|
PortletRequestWrapper(PortletRequest portletRequest)
Creates a PortletRequest adaptor wrapping the specified request object. |
Method Summary | |
---|---|
Client |
getClient()
Returns an object representing the client device that the user connects to the portal with. |
PortletData |
getData()
Returns the data of the concrete portlet instance |
Portlet.Mode |
getMode()
Returns the mode that the portlet is running in. |
PortletSession |
getPortletSession()
Returns the current session or, if there is no current session, it creates one and returns it. |
PortletSession |
getPortletSession(boolean create)
Returns the current session or, if there is no current session and the given flag is true , it creates one and returns
it. |
PortletSettings |
getPortletSettings()
Returns the PortletSettings object of the concrete portlet. |
Portlet.Mode |
getPreviousMode()
Returns the mode that the portlet was running at last, or null if no previous mode exists. |
User |
getUser()
Returns the user object. |
PortletWindow |
getWindow()
Returns the window that the portlet is running in. |
void |
invalidateCache()
Invalidates the cache for all window states, markups and locals |
void |
setModeModifier(Portlet.ModeModifier modeModifier)
Defines which portlet mode is shown next. |
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper |
---|
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole |
Methods inherited from class javax.servlet.ServletRequestWrapper |
---|
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocale, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding, setRequest |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.jetspeed.portlet.PortletRequest |
---|
getAttribute, getAttributeNames, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getInputStream, getIntHeader, getLocale, getLocales, getMethod, getParameter, getParameterMap, getParameterNames, getParameterValues, isSecure, removeAttribute, setAttribute |
Methods inherited from interface javax.servlet.http.HttpServletRequest |
---|
getAuthType, getContextPath, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole |
Methods inherited from interface javax.servlet.ServletRequest |
---|
getCharacterEncoding, getContentLength, getContentType, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequestDispatcher, getScheme, getServerName, getServerPort, setCharacterEncoding |
Constructor Detail |
public PortletRequestWrapper(PortletRequest portletRequest)
portletRequest
- the portlet requestjava.lang.IllegalArgumentException
- if the request is nullMethod Detail |
public Portlet.Mode getMode()
PortletRequest
getMode
in interface PortletRequest
org.apache.jetspeed.portlet.PortletRequest
public Portlet.Mode getPreviousMode()
PortletRequest
null
if no previous mode exists.getPreviousMode
in interface PortletRequest
org.apache.jetspeed.portlet.PortletRequest
public void setModeModifier(Portlet.ModeModifier modeModifier) throws AccessDeniedException
PortletRequest
Portlet.ModeModifier.REQUESTED
.
This function may only be used during event processing, in any other case the call has no effect.
setModeModifier
in interface PortletRequest
org.apache.jetspeed.portlet.PortletRequest
modeModifier
- the mode modifierAccessDeniedException
- if the portlet tries to access this function
outside of the action event processingpublic final Client getClient()
PortletRequest
getClient
in interface PortletRequest
org.apache.jetspeed.portlet.PortletRequest
public PortletWindow getWindow()
PortletRequest
getWindow
in interface PortletRequest
org.apache.jetspeed.portlet.PortletRequest
public PortletData getData()
PortletRequest
If the portlet is run in CONFIGURE mode, the
portlet data is not accessible and this method will
return null
.
getData
in interface PortletRequest
org.apache.jetspeed.portlet.PortletRequest
public User getUser()
PortletRequest
If the user has not logged in or does not grant access to
the portlet, this method returns null
.
getUser
in interface PortletRequest
org.apache.jetspeed.portlet.PortletRequest
public PortletSession getPortletSession()
PortletRequest
getPortletSession
in interface PortletRequest
org.apache.jetspeed.portlet.PortletRequest
public PortletSession getPortletSession(boolean create)
PortletRequest
true
, it creates one and returns
it.
If the given flag is false
and there is no current
portlet session, this method returns null
.
getPortletSession
in interface PortletRequest
org.apache.jetspeed.portlet.PortletRequest
create
- true
to create a news session, false
to return null
of there
is no current sessionpublic PortletSettings getPortletSettings()
PortletRequest
PortletSettings
object of the concrete portlet.getPortletSettings
in interface PortletRequest
org.apache.jetspeed.portlet.PortletRequest
public void invalidateCache()
PortletRequest
invalidateCache
in interface PortletRequest
|
WebSphere Portal 5.0.0.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |