summaryrefslogtreecommitdiffstats
path: root/sandbox/travelsample/contributions/blog-feed-contribution/src/main/java/scatours/blog/feed/BlogFeedImpl.java
diff options
context:
space:
mode:
authormcombellack <mcombellack@13f79535-47bb-0310-9956-ffa450edef68>2009-06-20 16:17:50 +0000
committermcombellack <mcombellack@13f79535-47bb-0310-9956-ffa450edef68>2009-06-20 16:17:50 +0000
commitf16307702521f9034028200d87fdc1506220c2e6 (patch)
treeb6ecd397a6261926cb391aad49b2fb52251ba773 /sandbox/travelsample/contributions/blog-feed-contribution/src/main/java/scatours/blog/feed/BlogFeedImpl.java
parent0514a23af1758840c51b5ff6c64fc7d65588143b (diff)
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
Diffstat (limited to '')
-rw-r--r--sandbox/travelsample/contributions/blog-feed-contribution/src/main/java/scatours/blog/feed/BlogFeedImpl.java14
1 files 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/");
@@ -83,6 +83,16 @@ public class BlogFeedImpl implements org.apache.tuscany.sca.binding.atom.collect
}
/**
+ * 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