tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r567355 - in /incubator/tuscany/java/sca/demos/alert-aggregator/src: main/java/org/apache/tuscany/sca/demos/aggregator/AlertsFeedServiceImpl.java test/java/org/apache/tuscany/sca/demos/aggregator/AlertsTestCase.java
Date Sun, 19 Aug 2007 06:23:46 GMT
Author: rfeng
Date: Sat Aug 18 23:23:45 2007
New Revision: 567355

URL: http://svn.apache.org/viewvc?view=rev&rev=567355
Log:
Fix the broken alert-aggregator demo

Modified:
    incubator/tuscany/java/sca/demos/alert-aggregator/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsFeedServiceImpl.java
    incubator/tuscany/java/sca/demos/alert-aggregator/src/test/java/org/apache/tuscany/sca/demos/aggregator/AlertsTestCase.java

Modified: incubator/tuscany/java/sca/demos/alert-aggregator/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsFeedServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/alert-aggregator/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsFeedServiceImpl.java?view=diff&rev=567355&r1=567354&r2=567355
==============================================================================
--- incubator/tuscany/java/sca/demos/alert-aggregator/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsFeedServiceImpl.java
(original)
+++ incubator/tuscany/java/sca/demos/alert-aggregator/src/main/java/org/apache/tuscany/sca/demos/aggregator/AlertsFeedServiceImpl.java
Sat Aug 18 23:23:45 2007
@@ -19,16 +19,19 @@
 
 package org.apache.tuscany.sca.demos.aggregator;
 
+import java.io.InputStream;
 import java.text.DateFormat;
 import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.tuscany.sca.binding.feed.Collection;
+import org.apache.tuscany.sca.binding.feed.NotFoundException;
 import org.apache.tuscany.sca.demos.aggregator.types.AlertType;
 import org.apache.tuscany.sca.demos.aggregator.types.AlertsType;
 import org.osoa.sca.annotations.Reference;
 import org.osoa.sca.annotations.Service;
 
+import com.sun.syndication.feed.atom.Entry;
 import com.sun.syndication.feed.atom.Feed;
 import com.sun.syndication.feed.synd.SyndEntry;
 import com.sun.syndication.feed.synd.SyndEntryImpl;
@@ -89,5 +92,46 @@
         feed.setEntries(entries);
         
         return (Feed)feed.createWireFeed("atom_1.0");
+    }
+
+    /**
+     * @see org.apache.tuscany.sca.binding.feed.Collection#delete(java.lang.String)
+     */
+    public void delete(String id) throws NotFoundException {
+    }
+
+    /**
+     * @see org.apache.tuscany.sca.binding.feed.Collection#get(java.lang.String)
+     */
+    public Entry get(String id) throws NotFoundException {
+        return null;
+    }
+
+    /**
+     * @see org.apache.tuscany.sca.binding.feed.Collection#post(com.sun.syndication.feed.atom.Entry)
+     */
+    public Entry post(Entry entry) {
+        return null;
+    }
+
+    /**
+     * @see org.apache.tuscany.sca.binding.feed.Collection#postMedia(java.lang.String, java.lang.String,
java.lang.String, java.io.InputStream)
+     */
+    public Entry postMedia(String title, String slug, String contentType, InputStream media)
{
+        return null;
+    }
+
+    /**
+     * @see org.apache.tuscany.sca.binding.feed.Collection#put(java.lang.String, com.sun.syndication.feed.atom.Entry)
+     */
+    public Entry put(String id, Entry entry) throws NotFoundException {
+        return null;
+    }
+
+    /**
+     * @see org.apache.tuscany.sca.binding.feed.Collection#putMedia(java.lang.String, java.lang.String,
java.io.InputStream)
+     */
+    public Entry putMedia(String id, String contentType, InputStream media) throws NotFoundException
{
+        return null;
     }    
 }

Modified: incubator/tuscany/java/sca/demos/alert-aggregator/src/test/java/org/apache/tuscany/sca/demos/aggregator/AlertsTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/alert-aggregator/src/test/java/org/apache/tuscany/sca/demos/aggregator/AlertsTestCase.java?view=diff&rev=567355&r1=567354&r2=567355
==============================================================================
--- incubator/tuscany/java/sca/demos/alert-aggregator/src/test/java/org/apache/tuscany/sca/demos/aggregator/AlertsTestCase.java
(original)
+++ incubator/tuscany/java/sca/demos/alert-aggregator/src/test/java/org/apache/tuscany/sca/demos/aggregator/AlertsTestCase.java
Sat Aug 18 23:23:45 2007
@@ -61,19 +61,19 @@
 
     public void testGetAllNewAlerts() throws Exception {   
         JSONObject jsonRequest = new JSONObject("{\"params\":[\"sometext\"],\"method\":\"getAllNewAlerts\",\"id\":2}");
-        JSONObject jsonResp    = callService ("http://localhost:8080/SCADomain/AlertsServiceJSONRPC",
+        JSONObject jsonResp    = callService ("http://localhost:8080/AlertsServiceJSONRPC",
                                               jsonRequest);                             
    
     }   
     
     public void testAddAlertSources() throws Exception {   
         JSONObject jsonRequest = new JSONObject("{\"params\":[{\"name\":\"news\",\"id\":\"2\",\"address\":\"www.news.com\",\"feedAddress\":\"http://news.com.com/2547-1_3-0-20.xml\",\"feedType\":\"rss\",\"lastChecked\":\"lastChecked\",\"javaClass\":\"org.apache.tuscany.sca.demos.aggregator.types.impl.SourceTypeImpl\"}],\"method\":\"addAlertSource\",\"id\":2}");
-        JSONObject jsonResp    = callService ("http://localhost:8080/SCADomain/AlertsSourcesServiceJSONRPC",
+        JSONObject jsonResp    = callService ("http://localhost:8080/AlertsSourcesServiceJSONRPC",
                                               jsonRequest);  
     }
   
     public void testGetAlertSources() throws Exception {  
         JSONObject jsonRequest = new JSONObject("{\"params\":[\"sometext\"],\"method\":\"getAlertSources\",\"id\":2}");
-        JSONObject jsonResp    = callService ("http://localhost:8080/SCADomain/AlertsSourcesServiceJSONRPC",
+        JSONObject jsonResp    = callService ("http://localhost:8080/AlertsSourcesServiceJSONRPC",
                                               jsonRequest);                             
   
         assertEquals("BBC News", jsonResp.getJSONObject("result").getJSONObject("source").optJSONArray("list").getJSONObject(0).getString("name"));

     }    



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message