Package com.google.gdata.data

Examples of com.google.gdata.data.Entry


     * @throws StorageException
     */
    public void insertEntries(int entrycount) throws IOException,InterruptedException, StorageException{
        List<StorageEntryWrapper> tempList = new ArrayList<StorageEntryWrapper>();
        for (int i = 0; i <= entrycount ; i++) {
            ServerBaseEntry entry = new ServerBaseEntry(new Entry());
            entry.setId(""+i);
            entry.setServiceConfig(this.configurator);
            entry.setUpdated(new DateTime(System.currentTimeMillis(),0));
            entry.setFeedId(feedId);
            StorageEntryWrapper wrapper = new StorageEntryWrapper(entry,StorageOperation.INSERT);
View Full Code Here


      assertTrue(this.query.get().isEntryStored(""+(this.count-1),feedId));
      assertFalse(this.query.get().isEntryStored("someOther",feedId));
    }
   
    public void testGetEntryLastModied() throws IOException, StorageException{
        ServerBaseEntry entry = new ServerBaseEntry(new Entry());
        entry.setId("test");
        entry.setServiceConfig(this.configurator);
        entry.setUpdated(new DateTime(System.currentTimeMillis(),0));
        entry.setFeedId(feedId);
        StorageEntryWrapper wrapper = new StorageEntryWrapper(entry,StorageOperation.INSERT);
View Full Code Here

            e.printStackTrace();
        }
    }
   
    public void testGetFeedLastModified() throws StorageException, IOException{
        ServerBaseEntry entry = new ServerBaseEntry(new Entry());
        entry.setId("test");
        entry.setServiceConfig(this.configurator);
        entry.setUpdated(new DateTime(System.currentTimeMillis(),0));
        entry.setFeedId(feedId);
        StorageEntryWrapper wrapper = new StorageEntryWrapper(entry,StorageOperation.INSERT);
View Full Code Here

    }
   
    public void testCheckVersionId() throws IOException, StorageException{
        this.modifier.forceWrite();
        ReferenceCounter<StorageQuery> sQuery = this.controller.getStorageQuery();
        ServerBaseEntry entry = new ServerBaseEntry(new Entry());
        entry.setId("test");
        entry.setServiceConfig(this.configurator);
        entry.setUpdated(new DateTime(System.currentTimeMillis(),0));
        entry.setFeedId(feedId);
        entry.setVersion(5);
View Full Code Here

     *  To provide a concrete entry to decorate after object creation use {@link ServerBaseEntry#setEntry(BaseEntry)} 
    
     */
    @SuppressWarnings("unchecked")
    public ServerBaseEntry() {
        this(new Entry());
       
    }
View Full Code Here

   

    @Test
    public void testClientPost() throws Exception {
        String blogEntryTitle = "titleByBloogerTestcase000";
        Entry newEntry = new Entry();
        newEntry.setTitle(new PlainTextConstruct(blogEntryTitle));
        newEntry.setContent(new PlainTextConstruct("contentByBloggerTestCase000"));
        Entry postedEntry = testService.clientPost(newEntry);       
        assertEquals(blogEntryTitle, postedEntry.getTitle().getPlainText());
    }
View Full Code Here

        //This test case might fail
        //because Google blogger service has limitation on new posts allowed everyday/every hour?
       
        System.out.println("testClientDelete");
        //We create a new post, and then delete it
        Entry newEntry = new Entry();
        newEntry.setTitle(new PlainTextConstruct("blogEntryShouldNotApear"));
        newEntry.setContent(new PlainTextConstruct("contentByBloggerShouldNotAppear"));
        Entry postedEntry = testService.clientPost(newEntry);
        Thread.sleep(300);       
        int idStartPosition = postedEntry.getId().lastIndexOf("-");
        String postedEntryID = postedEntry.getId().substring(idStartPosition+1);       
        System.out.println("postedEntryID: " + postedEntryID );
       
        //Before deletion
        Entry entry00 = testService.clientGetEntry(postedEntryID);
        System.out.println("Before Deleteion: " + entry00.getId());
       
        //Delete this entry
        testService.clientDelete(postedEntryID);

        //Worked: this newly posted entry did not appear in the blogspot website,
View Full Code Here

        String entryID = "tag:blogger.com,1999:blog-4520949313432095990.post-973462497533349425";
        Entry entry = testService.clientGetEntry(entryID);
        System.out.println("Entry id: " + entry.getId());
        */
       
        Entry myEntry = new Entry();
        myEntry.setTitle(new PlainTextConstruct("titleByConsumer2"));
        myEntry.setContent(new PlainTextConstruct("contentByConsmer2"));
        testService.clientPost(myEntry);
       
        System.out.println("#Entries(After post): "+ testService.clientGetFeed().getEntries().size());
       
        String entryID = "tag:blogger.com,1999:blog-4520949313432095990.post-973462497533349425";
        Entry entry = testService.clientGetEntry(entryID);
        System.out.println("Entry id: " + entry.getId());

      
    }
View Full Code Here

   
   
    @Test
    public void testClientGetEntry() throws Exception {
        String entryID = "12feeeb38ab87365";
        Entry contactEntry = testService.clientGetEntry(entryID);
        System.out.println("Entry ID: " + contactEntry.getId());
        assertTrue(contactEntry.getId().endsWith(entryID));
        System.out.println("------------------------------------------------------------\n\n");
    }
View Full Code Here

    public void testClientPut() throws Exception
        String entryID = "12feeeb38ab87365";         
        String newBlogEntryTitle = "updatedTitleByGoogleContactsConsumerTestCase";
        testService.clientPut(entryID, newBlogEntryTitle);      //update the title
        Thread.sleep(300);           
        Entry updatedEntry = testService.clientGetEntry(entryID);        
        assertEquals(newBlogEntryTitle, updatedEntry.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.