THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
public interface ConfiguredObject
{
...
UserPreferences getPreferences();
...
}
public interface UserPreferences()
{
// Gets all preferences belonging to this user
Map<String, Map<String,Preference> getPreferences()
// replaces all current preferences with replacement. returns preferences that were removed – used by PUT /userpreferences & DELETE
Map<String, Map<String, Preference>> replace(Map<String, Map<String, Preference>>)
// update/append preferences – used by POST /userpreferences
updateOrAppend(Map<String, Map<String, Preference>>)
// replaces all prefs of given type with the replacement. returns preferences that were removed – used by PUT /userpreferences/type & DELETE
Map<String, Preference> replace (String type, Map<String, Preference>)
// update/append preferences within given type – used by POST /userpreferences/type
updateOrAppend(String type, Map<String, Preference>)
// // Gets all preferences visible to this user, does not include those that belong to him
Map<String, Map<String, Preference> getVisiblePreferences()
// Allows REST API to construct the Preference objects – does not persist of the object. Object will be immutable
Preference createPreference(String type, Map<String,Object>)
} |
...