jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1451537 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
Date Fri, 01 Mar 2013 09:07:24 GMT
Author: alexparvulescu
Date: Fri Mar  1 09:07:24 2013
New Revision: 1451537

URL: http://svn.apache.org/r1451537
Log:
OAK-661 Thin fallback for shared node sets

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java?rev=1451537&r1=1451536&r2=1451537&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
Fri Mar  1 09:07:24 2013
@@ -59,6 +59,7 @@ import javax.jcr.version.VersionHistory;
 import com.google.common.base.Function;
 import com.google.common.base.Predicate;
 import com.google.common.base.Predicates;
+import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Iterators;
 import com.google.common.collect.Lists;
@@ -1253,17 +1254,22 @@ public class NodeImpl<T extends NodeDele
     @Override
     @Nonnull
     public NodeIterator getSharedSet() throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException("TODO: Node.getSharedSet");
+        checkStatus();
+        checkProtected();
+        return new NodeIteratorAdapter(ImmutableSet.of(this));
     }
 
     @Override
     public void removeSharedSet() throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException("TODO: Node.removeSharedSet");
+        NodeIterator iter = getSharedSet();
+        while (iter.hasNext()) {
+            iter.nextNode().removeShare();
+        }
     }
 
     @Override
     public void removeShare() throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException("TODO: Node.removeShare");
+        remove();
     }
 
     /**



Mime
View raw message