Java Code Examples for org.springframework.beans.PropertyAccessorUtils#canonicalPropertyName()
The following examples show how to use
org.springframework.beans.PropertyAccessorUtils#canonicalPropertyName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DataBinder.java From spring-analysis-note with MIT License | 5 votes |
/** * Check the given property values against the allowed fields, * removing values for fields that are not allowed. * @param mpvs the property values to be bound (can be modified) * @see #getAllowedFields * @see #isAllowed(String) */ protected void checkAllowedFields(MutablePropertyValues mpvs) { PropertyValue[] pvs = mpvs.getPropertyValues(); for (PropertyValue pv : pvs) { String field = PropertyAccessorUtils.canonicalPropertyName(pv.getName()); if (!isAllowed(field)) { mpvs.removePropertyValue(pv); getBindingResult().recordSuppressedField(field); if (logger.isDebugEnabled()) { logger.debug("Field [" + field + "] has been removed from PropertyValues " + "and will not be bound, because it has not been found in the list of allowed fields"); } } } }
Example 2
Source File: DataBinder.java From java-technology-stack with MIT License | 5 votes |
/** * Check the given property values against the allowed fields, * removing values for fields that are not allowed. * @param mpvs the property values to be bound (can be modified) * @see #getAllowedFields * @see #isAllowed(String) */ protected void checkAllowedFields(MutablePropertyValues mpvs) { PropertyValue[] pvs = mpvs.getPropertyValues(); for (PropertyValue pv : pvs) { String field = PropertyAccessorUtils.canonicalPropertyName(pv.getName()); if (!isAllowed(field)) { mpvs.removePropertyValue(pv); getBindingResult().recordSuppressedField(field); if (logger.isDebugEnabled()) { logger.debug("Field [" + field + "] has been removed from PropertyValues " + "and will not be bound, because it has not been found in the list of allowed fields"); } } } }
Example 3
Source File: DataBinder.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Check the given property values against the allowed fields, * removing values for fields that are not allowed. * @param mpvs the property values to be bound (can be modified) * @see #getAllowedFields * @see #isAllowed(String) */ protected void checkAllowedFields(MutablePropertyValues mpvs) { PropertyValue[] pvs = mpvs.getPropertyValues(); for (PropertyValue pv : pvs) { String field = PropertyAccessorUtils.canonicalPropertyName(pv.getName()); if (!isAllowed(field)) { mpvs.removePropertyValue(pv); getBindingResult().recordSuppressedField(field); if (logger.isDebugEnabled()) { logger.debug("Field [" + field + "] has been removed from PropertyValues " + "and will not be bound, because it has not been found in the list of allowed fields"); } } } }
Example 4
Source File: DataBinder.java From spring4-understanding with Apache License 2.0 | 5 votes |
/** * Check the given property values against the allowed fields, * removing values for fields that are not allowed. * @param mpvs the property values to be bound (can be modified) * @see #getAllowedFields * @see #isAllowed(String) */ protected void checkAllowedFields(MutablePropertyValues mpvs) { PropertyValue[] pvs = mpvs.getPropertyValues(); for (PropertyValue pv : pvs) { String field = PropertyAccessorUtils.canonicalPropertyName(pv.getName()); if (!isAllowed(field)) { mpvs.removePropertyValue(pv); getBindingResult().recordSuppressedField(field); if (logger.isDebugEnabled()) { logger.debug("Field [" + field + "] has been removed from PropertyValues " + "and will not be bound, because it has not been found in the list of allowed fields"); } } } }
Example 5
Source File: AbstractPropertyBindingResult.java From spring-analysis-note with MIT License | 4 votes |
/** * Returns the canonical property name. * @see org.springframework.beans.PropertyAccessorUtils#canonicalPropertyName */ @Override protected String canonicalFieldName(String field) { return PropertyAccessorUtils.canonicalPropertyName(field); }
Example 6
Source File: AbstractPropertyBindingResult.java From java-technology-stack with MIT License | 4 votes |
/** * Returns the canonical property name. * @see org.springframework.beans.PropertyAccessorUtils#canonicalPropertyName */ @Override protected String canonicalFieldName(String field) { return PropertyAccessorUtils.canonicalPropertyName(field); }
Example 7
Source File: AbstractPropertyBindingResult.java From lams with GNU General Public License v2.0 | 4 votes |
/** * Returns the canonical property name. * @see org.springframework.beans.PropertyAccessorUtils#canonicalPropertyName */ @Override protected String canonicalFieldName(String field) { return PropertyAccessorUtils.canonicalPropertyName(field); }
Example 8
Source File: AbstractPropertyBindingResult.java From spring4-understanding with Apache License 2.0 | 4 votes |
/** * Returns the canonical property name. * @see org.springframework.beans.PropertyAccessorUtils#canonicalPropertyName */ @Override protected String canonicalFieldName(String field) { return PropertyAccessorUtils.canonicalPropertyName(field); }