@Produces( {MediaType.APPLICATION_ATOM_XML, MediaType.APPLICATION_JSON})
public SyndFeed getSyndFeed(@Context Providers providers, @Context UriInfo uriInfo) {
SyndFeed synd = new SyndFeed();
synd.setId("urn:com:hp:users");
synd.setTitle(new SyndText("Users"));
synd.addAuthor(new SyndPerson("admin"));
synd.setUpdated(new Date());
// set the entries
for (User user : users) {
SyndEntry entry = new SyndEntry();
entry.setId(Integer.toString(user.getId()));
entry.setPublished(new Date(System.currentTimeMillis()));
entry.setUpdated(new Date(System.currentTimeMillis()));
entry.setTitle(new SyndText(user.getLastName() + " " + user.getFirstName()));
synd.addEntry(entry);
}
synd.setBase(uriInfo.getAbsolutePath().toString());
return synd;
}