protected SyndFeed getFeed(Context context, Request request, String channelKey, Integer from, Integer count, Map<String, String> params) throws IOException, ComponentLookupException { FeedSource src = feeds.get(channelKey); if (src != null) { return src.getFeed(from, count, params); } throw new ComponentLookupException("Feed with key '" + channelKey + "' not found.", "FeedSource", channelKey); }
/** * Get the list of feeds available from the nexus server. */ @Override @GET @ResourceMethodSignature(output = FeedListResourceResponse.class) public Object get(Context context, Request req, Response res, Variant variant) throws ResourceException { FeedListResourceResponse response = new FeedListResourceResponse(); List<FeedSource> sources = feeds; for (FeedSource source : sources) { FeedListResource resource = new FeedListResource(); resource.setResourceURI(createChildReference(req, this, source.getFeedKey()).toString()); resource.setName(source.getFeedName()); response.addData(resource); } return response; }