Sets the properties on the target bean.
This method uses
PropertyBindingSupport
and therefore offers its capabilities such as:
- property placeholders - Keys and values using Camels property placeholder will be resolved
- nested - Properties can be nested using the dot syntax (OGNL and builder pattern using with as prefix), eg foo.bar=123
- map
- Properties can lookup in Map's using map syntax, eg foo[bar] where foo is the name of the property that is a Map instance, and bar is the name of the key.
- list
- Properties can refer or add to in List's using list syntax, eg foo[0] where foo is the name of the property that is a
List instance, and 0 is the index. To refer to the last element, then use last as key.
This implementation sets the properties using the following algorithm in the given order:
- reference by bean id - Values can refer to other beans in the registry by prefixing with with # or #bean: eg #myBean or #bean:myBean
- reference by type - Values can refer to singleton beans by their type in the registry by prefixing with #type: syntax, eg #type:com.foo.MyClassType
- autowire by type - Values can refer to singleton beans by auto wiring by setting the value to #autowired
- reference new class - Values can refer to creating new beans by their class name by prefixing with #class, eg #class:com.foo.MyClassType
- value as lookup - The value is used as-is (eg like #value) to lookup in the Registry if there is a bean then its set on the target
When an option has been set on the target bean, then its removed from the given properties map. If all the options has been set, then the map will be empty.
The implementation ignores case for the property keys.