public class MockWebRequest
extends org.apache.wicket.request.http.WebRequest
WebRequest.| Constructor and Description |
|---|
MockWebRequest(org.apache.wicket.request.Url url)
Construct.
|
MockWebRequest(org.apache.wicket.request.Url url,
String contextPath,
String filterPath,
String prefixToContextPath)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCookie(javax.servlet.http.Cookie cookie) |
void |
addDateHeader(String name,
org.apache.wicket.util.time.Time value)
Adds date header for given name.
|
void |
addHeader(String name,
String value)
Adds header for given name.
|
MockWebRequest |
cloneWithUrl(org.apache.wicket.request.Url url) |
Charset |
getCharset() |
org.apache.wicket.request.Url |
getClientUrl() |
Object |
getContainerRequest() |
String |
getContextPath() |
List<javax.servlet.http.Cookie> |
getCookies() |
org.apache.wicket.util.time.Time |
getDateHeader(String name) |
String |
getFilterPath() |
String |
getHeader(String name) |
List<String> |
getHeaders(String name) |
Locale |
getLocale() |
MockRequestParameters |
getPostParameters() |
String |
getPrefixToContextPath() |
org.apache.wicket.request.Url |
getUrl() |
void |
removeHeader(String header)
Removes header with specified name.
|
MockWebRequest |
setContextPath(String contextPath) |
void |
setCookies(List<javax.servlet.http.Cookie> cookies)
Sets cookies for current request.
|
void |
setDateHeader(String name,
org.apache.wicket.util.time.Time value)
Sets date header for given name.
|
MockWebRequest |
setFilterPath(String filterPath) |
void |
setHeader(String name,
String value)
Sets header for given name.
|
void |
setLocale(Locale locale)
Sets request locale.
|
MockWebRequest |
setPrefixToContextPath(String prefixToContextPath) |
void |
setUrl(org.apache.wicket.request.Url url) |
String |
toString() |
getCookie, getIfModifiedSinceHeader, isAjax, shouldPreserveClientUrlpublic MockWebRequest(org.apache.wicket.request.Url url)
url - public MockWebRequest cloneWithUrl(org.apache.wicket.request.Url url)
cloneWithUrl in class org.apache.wicket.request.http.WebRequestpublic void setUrl(org.apache.wicket.request.Url url)
url - public org.apache.wicket.request.Url getUrl()
getUrl in class org.apache.wicket.request.Requestpublic void setCookies(List<javax.servlet.http.Cookie> cookies)
cookies - public void addCookie(javax.servlet.http.Cookie cookie)
cookie - public List<javax.servlet.http.Cookie> getCookies()
getCookies in class org.apache.wicket.request.http.WebRequestpublic org.apache.wicket.util.time.Time getDateHeader(String name)
getDateHeader in class org.apache.wicket.request.http.WebRequestpublic void setDateHeader(String name, org.apache.wicket.util.time.Time value)
name - value - public void addDateHeader(String name, org.apache.wicket.util.time.Time value)
name - value - public String getHeader(String name)
getHeader in class org.apache.wicket.request.http.WebRequestpublic void setHeader(String name, String value)
name - value - public void addHeader(String name, String value)
name - value - public void setLocale(Locale locale)
locale - public Locale getLocale()
getLocale in class org.apache.wicket.request.Requestpublic List<String> getHeaders(String name)
getHeaders in class org.apache.wicket.request.http.WebRequestpublic void removeHeader(String header)
header - public MockRequestParameters getPostParameters()
getPostParameters in class org.apache.wicket.request.Requestpublic Charset getCharset()
getCharset in class org.apache.wicket.request.Requestpublic org.apache.wicket.request.Url getClientUrl()
getClientUrl in class org.apache.wicket.request.Requestpublic Object getContainerRequest()
getContainerRequest in class org.apache.wicket.request.Requestpublic String getContextPath()
getContextPath in class org.apache.wicket.request.Requestpublic MockWebRequest setContextPath(String contextPath)
contextPath - public String getFilterPath()
getFilterPath in class org.apache.wicket.request.Requestpublic MockWebRequest setFilterPath(String filterPath)
filterPath - public String getPrefixToContextPath()
getPrefixToContextPath in class org.apache.wicket.request.Requestpublic MockWebRequest setPrefixToContextPath(String prefixToContextPath)
prefixToContextPath - Copyright © 2006–2018 Apache Software Foundation. All rights reserved.