Examples of FeedSource


Examples of org.sonatype.nexus.timeline.feeds.FeedSource

  @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();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.