jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1243505 - in /jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state: ChangeLog.java ChangeTree.java TransientSpace.java
Date Mon, 13 Feb 2012 13:42:43 GMT
Author: mduerig
Date: Mon Feb 13 13:42:43 2012
New Revision: 1243505

URL: http://svn.apache.org/viewvc?rev=1243505&view=rev
Log:
Microkernel based prototype of JCR implementation (WIP)
- Allow multi valued properties in change log

Modified:
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeLog.java
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeTree.java
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientSpace.java

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeLog.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeLog.java?rev=1243505&r1=1243504&r2=1243505&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeLog.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeLog.java
Mon Feb 13 13:42:43 2012
@@ -20,6 +20,7 @@
 package org.apache.jackrabbit.state;
 
 import org.apache.jackrabbit.Path;
+import org.apache.jackrabbit.json.JsonValue;
 import org.apache.jackrabbit.json.JsonValue.JsonAtom;
 
 import java.util.ArrayList;
@@ -80,7 +81,7 @@ public class ChangeLog {
      * @param name  name of the property
      * @param value  value of the property
      */
-    public void setProperty(Path parent, String name, JsonAtom value) {
+    public void setProperty(Path parent, String name, JsonValue value) {
         if (value == null) {
             value = JsonAtom.NULL;
         }
@@ -296,9 +297,9 @@ public class ChangeLog {
 
         private final Path from;
         private final Path to;
-        private final JsonAtom value;
+        private final JsonValue value;
 
-        private Operation(Path from, Path to, JsonAtom value) {
+        private Operation(Path from, Path to, JsonValue value) {
             if (from == null || to == null) {
                 throw new IllegalArgumentException("path is null");
             }
@@ -356,7 +357,7 @@ public class ChangeLog {
          * @param value  value of the property
          * @return  new set property operation
          */
-        public static Operation setProperty(Path parent, String name, JsonAtom value) {
+        public static Operation setProperty(Path parent, String name, JsonValue value) {
             return new Operation(NIL, encodeProperty(parent, name), value);
         }
 

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeTree.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeTree.java?rev=1243505&r1=1243504&r2=1243505&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeTree.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeTree.java
Mon Feb 13 13:42:43 2012
@@ -327,7 +327,7 @@ public class ChangeTree {
          * @param name
          * @param value
          */
-        public void setValue(String name, JsonValue value) {  // fixme: make this JsonAtom!?
+        public void setValue(String name, JsonValue value) {
             if (value == null && properties.containsKey(name) && properties.get(name)
!= null) {
                 properties.remove(name);
             }

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientSpace.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientSpace.java?rev=1243505&r1=1243504&r2=1243505&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientSpace.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientSpace.java
Mon Feb 13 13:42:43 2012
@@ -71,7 +71,7 @@ public class TransientSpace {
 
             @Override
             public void setValue(NodeDelta parent, String name, JsonValue value) {
-                changeLog.setProperty(parent.getPath(), name, value == null ? null : value.asAtom());
 // fixme: JsonValue should be JsonAtom
+                changeLog.setProperty(parent.getPath(), name, value);
             }
         };
 



Mime
View raw message