jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1135645 - /jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Date Tue, 14 Jun 2011 15:24:16 GMT
Author: thomasm
Date: Tue Jun 14 15:24:16 2011
New Revision: 1135645

URL: http://svn.apache.org/viewvc?rev=1135645&view=rev
Log:
Workspaces: use getChildNodes instead of getNodes.

Modified:
    jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java

Modified: jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java?rev=1135645&r1=1135644&r2=1135645&view=diff
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
(original)
+++ jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Tue Jun 14 15:24:16 2011
@@ -131,23 +131,15 @@ public class RepositoryServiceImpl exten
         final List<String> workspaces = new ArrayList<String>();
 
         try {
-            String json = microKernel.getNodes("/", 0, rev);
+            String json = microKernel.getChildNodes("/", 0, Integer.MAX_VALUE, 0, rev);
             new JSONParser().parse(json, new JsonHandlerBase(){
-                public String currentKey;
 
                 @Override
-                public boolean startObject() throws ParseException, IOException {
-                    if (currentKey != null) {
-                        workspaces.add(currentKey);
-                    }
+                public boolean primitive(Object value) throws ParseException, IOException
{
+                    workspaces.add(value.toString());
                     return true;
                 }
 
-                @Override
-                public boolean startObjectEntry(String key) throws ParseException, IOException
{
-                    currentKey = key;
-                    return true;
-                }
             });
         }
         catch (MicroKernelException e) {



Mime
View raw message