jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg (JIRA)" <j...@apache.org>
Subject [jira] [Created] (OAK-227) add depth parameter to MicroKernel#diff method
Date Thu, 02 Aug 2012 16:00:03 GMT
Stefan Guggisberg created OAK-227:

             Summary: add depth parameter to MicroKernel#diff method
                 Key: OAK-227
                 URL: https://issues.apache.org/jira/browse/OAK-227
             Project: Jackrabbit Oak
          Issue Type: New Feature
          Components: mk
            Reporter: Stefan Guggisberg
            Assignee: Stefan Guggisberg

a depth parameter allows to specify how deep changes should be included in the returned JSON

an example:

// initial content (/test/foo)
String rev0 = mk.commit("/", "+\"test\":{\"foo\":{}}", null, "");

// add /test/foo/bar
String rev1 = mk.commit("/test/foo", "+\"bar\":{\"p1\":123}", null, "");

// modify property /test/foo/bar/p1
String rev2 = mk.commit("/test/foo/bar", "^\"p1\":456", null, "");

// diff with depth 5
String diff1 = mk.diff(rev0, rev2, "/", 5);
// returned +"/test/foo/bar":{"p1":456} 

// diff with depth 1
String diff1 = mk.diff(rev0, rev2, "/", 1);
// returned ^"/test", indicating that there are changes below /test 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message