Examples of fetchSubscription()


Examples of org.apache.roller.planet.business.fetcher.FeedFetcher.fetchSubscription()

    public void testFetchSubscription() throws Exception {
       
        FeedFetcher feedFetcher = PlanetFactory.getPlanet().getFeedFetcher();
       
        // first fetch non-conditionally so we know we should get a Sub
        Subscription sub = feedFetcher.fetchSubscription(feed_url);
        assertNotNull(sub);
        assertEquals(feed_url, sub.getFeedURL());
        assertNotNull(sub.getLastUpdated());
       
        // now do a conditional fetch and we should get back null
View Full Code Here

Examples of org.apache.roller.planet.business.fetcher.FeedFetcher.fetchSubscription()

        assertNotNull(sub);
        assertEquals(feed_url, sub.getFeedURL());
        assertNotNull(sub.getLastUpdated());
       
        // now do a conditional fetch and we should get back null
        Subscription updatedSub = feedFetcher.fetchSubscription(feed_url, sub.getLastUpdated());
        assertNull(updatedSub);
    }
   
}
View Full Code Here

Examples of org.apache.roller.planet.business.fetcher.FeedFetcher.fetchSubscription()

    public void testFetchFeed() throws Exception {
       
        FeedFetcher feedFetcher = PlanetFactory.getPlanet().getFeedFetcher();

        // fetch feed
        Subscription sub = feedFetcher.fetchSubscription(feed_url);
        assertNotNull(sub);
        assertEquals(feed_url, sub.getFeedURL());
        assertEquals("http://rollerweblogger.org/roller/", sub.getSiteURL());
        assertEquals("Blogging Roller", sub.getTitle());
        assertNotNull(sub.getLastUpdated());
View Full Code Here

Examples of org.apache.roller.planet.business.fetcher.FeedFetcher.fetchSubscription()

    public void testFetchFeedConditionally() throws Exception {
       
        FeedFetcher feedFetcher = PlanetFactory.getPlanet().getFeedFetcher();

        // fetch feed
        Subscription sub = feedFetcher.fetchSubscription(feed_url);
        assertNotNull(sub);
        assertEquals(feed_url, sub.getFeedURL());
        assertEquals("http://rollerweblogger.org/roller/", sub.getSiteURL());
        assertEquals("Blogging Roller", sub.getTitle());
        assertNotNull(sub.getLastUpdated());
View Full Code Here

Examples of org.apache.roller.planet.business.fetcher.FeedFetcher.fetchSubscription()

        assertEquals("Blogging Roller", sub.getTitle());
        assertNotNull(sub.getLastUpdated());
        assertTrue(sub.getEntries().size() > 0);
       
        // now do a conditional fetch and we should get back null
        Subscription updatedSub = feedFetcher.fetchSubscription(feed_url, sub.getLastUpdated());
        assertNull(updatedSub);
    }
   
}
View Full Code Here

Examples of org.apache.roller.planet.business.fetcher.FeedFetcher.fetchSubscription()

       
        Subscription updatedSub;
        try {
            // fetch the latest version of the subscription
            FeedFetcher fetcher = PlanetFactory.getPlanet().getFeedFetcher();
            updatedSub = fetcher.fetchSubscription(sub.getFeedURL(), sub.getLastUpdated());
        } catch (FetcherException ex) {
            throw new UpdaterException("Error fetching updated subscription", ex);
        }
       
        // if sub was unchanged then we are done
View Full Code Here

Examples of org.apache.roller.planet.business.fetcher.FeedFetcher.fetchSubscription()

            if(sub == null) {
                log.debug("Adding New Subscription - "+getSubUrl());
               
                // sub doesn't exist yet, so we need to fetch it
                FeedFetcher fetcher = PlanetFactory.getPlanet().getFeedFetcher();
                sub = fetcher.fetchSubscription(getSubUrl());
               
                // save new sub
                pmgr.saveSubscription(sub);
            } else {
                log.debug("Adding Existing Subscription - "+getSubUrl());
View Full Code Here

Examples of org.apache.roller.planet.business.fetcher.FeedFetcher.fetchSubscription()

        try {
            // fetch the latest version of the subscription
            log.debug("Getting fetcher");
            FeedFetcher fetcher = PlanetFactory.getPlanet().getFeedFetcher();
            log.debug("Using fetcher class: " + fetcher.getClass().getName());
            updatedSub = fetcher.fetchSubscription(sub.getFeedURL(), sub.getLastUpdated());
           
        } catch (FetcherException ex) {
            throw new UpdaterException("Error fetching updated subscription", ex);
        }
       
View Full Code Here

Examples of org.apache.roller.planet.business.fetcher.FeedFetcher.fetchSubscription()

            // check if this subscription already exists before adding it
            Subscription sub = pMgr.getSubscription(getAddSubUrl());
            if(sub == null) {
                // sub doesn't exist yet, so we need to fetch it
                FeedFetcher fetcher = PlanetFactory.getPlanet().getFeedFetcher();
                sub = fetcher.fetchSubscription(getAddSubUrl());
               
                // save new sub
                pMgr.saveSubscription(sub);
            }
           
View Full Code Here

Examples of org.apache.roller.planet.business.fetcher.FeedFetcher.fetchSubscription()

    public void testFetchFeed() throws Exception {
       
        FeedFetcher feedFetcher = PlanetFactory.getPlanet().getFeedFetcher();

        // fetch feed
        Subscription sub = feedFetcher.fetchSubscription(feed_url);
        assertNotNull(sub);
        assertEquals(feed_url, sub.getFeedURL());
        assertEquals("http://rollerweblogger.org/roller/", sub.getSiteURL());
        assertEquals("Blogging Roller", sub.getTitle());
        assertNotNull(sub.getLastUpdated());
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.