apigee/usergrid-stack — pull request #215 by snoopdave (2013-09-19 20:42:29+00:00)
Title: Usergrid 1727: fix issue "new user entities contain deprecated rolenames path"

__Issue description__

Should the returned set property be changed to "roles" and the value to "/users//roles"? Here's an example of what's being returned:

```
"sets":
{ "rolenames": "/users/30f410ea-e287-11e2-b46f-11998569048e/rolenames", "permissions": "/users/30f410ea-e287-11e2-b46f-11998569048e/permissions" }
```

__Summary of the fix__

I have implemented the fix suggested by Todd Nine and so, now sets will look like this:

```
"sets":
{ "rolenames": "/users/30f410ea-e287-11e2-b46f-11998569048e/roles", "permissions": "/users/30f410ea-e287-11e2-b46f-11998569048e/permissions" }
```

We were storing the list of EntityDictionaries as a Set of Strings because the property name used for each dictionary was the same as the last segment of the path. Now, with rolenames that is not the case; the name is "rolenames" and the path segment is "roles".

To make this change I had to introduce a new class called EntityDictionaryEntry which stores a dictionary name and a path segment. I also had to make changes in multiple files to use this new class instead of the old Set of strings.