chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r901728 - in /incubator/chemistry/trunk/chemistry: chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/ chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/
Date Thu, 21 Jan 2010 14:46:53 GMT
Author: fguillaume
Date: Thu Jan 21 14:46:52 2010
New Revision: 901728

URL: http://svn.apache.org/viewvc?rev=901728&view=rev
Log:
Don't crash on some unimplemented features (checkedout collection), just return empty

Modified:
    incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISCheckedOutCollection.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISCheckedOutCollection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISCheckedOutCollection.java?rev=901728&r1=901727&r2=901728&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISCheckedOutCollection.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISCheckedOutCollection.java
Thu Jan 21 14:46:52 2010
@@ -38,7 +38,7 @@
 public class CMISCheckedOutCollection extends CMISObjectsCollection {
 
     public CMISCheckedOutCollection(Repository repository) {
-        super("checkedout", null, null, repository);
+        super("checkedout", "checkedout", null, repository);
     }
 
     /*
@@ -55,6 +55,11 @@
         return feed;
     }
 
+    @Override
+    public String getId(RequestContext request) {
+        return "urn:x-checkedout";
+    }
+
     /*
      * ----- AbstractEntityCollectionAdapter -----
      */

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java?rev=901728&r1=901727&r2=901728&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
Thu Jan 21 14:46:52 2010
@@ -150,8 +150,10 @@
         feed.setUpdated(new Date()); // XXX
         feed.addLink(getServiceLink(request), AtomPub.LINK_SERVICE,
                 AtomPub.MEDIA_TYPE_ATOM_SERVICE, null, null, -1);
-        feed.addLink(getObjectLink(id, request), AtomPub.LINK_VIA,
-                AtomPub.MEDIA_TYPE_ATOM_ENTRY, null, null, -1);
+        if (id != null) {
+            feed.addLink(getObjectLink(id, request), AtomPub.LINK_VIA,
+                    AtomPub.MEDIA_TYPE_ATOM_ENTRY, null, null, -1);
+        }
         return feed;
     }
 

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java?rev=901728&r1=901727&r2=901728&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java
Thu Jan 21 14:46:52 2010
@@ -263,7 +263,7 @@
     public ListPage<ObjectEntry> getCheckedOutDocuments(ObjectId folder,
             Inclusion inclusion, Paging paging) {
         // TODO Auto-generated method stub
-        throw new UnsupportedOperationException();
+        return SimpleListPage.emptyList();
     }
 
     /*
@@ -439,7 +439,7 @@
 
     public Collection<QName> getAllowableActions(ObjectId object) {
         // TODO Auto-generated method stub
-        throw new UnsupportedOperationException();
+        return SimpleListPage.emptyList();
     }
 
     public ObjectEntry getProperties(ObjectId object, Inclusion inclusion) {
@@ -914,7 +914,7 @@
             String typeId, boolean includeSubRelationshipTypes,
             Inclusion inclusion, Paging paging) {
         // TODO Auto-generated method stub
-        throw new UnsupportedOperationException();
+        return SimpleListPage.emptyList();
     }
 
     /*
@@ -934,7 +934,7 @@
     public Collection<ObjectEntry> getAppliedPolicies(ObjectId policy,
             String filter) {
         // TODO Auto-generated method stub
-        throw new UnsupportedOperationException();
+        return Collections.emptyList();
     }
 
     /*



Mime
View raw message