tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r567424 - in /incubator/tuscany/java/sca: demos/bigbank-account/src/main/java/bigbank/account/feed/ modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/ modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/fe...
Date Sun, 19 Aug 2007 16:37:09 GMT
Author: jsdelfino
Date: Sun Aug 19 09:37:06 2007
New Revision: 567424

URL: http://svn.apache.org/viewvc?view=rev&rev=567424
Log:
Minor refactoring of the feed interface, moved the media entry related methods to a separate
MediaCollection interface. Also added @Remotable to the interfaces.

Added:
    incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/
    incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/Collection.java
  (with props)
    incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/MediaCollection.java
  (with props)
    incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/NotFoundException.java
  (with props)
Removed:
    incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/Collection.java
    incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/NotFoundException.java
Modified:
    incubator/tuscany/java/sca/demos/bigbank-account/src/main/java/bigbank/account/feed/AccountFeedImpl.java
    incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/AtomBinding.java
    incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/RSSBinding.java
    incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/AtomBindingInvoker.java
    incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java
    incubator/tuscany/java/sca/modules/binding-feed/src/test/java/org/apache/tuscany/sca/binding/feed/CustomerClientImpl.java
    incubator/tuscany/java/sca/modules/binding-feed/src/test/java/org/apache/tuscany/sca/binding/feed/CustomerCollectionImpl.java
    incubator/tuscany/java/sca/modules/implementation-data/src/test/java/org/apache/tuscany/sca/implementation/data/companyFeed/CompanyFeed.java
    incubator/tuscany/java/sca/samples/feed-aggregator/src/main/java/feed/AggregatorImpl.java

Modified: incubator/tuscany/java/sca/demos/bigbank-account/src/main/java/bigbank/account/feed/AccountFeedImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/bigbank-account/src/main/java/bigbank/account/feed/AccountFeedImpl.java?view=diff&rev=567424&r1=567423&r2=567424
==============================================================================
--- incubator/tuscany/java/sca/demos/bigbank-account/src/main/java/bigbank/account/feed/AccountFeedImpl.java
(original)
+++ incubator/tuscany/java/sca/demos/bigbank-account/src/main/java/bigbank/account/feed/AccountFeedImpl.java
Sun Aug 19 09:37:06 2007
@@ -21,8 +21,8 @@
 import java.io.InputStream;
 import java.util.Collections;
 
-import org.apache.tuscany.sca.binding.feed.Collection;
-import org.apache.tuscany.sca.binding.feed.NotFoundException;
+import org.apache.tuscany.sca.feed.Collection;
+import org.apache.tuscany.sca.feed.NotFoundException;
 import org.osoa.sca.annotations.Reference;
 import org.osoa.sca.annotations.Service;
 
@@ -94,11 +94,4 @@
         return null;
     }
 
-    public Entry postMedia(String title, String slug, String contentType, InputStream media)
{
-        return null;
-    }
-    
-    public Entry putMedia(String id, String contentType, InputStream media) throws NotFoundException
{
-        return null;
-    }
 }

Modified: incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/AtomBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/AtomBinding.java?view=diff&rev=567424&r1=567423&r2=567424
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/AtomBinding.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/AtomBinding.java
Sun Aug 19 09:37:06 2007
@@ -19,13 +19,10 @@
 
 package org.apache.tuscany.sca.binding.feed;
 
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
 import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.policy.Intent;
-import org.apache.tuscany.sca.policy.PolicySet;
 
 /**
  * Implementation of the Atom binding model.

Modified: incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/RSSBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/RSSBinding.java?view=diff&rev=567424&r1=567423&r2=567424
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/RSSBinding.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/RSSBinding.java
Sun Aug 19 09:37:06 2007
@@ -19,13 +19,10 @@
 
 package org.apache.tuscany.sca.binding.feed;
 
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
 import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.policy.Intent;
-import org.apache.tuscany.sca.policy.PolicySet;
 
 /**
  * Implementation of the Feed binding model.

Modified: incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/AtomBindingInvoker.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/AtomBindingInvoker.java?view=diff&rev=567424&r1=567423&r2=567424
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/AtomBindingInvoker.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/AtomBindingInvoker.java
Sun Aug 19 09:37:06 2007
@@ -27,7 +27,7 @@
 import org.apache.commons.httpclient.methods.PostMethod;
 import org.apache.commons.httpclient.methods.PutMethod;
 import org.apache.commons.httpclient.methods.StringRequestEntity;
-import org.apache.tuscany.sca.binding.feed.NotFoundException;
+import org.apache.tuscany.sca.feed.NotFoundException;
 import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.invocation.Invoker;
 import org.apache.tuscany.sca.invocation.Message;

Modified: incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java?view=diff&rev=567424&r1=567423&r2=567424
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java
Sun Aug 19 09:37:06 2007
@@ -30,7 +30,7 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.commons.codec.binary.Base64;
-import org.apache.tuscany.sca.binding.feed.NotFoundException;
+import org.apache.tuscany.sca.feed.NotFoundException;
 import org.apache.tuscany.sca.invocation.InvocationChain;
 import org.apache.tuscany.sca.invocation.Invoker;
 import org.apache.tuscany.sca.invocation.Message;

Added: incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/Collection.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/Collection.java?view=auto&rev=567424
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/Collection.java
(added)
+++ incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/Collection.java
Sun Aug 19 09:37:06 2007
@@ -0,0 +1,73 @@
+/*
+ * 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 org.apache.tuscany.sca.feed;
+
+import org.osoa.sca.annotations.Remotable;
+
+import com.sun.syndication.feed.atom.Entry;
+
+/**
+ * Provides access to a collection of resources using Atom.
+ * 
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface Collection {
+
+    /**
+     * Get an RSS or Atom feed for a collection of resources.
+     * 
+     * @param uri the uri of the feed
+     * @return the RSS or Atom feed
+     */
+    com.sun.syndication.feed.atom.Feed getFeed();
+
+    /**
+     * Creates a new entry.
+     * 
+     * @param entry
+     * @return
+     */
+    Entry post(Entry entry);
+
+    /**
+     * Retrieves an entry.
+     * 
+     * @param id
+     * @return
+     */
+    Entry get(String id) throws NotFoundException;
+
+    /**
+     * Update an entry.
+     * 
+     * @param id
+     * @param entry
+     * @return
+     */
+    Entry put(String id, Entry entry) throws NotFoundException;
+
+    /**
+     * Delete an entry.
+     * 
+     * @param id
+     */
+    void delete(String id) throws NotFoundException;
+
+}

Propchange: incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/Collection.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/Collection.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/MediaCollection.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/MediaCollection.java?view=auto&rev=567424
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/MediaCollection.java
(added)
+++ incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/MediaCollection.java
Sun Aug 19 09:37:06 2007
@@ -0,0 +1,55 @@
+/*
+ * 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 org.apache.tuscany.sca.feed;
+
+import java.io.InputStream;
+
+import org.osoa.sca.annotations.Remotable;
+
+import com.sun.syndication.feed.atom.Entry;
+
+/**
+ * Provides access to a collection of resources using Atom.
+ * 
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface MediaCollection extends Collection {
+
+    /**
+     * Creates a new media entry
+     * 
+     * @param title
+     * @param slug
+     * @param contentType
+     * @param media
+     */
+    Entry postMedia(String title, String slug, String contentType, InputStream media);
+
+    /**
+     * Update a media entry.
+     * 
+     * @param id
+     * @param contentType
+     * @param media
+     * @return
+     */
+    Entry putMedia(String id, String contentType, InputStream media) throws NotFoundException;
+
+}

Propchange: incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/MediaCollection.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/MediaCollection.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/NotFoundException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/NotFoundException.java?view=auto&rev=567424
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/NotFoundException.java
(added)
+++ incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/NotFoundException.java
Sun Aug 19 09:37:06 2007
@@ -0,0 +1,45 @@
+/*
+ * 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 org.apache.tuscany.sca.feed;
+
+/**
+ * Indicates that a resource could not be found.
+ * 
+ * @version $Rev$ $Date$
+ */
+public class NotFoundException extends Exception {
+    private static final long serialVersionUID = -5046027674128627383L;
+
+    public NotFoundException() {
+    }
+
+    public NotFoundException(String message) {
+        super(message);
+    }
+
+    public NotFoundException(Throwable cause) {
+        super(cause);
+    }
+
+    public NotFoundException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/NotFoundException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/binding-feed/src/main/java/org/apache/tuscany/sca/feed/NotFoundException.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/modules/binding-feed/src/test/java/org/apache/tuscany/sca/binding/feed/CustomerClientImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-feed/src/test/java/org/apache/tuscany/sca/binding/feed/CustomerClientImpl.java?view=diff&rev=567424&r1=567423&r2=567424
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-feed/src/test/java/org/apache/tuscany/sca/binding/feed/CustomerClientImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-feed/src/test/java/org/apache/tuscany/sca/binding/feed/CustomerClientImpl.java
Sun Aug 19 09:37:06 2007
@@ -22,6 +22,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.tuscany.sca.feed.Collection;
 import org.osoa.sca.annotations.Reference;
 
 import com.sun.syndication.feed.atom.Content;

Modified: incubator/tuscany/java/sca/modules/binding-feed/src/test/java/org/apache/tuscany/sca/binding/feed/CustomerCollectionImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-feed/src/test/java/org/apache/tuscany/sca/binding/feed/CustomerCollectionImpl.java?view=diff&rev=567424&r1=567423&r2=567424
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-feed/src/test/java/org/apache/tuscany/sca/binding/feed/CustomerCollectionImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-feed/src/test/java/org/apache/tuscany/sca/binding/feed/CustomerCollectionImpl.java
Sun Aug 19 09:37:06 2007
@@ -28,6 +28,8 @@
 import java.util.Map;
 import java.util.UUID;
 
+import org.apache.tuscany.sca.feed.Collection;
+import org.apache.tuscany.sca.feed.NotFoundException;
 import org.osoa.sca.annotations.Scope;
 
 import com.sun.syndication.feed.atom.Content;
@@ -134,11 +136,4 @@
         return feed;
     }
 
-    public Entry postMedia(String title, String slug, String contentType, InputStream media)
{
-        return null;
-    }
-
-    public Entry putMedia(String id, String contentType, InputStream media) throws NotFoundException
{
-        return null;
-    }
 }

Modified: incubator/tuscany/java/sca/modules/implementation-data/src/test/java/org/apache/tuscany/sca/implementation/data/companyFeed/CompanyFeed.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-data/src/test/java/org/apache/tuscany/sca/implementation/data/companyFeed/CompanyFeed.java?view=diff&rev=567424&r1=567423&r2=567424
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-data/src/test/java/org/apache/tuscany/sca/implementation/data/companyFeed/CompanyFeed.java
(original)
+++ incubator/tuscany/java/sca/modules/implementation-data/src/test/java/org/apache/tuscany/sca/implementation/data/companyFeed/CompanyFeed.java
Sun Aug 19 09:37:06 2007
@@ -25,8 +25,8 @@
 import java.util.Date;
 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.feed.Collection;
+import org.apache.tuscany.sca.feed.NotFoundException;
 import org.apache.tuscany.sca.implementation.data.DATA;
 import org.osoa.sca.annotations.Reference;
 
@@ -96,15 +96,7 @@
         return null;
     }
 
-    public Entry postMedia(String title, String slug, String contentType, InputStream media)
{
-        return null;
-    }
-
     public Entry put(String id, Entry entry) throws NotFoundException {
-        return null;
-    }
-
-    public Entry putMedia(String id, String contentType, InputStream media) throws NotFoundException
{
         return null;
     }
 

Modified: incubator/tuscany/java/sca/samples/feed-aggregator/src/main/java/feed/AggregatorImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/feed-aggregator/src/main/java/feed/AggregatorImpl.java?view=diff&rev=567424&r1=567423&r2=567424
==============================================================================
--- incubator/tuscany/java/sca/samples/feed-aggregator/src/main/java/feed/AggregatorImpl.java
(original)
+++ incubator/tuscany/java/sca/samples/feed-aggregator/src/main/java/feed/AggregatorImpl.java
Sun Aug 19 09:37:06 2007
@@ -23,7 +23,7 @@
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.tuscany.sca.binding.feed.NotFoundException;
+import org.apache.tuscany.sca.feed.NotFoundException;
 import org.osoa.sca.annotations.Property;
 import org.osoa.sca.annotations.Reference;
 
@@ -38,12 +38,12 @@
  *
  * @version $Rev$ $Date$
  */
-public class AggregatorImpl implements org.apache.tuscany.sca.binding.feed.Collection {
+public class AggregatorImpl implements org.apache.tuscany.sca.feed.Collection {
 
     @Reference
-    public org.apache.tuscany.sca.binding.feed.Collection feed1;
+    public org.apache.tuscany.sca.feed.Collection feed1;
     @Reference
-    public org.apache.tuscany.sca.binding.feed.Collection feed2;
+    public org.apache.tuscany.sca.feed.Collection feed2;
     @Reference(required = false)
     public Sort sort;
 
@@ -94,16 +94,8 @@
         return null;
     }
 
-    public Entry postMedia(String title, String slug, String contentType, InputStream media)
{
-        return null;
-    }
-
     public Entry put(String id, Entry entry) throws NotFoundException {
         return null;
     }
 
-    public Entry putMedia(String id, String contentType, InputStream media) throws NotFoundException
{
-        return null;
-    }
-    
 }



---------------------------------------------------------------------
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