List of usage examples for com.google.gwt.gdata.client.blogger BlogEntry getEntryPostLink
public final native BloggerLink getEntryPostLink() ;
From source file:com.google.gwt.gdata.sample.hellogdata.client.BloggerCreateBlogPostCommentDemo.java
License:Apache License
/** * Retrieve the Blogger blogs feed using the Blogger service and * the blogs feed uri. In GData all get, insert, update and delete methods * always receive a callback defining success and failure handlers. * Here, the failure handler displays an error message while the * success handler obtains the first Blog entry and * calls getPosts to retrieve the posts feed for that blog. * // ww w . jav a 2s . c o m * @param blogsFeedUri The uri of the blogs feed */ private void getBlogs(String blogsFeedUri) { showStatus("Loading blog feed...", false); service.getBlogFeed(blogsFeedUri, new BlogFeedCallback() { public void onFailure(CallErrorException caught) { showStatus("An error occurred while retrieving the Blogger Blog " + "feed: " + caught.getMessage(), true); } public void onSuccess(BlogFeed result) { BlogEntry[] entries = result.getEntries(); if (entries.length == 0) { showStatus("You have no Blogger blogs.", false); } else { BlogEntry targetBlog = entries[0]; String postsFeedUri = targetBlog.getEntryPostLink().getHref(); getPosts(postsFeedUri); } } }); }
From source file:com.google.gwt.gdata.sample.hellogdata.client.BloggerQueryBlogPostsDemo.java
License:Apache License
/** * Retrieve the Blogger blogs feed using the Blogger service and * the blogs feed uri. In GData all get, insert, update and delete methods * always receive a callback defining success and failure handlers. * Here, the failure handler displays an error message while the * success handler picks up the first Blog entry and * calls queryPosts to retrieve a posts feed for that blog. * //w ww. java 2 s . c o m * @param blogsFeedUri The uri of the blogs feed */ private void getBlogs(String blogsFeedUri) { showStatus("Loading blog feed...", false); service.getBlogFeed(blogsFeedUri, new BlogFeedCallback() { public void onFailure(CallErrorException caught) { showStatus("An error occurred while retrieving the Blogger Blog " + "feed: " + caught.getMessage(), true); } public void onSuccess(BlogFeed result) { BlogEntry[] entries = result.getEntries(); if (entries.length == 0) { showStatus("You have no Blogger blogs.", false); } else { BlogEntry targetBlog = entries[0]; String postsFeedUri = targetBlog.getEntryPostLink().getHref(); queryPosts(postsFeedUri); } } }); }