@GET
@RequiresPermissions("nexus:feeds:read")
public SyndFeed get(@PathParam(FEED_KEY) String feedKey, @DefaultValue("0") @QueryParam("from") int from,
@DefaultValue("40") @QueryParam("count") int count, final @Context UriInfo uriInfo)
{
final FeedSource feedSource = feeds.get(feedKey);
if (feedSource == null) {
throw new NotFoundException("Feed " + feedKey + " not found!");
}
try {
final Map<String, String> params = getParameters(uriInfo);
final List<FeedEvent> feedEvents = feedSource.getFeed(from, count, params);
final SyndFeed feed = new SyndFeedImpl();
feed.setTitle(feedSource.getFeedName());
feed.setDescription(feedSource.getFeedDescription());
feed.setAuthor("Nexus " + systemStatusProvider.get().getVersion());
feed.setPublishedDate(new Date());
feed.setLink(BaseUrlHolder.get() + "/service/siesta/feeds/" + feedSource.getFeedKey());
final List<SyndEntry> entries = Lists.newArrayListWithCapacity(feedEvents.size());
for (FeedEvent event : feedEvents) {
final SyndEntry entry = new SyndEntryImpl();