Skip to content
Snippets Groups Projects
Commit 8c4d6ae5 authored by srosse's avatar srosse
Browse files

no-jira: send all infos for contacts

parent 15e0d38d
No related branches found
No related tags found
No related merge requests found
...@@ -76,7 +76,7 @@ public class ContactsWebService { ...@@ -76,7 +76,7 @@ public class ContactsWebService {
int count = 0; int count = 0;
UserVO[] userVOs = new UserVO[contacts.size()]; UserVO[] userVOs = new UserVO[contacts.size()];
for(Identity contact:contacts) { for(Identity contact:contacts) {
userVOs[count++] = link(get(contact), uriInfo); userVOs[count++] = link(get(contact, null, true, false, true), uriInfo);
} }
UserVOes voes = new UserVOes(); UserVOes voes = new UserVOes();
voes.setUsers(userVOs); voes.setUsers(userVOs);
......
...@@ -193,16 +193,17 @@ public class UserVOFactory { ...@@ -193,16 +193,17 @@ public class UserVOFactory {
public static UserVO link(UserVO userVO, UriInfo uriInfo) { public static UserVO link(UserVO userVO, UriInfo uriInfo) {
if(uriInfo != null) { if(uriInfo != null) {
UriBuilder baseUriBuilder = uriInfo.getBaseUriBuilder(); URI baseUri = uriInfo.getBaseUriBuilder().build();
URI getUri = baseUriBuilder.path("users").path(userVO.getKey().toString()).build();
URI getUri = UriBuilder.fromUri(baseUri).path("users").path(userVO.getKey().toString()).build();
userVO.getLink().add(new LinkVO("self", getUri.toString(), "")); userVO.getLink().add(new LinkVO("self", getUri.toString(), ""));
userVO.getLink().add(new LinkVO("edit", getUri.toString(), "")); userVO.getLink().add(new LinkVO("edit", getUri.toString(), ""));
userVO.getLink().add(new LinkVO("delete", getUri.toString(), "")); userVO.getLink().add(new LinkVO("delete", getUri.toString(), ""));
URI groupUri = baseUriBuilder.path("users").path(userVO.getKey().toString()).path("groups").build(); URI groupUri = UriBuilder.fromUri(baseUri).path("users").path(userVO.getKey().toString()).path("groups").build();
userVO.getLink().add(new LinkVO("self", groupUri.toString(), "Groups")); userVO.getLink().add(new LinkVO("self", groupUri.toString(), "Groups"));
URI portraitUri = baseUriBuilder.path("users").path(userVO.getKey().toString()).path("portrait").build(); URI portraitUri = UriBuilder.fromUri(baseUri).path("users").path(userVO.getKey().toString()).path("portrait").build();
userVO.getLink().add(new LinkVO("self", portraitUri.toString(), "Portrait")); userVO.getLink().add(new LinkVO("self", portraitUri.toString(), "Portrait"));
} }
return userVO; return userVO;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment