public class ParserWebContextImpl extends AbstractWebContextWrapper implements ParserWebContext
DEFAULT_CHARSET_ENCODING, UPLOAD_FAILED, UPLOAD_SIZE_LIMIT_EXCEEDED, URL_CASE_FOLDING_LOWER, URL_CASE_FOLDING_LOWER_WITH_UNDERSCORES, URL_CASE_FOLDING_NONE, URL_CASE_FOLDING_UPPER, URL_CASE_FOLDING_UPPER_WITH_UNDERSCORESREQUEST_ATTRIBUTE_FROM_WEBCONTEXT| Constructor and Description |
|---|
ParserWebContextImpl(WebContext wrappedContext)
包装一个
RequestContext对象。 |
| Modifier and Type | Method and Description |
|---|---|
String |
convertCase(String str)
将指定的字符串根据
getCaseFolding()的设置,转换成指定大小写形式。 |
String |
getCaseFolding()
按照指定的风格转换parameters和cookies的名称,默认为“小写加下划线”。
|
CookieParser |
getCookies()
取得所有cookie。第一次执行此方法时,将会解析request,从中取得所有cookies。
|
String |
getHtmlFieldSuffix()
取得代表HTML字段的后缀。
|
ParameterParser |
getParameters()
取得所有query参数。第一次执行此方法时,将会解析request,从中取得所有的参数。
|
org.springframework.beans.PropertyEditorRegistrar |
getPropertyEditorRegistrar()
取得用来转换参数类型的propertyEditor注册器。
|
UploadService |
getUploadService()
返回上传服务
|
String |
getURIEncoding()
当
useServletEngineParser==false并且
useBodyEncodingForURI=false时,用该编码来解释GET请求的参数。 |
boolean |
isAutoUpload()
是否自动执行Upload。
|
boolean |
isConverterQuiet()
类型转换出现异常时,是否不报错,而是返回默认值。
|
boolean |
isEmptyToNull() |
boolean |
isTrimming()
是否对输入参数进行trimming。默认为
true。 |
boolean |
isUnescapeParameters()
是否对参数进行HTML entities解码,默认为
false。 |
boolean |
isUseBodyEncodingForURI()
是否以request.setCharacterEncoding所指定的编码来解析query,默认为
true。 |
boolean |
isUseServletEngineParser()
是否使用servlet引擎的parser,默认为
false。 |
void |
setAutoUpload(boolean autoUpload)
是否自动执行Upload。
|
void |
setCaseFolding(String folding)
按照指定的风格转换parameters和cookies的名称,默认为“小写加下划线”。
|
void |
setConverterQuiet(boolean converterQuiet)
设置类型转换出现异常时,是否不报错,而是返回默认值。
|
void |
setEmptyToNull(boolean emptyToNull) |
void |
setHtmlFieldSuffix(String htmlFieldSuffix)
设置代表HTML字段的后缀。
|
void |
setParameterParserFilters(ParameterParserFilter[] filters)
设置用于过滤参数的filters。
|
void |
setPropertyEditorRegistrar(org.springframework.beans.PropertyEditorRegistrar propertyEditorRegistrar)
设置用来转换参数类型的propertyEditor注册器。
|
void |
setTrimming(boolean trimming)
是否对输入参数进行trimming。默认为
true。 |
void |
setUnescapeParameters(boolean unescapeParameters)
是否对参数进行HTML entities解码,默认为
false。 |
void |
setUploadService(UploadService upload)
设置upload service。
|
void |
setURIEncoding(String uriEncoding)
当
useServletEngineParser==false并且
useBodyEncodingForURI=false时,用该编码来解释GET请求的参数。 |
void |
setUseBodyEncodingForURI(boolean useBodyEncodingForURI)
是否以request.setCharacterEncoding所指定的编码来解析query,默认为
true。 |
void |
setUseServletEngineParser(boolean useServletEngineParser)
是否使用servlet引擎的parser,默认为
false。 |
exist, existFromWrapperContext, get, getFromWrapperContext, getObject, getRequest, getResponse, getServletContext, getWrappedWebContext, getWrappedWebContext, init, isRequestFinished, putSubWebContext, setObject, setRequest, setResponse, setServletContextclear, clearSubContext, contain, containNodeMap, createSubContext, existNodeMap, findNodeMap, getInSubContext, getItemMap, getParent, getSubContext, getSubContextMap, getTotalContext, getTotalItemMap, put, putContext, putSubContext, remove, removeSubContext, renameKey, renameKeyNodeMap, setParentget, put, putAll, remove, setItemMap, sizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetObject, getRequest, getResponse, getServletContext, getWrappedWebContext, init, isRequestFinished, setObject, setRequest, setResponse, setServletContextclearSubContext, createSubContext, getInSubContext, getItemMap, getParent, getSubContext, getSubContextMap, getTotalItemMap, put, putSubContext, remove, removeSubContext, setParentpublic ParserWebContextImpl(WebContext wrappedContext)
RequestContext对象。wrappedContext - 被包装的RequestContextpublic org.springframework.beans.PropertyEditorRegistrar getPropertyEditorRegistrar()
getPropertyEditorRegistrar in interface ParserWebContextpublic void setPropertyEditorRegistrar(org.springframework.beans.PropertyEditorRegistrar propertyEditorRegistrar)
public boolean isConverterQuiet()
isConverterQuiet in interface ParserWebContextpublic void setConverterQuiet(boolean converterQuiet)
public boolean isAutoUpload()
isAutoUpload in interface ParserWebContextpublic void setAutoUpload(boolean autoUpload)
public String getCaseFolding()
getCaseFolding in interface ParserWebContextpublic void setCaseFolding(String folding)
public boolean isUnescapeParameters()
false。isUnescapeParameters in interface ParserWebContextpublic void setUnescapeParameters(boolean unescapeParameters)
false。public boolean isUseServletEngineParser()
false。isUseServletEngineParser in interface ParserWebContextpublic void setUseServletEngineParser(boolean useServletEngineParser)
false。public boolean isUseBodyEncodingForURI()
true。isUseBodyEncodingForURI in interface ParserWebContextpublic void setUseBodyEncodingForURI(boolean useBodyEncodingForURI)
true。public String getURIEncoding()
useServletEngineParser==false并且
useBodyEncodingForURI=false时,用该编码来解释GET请求的参数。getURIEncoding in interface ParserWebContextpublic void setURIEncoding(String uriEncoding)
useServletEngineParser==false并且
useBodyEncodingForURI=false时,用该编码来解释GET请求的参数。public boolean isTrimming()
true。isTrimming in interface ParserWebContextpublic void setTrimming(boolean trimming)
true。public boolean isEmptyToNull()
public void setEmptyToNull(boolean emptyToNull)
public void setParameterParserFilters(ParameterParserFilter[] filters)
public String getHtmlFieldSuffix()
getHtmlFieldSuffix in interface ParserWebContextpublic void setHtmlFieldSuffix(String htmlFieldSuffix)
public ParameterParser getParameters()
getParameters in interface ParserWebContextParameterParser实例public CookieParser getCookies()
getCookies in interface ParserWebContextCookieParser实例public String convertCase(String str)
getCaseFolding()的设置,转换成指定大小写形式。convertCase in interface ParserWebContextstr - 要转换的字符串public UploadService getUploadService()
ParserWebContextgetUploadService in interface ParserWebContextpublic void setUploadService(UploadService upload)
upload - UploadService对象Copyright © 2006–2018 TinyGroup. All rights reserved.