You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by mc...@apache.org on 2009/06/20 18:17:50 UTC

svn commit: r786847 - /tuscany/sandbox/travelsample/contributions/blog-feed-contribution/src/main/java/scatours/blog/feed/BlogFeedImpl.java

Author: mcombellack
Date: Sat Jun 20 16:17:50 2009
New Revision: 786847

URL: http://svn.apache.org/viewvc?rev=786847&view=rev
Log:
Improved the readability of the code that generates the next blog ID.
Fixed a spelling mistake in the word Tuscany. I should know how to spell it by now :-)

Modified:
    tuscany/sandbox/travelsample/contributions/blog-feed-contribution/src/main/java/scatours/blog/feed/BlogFeedImpl.java

Modified: tuscany/sandbox/travelsample/contributions/blog-feed-contribution/src/main/java/scatours/blog/feed/BlogFeedImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/contributions/blog-feed-contribution/src/main/java/scatours/blog/feed/BlogFeedImpl.java?rev=786847&r1=786846&r2=786847&view=diff
==============================================================================
--- tuscany/sandbox/travelsample/contributions/blog-feed-contribution/src/main/java/scatours/blog/feed/BlogFeedImpl.java (original)
+++ tuscany/sandbox/travelsample/contributions/blog-feed-contribution/src/main/java/scatours/blog/feed/BlogFeedImpl.java Sat Jun 20 16:17:50 2009
@@ -71,9 +71,9 @@
 
         // Create a sample entry
         final Entry entry = factory.newEntry();
-        entry.setId(Integer.toString(ID_GEN.incrementAndGet()));
+        entry.setId(nextBlogID());
         entry.addAuthor(FEED_AUTHOR);
-        entry.setTitle("Apache Tuscay in Action book features SCA Tours");
+        entry.setTitle("Apache Tuscany in Action book features SCA Tours");
         entry.setContentAsHtml("We are famous as SCA Tours has been featured in the Apache Tuscany in Action book published by Manning");
         entry.setUpdated(new Date());
         entry.addLink("http://www.manning.com/laws/");
@@ -83,6 +83,16 @@
     }
 
     /**
+     * Generates the next blog entry ID.
+     * 
+     * @return Next blog entry ID
+     */
+    private String nextBlogID()
+    {
+        return Integer.toString(ID_GEN.incrementAndGet());
+    }
+
+    /**
      * Query the feed.
      * 
      * @param query The query