Return-Path: X-Original-To: apmail-jackrabbit-oak-commits-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C3616D5CC for ; Tue, 24 Jul 2012 08:56:14 +0000 (UTC) Received: (qmail 8981 invoked by uid 500); 24 Jul 2012 08:56:14 -0000 Delivered-To: apmail-jackrabbit-oak-commits-archive@jackrabbit.apache.org Received: (qmail 8927 invoked by uid 500); 24 Jul 2012 08:56:12 -0000 Mailing-List: contact oak-commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-commits@jackrabbit.apache.org Delivered-To: mailing list oak-commits@jackrabbit.apache.org Received: (qmail 8871 invoked by uid 99); 24 Jul 2012 08:56:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jul 2012 08:56:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jul 2012 08:56:07 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D45A123889B8; Tue, 24 Jul 2012 08:55:22 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1364936 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Root.java Date: Tue, 24 Jul 2012 08:55:22 -0000 To: oak-commits@jackrabbit.apache.org From: angela@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120724085522.D45A123889B8@eris.apache.org> Author: angela Date: Tue Jul 24 08:55:22 2012 New Revision: 1364936 URL: http://svn.apache.org/viewvc?rev=1364936&view=rev Log: OAK-196 : Make Root interface permission aware Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Root.java Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Root.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Root.java?rev=1364936&r1=1364935&r2=1364936&view=diff ============================================================================== --- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Root.java (original) +++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/api/Root.java Tue Jul 24 08:55:22 2012 @@ -27,24 +27,38 @@ import javax.annotation.Nonnull; public interface Root { /** - * Move the child located at {@code sourcePath} to a child - * at {@code destPath}. Do nothing if either the source - * does not exist, the parent of the destination does not exist - * or the destination exists already. Both paths must resolve - * to a child located beneath this root. + * Move the child located at {@code sourcePath} to a child at {@code destPath}. + * Both paths must resolve to a child located beneath this root.
* - * @param sourcePath source path relative to this root - * @param destPath destination path relative to this root - * @return {@code true} on success, {@code false} otherwise. + * This method does nothing and returns {@code false} if + *
    + *
  • the tree at {@code sourcePath} does not exist or is not accessible,
  • + *
  • the parent of the tree at {@code destinationPath} does not exist or is not accessible,
  • + *
  • a tree already exists at {@code destinationPath}.
  • + *
+ * If a tree at {@code destinationPath} exists but is not accessible to the + * editing content session this method succeeds but a subsequent + * {@link #commit(ConflictHandler)} will detect the violation and fail. + * + * @param sourcePath The source path relative to this root + * @param destPath The destination path relative to this root + * @return {@code true} on success, {@code false} otherwise. */ boolean move(String sourcePath, String destPath); /** - * Copy the child located at {@code sourcePath} to a child - * at {@code destPath}. Do nothing if either the source - * does not exist, the parent of the destination does not exist - * or the destination exists already. Both paths must resolve - * to a child located in this root. + * Copy the child located at {@code sourcePath} to a child at {@code destPath}. + * Both paths must resolve to a child located in this root.
+ * + * This method does nothing an returns {@code false} if + *
    + *
  • The tree at {@code sourcePath} does exist or is not accessible,
  • + *
  • the parent of the tree at {@code destinationPath} does not exist or is not accessible,
  • + *
  • a tree already exists at {@code destinationPath}.
  • + *
+ * If a tree at {@code destinationPath} exists but is not accessible to the + * editing content session this method succeeds but a subsequent + * {@link #commit(ConflictHandler)} will detect the violation and fail. * * @param sourcePath source path relative to this root * @param destPath destination path relative to this root @@ -57,17 +71,18 @@ public interface Root { * a tree in this root. * * @param path path to the tree - * @return tree at the given path or {@code null} if no such tree exists + * @return tree at the given path or {@code null} if no such tree exists or + * if the tree at {@code path} is not accessible. */ @CheckForNull Tree getTree(String path); /** - * Rebase this root to the latest revision. After a call to this method, + * Rebase this root instance to the latest revision. After a call to this method, * all trees obtained through {@link #getTree(String)} become invalid and fresh * instances must be obtained. * - * @param conflictHandler {@link ConflictHandler} for resolving conflicts. + * @param conflictHandler A {@link ConflictHandler} for resolving conflicts. */ void rebase(ConflictHandler conflictHandler);