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 AE2E0EBCF for ; Fri, 15 Feb 2013 10:02:55 +0000 (UTC) Received: (qmail 75509 invoked by uid 500); 15 Feb 2013 10:02:54 -0000 Delivered-To: apmail-jackrabbit-oak-commits-archive@jackrabbit.apache.org Received: (qmail 75436 invoked by uid 500); 15 Feb 2013 10:02:53 -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-dev@jackrabbit.apache.org Delivered-To: mailing list oak-commits@jackrabbit.apache.org Received: (qmail 75347 invoked by uid 99); 15 Feb 2013 10:02:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Feb 2013 10:02:49 +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; Fri, 15 Feb 2013 10:02:48 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 3139B23888D2; Fri, 15 Feb 2013 10:02:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1446487 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeMigrator.java Date: Fri, 15 Feb 2013 10:02:29 -0000 To: oak-commits@jackrabbit.apache.org From: angela@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130215100229.3139B23888D2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: angela Date: Fri Feb 15 10:02:28 2013 New Revision: 1446487 URL: http://svn.apache.org/r1446487 Log: OAK-64 : Privilege Management (javadoc) Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeMigrator.java Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeMigrator.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeMigrator.java?rev=1446487&r1=1446486&r2=1446487&view=diff ============================================================================== --- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeMigrator.java (original) +++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeMigrator.java Fri Feb 15 10:02:28 2013 @@ -89,14 +89,18 @@ public class PrivilegeMigrator { * custom privilege definitions of Jackrabbit 2.x repositories. The caller * is in charge of migrating the definitions. * - * @param customPrivileges - * @param nsRegistry - * @return - * @throws RepositoryException - * @throws IOException + * @param customPrivileges The stream from which 2.x privilege definitions + * should be read. + * @param nsRegistry The namespace registry. + * @return The {@code PrivilegeDefinition}s contained in the stream. + * @throws RepositoryException If a name collisions is detected during + * parsing the custom privileges. + * @throws IOException If another error occurs while reading from the + * custom privileges stream. */ private static Iterable readCustomDefinitions(InputStream customPrivileges, - NamespaceRegistry nsRegistry) throws RepositoryException, IOException { + NamespaceRegistry nsRegistry) + throws RepositoryException, IOException { Map definitions = new LinkedHashMap(); InputSource src = new InputSource(customPrivileges); for (PrivilegeDefinition def : PrivilegeXmlHandler.readDefinitions(src, nsRegistry)) { @@ -214,7 +218,7 @@ public class PrivilegeMigrator { * Create a new {@code DocumentBuilder} * * @return a new {@code DocumentBuilder} - * @throws ParserConfigurationException + * @throws ParserConfigurationException If an error occurs. */ private static DocumentBuilder createDocumentBuilder() throws ParserConfigurationException { DocumentBuilder builder = createFactory().newDocumentBuilder(); @@ -226,9 +230,10 @@ public class PrivilegeMigrator { * Update the specified nsRegistry mappings with the nsRegistry declarations * defined by the given XML element. * - * @param elem - * @param nsRegistry - * @throws javax.jcr.RepositoryException + * @param elem An XML element. + * @param nsRegistry The namespace registry used to keep track of the + * namespace definitions present in the xml file. + * @throws javax.jcr.RepositoryException If error occurs. */ private static void updateNamespaceMapping(Element elem, NamespaceRegistry nsRegistry) throws RepositoryException { NamedNodeMap attributes = elem.getAttributes();