jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1297573 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/mk/ main/java/org/apache/jackrabbit/mk/api/ main/java/org/apache/jackrabbit/mk/client/ main/java/org/apache/jackrabbit/mk/cluster/ main/java/org/apache/jackra...
Date Tue, 06 Mar 2012 16:57:12 GMT
Author: stefan
Date: Tue Mar  6 16:57:10 2012
New Revision: 1297573

URL: http://svn.apache.org/viewvc?rev=1297573&view=rev
Log:
added optional 'filter' parameter the following mk methods:

getJournal
diff
getNodes

format & semantics TBD

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/MicroKernelImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/client/Client.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/cluster/HotBackup.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/server/MicroKernelServlet.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/simple/SimpleKernelImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/util/Sync.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/IndexWrapper.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/LogWrapper.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapper.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/VirtualRepositoryWrapper.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/Wrapper.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/WrapperBase.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/ConcurrentWriteTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/MoveNodeTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/api/MicroKernelTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/concurrent/ConcurrentTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/index/IndexTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/large/LargeNodeTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/large/ManyRevisionsTest.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapperTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/MicroKernelImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/MicroKernelImpl.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/MicroKernelImpl.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/MicroKernelImpl.java Tue Mar  6 16:57:10 2012
@@ -135,7 +135,7 @@ public class MicroKernelImpl implements 
         return gate.waitForCommit(oldHeadRevision, maxWaitMillis);
     }
 
-    public String getJournal(String fromRevisionId, String toRevisionId) throws MicroKernelException {
+    public String getJournal(String fromRevisionId, String toRevisionId, String filter) throws MicroKernelException {
         if (rep == null) {
             throw new IllegalStateException("this instance has already been disposed");
         }
@@ -190,7 +190,7 @@ public class MicroKernelImpl implements 
                     key("msg").value(commit.getMsg());
             String diff = diffCache.get(commit.getId());
             if (diff == null) {
-                diff = diff(commit.getParentId(), commit.getId(), "/");
+                diff = diff(commit.getParentId(), commit.getId(), filter);
                 diffCache.put(commit.getId(), diff);
             }
             commitBuff.key("changes").value(diff).endObject();
@@ -198,10 +198,9 @@ public class MicroKernelImpl implements 
         return commitBuff.endArray().toString();
     }
 
-    public String diff(String fromRevisionId, String toRevisionId, String path) throws MicroKernelException {
-        if (path == null) {
-            path = "/";
-        }
+    public String diff(String fromRevisionId, String toRevisionId, String filter) throws MicroKernelException {
+        // TODO extract and evaluate filter criteria (such as e.g. 'path') specified in 'filter' parameter
+        String path = "/";
 
         toRevisionId = toRevisionId == null ? getHeadRevision() : toRevisionId;
 
@@ -402,16 +401,18 @@ public class MicroKernelImpl implements 
     }
 
     public String getNodes(String path, String revisionId) throws MicroKernelException {
-        return getNodes(path, revisionId, 1, 0, -1);
+        return getNodes(path, revisionId, 1, 0, -1, null);
     }
 
-    public String getNodes(String path, String revisionId, int depth, long offset, int count) throws MicroKernelException {
+    public String getNodes(String path, String revisionId, int depth, long offset, int count, String filter) throws MicroKernelException {
         if (rep == null) {
             throw new IllegalStateException("this instance has already been disposed");
         }
 
         revisionId = revisionId == null ? getHeadRevision() : revisionId;
 
+        // TODO extract and evaluate filter criteria (such as e.g. ':hash') specified in 'filter' parameter
+
         try {
             JsopBuilder buf = new JsopBuilder().object();
             toJson(buf, rep.getNode(revisionId, path), depth, (int) offset, count, true);

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java Tue Mar  6 16:57:10 2012
@@ -114,10 +114,14 @@ public interface MicroKernel {
      *
      * @param fromRevisionId first revision to be returned in journal
      * @param toRevisionId   last revision to be returned in journal, if null the current head revision is assumed
+     * @param filter         (optional) filter criteria
+     *                       (e.g. path, property names, etc);
+     *                       TODO specify format and semantics
      * @return a chronological list of revisions in JSON format
      * @throws MicroKernelException if an error occurs
      */
-    String /* jsonArray */ getJournal(String fromRevisionId, String toRevisionId)
+    String /* jsonArray */ getJournal(String fromRevisionId, String toRevisionId,
+                                      String filter)
             throws MicroKernelException;
 
     /**
@@ -134,13 +138,14 @@ public interface MicroKernel {
      *
      * @param fromRevisionId a revision
      * @param toRevisionId   another revision, if null the current head revision is assumed
-     * @param path consider only changes that affected the specified subtree at <code>path</code>;
-     *        if null the default "/" is assumed
+     * @param filter         (optional) filter criteria
+     *                       (e.g. path, property names, etc);
+     *                       TODO specify format and semantics
      * @return JSON diff representation of the changes
      * @throws MicroKernelException if an error occurs
      */
     String /* JSON diff */ diff(String fromRevisionId, String toRevisionId,
-                                String path)
+                                String filter)
             throws MicroKernelException;
 
     //-------------------------------------------------------------< READ ops >
@@ -199,10 +204,10 @@ public interface MicroKernel {
      * <li>If the value of <code>:childNodeCount</code> is larger than the list
      * of returned child nodes, then the node has more child nodes than those
      * included in the tree. Large number of child nodes can be retrieved in
-     * chunks using {@link #getNodes(String, String, int, long, int)}</li>
+     * chunks using {@link #getNodes(String, String, int, long, int, String)}</li>
      * </ul>
      * This method is a convenience method for
-     * <code>getNodes(path, revisionId, 1, 0, -1)</code>
+     * <code>getNodes(path, revisionId, 1, 0, -1, null)</code>
      *
      * @param path       path denoting root of node tree to be retrieved
      * @param revisionId revision, if null the current head revision is assumed
@@ -240,10 +245,13 @@ public interface MicroKernel {
      *                   beginning)
      * @param count      maximum number of child nodes to retrieve (-1 for as many as
      *                   possible)
+     * @param filter     (optional) filter criteria
+     *                   (e.g. names of properties to be included, etc);
+     *                   TODO specify format and semantics
      * @return node tree in JSON format
      * @throws MicroKernelException if an error occurs
      */
-    String /* jsonTree */ getNodes(String path, String revisionId, int depth, long offset, int count) throws MicroKernelException;
+    String /* jsonTree */ getNodes(String path, String revisionId, int depth, long offset, int count, String filter) throws MicroKernelException;
 
     //------------------------------------------------------------< WRITE ops >
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/client/Client.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/client/Client.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/client/Client.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/client/Client.java Tue Mar  6 16:57:10 2012
@@ -165,7 +165,7 @@ public class Client implements MicroKern
         }
     }
 
-    public synchronized String getJournal(String fromRevisionId, String toRevisionId)
+    public synchronized String getJournal(String fromRevisionId, String toRevisionId, String filter)
             throws MicroKernelException {
         
         Request request = null;
@@ -174,6 +174,7 @@ public class Client implements MicroKern
             request = createRequest("getJournal");
             request.addParameter("from_revision_id", fromRevisionId);
             request.addParameter("to_revision_id", toRevisionId);
+            request.addParameter("filter", filter);
             return request.getString();
         } catch (IOException e) {
             throw toMicroKernelException(e);
@@ -182,7 +183,7 @@ public class Client implements MicroKern
         }
     }
 
-    public synchronized String diff(String fromRevisionId, String toRevisionId, String path)
+    public synchronized String diff(String fromRevisionId, String toRevisionId, String filter)
             throws MicroKernelException {
         Request request = null;
 
@@ -190,7 +191,7 @@ public class Client implements MicroKern
             request = createRequest("diff");
             request.addParameter("from_revision_id", fromRevisionId);
             request.addParameter("to_revision_id", toRevisionId);
-            request.addParameter("path", path);
+            request.addParameter("filter", filter);
             return request.getString();
         } catch (IOException e) {
             throw toMicroKernelException(e);
@@ -236,11 +237,11 @@ public class Client implements MicroKern
     public synchronized String getNodes(String path, String revisionId)
             throws MicroKernelException {
 
-        return getNodes(path, revisionId, 1, 0, -1);
+        return getNodes(path, revisionId, 1, 0, -1, null);
     }
 
     public synchronized String getNodes(String path, String revisionId, int depth,
-            long offset, int count) throws MicroKernelException {
+            long offset, int count, String filter) throws MicroKernelException {
         
         Request request = null;
 
@@ -251,6 +252,7 @@ public class Client implements MicroKern
             request.addParameter("depth", depth);
             request.addParameter("offset", offset);
             request.addParameter("count", count);
+            request.addParameter("filter", filter);
             return request.getString();
         } catch (IOException e) {
             throw toMicroKernelException(e);

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/cluster/HotBackup.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/cluster/HotBackup.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/cluster/HotBackup.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/cluster/HotBackup.java Tue Mar  6 16:57:10 2012
@@ -70,7 +70,7 @@ public class HotBackup {
     public void sync() {
         String headRev = source.getHeadRevision();
         if (lastRev != headRev) {
-            JsopArray journal = (JsopArray) Jsop.parse(source.getJournal(lastRev, headRev));
+            JsopArray journal = (JsopArray) Jsop.parse(source.getJournal(lastRev, headRev, null));
             for (int i = 0; i < journal.size(); i++) {
                 JsopObject record = (JsopObject) journal.get(i);
                 String diff = (String) record.get("changes");
@@ -86,7 +86,8 @@ public class HotBackup {
         String parent = PathUtils.getParentPath(path);
         String name = PathUtils.getName(path);
         
-        JsopObject props = (JsopObject) Jsop.parse(mk.getNodes(parent, mk.getHeadRevision(), -1, 0, -1));
+        // todo use filter parameter for specifying the property?
+        JsopObject props = (JsopObject) Jsop.parse(mk.getNodes(parent, mk.getHeadRevision(), -1, 0, -1, null));
         return (String) props.get(name);
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java Tue Mar  6 16:57:10 2012
@@ -62,7 +62,7 @@ public class Indexer {
             jsop.tag('+').key(PathUtils.relativize("/", indexRootNode)).object().endObject();
             revision = mk.commit("/", jsop.toString(), revision, null);
         } else {
-            String node = mk.getNodes(indexRootNode, revision, 0, 0, Integer.MAX_VALUE);
+            String node = mk.getNodes(indexRootNode, revision, 0, 0, Integer.MAX_VALUE, null);
             JsopTokenizer t = new JsopTokenizer(node);
             t.read('{');
             HashMap<String, String> map = new HashMap<String, String>();
@@ -145,7 +145,7 @@ public class Indexer {
         if (page != null) {
             return page;
         }
-        String json = mk.getNodes(p, revision, 0, 0, 0);
+        String json = mk.getNodes(p, revision, 0, 0, 0, null);
         if (json == null) {
             page = new BTreeLeaf(tree, parent, name,
                     new String[0], new String[0]);
@@ -248,7 +248,7 @@ public class Indexer {
         } else {
             toRevision = mk.getHeadRevision();
         }
-        String journal = mk.getJournal(readRevision, toRevision);
+        String journal = mk.getJournal(readRevision, toRevision, null);
         JsopTokenizer t = new JsopTokenizer(journal);
         String lastRevision = readRevision;
         t.read('[');
@@ -405,7 +405,7 @@ public class Indexer {
             return;
         }
         // TODO remove: support large trees
-        String node = mk.getNodes(nodePath, lastRevision, Integer.MAX_VALUE, 0, Integer.MAX_VALUE);
+        String node = mk.getNodes(nodePath, lastRevision, Integer.MAX_VALUE, 0, Integer.MAX_VALUE, null);
         JsopTokenizer t = new JsopTokenizer(node);
         NodeMap map = new NodeMap();
         t.read('{');
@@ -439,7 +439,7 @@ public class Indexer {
             return;
         }
         // TODO move: support large trees
-        String node = mk.getNodes(sourcePath, lastRevision, Integer.MAX_VALUE, 0, Integer.MAX_VALUE);
+        String node = mk.getNodes(sourcePath, lastRevision, Integer.MAX_VALUE, 0, Integer.MAX_VALUE, null);
         JsopTokenizer t = new JsopTokenizer(node);
         NodeMap map = new NodeMap();
         t.read('{');
@@ -464,7 +464,7 @@ public class Indexer {
             return;
         }
         // TODO add: support large child node lists
-        String node = mk.getNodes(path, readRevision, 0, 0, Integer.MAX_VALUE);
+        String node = mk.getNodes(path, readRevision, 0, 0, Integer.MAX_VALUE, null);
         JsopTokenizer t = new JsopTokenizer(node);
         NodeMap map = new NodeMap();
         t.read('{');

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/server/MicroKernelServlet.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/server/MicroKernelServlet.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/server/MicroKernelServlet.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/server/MicroKernelServlet.java Tue Mar  6 16:57:10 2012
@@ -146,9 +146,10 @@ class MicroKernelServlet {
             
             String fromRevisionId = request.getParameter("from_revision_id", headRevision);
             String toRevisionId = request.getParameter("to_revision_id", headRevision);
+            String filter = request.getParameter("filter", "");
 
             response.setContentType("application/json");
-            String json = mk.getJournal(fromRevisionId, toRevisionId);
+            String json = mk.getJournal(fromRevisionId, toRevisionId, filter);
             if (request.getHeaders().containsKey("User-Agent")) {
                 json = JsopBuilder.prettyPrint(json);
             }
@@ -165,10 +166,10 @@ class MicroKernelServlet {
 
             String fromRevisionId = request.getParameter("from_revision_id", headRevision);
             String toRevisionId = request.getParameter("to_revision_id", headRevision);
-            String path = request.getParameter("path", "/");
+            String filter = request.getParameter("filter", "");
 
             response.setContentType("application/json");
-            String json = mk.diff(fromRevisionId, toRevisionId, path);
+            String json = mk.diff(fromRevisionId, toRevisionId, filter);
             if (request.getHeaders().containsKey("User-Agent")) {
                 json = JsopBuilder.prettyPrint(json);
             }
@@ -218,9 +219,10 @@ class MicroKernelServlet {
             int depth = request.getParameter("depth", 1);
             long offset = request.getParameter("offset", 0L);
             int count = request.getParameter("count", -1);
-            
+            String filter = request.getParameter("filter", "");
+
             response.setContentType("application/json");
-            String json = mk.getNodes(path, revisionId, depth, offset, count);
+            String json = mk.getNodes(path, revisionId, depth, offset, count, filter);
             if (request.getHeaders().containsKey("User-Agent")) {
                 json = JsopBuilder.prettyPrint(json);
             }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/simple/SimpleKernelImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/simple/SimpleKernelImpl.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/simple/SimpleKernelImpl.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/simple/SimpleKernelImpl.java Tue Mar  6 16:57:10 2012
@@ -421,7 +421,7 @@ public class SimpleKernelImpl extends Wr
         return gate.waitForCommit(oldHeadRevision, maxWaitMillis);
     }
 
-    public JsopReader getJournalStream(String fromRevisionId, String toRevisionId) {
+    public JsopReader getJournalStream(String fromRevisionId, String toRevisionId, String filter) {
         long fromRev = Revision.parseId(fromRevisionId);
         long toRev = Revision.parseId(toRevisionId);
         NodeImpl node = getRoot();
@@ -485,7 +485,7 @@ public class SimpleKernelImpl extends Wr
     }
 
 
-    public JsopReader diffStream(String fromRevisionId, String toRevisionId, String path) {
+    public JsopReader diffStream(String fromRevisionId, String toRevisionId, String filter) {
         // TODO implement if required
         return new JsopStream();
     }
@@ -501,10 +501,10 @@ public class SimpleKernelImpl extends Wr
      * @return the json string
      */
     public JsopReader getNodesStream(String path, String revisionId) {
-        return getNodesStream(path, revisionId, 1, 0, -1);
+        return getNodesStream(path, revisionId, 1, 0, -1, null);
     }
 
-    public JsopReader getNodesStream(String path, String revisionId, int depth, long offset, int count) {
+    public JsopReader getNodesStream(String path, String revisionId, int depth, long offset, int count, String filter) {
         // TODO offset > 0 should mean the properties are not included
         if (count < 0) {
             count = nodeMap.getMaxMemoryChildren();

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/util/Sync.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/util/Sync.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/util/Sync.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/util/Sync.java Tue Mar  6 16:57:10 2012
@@ -111,10 +111,10 @@ public class Sync {
         String target = PathUtils.concat(targetPath, relPath);
         NodeImpl s = null, t = null;
         if (sourceMk.nodeExists(source, sourceRev)) {
-            s = NodeImpl.parse(sourceMk.getNodes(source, sourceRev, 0, 0, childNodesPerBatch));
+            s = NodeImpl.parse(sourceMk.getNodes(source, sourceRev, 0, 0, childNodesPerBatch, null));
         }
         if (targetMk != null && targetMk.nodeExists(target, targetRev)) {
-            t = NodeImpl.parse(targetMk.getNodes(target, targetRev, 0, 0, childNodesPerBatch));
+            t = NodeImpl.parse(targetMk.getNodes(target, targetRev, 0, 0, childNodesPerBatch, null));
         }
         if (s == null || t == null) {
             if (s == t) {
@@ -195,7 +195,7 @@ public class Sync {
             }
 
             private void nextBatch() {
-                NodeImpl n = NodeImpl.parse(mk.getNodes(path, rev, 0, offset, batchSize));
+                NodeImpl n = NodeImpl.parse(mk.getNodes(path, rev, 0, offset, batchSize, null));
                 current = n.getChildNodeNames(Integer.MAX_VALUE);
                 offset += batchSize;
             }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/IndexWrapper.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/IndexWrapper.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/IndexWrapper.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/IndexWrapper.java Tue Mar  6 16:57:10 2012
@@ -142,9 +142,9 @@ public class IndexWrapper extends Wrappe
         return null;
     }
 
-    public JsopReader getNodesStream(String path, String revisionId, int depth, long offset, int count) {
+    public JsopReader getNodesStream(String path, String revisionId, int depth, long offset, int count, String filter) {
         if (!path.startsWith(INDEX_PATH)) {
-            return mk.getNodesStream(path, revisionId, depth, offset, count);
+            return mk.getNodesStream(path, revisionId, depth, offset, count, filter);
         }
         String index = PathUtils.relativize(INDEX_PATH, path);
         int idx = index.indexOf('?');
@@ -198,16 +198,16 @@ public class IndexWrapper extends Wrappe
         return s;
     }
 
-    public JsopReader diffStream(String fromRevisionId, String toRevisionId, String path) {
-        return mk.diffStream(fromRevisionId, toRevisionId, path);
+    public JsopReader diffStream(String fromRevisionId, String toRevisionId, String filter) {
+        return mk.diffStream(fromRevisionId, toRevisionId, filter);
     }
 
-    public JsopReader getJournalStream(String fromRevisionId, String toRevisionId) {
-        return mk.getJournalStream(fromRevisionId, toRevisionId);
+    public JsopReader getJournalStream(String fromRevisionId, String toRevisionId, String filter) {
+        return mk.getJournalStream(fromRevisionId, toRevisionId, filter);
     }
 
     public JsopReader getNodesStream(String path, String revisionId) {
-        return getNodesStream(path, revisionId, 1, 0, -1);
+        return getNodesStream(path, revisionId, 1, 0, -1, null);
     }
 
     public JsopReader getRevisionsStream(long since, int maxEntries) {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/LogWrapper.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/LogWrapper.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/LogWrapper.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/LogWrapper.java Tue Mar  6 16:57:10 2012
@@ -81,10 +81,10 @@ public class LogWrapper implements Micro
         }
     }
 
-    public String getJournal(String fromRevisionId, String toRevisionId) {
+    public String getJournal(String fromRevisionId, String toRevisionId, String filter) {
         try {
             logMethod("getJournal", fromRevisionId, toRevisionId);
-            String result = mk.getJournal(fromRevisionId, toRevisionId);
+            String result = mk.getJournal(fromRevisionId, toRevisionId, filter);
             logResult(result);
             return result;
         } catch (Exception e) {
@@ -93,10 +93,10 @@ public class LogWrapper implements Micro
         }
     }
 
-    public String diff(String fromRevisionId, String toRevisionId, String path) {
+    public String diff(String fromRevisionId, String toRevisionId, String filter) {
         try {
-            logMethod("diff", fromRevisionId, toRevisionId, path);
-            String result = mk.diff(fromRevisionId, toRevisionId, path);
+            logMethod("diff", fromRevisionId, toRevisionId, filter);
+            String result = mk.diff(fromRevisionId, toRevisionId, filter);
             logResult(result);
             return result;
         } catch (Exception e) {
@@ -129,10 +129,10 @@ public class LogWrapper implements Micro
         }
     }
 
-    public String getNodes(String path, String revisionId, int depth, long offset, int count) {
+    public String getNodes(String path, String revisionId, int depth, long offset, int count, String filter) {
         try {
-            logMethod("getNodes", path, revisionId, depth, offset, count);
-            String result = mk.getNodes(path, revisionId, depth, offset, count);
+            logMethod("getNodes", path, revisionId, depth, offset, count, filter);
+            String result = mk.getNodes(path, revisionId, depth, offset, count, filter);
             logResult(result);
             return result;
         } catch (Exception e) {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapper.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapper.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapper.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapper.java Tue Mar  6 16:57:10 2012
@@ -115,9 +115,9 @@ public class SecurityWrapper extends Wra
         return mk.getHeadRevision();
     }
 
-    public JsopReader getJournalStream(String fromRevisionId, String toRevisionId) {
+    public JsopReader getJournalStream(String fromRevisionId, String toRevisionId, String filter) {
         rightsRevision = getHeadRevision();
-        JsopReader t = mk.getJournalStream(fromRevisionId, toRevisionId);
+        JsopReader t = mk.getJournalStream(fromRevisionId, toRevisionId, filter);
         if (admin) {
             return t;
         }
@@ -292,15 +292,15 @@ public class SecurityWrapper extends Wra
     }
 
     public JsopReader getNodesStream(String path, String revisionId) {
-        return getNodesStream(path, revisionId, 1, 0, -1);
+        return getNodesStream(path, revisionId, 1, 0, -1, null);
     }
 
-    public JsopReader getNodesStream(String path, String revisionId, int depth, long offset, int count) {
+    public JsopReader getNodesStream(String path, String revisionId, int depth, long offset, int count, String filter) {
         rightsRevision = getHeadRevision();
         if (!checkRights(path, false)) {
             throw ExceptionFactory.get("Node not found: " + path);
         }
-        JsopReader t = mk.getNodesStream(path, revisionId, depth, offset, count);
+        JsopReader t = mk.getNodesStream(path, revisionId, depth, offset, count, filter);
         if (admin) {
             return t;
         }
@@ -397,7 +397,7 @@ public class SecurityWrapper extends Wra
             NodeImpl n = cache.get(key);
             if (n == null) {
                 if (mk.nodeExists(path, rightsRevision)) {
-                    String json = mk.getNodes(path, rightsRevision, 0, 0, 0);
+                    String json = mk.getNodes(path, rightsRevision, 0, 0, 0, null);
                     JsopReader t = new JsopTokenizer(json);
                     t.read('{');
                     n = NodeImpl.parse(map, t, 0);

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/VirtualRepositoryWrapper.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/VirtualRepositoryWrapper.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/VirtualRepositoryWrapper.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/VirtualRepositoryWrapper.java Tue Mar  6 16:57:10 2012
@@ -264,8 +264,8 @@ public class VirtualRepositoryWrapper ex
         return buff.toString();
     }
 
-    public JsopReader getJournalStream(String fromRevisionId, String toRevisionId) {
-        return mk.getJournalStream(fromRevisionId, toRevisionId);
+    public JsopReader getJournalStream(String fromRevisionId, String toRevisionId, String filter) {
+        return mk.getJournalStream(fromRevisionId, toRevisionId, filter);
     }
 
     public JsopReader diffStream(String fromRevisionId, String toRevisionId, String path) throws MicroKernelException {
@@ -277,17 +277,17 @@ public class VirtualRepositoryWrapper ex
     }
 
     public JsopReader getNodesStream(String path, String revisionId) {
-        return getNodesStream(path, revisionId, 1, 0, -1);
+        return getNodesStream(path, revisionId, 1, 0, -1, null);
     }
 
-    public JsopReader getNodesStream(String path, String revisionId, int depth, long offset, int count) {
+    public JsopReader getNodesStream(String path, String revisionId, int depth, long offset, int count, String filter) {
         String mount = getMount(path);
         if (mount == null) {
             throw ExceptionFactory.get("Not mapped: " + path);
         }
         String rev = getRevision(mount, revisionId);
         Wrapper mk = mounts.get(mount);
-        return mk.getNodesStream(path, rev, depth, offset, count);
+        return mk.getNodesStream(path, rev, depth, offset, count, filter);
     }
 
     private String getRevision(String mount, String revisionId) {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/Wrapper.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/Wrapper.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/Wrapper.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/Wrapper.java Tue Mar  6 16:57:10 2012
@@ -24,14 +24,14 @@ public interface Wrapper extends MicroKe
 
     JsopReader getRevisionsStream(long since, int maxEntries) throws MicroKernelException;
 
-    JsopReader getJournalStream(String fromRevisionId, String toRevisionId) throws MicroKernelException;
+    JsopReader getJournalStream(String fromRevisionId, String toRevisionId, String filter) throws MicroKernelException;
 
     JsopReader getNodesStream(String path, String revisionId) throws MicroKernelException;
 
-    JsopReader getNodesStream(String path, String revisionId, int depth, long offset, int count) throws MicroKernelException;
+    JsopReader getNodesStream(String path, String revisionId, int depth, long offset, int count, String filter) throws MicroKernelException;
 
     String commitStream(String path, JsopReader jsonDiff, String revisionId, String message) throws MicroKernelException;
 
-    JsopReader diffStream(String fromRevisionId, String toRevisionId, String path);
+    JsopReader diffStream(String fromRevisionId, String toRevisionId, String filter);
 
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/WrapperBase.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/WrapperBase.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/WrapperBase.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/mk/wrapper/WrapperBase.java Tue Mar  6 16:57:10 2012
@@ -28,20 +28,20 @@ public abstract class WrapperBase implem
         return commitStream(path, new JsopTokenizer(jsonDiff), revisionId, message);
     }
 
-    public final String getJournal(String fromRevisionId, String toRevisionId) {
-        return getJournalStream(fromRevisionId, toRevisionId).toString();
+    public final String getJournal(String fromRevisionId, String toRevisionId, String filter) {
+        return getJournalStream(fromRevisionId, toRevisionId, filter).toString();
     }
 
     public final String getNodes(String path, String revisionId) {
         return getNodesStream(path, revisionId).toString();
     }
 
-    public final String getNodes(String path, String revisionId, int depth, long offset, int count) {
-        return getNodesStream(path, revisionId, depth, offset, count).toString();
+    public final String getNodes(String path, String revisionId, int depth, long offset, int count, String filter) {
+        return getNodesStream(path, revisionId, depth, offset, count, filter).toString();
     }
 
-    public final String diff(String fromRevisionId, String toRevisionId, String path) {
-        return diffStream(fromRevisionId, toRevisionId, path).toString();
+    public final String diff(String fromRevisionId, String toRevisionId, String filter) {
+        return diffStream(fromRevisionId, toRevisionId, filter).toString();
     }
 
     public final String getRevisions(long since, int maxEntries) {
@@ -60,16 +60,16 @@ public abstract class WrapperBase implem
                 return wrapped.commit(path, jsonDiff.toString(), revisionId, message);
             }
 
-            public JsopReader getJournalStream(String fromRevisionId, String toRevisionId) {
-                return new JsopTokenizer(wrapped.getJournal(fromRevisionId, toRevisionId));
+            public JsopReader getJournalStream(String fromRevisionId, String toRevisionId, String filter) {
+                return new JsopTokenizer(wrapped.getJournal(fromRevisionId, toRevisionId, filter));
             }
 
             public JsopReader getNodesStream(String path, String revisionId) {
                 return new JsopTokenizer(wrapped.getNodes(path, revisionId));
             }
 
-            public JsopReader getNodesStream(String path, String revisionId, int depth, long offset, int count) {
-                return new JsopTokenizer(wrapped.getNodes(path, revisionId, depth, offset, count));
+            public JsopReader getNodesStream(String path, String revisionId, int depth, long offset, int count, String filter) {
+                return new JsopTokenizer(wrapped.getNodes(path, revisionId, depth, offset, count, filter));
             }
 
             public JsopReader getRevisionsStream(long since, int maxEntries) {
@@ -96,8 +96,8 @@ public abstract class WrapperBase implem
                 return wrapped.getHeadRevision();
             }
 
-            public String getJournal(String fromRevisionId, String toRevisionId) {
-                return wrapped.getJournal(fromRevisionId, toRevisionId);
+            public String getJournal(String fromRevisionId, String toRevisionId, String filter) {
+                return wrapped.getJournal(fromRevisionId, toRevisionId, filter);
             }
 
             public long getLength(String blobId) {
@@ -108,8 +108,8 @@ public abstract class WrapperBase implem
                 return wrapped.getNodes(path, revisionId);
             }
 
-            public String getNodes(String path, String revisionId, int depth, long offset, int count) {
-                return wrapped.getNodes(path, revisionId, depth, offset, count);
+            public String getNodes(String path, String revisionId, int depth, long offset, int count, String filter) {
+                return wrapped.getNodes(path, revisionId, depth, offset, count, filter);
             }
 
             public String getRevisions(long since, int maxEntries) {

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/ConcurrentWriteTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/ConcurrentWriteTest.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/ConcurrentWriteTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/ConcurrentWriteTest.java Tue Mar  6 16:57:10 2012
@@ -77,7 +77,7 @@ public class ConcurrentWriteTest extends
         System.out.println("duration: " + (t1 - t0) + "ms");
 
         String head = mk.getHeadRevision();
-        mk.getNodes("/", head, Integer.MAX_VALUE, 0, -1);
+        mk.getNodes("/", head, Integer.MAX_VALUE, 0, -1, null);
         // System.out.println(json);
         System.out.println("new HEAD: " + head);
         System.out.println();
@@ -87,7 +87,7 @@ public class ConcurrentWriteTest extends
         System.out.println(history);
         System.out.println();
 
-        mk.getJournal(oldHead, head);
+        mk.getJournal(oldHead, head, null);
         // System.out.println("Journal:");
         // System.out.println(journal);
         // System.out.println();

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/MoveNodeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/MoveNodeTest.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/MoveNodeTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/MoveNodeTest.java Tue Mar  6 16:57:10 2012
@@ -331,7 +331,7 @@ public class MoveNodeTest extends MultiM
             } while (t.matches(','));
         }
         String head = mk.getHeadRevision();
-        String journal = mk.getJournal(journalRevision, head);
+        String journal = mk.getJournal(journalRevision, head, null);
         JsopTokenizer t = new JsopTokenizer(journal);
         StringBuilder buff = new StringBuilder();
         t.read('[');

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java Tue Mar  6 16:57:10 2012
@@ -104,7 +104,7 @@ public class MultiMkTestBase {
     }
 
     private static void cleanRepository(MicroKernel mk) {
-        String result = mk.getNodes("/", mk.getHeadRevision(), 0, 0, -1);
+        String result = mk.getNodes("/", mk.getHeadRevision(), 0, 0, -1, null);
         List<String> names = new ArrayList<String>();
         List<String> properties = new ArrayList<String>();
         JsopReader t = new JsopTokenizer(result);

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/api/MicroKernelTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/api/MicroKernelTest.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/api/MicroKernelTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/api/MicroKernelTest.java Tue Mar  6 16:57:10 2012
@@ -70,7 +70,7 @@ public class MicroKernelTest extends Mul
     public void getNodes() {
         String head = mk.getHeadRevision();
 
-        String json = mk.getNodes("/test", head, 0, 0, -1);
+        String json = mk.getNodes("/test", head, 0, 0, -1, null);
         assertTrue(json.contains("stringProp"));
     }
 
@@ -163,7 +163,7 @@ public class MicroKernelTest extends Mul
                         "^\"" + node + "/child1/grandchild11/prop3\" : 43",
                 head, "");
 
-        String json = mk.getNodes('/' + node, head, 3, 0, -1);
+        String json = mk.getNodes('/' + node, head, 3, 0, -1, null);
         assertEquals("{\"prop1\":41,\":childNodeCount\":2," +
                 "\"child1\":{\"prop2\":42,\":childNodeCount\":1," +
                 "\"grandchild11\":{\"prop3\":43,\":childNodeCount\":0}}," +

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/concurrent/ConcurrentTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/concurrent/ConcurrentTest.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/concurrent/ConcurrentTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/concurrent/ConcurrentTest.java Tue Mar  6 16:57:10 2012
@@ -42,10 +42,10 @@ public class ConcurrentTest extends Mult
                 int i = id.getAndIncrement();
                 String newRev = mk.commit("/", "+\"" + i + "\":{\"x\": " + i + "}", rev, "");
                 Assert.assertTrue(!newRev.equals(rev));
-                mk.getJournal(rev, newRev);
+                mk.getJournal(rev, newRev, null);
                 mk.getRevisions(start, 100);
                 mk.getNodes("/" + i, newRev);
-                mk.getNodes("/" + i, newRev, 0, 0, 0);
+                mk.getNodes("/" + i, newRev, 0, 0, 0, null);
                 Assert.assertFalse(mk.nodeExists("/" + i, rev));
                 Assert.assertTrue(mk.nodeExists("/" + i, newRev));
                 rev = newRev;

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/index/IndexTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/index/IndexTest.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/index/IndexTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/index/IndexTest.java Tue Mar  6 16:57:10 2012
@@ -225,7 +225,7 @@ public class IndexTest extends MultiMkTe
 
     static void print(MicroKernel mk, BTree tree) {
         String head = mk.getHeadRevision();
-        String t = mk.getNodes("/index", head, 100, 0, -1);
+        String t = mk.getNodes("/index", head, 100, 0, -1, null);
         log(JsopTest.format(t));
         Cursor c = tree.findFirst("0");
         StringBuilder buff = new StringBuilder();

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java Tue Mar  6 16:57:10 2012
@@ -62,7 +62,7 @@ public class DescendantCountTest extends
             c.setData(null);
             c.create();
             head = mk.getHeadRevision();
-            String json = JsopBuilder.prettyPrint(mk.getNodes("/test" + i, head, Integer.MAX_VALUE, 0, -1));
+            String json = JsopBuilder.prettyPrint(mk.getNodes("/test" + i, head, Integer.MAX_VALUE, 0, -1, null));
             NodeImpl n = NodeImpl.parse(json);
             long count = count(n);
             JsopObject o = (JsopObject) Jsop.parse(json);

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/large/LargeNodeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/large/LargeNodeTest.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/large/LargeNodeTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/large/LargeNodeTest.java Tue Mar  6 16:57:10 2012
@@ -58,11 +58,11 @@ public class LargeNodeTest extends Multi
         head = mk.commit("/", "+\"x0\" : {\"x\": 0, \"x1\":{\"x\":1, \"x2\": {\"x\": -3}}}", head, null);
         String s = mk.getNodes("/x0", head);
         Assert.assertEquals("{\"x\":0,\":childNodeCount\":1,\"x1\":{\"x\":1,\":childNodeCount\":1,\"x2\":{}}}", s);
-        s = mk.getNodes("/x0", head, 1, 0, -1);
+        s = mk.getNodes("/x0", head, 1, 0, -1, null);
         Assert.assertEquals("{\"x\":0,\":childNodeCount\":1,\"x1\":{\"x\":1,\":childNodeCount\":1,\"x2\":{}}}", s);
-        s = mk.getNodes("/x0", head, 0, 0, -1);
+        s = mk.getNodes("/x0", head, 0, 0, -1, null);
         Assert.assertEquals("{\"x\":0,\":childNodeCount\":1,\"x1\":{}}", s);
-        s = mk.getNodes("/x0", head, 0, 0, 0);
+        s = mk.getNodes("/x0", head, 0, 0, 0, null);
         Assert.assertEquals("{\"x\":0,\":childNodeCount\":1}", s);
         head = mk.commit("/", "-\"x0\"", head, null);
     }
@@ -111,7 +111,7 @@ public class LargeNodeTest extends Multi
         if (buff.length() > 0) {
             head = mk.commit("/", buff.toString(), head, "");
         }
-        Assert.assertEquals("{\":childNodeCount\":"+count+"}", mk.getNodes("/test", head, 1, 0, 0));
+        Assert.assertEquals("{\":childNodeCount\":"+count+"}", mk.getNodes("/test", head, 1, 0, 0, null));
     }
 
     private void log(String s) {
@@ -141,27 +141,27 @@ public class LargeNodeTest extends Multi
                     "\"t14\":{\"x\":14,\":childNodeCount\":0}," +
                     "\"t15\":{\"x\":15,\":childNodeCount\":0}," +
                     "\"t16\":{\"x\":16,\":childNodeCount\":0}}",
-                    mk.getNodes("/", head, 1, 0, -1));
+                    mk.getNodes("/", head, 1, 0, -1, null));
             Assert.assertEquals("{\":childNodeCount\":101," +
                     "\"t0\":{\"x\":0,\":childNodeCount\":0}," +
                     "\"t1\":{\"x\":1,\":childNodeCount\":0}}",
-                    mk.getNodes("/", head, 1, 1, 2));
+                    mk.getNodes("/", head, 1, 1, 2, null));
             Assert.assertEquals("{\":childNodeCount\":101," +
                     "\"t17\":{\"x\":17,\":childNodeCount\":0}," +
                     "\"t18\":{\"x\":18,\":childNodeCount\":0}}",
-                    mk.getNodes("/", head, 1, 10, 2));
+                    mk.getNodes("/", head, 1, 10, 2, null));
             Assert.assertEquals("{\":childNodeCount\":101," +
                     "\"t26\":{\"x\":26,\":childNodeCount\":0}," +
                     "\"t27\":{\"x\":27,\":childNodeCount\":0}}",
-                    mk.getNodes("/", head, 1, 20, 2));
+                    mk.getNodes("/", head, 1, 20, 2, null));
             Assert.assertEquals("{\":childNodeCount\":101," +
                     "\"t44\":{\"x\":44,\":childNodeCount\":0}," +
                     "\"t45\":{\"x\":45,\":childNodeCount\":0}}",
-                    mk.getNodes("/", head, 1, 40, 2));
+                    mk.getNodes("/", head, 1, 40, 2, null));
             Assert.assertEquals("{\":childNodeCount\":101," +
                     "\"t9\":{\"x\":9,\":childNodeCount\":0}," +
                     "\"t90\":{\"x\":90,\":childNodeCount\":0}}",
-                    mk.getNodes("/", head, 1, 90, 2));
+                    mk.getNodes("/", head, 1, 90, 2, null));
         } else {
             Assert.assertEquals("{\":childNodeCount\":101,\"t\":{\":childNodeCount\":3,\"a\":{},\"b\":{},\"c\":{}}," +
                     "\"t0\":{\"x\":0,\":childNodeCount\":0}," +
@@ -173,27 +173,27 @@ public class LargeNodeTest extends Multi
                     "\"t6\":{\"x\":6,\":childNodeCount\":0}," +
                     "\"t7\":{\"x\":7,\":childNodeCount\":0}," +
                     "\"t8\":{\"x\":8,\":childNodeCount\":0}}",
-                    mk.getNodes("/", head, 1, 0, -1));
+                    mk.getNodes("/", head, 1, 0, -1, null));
             Assert.assertEquals("{\":childNodeCount\":101," +
                     "\"t0\":{\"x\":0,\":childNodeCount\":0}," +
                     "\"t1\":{\"x\":1,\":childNodeCount\":0}}",
-                    mk.getNodes("/", head, 1, 1, 2));
+                    mk.getNodes("/", head, 1, 1, 2, null));
             Assert.assertEquals("{\":childNodeCount\":101," +
                     "\"t9\":{\"x\":9,\":childNodeCount\":0}," +
                     "\"t10\":{\"x\":10,\":childNodeCount\":0}}",
-                    mk.getNodes("/", head, 1, 10, 2));
+                    mk.getNodes("/", head, 1, 10, 2, null));
             Assert.assertEquals("{\":childNodeCount\":101," +
                     "\"t19\":{\"x\":19,\":childNodeCount\":0}," +
                     "\"t20\":{\"x\":20,\":childNodeCount\":0}}",
-                    mk.getNodes("/", head, 1, 20, 2));
+                    mk.getNodes("/", head, 1, 20, 2, null));
             Assert.assertEquals("{\":childNodeCount\":101," +
                     "\"t39\":{\"x\":39,\":childNodeCount\":0}," +
                     "\"t40\":{\"x\":40,\":childNodeCount\":0}}",
-                    mk.getNodes("/", head, 1, 40, 2));
+                    mk.getNodes("/", head, 1, 40, 2, null));
             Assert.assertEquals("{\":childNodeCount\":101," +
                     "\"t89\":{\"x\":89,\":childNodeCount\":0}," +
                     "\"t90\":{\"x\":90,\":childNodeCount\":0}}",
-                    mk.getNodes("/", head, 1, 90, 2));
+                    mk.getNodes("/", head, 1, 90, 2, null));
         }
     }
 
@@ -212,7 +212,7 @@ public class LargeNodeTest extends Multi
     }
 
     private String getNode(String node, int depth, long offset, int count) {
-        String s = mk.getNodes(node, mk.getHeadRevision(), depth, offset, count);
+        String s = mk.getNodes(node, mk.getHeadRevision(), depth, offset, count, null);
         s = s.replaceAll("\"", "").replaceAll(":childNodeCount:.", "");
         s = s.replaceAll("\\{\\,", "\\{").replaceAll("\\,\\}", "\\}");
         s = s.replaceAll("\\:\\{\\}", "");

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/large/ManyRevisionsTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/large/ManyRevisionsTest.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/large/ManyRevisionsTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/large/ManyRevisionsTest.java Tue Mar  6 16:57:10 2012
@@ -61,7 +61,7 @@ public class ManyRevisionsTest extends M
             String n = mk.getNodes("/test", rev);
             NodeImpl node = NodeImpl.parse(n);
             assertEquals(i, Integer.parseInt(node.getProperty("id")));
-            String journal = mk.getJournal(last, rev);
+            String journal = mk.getJournal(last, rev, null);
             JsopArray array = (JsopArray) Jsop.parse(journal);
             assertEquals(last + ".." + rev + ": " + journal,
                     2, array.size());

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapperTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapperTest.java?rev=1297573&r1=1297572&r2=1297573&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapperTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapperTest.java Tue Mar  6 16:57:10 2012
@@ -109,16 +109,16 @@ public class SecurityWrapperTest extends
         String toRevision = mkAdmin.commit("/", "+ \"test\": { \"data\": \"Hello\" }", head, "");
         toRevision = mkAdmin.commit("/", "^ \"test/data\": \"Hallo\"", toRevision, "");
         toRevision = mkAdmin.commit("/", "^ \"test/data\": null", toRevision, "");
-        String j2 = mkGuest.getJournal(fromRevision, toRevision);
+        String j2 = mkGuest.getJournal(fromRevision, toRevision, null);
         assertEquals("", filterJournal(j2));
         toRevision = mkAdmin.commit("/", "^ \":rights\": \"read\"", fromRevision, "");
-        String j3 = mkGuest.getJournal(fromRevision, toRevision);
+        String j3 = mkGuest.getJournal(fromRevision, toRevision, null);
         assertEquals(
                 "+\"/test\":{\"data\":\"Hello\"}\n" +
                 "^\"/test/data\":\"Hallo\"\n" +
                 "^\"/test/data\":null\n",
                 filterJournal(j3));
-        String journal = mkAdmin.getJournal(fromRevision, toRevision);
+        String journal = mkAdmin.getJournal(fromRevision, toRevision, null);
         assertEquals(
                 "+\"/test\":{\"data\":\"Hello\"}\n" +
                 "^\"/test/data\":\"Hallo\"\n" +



Mime
View raw message