summaryrefslogtreecommitdiffstats
path: root/sandbox/travelsample/contributions/blog-feed/src
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/travelsample/contributions/blog-feed/src')
-rw-r--r--sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/AtomBlogFeedImpl.java3
-rw-r--r--sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/BaseBlogFeedImpl.java13
-rw-r--r--sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/GenericBlogFeedImpl.java11
-rw-r--r--sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/RSSBlogFeedImpl.java8
4 files changed, 15 insertions, 20 deletions
diff --git a/sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/AtomBlogFeedImpl.java b/sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/AtomBlogFeedImpl.java
index edb8e17fc1..b7a392f927 100644
--- a/sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/AtomBlogFeedImpl.java
+++ b/sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/AtomBlogFeedImpl.java
@@ -33,7 +33,8 @@ import com.tuscanyscatours.blog.BlogPost;
* An Atom feed that implements the org.apache.tuscany.sca.binding.atom.collection.Collection
* interface and uses the Atom APIs to construct the Atom feed.
*/
-public class AtomBlogFeedImpl extends BaseBlogFeedImpl implements org.apache.tuscany.sca.binding.atom.collection.Collection {
+public class AtomBlogFeedImpl extends BaseBlogFeedImpl implements
+ org.apache.tuscany.sca.binding.atom.collection.Collection {
/**
* Gets an Atom feed containing all the blog posts.
diff --git a/sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/BaseBlogFeedImpl.java b/sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/BaseBlogFeedImpl.java
index 1579480dc7..f132d340ea 100644
--- a/sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/BaseBlogFeedImpl.java
+++ b/sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/BaseBlogFeedImpl.java
@@ -73,13 +73,12 @@ public abstract class BaseBlogFeedImpl {
List<BlogPost> blogEntries = new ArrayList<BlogPost>();
// Create a sample entry
- final BlogPost samplePost = new BlogPost(
- FEED_AUTHOR,
- "Apache Tuscany in Action book features SCA Tours",
- "We are famous as SCA Tours has been featured in the Apache Tuscany in Action book published by Manning",
- new Date(),
- "http://www.manning.com/laws/",
- null);
+ final BlogPost samplePost =
+ new BlogPost(
+ FEED_AUTHOR,
+ "Apache Tuscany in Action book features SCA Tours",
+ "We are famous as SCA Tours has been featured in the Apache Tuscany in Action book published by Manning",
+ new Date(), "http://www.manning.com/laws/", null);
// Add sample post to the list of posts
blogEntries.add(samplePost);
diff --git a/sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/GenericBlogFeedImpl.java b/sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/GenericBlogFeedImpl.java
index 816360d4fd..c427b658a4 100644
--- a/sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/GenericBlogFeedImpl.java
+++ b/sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/GenericBlogFeedImpl.java
@@ -59,16 +59,11 @@ public class GenericBlogFeedImpl extends BaseBlogFeedImpl {
*/
private Entry<Object, Object> convertBlogPostToFeedItem(BlogPost post) {
// Convert Blog entry into an Item
- final Item item = new Item(
- post.getTitle(),
- post.getContent(),
- post.getLink(),
- post.getRelated(),
- post.getUpdated());
+ final Item item =
+ new Item(post.getTitle(), post.getContent(), post.getLink(), post.getRelated(), post.getUpdated());
// Add item to entry
- final Entry<Object, Object> entry = new Entry<Object, Object>(
- nextBlogID(), item);
+ final Entry<Object, Object> entry = new Entry<Object, Object>(nextBlogID(), item);
return entry;
}
diff --git a/sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/RSSBlogFeedImpl.java b/sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/RSSBlogFeedImpl.java
index b4526af5d0..efccffef67 100644
--- a/sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/RSSBlogFeedImpl.java
+++ b/sandbox/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/RSSBlogFeedImpl.java
@@ -23,20 +23,20 @@ import java.util.List;
import org.apache.tuscany.sca.binding.rss.collection.NotFoundException;
-import com.tuscanyscatours.blog.BlogPost;
-
import com.sun.syndication.feed.synd.SyndContent;
import com.sun.syndication.feed.synd.SyndContentImpl;
import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndEntryImpl;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.feed.synd.SyndFeedImpl;
+import com.tuscanyscatours.blog.BlogPost;
/**
* An RSS feed that implements the org.apache.tuscany.sca.binding.rss.collection.Collection
* interface and uses the RSS APIs to construct the RSS feed.
*/
-public class RSSBlogFeedImpl extends BaseBlogFeedImpl implements org.apache.tuscany.sca.binding.rss.collection.Collection {
+public class RSSBlogFeedImpl extends BaseBlogFeedImpl implements
+ org.apache.tuscany.sca.binding.rss.collection.Collection {
/**
* Gets an RSS feed containing all the blog posts.
@@ -57,7 +57,7 @@ public class RSSBlogFeedImpl extends BaseBlogFeedImpl implements org.apache.tusc
entry.setUri(nextBlogID());
entry.setAuthor(blogEntry.getAuthor());
entry.setTitle(blogEntry.getTitle());
-
+
SyndContent content = new SyndContentImpl();
content.setType("text");
content.setValue(blogEntry.getContent());