return resourceGroup;
}
protected GroupRest fillGroup(ResourceGroup group, UriInfo uriInfo) {
GroupRest gr = new GroupRest(group.getName());
gr.setId(group.getId());
gr.setCategory(group.getGroupCategory());
gr.setRecursive(group.isRecursive());
if (group.getGroupDefinition()!=null) {
gr.setDynaGroupDefinitionId(group.getGroupDefinition().getId());
}
gr.setExplicitCount(group.getExplicitResources().size());
gr.setImplicitCount(group.getImplicitResources().size());
UriBuilder uriBuilder = uriInfo.getBaseUriBuilder();
uriBuilder.path("/group/{id}");
URI uri = uriBuilder.build(group.getId());
Link link = new Link("edit",uri.toASCIIString());
gr.getLinks().add(link);
gr.getLinks().add(getLinkToGroup(group,uriInfo, "self"));
uriBuilder = uriInfo.getBaseUriBuilder();
uriBuilder.path("/group/{id}/metricDefinitions");
uri = uriBuilder.build(group.getId());
link = new Link("metricDefinitions",uri.toASCIIString());
gr.getLinks().add(link);
gr.getLinks().add(createUILink(uriInfo,UILinkTemplate.GROUP,group.getId()));
return gr;
}