diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-01-24 14:24:14 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-01-24 14:24:14 +0000 |
commit | 3d3670cdd4ee1aaf6d3e22fd7de7fb362c9eefba (patch) | |
tree | b62fd62bad2d3713c7d2b331598c092413bd96c6 /sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed | |
parent | 878131a50cf9651fc8de402420b8c94696328a3c (diff) |
Copy into trunk from sandbox
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@902572 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed')
9 files changed, 625 insertions, 0 deletions
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/build.xml b/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/build.xml new file mode 100644 index 0000000000..2f0f6b12a5 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/build.xml @@ -0,0 +1,22 @@ +<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<project name="scatours-contribution-blog-feed" default="compile">
+ <import file="../../antdefs.xml"/>
+</project>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/pom.xml b/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/pom.xml new file mode 100644 index 0000000000..c7f90cfba0 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/pom.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>scatours</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent><version>1.0-SNAPSHOT</version>
+ <artifactId>scatours-contribution-blog-feed</artifactId>
+ <name>Apache Tuscany SCA Tours Blog Feed Contribution</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>${tuscany.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-tomcat</artifactId>
+ <version>${tuscany.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-atom</artifactId>
+ <version>${tuscany.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-atom-abdera</artifactId>
+ <version>${tuscany.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-rss-rome</artifactId>
+ <version>${tuscany.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.5</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>${artifactId}</finalName>
+ </build>
+</project>
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/BlogPost.java b/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/BlogPost.java new file mode 100644 index 0000000000..f93fe59b9d --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/BlogPost.java @@ -0,0 +1,68 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package com.tuscanyscatours.blog; + +import java.util.Date; + +/** + * Bean for blog posts. + */ +public class BlogPost { + + private final String author; + private final String title; + private final String content; + private final Date updated; + private final String link; + private final String related; + + public BlogPost(String author, String title, String content, Date updated, String link, String related) { + this.author = author; + this.title = title; + this.content = content; + this.updated = updated; + this.link = link; + this.related = related; + } + + public String getAuthor() { + return author; + } + + public String getTitle() { + return title; + } + + public String getContent() { + return content; + } + + public Date getUpdated() { + return updated; + } + + public String getLink() { + return link; + } + + public String getRelated() { + return related; + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/AtomBlogFeedImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/AtomBlogFeedImpl.java new file mode 100644 index 0000000000..b7a392f927 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/AtomBlogFeedImpl.java @@ -0,0 +1,124 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package com.tuscanyscatours.blog.feed.impl; + +import java.util.List; + +import org.apache.abdera.Abdera; +import org.apache.abdera.factory.Factory; +import org.apache.abdera.model.Entry; +import org.apache.abdera.model.Feed; +import org.apache.tuscany.sca.binding.atom.collection.NotFoundException; + +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 { + + /** + * Gets an Atom feed containing all the blog posts. + * + * @return An Atom feed containing all the blog posts. + */ + public Feed getFeed() { + // Create SCA Tours blog Atom feed + final Factory factory = Abdera.getNewFactory(); + final Feed feed = factory.newFeed(); + feed.setTitle(FEED_TITLE); + feed.setSubtitle(FEED_DESCRIPTION); + feed.addAuthor(FEED_AUTHOR); + + // Get all blog posts and convert to Atom entries + final List<BlogPost> blogEntries = getAllBlogPosts(); + for (BlogPost blogEntry : blogEntries) { + final Entry entry = factory.newEntry(); + entry.setId(nextBlogID()); + entry.addAuthor(blogEntry.getAuthor()); + entry.setTitle(blogEntry.getTitle()); + entry.setContentAsHtml(blogEntry.getContent()); + entry.setUpdated(blogEntry.getUpdated()); + entry.addLink(blogEntry.getLink()); + feed.addEntry(entry); + } + + return feed; + } + + /** + * Query the feed. + * + * @param query The query + * @return Always returns null as method not implemented + */ + public Feed query(String query) { + // Not implemented + return null; + } + + /** + * Posts a new entry to the blog. + * + * @param entry The new entry + * @return Always returns null as method not implemented + */ + public Entry post(Entry entry) { + // Not implemented + return null; + } + + /** + * Gets the specified entry from the blog. + * + * @param id ID of the entry to get + * @return Not used + * @throws NotFoundException Always thrown as method not implemented + */ + public Entry get(String id) throws NotFoundException { + // Not implemented + throw new NotFoundException("You are not allowed to update entries"); + } + + /** + * Updates the specified entry on the blog. + * + * @param id ID of the entry to update + * @param entry The new entry + * @throws NotFoundException Always thrown as method not implemented + */ + public void put(String id, Entry entry) throws NotFoundException { + // Not implemented + throw new NotFoundException("You are not allowed to update entries"); + } + + /** + * Deletes the specified entry from the blog. + * + * @param id ID of the entry to delete + * @throws NotFoundException Always thrown as method not implemented + */ + public void delete(String id) throws NotFoundException { + // Not implemented + throw new NotFoundException("You are not allowed to delete entries"); + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/BaseBlogFeedImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/BaseBlogFeedImpl.java new file mode 100644 index 0000000000..f132d340ea --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/BaseBlogFeedImpl.java @@ -0,0 +1,88 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package com.tuscanyscatours.blog.feed.impl; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; + +import com.tuscanyscatours.blog.BlogPost; + +/** + * Base class for all blog feeds that provides the common methods + * that are shared by all the blog feed implementations. + */ +public abstract class BaseBlogFeedImpl { + + /** + * Title of the blog.feed. + */ + protected static final String FEED_TITLE = "Tuscany SCA Tours Blog Feed"; + + /** + * Description of the blog feed. + */ + protected static final String FEED_DESCRIPTION = "Feed contianing the latest blog posts from Tuscany SCA Tours"; + + /** + * Author of the blog feed. + */ + protected static final String FEED_AUTHOR = "SCA Tours CEO"; + + /** + * Used to generate unique IDs for the blog entries. + */ + protected static final AtomicInteger ID_GEN = new AtomicInteger(); + + /** + * Generates the next blog entry ID. + * + * @return Next blog entry ID + */ + protected String nextBlogID() { + return Integer.toString(ID_GEN.incrementAndGet()); + } + + /** + * Retrieves a list of all blog posts. + * + * @return A list of all blog posts. + */ + public List<BlogPost> getAllBlogPosts() { + // Note: To keep things simple, we will just hard code a sample post. + // A proper implementation would load all blog posts from some resource + // such as files or a database. + 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); + + // Add sample post to the list of posts + blogEntries.add(samplePost); + + return blogEntries; + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/GenericBlogFeedImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/GenericBlogFeedImpl.java new file mode 100644 index 0000000000..c427b658a4 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/GenericBlogFeedImpl.java @@ -0,0 +1,70 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package com.tuscanyscatours.blog.feed.impl; + +import java.util.List; + +import org.apache.tuscany.sca.data.collection.Entry; +import org.apache.tuscany.sca.data.collection.Item; + +import com.tuscanyscatours.blog.BlogPost; + +/** + * Implementation of the blog feed that uses the Tuscany Data API so + * that it is independent of any Feed APIs such as Atom and RSS. + */ +public class GenericBlogFeedImpl extends BaseBlogFeedImpl { + + /** + * Implementation of the getAll() method from the Tuscany API + * that will return all of the blog posts as generic Tuscany + * feed items. + * + * @return All blog entries + */ + public Entry<Object, Object>[] getAll() { + final List<BlogPost> posts = getAllBlogPosts(); + + final Entry<Object, Object>[] entries = new Entry[posts.size()]; + int i = 0; + for (BlogPost post : posts) { + entries[i++] = convertBlogPostToFeedItem(post); + } + + return entries; + } + + /** + * Converts a blog post to a Tuscany API feed item. + * + * @param post The blog post to convert + * @return The blog post as a Tuscany API feed item + */ + 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()); + + // Add item to entry + final Entry<Object, Object> entry = new Entry<Object, Object>(nextBlogID(), item); + + return entry; + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/RSSBlogFeedImpl.java b/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/RSSBlogFeedImpl.java new file mode 100644 index 0000000000..efccffef67 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/java/com/tuscanyscatours/blog/feed/impl/RSSBlogFeedImpl.java @@ -0,0 +1,94 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package com.tuscanyscatours.blog.feed.impl; + +import java.util.List; + +import org.apache.tuscany.sca.binding.rss.collection.NotFoundException; + +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 { + + /** + * Gets an RSS feed containing all the blog posts. + * + * @return An RSS feed containing all the blog posts. + */ + public SyndFeed getFeed() { + // Create SCA Tours blog RSS feed + SyndFeed feed = new SyndFeedImpl(); + feed.setTitle(FEED_TITLE); + feed.setDescription(FEED_DESCRIPTION); + feed.setAuthor(FEED_AUTHOR); + + // Get all blog posts and convert to RSS entries + final List<BlogPost> blogEntries = getAllBlogPosts(); + for (BlogPost blogEntry : blogEntries) { + SyndEntry entry = new SyndEntryImpl(); + entry.setUri(nextBlogID()); + entry.setAuthor(blogEntry.getAuthor()); + entry.setTitle(blogEntry.getTitle()); + + SyndContent content = new SyndContentImpl(); + content.setType("text"); + content.setValue(blogEntry.getContent()); + + entry.setPublishedDate(blogEntry.getUpdated()); + entry.setLink(blogEntry.getLink()); + + feed.getEntries().add(entry); + } + + return feed; + } + + /** + * Query the feed. + * + * @param query The query + * @return Always returns null as method not implemented + */ + public SyndFeed query(String query) { + // Not implemented + return null; + } + + public SyndEntry get(String id) throws NotFoundException { + // Not implemented + return null; + } + + public List<SyndEntry> getAll() throws NotFoundException { + // Not implemented + return null; + } +} diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/resources/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..b4152d6e3f --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0">
+</contribution>
\ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/resources/blog-feed.composite b/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/resources/blog-feed.composite new file mode 100644 index 0000000000..751fd33cd2 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/contributions/blog-feed/src/main/resources/blog-feed.composite @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ name="blogFeed">
+
+ <!-- Example that shows using the Tuscany Data APIs to create a feed that -->
+ <!-- is independent of the Feed API -->
+ <service name="BlogAtom" promote="BlogFeed">
+ <tuscany:binding.atom uri="http://localhost:8090/BlogAtom"/>
+ </service>
+
+ <service name="BlogRSS" promote="BlogFeed">
+ <tuscany:binding.rss uri="http://localhost:8090/BlogRSS"/>
+ </service>
+
+ <component name="BlogFeed">
+ <implementation.java class="com.tuscanyscatours.blog.feed.impl.GenericBlogFeedImpl"/>
+ </component>
+
+ <!-- Example that shows using the Atom Collections API to create a feed that -->
+ <!-- uses the Atom APIs -->
+ <service name="BlogAtomAPIs" promote="BlogAtom">
+ <tuscany:binding.atom uri="http://localhost:8090/BlogAtomAPIs"/>
+ </service>
+
+ <component name="BlogAtom">
+ <implementation.java class="com.tuscanyscatours.blog.feed.impl.AtomBlogFeedImpl"/>
+ </component>
+
+ <!-- Example that shows using the RSS Collections API to create a feed that -->
+ <!-- uses the RSS APIs -->
+ <service name="BlogRSSAPIs" promote="BlogRSS">
+ <tuscany:binding.rss uri="http://localhost:8090/BlogRSSAPIs"/>
+ </service>
+
+ <component name="BlogRSS">
+ <implementation.java class="com.tuscanyscatours.blog.feed.impl.RSSBlogFeedImpl"/>
+ </component>
+</composite>
|