I have implemented it as follows:
ValueMap preferences = instance.getPreferences();
| while (iterator.hasNext())
| {
| Element preference = (Element) iterator.next();
| String name = preference.valueOf(PREFERENCE_NAME);
| Value originalValue = preferences.getValue(name);
| if (null != originalValue)
| {
| Class<Value> valueClass = getValueClass(originalValue);
| Value value = createValue(preference, valueClass);
| preferences.setValue(name, value);
| }
| }
| instance.setPreferences(preferences);
|
This prohibits adding undefined preferences, only predefined prefs can now be overridden,
and its type is taken over from the original type.
But according to you, this could be simplified to using strings only.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4013578#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...