jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1394075 - in /jackrabbit/oak/trunk: oak-core/pom.xml oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyDelegate.java
Date Thu, 04 Oct 2012 13:44:48 GMT
Author: mduerig
Date: Thu Oct  4 13:44:48 2012
New Revision: 1394075

URL: http://svn.apache.org/viewvc?rev=1394075&view=rev
Log:
OAK-350: Unify PropertyState and CoreValue
- Replace usages of deprecated methods on PropertyLocation with new methods and remove deprecated
methods

Modified:
    jackrabbit/oak/trunk/oak-core/pom.xml
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyDelegate.java

Modified: jackrabbit/oak/trunk/oak-core/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/pom.xml?rev=1394075&r1=1394074&r2=1394075&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-core/pom.xml Thu Oct  4 13:44:48 2012
@@ -49,6 +49,7 @@
               org.apache.jackrabbit.oak.plugins.identifier,
               org.apache.jackrabbit.oak.plugins.index.lucene,
               org.apache.jackrabbit.oak.plugins.index.property,
+              org.apache.jackrabbit.oak.plugins.memory,
               org.apache.jackrabbit.oak.plugins.name,
               org.apache.jackrabbit.oak.plugins.type,
               org.apache.jackrabbit.oak.spi.query,

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=1394075&r1=1394074&r2=1394075&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 Oct  4 13:44:48 2012
@@ -627,28 +627,6 @@ public class TreeImpl implements Tree, P
         }
 
         /**
-         * Set the value of the underlying property
-         * @param value the value to set
-         * @return  {@code true} on success false otherwise
-         */
-        @Deprecated
-        public boolean setValue(CoreValue value) {
-            parent.tree.setProperty(property.getName(), value);
-            return true;
-        }
-
-        /**
-         * Set the values of the underlying property
-         * @param values the values to set
-         * @return  {@code true} on success false otherwise
-         */
-        @Deprecated
-        public boolean setValues(List<CoreValue> values) {
-            parent.tree.setProperty(property.getName(), values);
-            return true;
-        }
-
-        /**
          * Set the underlying property
          * @param property The property to set
          */

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyDelegate.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyDelegate.java?rev=1394075&r1=1394074&r2=1394075&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyDelegate.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyDelegate.java
Thu Oct  4 13:44:48 2012
@@ -29,6 +29,8 @@ import org.apache.jackrabbit.oak.api.Cor
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.TreeLocation;
 import org.apache.jackrabbit.oak.core.TreeImpl.PropertyLocation;
+import org.apache.jackrabbit.oak.plugins.memory.MultiPropertyState;
+import org.apache.jackrabbit.oak.plugins.memory.SinglePropertyState;
 import org.apache.jackrabbit.oak.util.TODO;
 
 /**
@@ -180,7 +182,7 @@ public class PropertyDelegate extends It
      * @param value
      */
     public void setValue(CoreValue value) throws InvalidItemStateException {
-        getLocation().setValue(value);
+        getLocation().set(new SinglePropertyState(getName(), value));
     }
 
     /**
@@ -188,7 +190,7 @@ public class PropertyDelegate extends It
      * @param values
      */
     public void setValues(List<CoreValue> values) throws InvalidItemStateException
{
-        getLocation().setValues(values);
+        getLocation().set(new MultiPropertyState(getName(), values));
     }
 
     /**



Mime
View raw message