jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1224987 - in /jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state: ChangeTree.java TransientSpace.java
Date Tue, 27 Dec 2011 19:33:29 GMT
Author: mduerig
Date: Tue Dec 27 19:33:29 2011
New Revision: 1224987

URL: http://svn.apache.org/viewvc?rev=1224987&view=rev
Log:
Microkernel based prototype of JCR implementation (WIP)
- refactor

Modified:
    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/ChangeTree.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/ChangeTree.java?rev=1224987&r1=1224986&r2=1224987&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
Tue Dec 27 19:33:29 2011
@@ -59,9 +59,9 @@ import java.util.Map.Entry;
  */
 public class ChangeTree {
     private final NodeDelta root;
-    private final Function1<String, Boolean> nodeExists;
+    private final Function1<Path, Boolean> nodeExists;
 
-    public ChangeTree(final Path rootPath, Function1<String, Boolean> nodeExists) {
+    public ChangeTree(final Path rootPath, Function1<Path, Boolean> nodeExists) {
         this.nodeExists = nodeExists;
 
         root = new Existing(null, "") {
@@ -368,7 +368,7 @@ public class ChangeTree {
         public NodeDelta getNode(String name) {
             NodeDelta delta = getChild(name);
             if (delta == null) {
-                return nodeExists.apply(getPath().concat(name).getMkPath())
+                return nodeExists.apply(getPath().concat(name))
                         ? new Existing(this, name)
                         : null;
             }

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=1224987&r1=1224986&r2=1224987&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
Tue Dec 27 19:33:29 2011
@@ -20,10 +20,10 @@ public class TransientSpace {
         this.microkernel = microkernel;
         this.revision = revision;
 
-        changeTree = new ChangeTree(Path.create(workspace), new Function1<String, Boolean>()
{
+        changeTree = new ChangeTree(Path.create(workspace), new Function1<Path, Boolean>()
{
             @Override
-            public Boolean apply(String path) {
-                return microkernel.nodeExists(path, getRevision());
+            public Boolean apply(Path path) {
+                return microkernel.nodeExists(path.getMkPath(), getRevision());
             }
         });
     }



Mime
View raw message