public class RelaxedDataBinder extends DataBinder
RelaxedNames
DEFAULT_AUTO_GROW_COLLECTION_LIMIT, DEFAULT_OBJECT_NAME, logger
Constructor and Description |
---|
RelaxedDataBinder(Object target)
Create a new
RelaxedDataBinder instance. |
RelaxedDataBinder(Object target,
String namePrefix)
Create a new
RelaxedDataBinder instance. |
Modifier and Type | Method and Description |
---|---|
protected AbstractPropertyBindingResult |
createBeanPropertyBindingResult() |
protected void |
doBind(MutablePropertyValues propertyValues) |
protected String |
normalizePath(BeanWrapper wrapper,
String path)
Normalize a bean property path to a format understood by a BeanWrapper.
|
void |
setIgnoreNestedProperties(boolean ignoreNestedProperties)
Flag to disable binding of nested properties (i.e.
|
void |
setNameAliases(Map<String,List<String>> aliases)
Set name aliases.
|
RelaxedDataBinder |
withAlias(String name,
String... alias)
Add aliases to the
DataBinder . |
addCustomFormatter, addCustomFormatter, addCustomFormatter, addValidators, applyPropertyValues, bind, checkAllowedFields, checkRequiredFields, close, convertIfNecessary, convertIfNecessary, convertIfNecessary, createDirectFieldBindingResult, findCustomEditor, getAllowedFields, getAutoGrowCollectionLimit, getBindingErrorProcessor, getBindingResult, getConversionService, getDisallowedFields, getInternalBindingResult, getObjectName, getPropertyAccessor, getPropertyEditorRegistry, getRequiredFields, getSimpleTypeConverter, getTarget, getTypeConverter, getValidator, getValidators, initBeanPropertyAccess, initDirectFieldAccess, isAllowed, isAutoGrowNestedPaths, isIgnoreInvalidFields, isIgnoreUnknownFields, registerCustomEditor, registerCustomEditor, replaceValidators, setAllowedFields, setAutoGrowCollectionLimit, setAutoGrowNestedPaths, setBindingErrorProcessor, setConversionService, setDisallowedFields, setExtractOldValueForEditor, setIgnoreInvalidFields, setIgnoreUnknownFields, setMessageCodesResolver, setRequiredFields, setValidator, validate, validate
public RelaxedDataBinder(Object target)
RelaxedDataBinder
instance.target
- the target into which properties are boundpublic RelaxedDataBinder(Object target, String namePrefix)
RelaxedDataBinder
instance.target
- the target into which properties are boundnamePrefix
- An optional prefix to be used when reading propertiespublic void setIgnoreNestedProperties(boolean ignoreNestedProperties)
ignoreNestedProperties
- the flag to set (default false)public void setNameAliases(Map<String,List<String>> aliases)
aliases
- a map of property name to aliasespublic RelaxedDataBinder withAlias(String name, String... alias)
DataBinder
.name
- the property name to aliasalias
- aliases for the property namesprotected void doBind(MutablePropertyValues propertyValues)
doBind
in class DataBinder
protected String normalizePath(BeanWrapper wrapper, String path)
wrapper
- a bean wrapper for the object to bindpath
- the bean path to bindprotected AbstractPropertyBindingResult createBeanPropertyBindingResult()
createBeanPropertyBindingResult
in class DataBinder
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.