From f16307702521f9034028200d87fdc1506220c2e6 Mon Sep 17 00:00:00 2001 From: mcombellack Date: Sat, 20 Jun 2009 16:17:50 +0000 Subject: 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 :-) git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@786847 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/scatours/blog/feed/BlogFeedImpl.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sandbox/travelsample/contributions/blog-feed-contribution/src/main/java/scatours/blog/feed/BlogFeedImpl.java b/sandbox/travelsample/contributions/blog-feed-contribution/src/main/java/scatours/blog/feed/BlogFeedImpl.java index 36abfba38e..016ae77ab6 100644 --- a/sandbox/travelsample/contributions/blog-feed-contribution/src/main/java/scatours/blog/feed/BlogFeedImpl.java +++ b/sandbox/travelsample/contributions/blog-feed-contribution/src/main/java/scatours/blog/feed/BlogFeedImpl.java @@ -71,9 +71,9 @@ public class BlogFeedImpl implements org.apache.tuscany.sca.binding.atom.collect // 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/"); @@ -82,6 +82,16 @@ public class BlogFeedImpl implements org.apache.tuscany.sca.binding.atom.collect return feed; } + /** + * Generates the next blog entry ID. + * + * @return Next blog entry ID + */ + private String nextBlogID() + { + return Integer.toString(ID_GEN.incrementAndGet()); + } + /** * Query the feed. * -- cgit v1.2.3