public class MockExternalContext extends javax.faces.context.ExternalContext
Constructor and Description |
---|
MockExternalContext() |
addResponseCookie, addResponseHeader, encodeBookmarkableURL, encodePartialActionURL, encodeRedirectURL, getApplicationContextPath, getClientWindow, getContextName, getFlash, getMimeType, getRealPath, getRequestCharacterEncoding, getRequestContentLength, getRequestContentType, getRequestScheme, getRequestServerName, getRequestServerPort, getResponseBufferSize, getResponseCharacterEncoding, getResponseContentType, getResponseOutputStream, getResponseOutputWriter, getSessionId, getSessionMaxInactiveInterval, invalidateSession, isResponseCommitted, isSecure, responseFlushBuffer, responseReset, responseSendError, setClientWindow, setRequest, setRequestCharacterEncoding, setResponse, setResponseBufferSize, setResponseCharacterEncoding, setResponseContentLength, setResponseContentType, setResponseHeader, setResponseStatus, setSessionMaxInactiveInterval
public MockExternalContext()
public void dispatch(String path) throws IOException
dispatch
in class javax.faces.context.ExternalContext
IOException
public String encodeActionURL(String url)
encodeActionURL
in class javax.faces.context.ExternalContext
public String encodeNamespace(String name)
encodeNamespace
in class javax.faces.context.ExternalContext
public String encodeResourceURL(String url)
encodeResourceURL
in class javax.faces.context.ExternalContext
public Map<String,Object> getApplicationMap()
getApplicationMap
in class javax.faces.context.ExternalContext
public String getAuthType()
getAuthType
in class javax.faces.context.ExternalContext
public Object getContext()
getContext
in class javax.faces.context.ExternalContext
public String getInitParameter(String name)
getInitParameter
in class javax.faces.context.ExternalContext
public Map getInitParameterMap()
getInitParameterMap
in class javax.faces.context.ExternalContext
public String getRemoteUser()
getRemoteUser
in class javax.faces.context.ExternalContext
public Object getRequest()
getRequest
in class javax.faces.context.ExternalContext
public String getRequestContextPath()
getRequestContextPath
in class javax.faces.context.ExternalContext
public Map<String,Object> getRequestCookieMap()
getRequestCookieMap
in class javax.faces.context.ExternalContext
public Map<String,String> getRequestHeaderMap()
getRequestHeaderMap
in class javax.faces.context.ExternalContext
public Map<String,String[]> getRequestHeaderValuesMap()
getRequestHeaderValuesMap
in class javax.faces.context.ExternalContext
public Locale getRequestLocale()
getRequestLocale
in class javax.faces.context.ExternalContext
public Iterator<Locale> getRequestLocales()
getRequestLocales
in class javax.faces.context.ExternalContext
public Map<String,Object> getRequestMap()
getRequestMap
in class javax.faces.context.ExternalContext
public Map<String,String> getRequestParameterMap()
getRequestParameterMap
in class javax.faces.context.ExternalContext
public Iterator<String> getRequestParameterNames()
getRequestParameterNames
in class javax.faces.context.ExternalContext
public Map<String,String[]> getRequestParameterValuesMap()
getRequestParameterValuesMap
in class javax.faces.context.ExternalContext
public String getRequestPathInfo()
getRequestPathInfo
in class javax.faces.context.ExternalContext
public String getRequestServletPath()
getRequestServletPath
in class javax.faces.context.ExternalContext
public URL getResource(String path) throws MalformedURLException
getResource
in class javax.faces.context.ExternalContext
MalformedURLException
public InputStream getResourceAsStream(String path)
getResourceAsStream
in class javax.faces.context.ExternalContext
public Set<String> getResourcePaths(String path)
getResourcePaths
in class javax.faces.context.ExternalContext
public Object getResponse()
getResponse
in class javax.faces.context.ExternalContext
public Object getSession(boolean create)
getSession
in class javax.faces.context.ExternalContext
public Map<String,Object> getSessionMap()
getSessionMap
in class javax.faces.context.ExternalContext
public Principal getUserPrincipal()
getUserPrincipal
in class javax.faces.context.ExternalContext
public boolean isUserInRole(String role)
isUserInRole
in class javax.faces.context.ExternalContext
public void log(String message, Throwable exception)
log
in class javax.faces.context.ExternalContext
public void redirect(String url) throws IOException
redirect
in class javax.faces.context.ExternalContext
IOException
Copyright © 2016 Nuxeo SA. All rights reserved.