use of org.apache.cxf.systests.cdi.base.AtomFeed in project cxf by apache.
the class BookStoreFeed method getBooks.
@GET
@Path("/books/feed")
@NotNull
@Valid
@Produces("application/atom+xml")
public AtomFeed getBooks() {
final AtomFeed feed = new AtomFeed();
for (final Book book : service.all()) {
final AtomFeedEntry entry = new AtomFeedEntry();
entry.addLink("/bookstore/books/" + book.getId());
feed.addEntry(entry);
}
return feed;
}
Aggregations