org.fcrepo.server.security.servletfilters
Class ExtendedHttpServletRequestWrapper

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by javax.servlet.http.HttpServletRequestWrapper
          extended by org.fcrepo.server.security.servletfilters.ExtendedHttpServletRequestWrapper
All Implemented Interfaces:
javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest, ExtendedHttpServletRequest

public class ExtendedHttpServletRequestWrapper
extends javax.servlet.http.HttpServletRequestWrapper
implements ExtendedHttpServletRequest

Author:
Bill Niebel

Field Summary
static String AUTHORIZATION
           
static String BASIC
           
static String FROM
           
 
Fields inherited from interface org.fcrepo.server.security.servletfilters.ExtendedHttpServletRequest
FAILED, IMMUTABLE_NULL_SET, SUCCEEDED
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
ExtendedHttpServletRequestWrapper(javax.servlet.http.HttpServletRequest wrappedRequest)
           
 
Method Summary
 void addAttributes(String authority, Map attributes)
           
 void audit()
           
 void auditInnerMap(Map map)
           
 void auditInnerSet(Set set)
           
 void auditOuterMap(Map map, String desc)
           
 Map getAllAttributes()
           
 boolean getAttributeDefined(String key)
           
 Set getAttributeValues(String key)
           
 String getAuthority()
           
 String getAuthorizationHeader()
           
 String getFromHeader()
           
 String getPassword()
           
 String getRealPath(String path)
          Deprecated. As of Version 2.1 of the Java Servlet API, use ServletContext.getRealPath(java.lang.String).
 String getRemoteUser()
           
 String getUser()
           
 Principal getUserPrincipal()
           
 boolean hasAttributeValues(String key)
           
 boolean isAttributeDefined(String key)
           
 boolean isAuthenticated()
           
 boolean isRequestedSessionIdFromUrl()
          Deprecated. As of Version 2.1 of the Java Servlet API, use HttpServletRequestWrapper.isRequestedSessionIdFromURL().
 boolean isSecure()
           
protected  boolean isSponsoredUserRequested()
           
 boolean isUserSponsored()
           
 void lockSponsoredUser()
           
 void lockWrapper()
           
 void setAuthenticated(Principal userPrincipal, String authority)
           
 void setSponsoredUser()
           
 
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
 
Methods inherited from class javax.servlet.ServletRequestWrapper
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, removeAttribute, setAttribute, 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, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
 
Methods inherited from interface javax.servlet.ServletRequest
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, removeAttribute, setAttribute, setCharacterEncoding
 

Field Detail

BASIC

public static final String BASIC
See Also:
Constant Field Values

AUTHORIZATION

public static final String AUTHORIZATION
See Also:
Constant Field Values

FROM

public static final String FROM
See Also:
Constant Field Values
Constructor Detail

ExtendedHttpServletRequestWrapper

public ExtendedHttpServletRequestWrapper(javax.servlet.http.HttpServletRequest wrappedRequest)
                                  throws Exception
Throws:
Exception
Method Detail

lockWrapper

public final void lockWrapper()
                       throws Exception
Specified by:
lockWrapper in interface ExtendedHttpServletRequest
Throws:
Exception

setSponsoredUser

public void setSponsoredUser()
                      throws Exception
Specified by:
setSponsoredUser in interface ExtendedHttpServletRequest
Throws:
Exception

lockSponsoredUser

public void lockSponsoredUser()
                       throws Exception
Specified by:
lockSponsoredUser in interface ExtendedHttpServletRequest
Throws:
Exception

setAuthenticated

public void setAuthenticated(Principal userPrincipal,
                             String authority)
                      throws Exception
Specified by:
setAuthenticated in interface ExtendedHttpServletRequest
Throws:
Exception

getUserPrincipal

public Principal getUserPrincipal()
Specified by:
getUserPrincipal in interface javax.servlet.http.HttpServletRequest
Overrides:
getUserPrincipal in class javax.servlet.http.HttpServletRequestWrapper

isUserSponsored

public final boolean isUserSponsored()
Specified by:
isUserSponsored in interface ExtendedHttpServletRequest

isSponsoredUserRequested

protected boolean isSponsoredUserRequested()

isAuthenticated

public final boolean isAuthenticated()
Specified by:
isAuthenticated in interface ExtendedHttpServletRequest

getRemoteUser

public String getRemoteUser()
Specified by:
getRemoteUser in interface javax.servlet.http.HttpServletRequest
Overrides:
getRemoteUser in class javax.servlet.http.HttpServletRequestWrapper

auditInnerMap

public final void auditInnerMap(Map map)

auditInnerSet

public final void auditInnerSet(Set set)

auditOuterMap

public final void auditOuterMap(Map map,
                                String desc)

audit

public void audit()
Specified by:
audit in interface ExtendedHttpServletRequest

getAttributeDefined

public boolean getAttributeDefined(String key)
                            throws AuthzOperationalException
Throws:
AuthzOperationalException

getAttributeValues

public Set getAttributeValues(String key)
                       throws AuthzOperationalException
Specified by:
getAttributeValues in interface ExtendedHttpServletRequest
Throws:
AuthzOperationalException

hasAttributeValues

public boolean hasAttributeValues(String key)
                           throws AuthzOperationalException
Specified by:
hasAttributeValues in interface ExtendedHttpServletRequest
Throws:
AuthzOperationalException

isAttributeDefined

public boolean isAttributeDefined(String key)
                           throws AuthzOperationalException
Specified by:
isAttributeDefined in interface ExtendedHttpServletRequest
Throws:
AuthzOperationalException

addAttributes

public void addAttributes(String authority,
                          Map attributes)
                   throws Exception
Specified by:
addAttributes in interface ExtendedHttpServletRequest
Throws:
Exception

getAllAttributes

public Map getAllAttributes()
                     throws AuthzOperationalException
Specified by:
getAllAttributes in interface ExtendedHttpServletRequest
Throws:
AuthzOperationalException

getAuthorizationHeader

public final String getAuthorizationHeader()

getFromHeader

public final String getFromHeader()
Specified by:
getFromHeader in interface ExtendedHttpServletRequest

getUser

public final String getUser()
                     throws Exception
Specified by:
getUser in interface ExtendedHttpServletRequest
Throws:
Exception

getPassword

public final String getPassword()
                         throws Exception
Specified by:
getPassword in interface ExtendedHttpServletRequest
Throws:
Exception

getAuthority

public final String getAuthority()
Specified by:
getAuthority in interface ExtendedHttpServletRequest

getRealPath

@Deprecated
public String getRealPath(String path)
Deprecated. As of Version 2.1 of the Java Servlet API, use ServletContext.getRealPath(java.lang.String).

Specified by:
getRealPath in interface javax.servlet.ServletRequest
Overrides:
getRealPath in class javax.servlet.ServletRequestWrapper

isRequestedSessionIdFromUrl

@Deprecated
public boolean isRequestedSessionIdFromUrl()
Deprecated. As of Version 2.1 of the Java Servlet API, use HttpServletRequestWrapper.isRequestedSessionIdFromURL().

Specified by:
isRequestedSessionIdFromUrl in interface javax.servlet.http.HttpServletRequest
Overrides:
isRequestedSessionIdFromUrl in class javax.servlet.http.HttpServletRequestWrapper

isSecure

public boolean isSecure()
Specified by:
isSecure in interface javax.servlet.ServletRequest
Overrides:
isSecure in class javax.servlet.ServletRequestWrapper


Copyright © 2011 DuraSpace. All Rights Reserved.