...
Code Block | ||||
---|---|---|---|---|
| ||||
<map> <!-- 'oname' and 'owner' are aliases for the 'ownerinfo.name.name' bean property --> <entry key="oname" value="ownerinfo.name.name"/> <entry key="owner" value="ownerinfo.name.name"/> </map> |
Dealing with mistyped property names
Consider a case where a documented search property is named as 'address' (lower case) and a query contains a mistyped 'Address' instead. In this case, unless a "search.lax.property.match" property is set, PropertyNotFoundException will be thrown.
Supporting case-insensitive property mapping is easy, register a "search.bean.property.map" (mentioned earlier) map as Java TreeMap
with a case-insensitive String.CASE_INSENSITIVE_ORDER Comparator.
However it will not help if the 'address' property was mistyped as 'adress'. In this case, "search.bean.property.map" might still be useful with having few more keys supporting some typical typos, example, 'adress' - 'address', 'addres' - 'address', etc.
Starting from CXF 3.1.5, org.apache.cxf.jaxrs.ext.search.PropertyNameConverter is available and might be used for a more sophisticated conversion of mistyped property names to correct names.
Parser properties
The parser properties are the ones which tell the parser how to treat the conversion of Date values and the unrecognized search property names.
...