Package com.google.gdata.data

Examples of com.google.gdata.data.Entry


    public void testClientPut() throws Exception
        String entryID = "photoid/5233468700029715874";         
        String newBlogEntryTitle = "updatedTitle:dog";
        testService.clientPut(entryID, newBlogEntryTitle);      //update the title
        Thread.sleep(Constants.SLEEP_INTERVAL);           
        Entry updatedEntry = testService.clientGetEntry(entryID);        
        Assert.assertEquals(newBlogEntryTitle, updatedEntry.getTitle().getPlainText());
    }
View Full Code Here


            return this.e!=null;
        }
       
        @Override
        public Entry next(){
            Entry r = e;
            e = _next();
            return r;
        }
View Full Code Here

//        @Override
        protected Entry _next() {
            if( itr==null )return null;
            if( itr.hasNext() ){
                Entry e = itr.next();
                return e;
            }
           
            while( true ){
                if( feed!=null ){
                    try {
                        Link nextLink = feed.getNextLink();
                        if( nextLink==null ){
                            itr = null;
                            feed = null;
                            return null;
                        }

                        URL nextUrl = new URL(nextLink.getHref());
                        Feed nf = feed.getService().getFeed(nextUrl, Feed.class);
                        if( nf==null ){
                            itr = null;
                            feed = null;
                            return null;
                        }

                        feed = nf;
                        itr = feed.getEntries().iterator();
                    } catch (IOException ex) {
                        Logger.getLogger(EntryIterable.class.getName()).log(Level.SEVERE, null, ex);
                        throw new Error(ex.getMessage(),ex);
                    } catch (ServiceException ex) {
                        Logger.getLogger(EntryIterable.class.getName()).log(Level.SEVERE, null, ex);
                        throw new Error(ex.getMessage(),ex);
                    }
                }
               
                if( itr.hasNext() ){
                    Entry e = itr.next();
                    return e;
                }
            }
        }
View Full Code Here

   
    @Do(desc = "tipDoExportPost")
    public void exportPost() {
        try {
            String postId = getPostID();
            Entry e = getPostByID(postId);
            if (e != null) {
                exportPost(e);
            }
        } catch (IOException ex) {
            throw new Error(ex.getMessage(), ex);
View Full Code Here

           
            boolean isDraftPost = isDraftPost();
            long postTimeShift = getTimeShift();
            Date postDate = new Date(htmlFile.getLastModifiedDate().getTime() + postTimeShift);
           
            Entry e = new Entry();
            e.setTitle(new PlainTextConstruct(title));
            e.setDraft(isDraftPost);
            e.setContent(new HtmlTextConstruct(htmlFile.getBody()));
           
            java.util.TimeZone tz = getTimeZone();
            if (tz == null)
                throw new ArgumentNotSetException("timeZone");
           
            Date pubDate = getPublishedDate()==null ? postDate : getPublishedDate();
            Date edtDate = getEditedDate()==null ? postDate : getEditedDate();
            Date updDate = getUpdatedDate()==null ? postDate : getUpdatedDate();
           
            e.setPublished(new DateTime(pubDate, tz));
            e.setEdited(new DateTime(edtDate, tz));
            e.setUpdated(new DateTime(updDate, tz));
           
            String blogId = getBlogID();
            if (blogId == null)
                throw new ArgumentNotSetException("blogID");
           
View Full Code Here

        if (testService == null) {
            // no internet connection
            return;
        }
        String entryID = "photoid/5233468700029715874";
        Entry contactEntry = testService.clientGetEntry(entryID);
        //System.out.println("Entry ID: " + contactEntry.getId());
        Assert.assertTrue(contactEntry.getId().endsWith(entryID));
        //System.out.println("------------------------------------------------------------\n\n");
    }
View Full Code Here

        }
        String entryID = "photoid/5233468700029715874";         
        String newBlogEntryTitle = "updatedTitle:dog";
        testService.clientPut(entryID, newBlogEntryTitle);      //update the title
        Thread.sleep(Constants.SLEEP_INTERVAL);           
        Entry updatedEntry = testService.clientGetEntry(entryID);        
        Assert.assertEquals(newBlogEntryTitle, updatedEntry.getTitle().getPlainText());
    }
View Full Code Here

        if (testService == null) {
            // no internet connection
            return;
        }
        String entryID = "1c76lcl70jg9r0fm18rcbneea8";
        Entry blogEntry = testService.clientGetEntry(entryID);
        //System.out.println("Entry ID: " + blogEntry.getId());
        Assert.assertTrue(blogEntry.getId().endsWith(entryID));
        //System.out.println("------------------------------------------------------------\n\n");
    }
View Full Code Here

        }
        String entryID = "1c76lcl70jg9r0fm18rcbneea8";         
        String newBlogEntryTitle = "updatedTitleByGoogleContactsConsumerTestCase";
        testService.clientPut(entryID, newBlogEntryTitle);      //update the title
        Thread.sleep(Constants.SLEEP_INTERVAL);           
        Entry updatedEntry = testService.clientGetEntry(entryID);        
        Assert.assertEquals(newBlogEntryTitle, updatedEntry.getTitle().getPlainText());
    }
View Full Code Here

        if (testService == null) {
            // no internet connection
            return;
        }
        String blogEntryTitle = "titleByGoogleCalendarTestcase";
        Entry newEntry = new Entry();
        newEntry.setTitle(new PlainTextConstruct(blogEntryTitle));
        newEntry.setContent(new PlainTextConstruct("contentByGoogleCalendarTestCase"));
        Entry postedEntry = testService.clientPost(newEntry);       
        Assert.assertEquals(blogEntryTitle, postedEntry.getTitle().getPlainText());
    }
View Full Code Here

TOP

Related Classes of com.google.gdata.data.Entry

Copyright © 2018 www.massapicom. 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.