org.jasig.portal.channels.portlet
Class PortletHttpServletRequestWrapper

java.lang.Object
  extended by org.jasig.portal.url.AbstractHttpServletRequestWrapper
      extended by org.jasig.portal.channels.portlet.PortletHttpServletRequestWrapper
All Implemented Interfaces:
HttpServletRequest, ServletRequest

public class PortletHttpServletRequestWrapper
extends AbstractHttpServletRequestWrapper

Scopes set request attributes to just this request. Attribute retrieval methods fall through to the parent request on a miss. Only the scoped attribute names are enumerated by AbstractHttpServletRequestWrapper.getAttributeNames()

Version:
$Revision$
Author:
Eric Dalquist

Field Summary
static String ATTRIBUTE__HTTP_SERVLET_REQUEST
          HttpServletRequest attribute that this HttpServletRequest object will be available.
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
PortletHttpServletRequestWrapper(HttpServletRequest httpServletRequest, Map<String,List<String>> parameters, IPerson person, List<org.apache.pluto.descriptors.common.SecurityRoleRefDD> securityRoleRefs)
           
 
Method Summary
 boolean equals(Object object)
           
 Object getAttribute(String name)
           
 String getParameter(String name)
           
 Map<String,String[]> getParameterMap()
           
 Enumeration<String> getParameterNames()
           
 String[] getParameterValues(String name)
           
 int hashCode()
           
 boolean isUserInRole(String role)
          Determines whether or not the user is in the given role.
 String toString()
           
 
Methods inherited from class org.jasig.portal.url.AbstractHttpServletRequestWrapper
getAttributeNames, getAuthType, getCharacterEncoding, getContentLength, getContentType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getInputStream, getIntHeader, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getMethod, getPathInfo, getPathTranslated, getProtocol, getQueryString, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRemoteUser, getRequestDispatcher, getRequestedSessionId, getRequestURI, getRequestURL, getScheme, getServerName, getServerPort, getServletPath, getSession, getSession, getUserPrincipal, getWrappedRequest, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isSecure, removeAttribute, setAttribute, setCharacterEncoding
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTRIBUTE__HTTP_SERVLET_REQUEST

public static final String ATTRIBUTE__HTTP_SERVLET_REQUEST
HttpServletRequest attribute that this HttpServletRequest object will be available.

Constructor Detail

PortletHttpServletRequestWrapper

public PortletHttpServletRequestWrapper(HttpServletRequest httpServletRequest,
                                        Map<String,List<String>> parameters,
                                        IPerson person,
                                        List<org.apache.pluto.descriptors.common.SecurityRoleRefDD> securityRoleRefs)
Method Detail

getAttribute

public Object getAttribute(String name)
Specified by:
getAttribute in interface ServletRequest
Overrides:
getAttribute in class AbstractHttpServletRequestWrapper

getParameter

public String getParameter(String name)
Specified by:
getParameter in interface ServletRequest
Overrides:
getParameter in class AbstractHttpServletRequestWrapper

getParameterMap

public Map<String,String[]> getParameterMap()
Specified by:
getParameterMap in interface ServletRequest
Overrides:
getParameterMap in class AbstractHttpServletRequestWrapper

getParameterNames

public Enumeration<String> getParameterNames()
Specified by:
getParameterNames in interface ServletRequest
Overrides:
getParameterNames in class AbstractHttpServletRequestWrapper

getParameterValues

public String[] getParameterValues(String name)
Specified by:
getParameterValues in interface ServletRequest
Overrides:
getParameterValues in class AbstractHttpServletRequestWrapper

isUserInRole

public boolean isUserInRole(String role)
Determines whether or not the user is in the given role. The wrapped request is consulted first then the GroupService is used to determine if a group exists for the specified role link and if the user is a member of it. This assumes the parent request will check the role directly

Specified by:
isUserInRole in interface HttpServletRequest
Overrides:
isUserInRole in class AbstractHttpServletRequestWrapper
See Also:
HttpServletRequestWrapper.isUserInRole(java.lang.String)

equals

public boolean equals(Object object)
Overrides:
equals in class Object
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2010 Jasig. All Rights Reserved.