|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2017 the original author or authors. |
|
|
|
* Copyright 2002-2018 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -39,6 +39,11 @@ public interface PropertyAccessor { |
|
|
|
* Follows normal Java conventions: getFoo().getBar() would be "foo.bar". |
|
|
|
* Follows normal Java conventions: getFoo().getBar() would be "foo.bar". |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
String NESTED_PROPERTY_SEPARATOR = "."; |
|
|
|
String NESTED_PROPERTY_SEPARATOR = "."; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Path separator for nested properties. |
|
|
|
|
|
|
|
* Follows normal Java conventions: getFoo().getBar() would be "foo.bar". |
|
|
|
|
|
|
|
*/ |
|
|
|
char NESTED_PROPERTY_SEPARATOR_CHAR = '.'; |
|
|
|
char NESTED_PROPERTY_SEPARATOR_CHAR = '.'; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
@ -46,6 +51,11 @@ public interface PropertyAccessor { |
|
|
|
* indexed or mapped property like "person.addresses[0]". |
|
|
|
* indexed or mapped property like "person.addresses[0]". |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
String PROPERTY_KEY_PREFIX = "["; |
|
|
|
String PROPERTY_KEY_PREFIX = "["; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Marker that indicates the start of a property key for an |
|
|
|
|
|
|
|
* indexed or mapped property like "person.addresses[0]". |
|
|
|
|
|
|
|
*/ |
|
|
|
char PROPERTY_KEY_PREFIX_CHAR = '['; |
|
|
|
char PROPERTY_KEY_PREFIX_CHAR = '['; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
@ -53,6 +63,11 @@ public interface PropertyAccessor { |
|
|
|
* indexed or mapped property like "person.addresses[0]". |
|
|
|
* indexed or mapped property like "person.addresses[0]". |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
String PROPERTY_KEY_SUFFIX = "]"; |
|
|
|
String PROPERTY_KEY_SUFFIX = "]"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Marker that indicates the end of a property key for an |
|
|
|
|
|
|
|
* indexed or mapped property like "person.addresses[0]". |
|
|
|
|
|
|
|
*/ |
|
|
|
char PROPERTY_KEY_SUFFIX_CHAR = ']'; |
|
|
|
char PROPERTY_KEY_SUFFIX_CHAR = ']'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -141,7 +156,7 @@ public interface PropertyAccessor { |
|
|
|
* <p>Bulk updates from PropertyValues are more powerful: This method is |
|
|
|
* <p>Bulk updates from PropertyValues are more powerful: This method is |
|
|
|
* provided for convenience. Behavior will be identical to that of |
|
|
|
* provided for convenience. Behavior will be identical to that of |
|
|
|
* the {@link #setPropertyValues(PropertyValues)} method. |
|
|
|
* the {@link #setPropertyValues(PropertyValues)} method. |
|
|
|
* @param map Map to take properties from. Contains property value objects, |
|
|
|
* @param map a Map to take properties from. Contains property value objects, |
|
|
|
* keyed by property name |
|
|
|
* keyed by property name |
|
|
|
* @throws InvalidPropertyException if there is no such property or |
|
|
|
* @throws InvalidPropertyException if there is no such property or |
|
|
|
* if the property isn't writable |
|
|
|
* if the property isn't writable |
|
|
|
@ -162,7 +177,7 @@ public interface PropertyAccessor { |
|
|
|
* This exception can be examined later to see all binding errors. |
|
|
|
* This exception can be examined later to see all binding errors. |
|
|
|
* Properties that were successfully updated remain changed. |
|
|
|
* Properties that were successfully updated remain changed. |
|
|
|
* <p>Does not allow unknown fields or invalid fields. |
|
|
|
* <p>Does not allow unknown fields or invalid fields. |
|
|
|
* @param pvs PropertyValues to set on the target object |
|
|
|
* @param pvs a PropertyValues to set on the target object |
|
|
|
* @throws InvalidPropertyException if there is no such property or |
|
|
|
* @throws InvalidPropertyException if there is no such property or |
|
|
|
* if the property isn't writable |
|
|
|
* if the property isn't writable |
|
|
|
* @throws PropertyBatchUpdateException if one or more PropertyAccessExceptions |
|
|
|
* @throws PropertyBatchUpdateException if one or more PropertyAccessExceptions |
|
|
|
@ -182,7 +197,7 @@ public interface PropertyAccessor { |
|
|
|
* {@link PropertyBatchUpdateException} containing all the individual errors. |
|
|
|
* {@link PropertyBatchUpdateException} containing all the individual errors. |
|
|
|
* This exception can be examined later to see all binding errors. |
|
|
|
* This exception can be examined later to see all binding errors. |
|
|
|
* Properties that were successfully updated remain changed. |
|
|
|
* Properties that were successfully updated remain changed. |
|
|
|
* @param pvs PropertyValues to set on the target object |
|
|
|
* @param pvs a PropertyValues to set on the target object |
|
|
|
* @param ignoreUnknown should we ignore unknown properties (not found in the bean) |
|
|
|
* @param ignoreUnknown should we ignore unknown properties (not found in the bean) |
|
|
|
* @throws InvalidPropertyException if there is no such property or |
|
|
|
* @throws InvalidPropertyException if there is no such property or |
|
|
|
* if the property isn't writable |
|
|
|
* if the property isn't writable |
|
|
|
@ -204,7 +219,7 @@ public interface PropertyAccessor { |
|
|
|
* {@link PropertyBatchUpdateException} containing all the individual errors. |
|
|
|
* {@link PropertyBatchUpdateException} containing all the individual errors. |
|
|
|
* This exception can be examined later to see all binding errors. |
|
|
|
* This exception can be examined later to see all binding errors. |
|
|
|
* Properties that were successfully updated remain changed. |
|
|
|
* Properties that were successfully updated remain changed. |
|
|
|
* @param pvs PropertyValues to set on the target object |
|
|
|
* @param pvs a PropertyValues to set on the target object |
|
|
|
* @param ignoreUnknown should we ignore unknown properties (not found in the bean) |
|
|
|
* @param ignoreUnknown should we ignore unknown properties (not found in the bean) |
|
|
|
* @param ignoreInvalid should we ignore invalid properties (found but not accessible) |
|
|
|
* @param ignoreInvalid should we ignore invalid properties (found but not accessible) |
|
|
|
* @throws InvalidPropertyException if there is no such property or |
|
|
|
* @throws InvalidPropertyException if there is no such property or |
|
|
|
|