public class RhnMockHttpServletRequest
extends com.mockobjects.servlet.MockHttpServletRequest
| Constructor and Description | 
|---|
| RhnMockHttpServletRequest()default constructor | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addAttribute(java.lang.String name,
            java.lang.Object value)Adds a new attribute the Request. | 
| void | addCookie(javax.servlet.http.Cookie cookie)Allows you to add a Cookie to the request to simulate receiving
 a cookie from the browser. | 
| java.lang.Object | getAttribute(java.lang.String name)Returns the attribute bound to the given name. | 
| java.lang.String | getCharacterEncoding() | 
| javax.servlet.http.Cookie[] | getCookies() | 
| java.lang.String | getHeader(java.lang.String name) | 
| java.util.Enumeration | getHeaderNames() | 
| java.util.Locale | getLocale() | 
| java.util.Enumeration | getLocales() | 
| java.lang.String | getMethod() | 
| java.lang.String | getParameter(java.lang.String paramName)Override to return 'null' if the requested param doesn't exist
 (Mock throws an AssertionError in this case :( | 
| java.util.Map | getParameterMap() | 
| java.lang.String | getRemoteUser() | 
| java.lang.StringBuffer | getRequestURL()Overrides the MockHttpServletRequest to actually return a value. | 
| int | getServerPort() | 
| boolean | isSecure() | 
| void | setAttribute(java.lang.String name,
            java.lang.Object value)Sets an attribute the Request. | 
| void | setCharacterEncoding(java.lang.String encodingIn) | 
| void | setLocale(java.util.Locale lcl)Set the primary locale of this Request. | 
| void | setLocales(java.util.List lcls)Set the list of Locales. | 
| void | setMethod(java.lang.String methodIn) | 
| void | setRequestURL(java.lang.String pathIn)Added the ability to specify a context path for testing. | 
| void | setupGetHeader(java.lang.String headerName,
              java.lang.String value)Add a GET header to the request. | 
| void | setupGetHeaderNames(java.util.Enumeration headerNamesIn)Header Names | 
| void | setupGetParameterMap(java.util.Map map) | 
| void | setupGetServerPort(int p)Sets the server port for this request. | 
| void | setupIsSecure(boolean s)Configures whether this request is secure. | 
addExpectedGetAttributeName, addExpectedSetAttribute, getAttributeNames, getAuthType, getContentLength, getContentType, getContextPath, getDateHeader, getHeaders, getInputStream, getIntHeader, getParameterNames, getParameterValues, getPathInfo, getPathTranslated, getProtocol, getQueryString, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequestDispatcher, getRequestedSessionId, getRequestURI, getScheme, getServerName, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole, removeAttribute, setContentType, setExpectedContentType, setExpectedCreateSession, setExpectedRequestDispatcherURI, setSession, setupAddHeader, setupAddParameter, setupAddParameter, setupGetAttribute, setupGetAttrubuteNames, setupGetContentType, setupGetContextPath, setupGetInputStream, setupGetMethod, setupGetParameterNames, setupGetProtocol, setupGetReader, setupGetRemoteAddr, setupGetRequestDispatcher, setupGetRequestURI, setupGetServletPath, setupGetUserPrincipal, setupPathInfo, setupQueryString, setupRemoveAttribute, setupScheme, setupServerNameassertEquals, assertEquals, assertTrue, fail, notImplemented, notYetImplemented, notYetImplemented, verifyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic java.lang.StringBuffer getRequestURL()
getRequestURL in interface javax.servlet.http.HttpServletRequestgetRequestURL in class com.mockobjects.servlet.MockHttpServletRequestpublic void setRequestURL(java.lang.String pathIn)
pathIn - Request url path.public java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface javax.servlet.ServletRequestgetAttribute in class com.mockobjects.servlet.MockHttpServletRequestname - Name of attribute whose value is sought.public void addAttribute(java.lang.String name,
                         java.lang.Object value)
name - attribute namevalue - attribute valuepublic void setAttribute(java.lang.String name,
                         java.lang.Object value)
setAttribute in interface javax.servlet.ServletRequestsetAttribute in class com.mockobjects.servlet.MockHttpServletRequestname - attribute namevalue - attribute valuepublic java.lang.String getHeader(java.lang.String name)
getHeader in interface javax.servlet.http.HttpServletRequestgetHeader in class com.mockobjects.servlet.MockHttpServletRequestpublic java.util.Enumeration getHeaderNames()
getHeaderNames in interface javax.servlet.http.HttpServletRequestgetHeaderNames in class com.mockobjects.servlet.MockHttpServletRequestpublic void setupGetHeaderNames(java.util.Enumeration headerNamesIn)
headerNamesIn - attribute headerNamespublic java.lang.String getParameter(java.lang.String paramName)
getParameter in interface javax.servlet.ServletRequestgetParameter in class com.mockobjects.servlet.MockHttpServletRequestparamName - name of param to look uppublic java.util.Map getParameterMap()
getParameterMap in interface javax.servlet.ServletRequestgetParameterMap in class com.mockobjects.servlet.MockHttpServletRequestpublic void setupGetParameterMap(java.util.Map map)
setupGetParameterMap in class com.mockobjects.servlet.MockHttpServletRequestpublic java.util.Locale getLocale()
getLocale in interface javax.servlet.ServletRequestgetLocale in class com.mockobjects.servlet.MockHttpServletRequestpublic void setLocale(java.util.Locale lcl)
lcl - The primary Local of this Request.public void setLocales(java.util.List lcls)
lcls - List of Locales.public java.util.Enumeration getLocales()
getLocales in interface javax.servlet.ServletRequestgetLocales in class com.mockobjects.servlet.MockHttpServletRequestpublic void addCookie(javax.servlet.http.Cookie cookie)
cookie - Cookie to added.public javax.servlet.http.Cookie[] getCookies()
getCookies in interface javax.servlet.http.HttpServletRequestgetCookies in class com.mockobjects.servlet.MockHttpServletRequestpublic int getServerPort()
getServerPort in interface javax.servlet.ServletRequestgetServerPort in class com.mockobjects.servlet.MockHttpServletRequestpublic void setupGetServerPort(int p)
p - Portpublic void setupGetHeader(java.lang.String headerName,
                           java.lang.String value)
headerName - name of header to be addedvalue - value of header to be added.public void setupIsSecure(boolean s)
s - Flag indicating whether request is secure.public boolean isSecure()
isSecure in interface javax.servlet.ServletRequestisSecure in class com.mockobjects.servlet.MockHttpServletRequestpublic java.lang.String getCharacterEncoding()
getCharacterEncoding in interface javax.servlet.ServletRequestgetCharacterEncoding in class com.mockobjects.servlet.MockHttpServletRequestpublic void setCharacterEncoding(java.lang.String encodingIn)
setCharacterEncoding in interface javax.servlet.ServletRequestsetCharacterEncoding in class com.mockobjects.servlet.MockHttpServletRequestpublic java.lang.String getMethod()
getMethod in interface javax.servlet.http.HttpServletRequestgetMethod in class com.mockobjects.servlet.MockHttpServletRequestpublic void setMethod(java.lang.String methodIn)
methodIn - The method to set.public java.lang.String getRemoteUser()
getRemoteUser in interface javax.servlet.http.HttpServletRequestgetRemoteUser in class com.mockobjects.servlet.MockHttpServletRequest