jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1431499 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: api/TreeLocation.java core/ReadOnlyTree.java core/TreeImpl.java
Date Thu, 10 Jan 2013 16:59:28 GMT
Author: angela
Date: Thu Jan 10 16:59:28 2013
New Revision: 1431499

URL: http://svn.apache.org/viewvc?rev=1431499&view=rev
Log:
OAK-549 : PropertyLocation#remove not part of TreeLocation API

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/TreeLocation.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ReadOnlyTree.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/TreeLocation.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/TreeLocation.java?rev=1431499&r1=1431498&r2=1431499&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/TreeLocation.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/TreeLocation.java
Thu Jan 10 16:59:28 2013
@@ -67,6 +67,14 @@ public interface TreeLocation {
         }
 
         /**
+         * @return Always {@code false}.
+         */
+        @Override
+        public boolean remove() {
+            return false;
+        }
+
+        /**
          * @return  {@code null}
          */
         @Override
@@ -136,4 +144,11 @@ public interface TreeLocation {
     @CheckForNull
     String getPath();
 
+    /**
+     * Remove the underlying item.
+     *
+     * @return {@code true} if the item was removed, {@code false} otherwise.
+     */
+    boolean remove();
+
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ReadOnlyTree.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ReadOnlyTree.java?rev=1431499&r1=1431498&r2=1431499&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ReadOnlyTree.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ReadOnlyTree.java
Thu Jan 10 16:59:28 2013
@@ -266,6 +266,11 @@ public class ReadOnlyTree implements Tre
         }
 
         @Override
+        public boolean remove() {
+            return false;
+        }
+
+        @Override
         public Tree getTree() {
             return tree;
         }
@@ -306,6 +311,11 @@ public class ReadOnlyTree implements Tre
         }
 
         @Override
+        public boolean remove() {
+            return false;
+        }
+
+        @Override
         public Tree getTree() {
             return null;
         }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java?rev=1431499&r1=1431498&r2=1431499&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
Thu Jan 10 16:59:28 2013
@@ -623,6 +623,11 @@ public class TreeImpl implements Tree {
         }
 
         @Override
+        public boolean remove() {
+            return tree.remove();
+        }
+
+        @Override
         public Tree getTree() {
             return canRead(tree) ? tree : null;
         }
@@ -692,6 +697,7 @@ public class TreeImpl implements Tree {
          * Remove the underlying property
          * @return  {@code true} on success false otherwise
          */
+        @Override
         public boolean remove() {
             parent.tree.removeProperty(name);
             return true;



Mime
View raw message