|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.context.ExternalContext
org.apache.shale.test.mock.MockExternalContext
public class MockExternalContext
Mock implementation of ExternalContext.
| Field Summary | |
|---|---|
protected javax.servlet.http.HttpServletRequest |
request
|
protected javax.servlet.http.HttpServletResponse |
response
|
| Fields inherited from class javax.faces.context.ExternalContext |
|---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
| Constructor Summary | |
|---|---|
MockExternalContext(javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Construct a wrapper instance. |
|
| Method Summary | |
|---|---|
void |
addRequestCookieMap(javax.servlet.http.Cookie cookie)
Add a new cookie for this request. |
void |
addRequestParameterMap(java.lang.String key,
java.lang.String value)
Add the specified request parameter for this request. |
void |
dispatch(java.lang.String requestURI)
|
java.lang.String |
encodeActionURL(java.lang.String sb)
|
java.lang.String |
encodeNamespace(java.lang.String aValue)
|
java.lang.String |
encodeResourceURL(java.lang.String sb)
|
java.util.Map |
getApplicationMap()
|
java.lang.String |
getAuthType()
|
java.lang.Object |
getContext()
|
java.lang.String |
getInitParameter(java.lang.String name)
|
java.util.Map |
getInitParameterMap()
|
java.lang.String |
getRemoteUser()
|
java.lang.Object |
getRequest()
|
java.lang.String |
getRequestContextPath()
|
java.util.Map |
getRequestCookieMap()
|
java.util.Map |
getRequestHeaderMap()
|
java.util.Map |
getRequestHeaderValuesMap()
|
java.util.Locale |
getRequestLocale()
|
java.util.Iterator |
getRequestLocales()
|
java.util.Map |
getRequestMap()
|
java.util.Map |
getRequestParameterMap()
|
java.util.Iterator |
getRequestParameterNames()
|
java.util.Map |
getRequestParameterValuesMap()
|
java.lang.String |
getRequestPathInfo()
|
java.lang.String |
getRequestServletPath()
|
java.net.URL |
getResource(java.lang.String path)
|
java.io.InputStream |
getResourceAsStream(java.lang.String path)
|
java.util.Set |
getResourcePaths(java.lang.String path)
|
java.lang.Object |
getResponse()
|
java.lang.Object |
getSession(boolean create)
|
java.util.Map |
getSessionMap()
|
java.security.Principal |
getUserPrincipal()
|
boolean |
isUserInRole(java.lang.String role)
|
void |
log(java.lang.String message)
|
void |
log(java.lang.String message,
java.lang.Throwable throwable)
|
void |
redirect(java.lang.String requestURI)
|
void |
setRequestCookieMap(java.util.Map map)
Set the request cookie map for this request. |
void |
setRequestParameterMap(java.util.Map map)
Set the request parameter map for this request. |
| Methods inherited from class javax.faces.context.ExternalContext |
|---|
getRequestCharacterEncoding, getRequestContentType, getResponseCharacterEncoding, getResponseContentType, setRequest, setRequestCharacterEncoding, setResponse, setResponseCharacterEncoding |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected javax.servlet.http.HttpServletRequest request
protected javax.servlet.http.HttpServletResponse response
| Constructor Detail |
|---|
public MockExternalContext(javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Construct a wrapper instance.
context - ServletContext for this applicationrequest - HttpServetRequest for this requestresponse - HttpServletResponse for this request| Method Detail |
|---|
public void addRequestCookieMap(javax.servlet.http.Cookie cookie)
Add a new cookie for this request.
cookie - The new cookiepublic void setRequestCookieMap(java.util.Map map)
Set the request cookie map for this request.
map - The new request cookie map
public void addRequestParameterMap(java.lang.String key,
java.lang.String value)
Add the specified request parameter for this request.
key - Parameter namevalue - Parameter valuepublic void setRequestParameterMap(java.util.Map map)
Set the request parameter map for this request.
map - The new request parameter map
public void dispatch(java.lang.String requestURI)
throws java.io.IOException,
javax.faces.FacesException
dispatch in class javax.faces.context.ExternalContextjava.io.IOException
javax.faces.FacesExceptionpublic java.lang.String encodeActionURL(java.lang.String sb)
encodeActionURL in class javax.faces.context.ExternalContextpublic java.lang.String encodeNamespace(java.lang.String aValue)
encodeNamespace in class javax.faces.context.ExternalContextpublic java.lang.String encodeResourceURL(java.lang.String sb)
encodeResourceURL in class javax.faces.context.ExternalContextpublic java.util.Map getApplicationMap()
getApplicationMap in class javax.faces.context.ExternalContextpublic java.lang.String getAuthType()
getAuthType in class javax.faces.context.ExternalContextpublic java.lang.Object getContext()
getContext in class javax.faces.context.ExternalContextpublic java.lang.String getInitParameter(java.lang.String name)
getInitParameter in class javax.faces.context.ExternalContextpublic java.util.Map getInitParameterMap()
getInitParameterMap in class javax.faces.context.ExternalContextpublic java.lang.String getRemoteUser()
getRemoteUser in class javax.faces.context.ExternalContextpublic java.lang.Object getRequest()
getRequest in class javax.faces.context.ExternalContextpublic java.lang.String getRequestContextPath()
getRequestContextPath in class javax.faces.context.ExternalContextpublic java.util.Map getRequestCookieMap()
getRequestCookieMap in class javax.faces.context.ExternalContextpublic java.util.Map getRequestHeaderMap()
getRequestHeaderMap in class javax.faces.context.ExternalContextpublic java.util.Map getRequestHeaderValuesMap()
getRequestHeaderValuesMap in class javax.faces.context.ExternalContextpublic java.util.Locale getRequestLocale()
getRequestLocale in class javax.faces.context.ExternalContextpublic java.util.Iterator getRequestLocales()
getRequestLocales in class javax.faces.context.ExternalContextpublic java.util.Map getRequestMap()
getRequestMap in class javax.faces.context.ExternalContextpublic java.util.Map getRequestParameterMap()
getRequestParameterMap in class javax.faces.context.ExternalContextpublic java.util.Iterator getRequestParameterNames()
getRequestParameterNames in class javax.faces.context.ExternalContextpublic java.util.Map getRequestParameterValuesMap()
getRequestParameterValuesMap in class javax.faces.context.ExternalContextpublic java.lang.String getRequestPathInfo()
getRequestPathInfo in class javax.faces.context.ExternalContextpublic java.lang.String getRequestServletPath()
getRequestServletPath in class javax.faces.context.ExternalContext
public java.net.URL getResource(java.lang.String path)
throws java.net.MalformedURLException
getResource in class javax.faces.context.ExternalContextjava.net.MalformedURLExceptionpublic java.io.InputStream getResourceAsStream(java.lang.String path)
getResourceAsStream in class javax.faces.context.ExternalContextpublic java.util.Set getResourcePaths(java.lang.String path)
getResourcePaths in class javax.faces.context.ExternalContextpublic java.lang.Object getResponse()
getResponse in class javax.faces.context.ExternalContextpublic java.lang.Object getSession(boolean create)
getSession in class javax.faces.context.ExternalContextpublic java.util.Map getSessionMap()
getSessionMap in class javax.faces.context.ExternalContextpublic java.security.Principal getUserPrincipal()
getUserPrincipal in class javax.faces.context.ExternalContextpublic boolean isUserInRole(java.lang.String role)
isUserInRole in class javax.faces.context.ExternalContextpublic void log(java.lang.String message)
log in class javax.faces.context.ExternalContext
public void log(java.lang.String message,
java.lang.Throwable throwable)
log in class javax.faces.context.ExternalContext
public void redirect(java.lang.String requestURI)
throws java.io.IOException
redirect in class javax.faces.context.ExternalContextjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||