jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1158444 - in /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel: RepositoryServiceImpl.java util/ItemInfos.java
Date Tue, 16 Aug 2011 20:52:25 GMT
Author: mduerig
Date: Tue Aug 16 20:52:25 2011
New Revision: 1158444

URL: http://svn.apache.org/viewvc?rev=1158444&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/ItemInfos.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java?rev=1158444&r1=1158443&r2=1158444&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Tue Aug 16 20:52:25 2011
@@ -343,7 +343,10 @@ public class RepositoryServiceImpl exten
 
             String json = microKernel.getNodes(mkPath, rev);
 
-            if (!itemId.denotesNode()) {
+            if (itemId.denotesNode()) {
+                return buildItemInfos(path, json, readFromDataStore);
+            }
+            else {
                 PropertyInfo info = buildPropertyInfo(path, json, readFromDataStore);
                 if (info == null) {
                     throw new PathNotFoundException(path.toString());
@@ -351,9 +354,6 @@ public class RepositoryServiceImpl exten
 
                 return Iterators.singleton(info);
             }
-            else {
-                return buildItemInfos(path, json, readFromDataStore);
-            }
         }
         catch (MicroKernelException e) {
             throw new RepositoryException(e.getMessage(), e);

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/ItemInfos.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/ItemInfos.java?rev=1158444&r1=1158443&r2=1158444&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/ItemInfos.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/ItemInfos.java
Tue Aug 16 20:52:25 2011
@@ -82,15 +82,14 @@ public final class ItemInfos {
         }
     }
 
-    public static NodeInfo buildNodeInfo(Path path, String json, Function1<String, QValue>
binaryHandler)
+    public static NodeInfo buildNodeInfo(final Path path, String json, Function1<String,
QValue> binaryHandler)
             throws RepositoryException {
 
-        final Name name = path.getName();
         final NodeInfo[] nodeInfos = new NodeInfo[1];
 
         InfoListener infoListener = new InfoListener() {
             public void createNodeInfo(NodeInfo nodeInfo) {
-                if (name.equals(nodeInfo.getPath().getName())) {
+                if (path.equals(nodeInfo.getPath())) {
                     nodeInfos[0] = nodeInfo;
                 }
             }
@@ -114,10 +113,9 @@ public final class ItemInfos {
         }
     }
 
-    public static PropertyInfo buildPropertyInfo(Path path, String json, Function1<String,
QValue> binaryHandler)
+    public static PropertyInfo buildPropertyInfo(final Path path, String json, Function1<String,
QValue> binaryHandler)
             throws RepositoryException {
         
-        final Name name = path.getName();
         final PropertyInfo[] propertyInfos = new PropertyInfo[1];
 
         InfoListener infoListener = new InfoListener() {
@@ -125,7 +123,7 @@ public final class ItemInfos {
             public void createChildInfos(NodeId id, Iterator<ChildInfo> childInfos)
{}
 
             public void createPropertyInfo(PropertyInfo propertyInfo) {
-                if (name.equals(propertyInfo.getPath().getName())) {
+                if (path.equals(propertyInfo.getPath())) {
                     propertyInfos[0] = propertyInfo;
                 }
             }



Mime
View raw message