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_UNDERSCORES
REQUEST_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, setServletContext
clear, clearSubContext, contain, containNodeMap, createSubContext, existNodeMap, findNodeMap, getInSubContext, getItemMap, getParent, getSubContext, getSubContextMap, getTotalContext, getTotalItemMap, put, putContext, putSubContext, remove, removeSubContext, renameKey, renameKeyNodeMap, setParent
get, put, putAll, remove, setItemMap, size
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getObject, getRequest, getResponse, getServletContext, getWrappedWebContext, init, isRequestFinished, setObject, setRequest, setResponse, setServletContext
clearSubContext, createSubContext, getInSubContext, getItemMap, getParent, getSubContext, getSubContextMap, getTotalItemMap, put, putSubContext, remove, removeSubContext, setParent
public ParserWebContextImpl(WebContext wrappedContext)
RequestContext
对象。wrappedContext
- 被包装的RequestContext
public org.springframework.beans.PropertyEditorRegistrar getPropertyEditorRegistrar()
getPropertyEditorRegistrar
in interface ParserWebContext
public void setPropertyEditorRegistrar(org.springframework.beans.PropertyEditorRegistrar propertyEditorRegistrar)
public boolean isConverterQuiet()
isConverterQuiet
in interface ParserWebContext
public void setConverterQuiet(boolean converterQuiet)
public boolean isAutoUpload()
isAutoUpload
in interface ParserWebContext
public void setAutoUpload(boolean autoUpload)
public String getCaseFolding()
getCaseFolding
in interface ParserWebContext
public void setCaseFolding(String folding)
public boolean isUnescapeParameters()
false
。isUnescapeParameters
in interface ParserWebContext
public void setUnescapeParameters(boolean unescapeParameters)
false
。public boolean isUseServletEngineParser()
false
。isUseServletEngineParser
in interface ParserWebContext
public void setUseServletEngineParser(boolean useServletEngineParser)
false
。public boolean isUseBodyEncodingForURI()
true
。isUseBodyEncodingForURI
in interface ParserWebContext
public void setUseBodyEncodingForURI(boolean useBodyEncodingForURI)
true
。public String getURIEncoding()
useServletEngineParser==false
并且
useBodyEncodingForURI=false
时,用该编码来解释GET请求的参数。getURIEncoding
in interface ParserWebContext
public void setURIEncoding(String uriEncoding)
useServletEngineParser==false
并且
useBodyEncodingForURI=false
时,用该编码来解释GET请求的参数。public boolean isTrimming()
true
。isTrimming
in interface ParserWebContext
public void setTrimming(boolean trimming)
true
。public boolean isEmptyToNull()
public void setEmptyToNull(boolean emptyToNull)
public void setParameterParserFilters(ParameterParserFilter[] filters)
public String getHtmlFieldSuffix()
getHtmlFieldSuffix
in interface ParserWebContext
public void setHtmlFieldSuffix(String htmlFieldSuffix)
public ParameterParser getParameters()
getParameters
in interface ParserWebContext
ParameterParser
实例public CookieParser getCookies()
getCookies
in interface ParserWebContext
CookieParser
实例public String convertCase(String str)
getCaseFolding()
的设置,转换成指定大小写形式。convertCase
in interface ParserWebContext
str
- 要转换的字符串public UploadService getUploadService()
ParserWebContext
getUploadService
in interface ParserWebContext
public void setUploadService(UploadService upload)
upload
- UploadService
对象Copyright © 2006–2018 TinyGroup. All rights reserved.