|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.ServletRequestWrapper | +--javax.servlet.http.HttpServletRequestWrapper | +--net.sf.jportlet.impl.PortletRequestImpl
Implementation of PortletRequest
Field Summary | |
static java.lang.String |
LOCALE_KEY
Key for accessing the Locale from HttpSession |
static java.lang.String |
PORTLET_REQUEST_KEY
Key for accessing the previous PortletRequest |
static java.lang.String |
PORTLET_URI_KEY
Key for accessing the PortletURI from HttpServletRequest |
static java.lang.String |
ROLES_KEY
Key for accessing the User 's roles from HttpServletRequest |
static java.lang.String |
SESSION_KEY_PREFIX
Prefix of the key of each PortletSession stored in the HttpSession |
static java.lang.String |
USER_ID_KEY
Key for accessing the current user's id from HttpSession |
static java.lang.String |
USER_KEY
Key for accessing the User from HttpServletRequest |
Fields inherited from interface javax.servlet.http.HttpServletRequest |
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
Constructor Summary | |
PortletRequestImpl(net.sf.jportlet.portlet.application.PortletProxy proxy,
javax.servlet.http.HttpServletRequest httpRequest,
net.sf.jportlet.service.PortletServiceFactory serviceFactory)
|
Method Summary | |
void |
addError(java.lang.Object error)
|
void |
addErrors(java.util.Collection errors)
|
boolean |
canAccess(Portlet.Mode mode)
Return true if the current user can access the portlet in a given mode |
java.lang.Object |
getAttribute(java.lang.String name)
|
java.util.Enumeration |
getAttributeNames()
|
java.util.Map |
getAttributes()
|
net.sf.jportlet.portlet.Client |
getClient()
Returns informations about the client device |
java.lang.String |
getContextPath()
|
net.sf.jportlet.portlet.PortletData |
getData()
Returns the data of the portlet |
java.util.Collection |
getErrors()
|
javax.servlet.http.HttpServletRequest |
getHttpRequest()
|
java.util.Locale |
getLocale()
|
Portlet.Mode |
getMode()
Returns the mode of the portlet |
net.sf.jportlet.impl.PortletPageContext |
getPageContext()
|
net.sf.jportlet.portlet.PortletSession |
getPortletSession()
Returns the current session or, if there is no current session, it creates one and returns it. |
net.sf.jportlet.portlet.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. |
net.sf.jportlet.portlet.PortletURI |
getPortletURI()
|
net.sf.jportlet.portlet.application.PortletProxy |
getProxy()
|
net.sf.jportlet.portlet.PortletSettings |
getSettings()
Returns the settings of the portlet |
net.sf.jportlet.portlet.User |
getUser()
Return the information of the current user. |
java.lang.String |
getUserId()
|
java.util.Collection |
getUserRoles()
Return a list of all the roles of the current user, or null if the
current user has no role or no user is logged in |
net.sf.jportlet.portlet.PortletWindow |
getWindow()
Return the window of the portlet |
boolean |
hasErrors()
|
boolean |
isUserInRole(java.lang.String role)
|
void |
removeAttribute(java.lang.String name)
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
|
void |
setAttributes(java.util.Map attributes)
|
void |
setPageContext(net.sf.jportlet.impl.PortletPageContext pageContext)
Sets the pageContext. |
void |
startSession(net.sf.jportlet.portlet.User user)
Start a new session for a user. |
void |
stopSession()
Stop the current session. |
void |
userChanged(net.sf.jportlet.portlet.User user)
|
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper |
getAuthType, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid |
Methods inherited from class javax.servlet.ServletRequestWrapper |
getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, setCharacterEncoding, setRequest |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.http.HttpServletRequest |
getAuthType, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid |
Methods inherited from interface javax.servlet.ServletRequest |
getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, setCharacterEncoding |
Field Detail |
public static final java.lang.String LOCALE_KEY
Locale
from HttpSession
public static final java.lang.String PORTLET_REQUEST_KEY
PortletRequest
public static final java.lang.String PORTLET_URI_KEY
PortletURI
from HttpServletRequest
public static final java.lang.String SESSION_KEY_PREFIX
PortletSession
stored in the HttpSession
public static final java.lang.String USER_ID_KEY
HttpSession
public static final java.lang.String USER_KEY
User
from HttpServletRequest
public static final java.lang.String ROLES_KEY
User
's roles from HttpServletRequest
Constructor Detail |
public PortletRequestImpl(net.sf.jportlet.portlet.application.PortletProxy proxy, javax.servlet.http.HttpServletRequest httpRequest, net.sf.jportlet.service.PortletServiceFactory serviceFactory)
Method Detail |
public void addError(java.lang.Object error)
public void addErrors(java.util.Collection errors)
public java.lang.Object getAttribute(java.lang.String name)
getAttribute
in interface javax.servlet.ServletRequest
getAttribute
in class javax.servlet.ServletRequestWrapper
ServletRequest.getAttribute(java.lang.String)
public java.util.Enumeration getAttributeNames()
getAttributeNames
in interface javax.servlet.ServletRequest
getAttributeNames
in class javax.servlet.ServletRequestWrapper
ServletRequest.getAttributeNames()
public java.util.Map getAttributes()
public net.sf.jportlet.portlet.Client getClient()
PortletRequest
getClient
in interface PortletRequest
PortletRequest.getClient()
public java.lang.String getContextPath()
getContextPath
in interface javax.servlet.http.HttpServletRequest
getContextPath
in class javax.servlet.http.HttpServletRequestWrapper
HttpServletRequest.getContextPath()
public net.sf.jportlet.portlet.PortletData getData()
PortletRequest
getData
in interface PortletRequest
PortletRequest.getData()
public java.util.Collection getErrors()
public javax.servlet.http.HttpServletRequest getHttpRequest()
public java.util.Locale getLocale()
getLocale
in interface javax.servlet.ServletRequest
getLocale
in class javax.servlet.ServletRequestWrapper
ServletRequest.getLocale()
public Portlet.Mode getMode()
PortletRequest
getMode
in interface PortletRequest
PortletRequest.getMode()
public net.sf.jportlet.impl.PortletPageContext getPageContext()
public net.sf.jportlet.portlet.PortletSession getPortletSession()
PortletRequest
getPortletSession
in interface PortletRequest
PortletRequest.getPortletSession()
public net.sf.jportlet.portlet.PortletSession getPortletSession(boolean create)
PortletRequest
getPortletSession
in interface PortletRequest
create
- flag to create the session
PortletRequest.getPortletSession(boolean)
public net.sf.jportlet.portlet.PortletURI getPortletURI()
public net.sf.jportlet.portlet.application.PortletProxy getProxy()
public net.sf.jportlet.portlet.PortletSettings getSettings()
PortletRequest
getSettings
in interface PortletRequest
PortletRequest.getSettings()
public net.sf.jportlet.portlet.User getUser()
PortletRequest
null
getUser
in interface PortletRequest
PortletRequest.getUser()
public java.lang.String getUserId()
public java.util.Collection getUserRoles()
null
if the
current user has no role or no user is logged in
public net.sf.jportlet.portlet.PortletWindow getWindow()
PortletRequest
getWindow
in interface PortletRequest
PortletRequest.getWindow()
public boolean hasErrors()
public void removeAttribute(java.lang.String name)
removeAttribute
in interface javax.servlet.ServletRequest
removeAttribute
in class javax.servlet.ServletRequestWrapper
ServletRequest.removeAttribute(java.lang.String)
public void setAttribute(java.lang.String name, java.lang.Object value)
setAttribute
in interface javax.servlet.ServletRequest
setAttribute
in class javax.servlet.ServletRequestWrapper
ServletRequest.setAttribute(java.lang.String, java.lang.Object)
public void setAttributes(java.util.Map attributes)
public void setPageContext(net.sf.jportlet.impl.PortletPageContext pageContext)
pageContext
- The pageContext to setpublic void startSession(net.sf.jportlet.portlet.User user) throws PortletException
user
- User who starts the current session
PortletException
public void stopSession()
public boolean isUserInRole(java.lang.String role)
isUserInRole
in interface javax.servlet.http.HttpServletRequest
isUserInRole
in class javax.servlet.http.HttpServletRequestWrapper
HttpServletRequest.isUserInRole(java.lang.String)
public boolean canAccess(Portlet.Mode mode)
true
if the current user can access the portlet in a given mode
mode
-
public void userChanged(net.sf.jportlet.portlet.User user)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |