[Cosmo-dev] Preferences design proposal

Randy Letness randy at osafoundation.org
Tue Jan 16 10:59:55 PST 2007


I added user preferences to the domain model. Preferences are just a 
Map<String,String>.  You can now set user preferences like:

User user = userDao.getUser(uid);
String oldVal = user.getPreferences().get("mypref");
user.getPreferences().put("mypref","newval");
or
user.getPreferences().remove("mypref");
userDao.updateUser(user);

No changes have been made to RPCService, but any new methods should just 
use the above api. We can add convience methods to User such as 
getPreference(String key), setPreference(String key, String value), etc...

You must wipe your db after svn uping.

-Randy






More information about the cosmo-dev mailing list