From oak-dev-return-2068-apmail-jackrabbit-oak-dev-archive=jackrabbit.apache.org@jackrabbit.apache.org Thu Aug 2 16:00:04 2012 Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4FB4B911C for ; Thu, 2 Aug 2012 16:00:04 +0000 (UTC) Received: (qmail 78143 invoked by uid 500); 2 Aug 2012 16:00:04 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 78091 invoked by uid 500); 2 Aug 2012 16:00:04 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 77974 invoked by uid 99); 2 Aug 2012 16:00:04 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2012 16:00:04 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 003E2142823 for ; Thu, 2 Aug 2012 16:00:04 +0000 (UTC) Date: Thu, 2 Aug 2012 16:00:03 +0000 (UTC) From: "Stefan Guggisberg (JIRA)" To: oak-dev@jackrabbit.apache.org Message-ID: <154438076.5924.1343923204003.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Created] (OAK-227) add depth parameter to MicroKernel#diff method MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 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 diff. an example: {code} // 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 {code} -- 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