Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 78165 invoked from network); 20 Dec 2010 13:29:54 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Dec 2010 13:29:54 -0000 Received: (qmail 21468 invoked by uid 500); 20 Dec 2010 13:29:54 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 21412 invoked by uid 500); 20 Dec 2010 13:29:53 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 21405 invoked by uid 99); 20 Dec 2010 13:29:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Dec 2010 13:29:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Mon, 20 Dec 2010 13:29:52 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6512923889EA; Mon, 20 Dec 2010 13:29:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1051097 - /directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/subtree/Subentry.java Date: Mon, 20 Dec 2010 13:29:32 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101220132932.6512923889EA@eris.apache.org> Author: elecharny Date: Mon Dec 20 13:29:32 2010 New Revision: 1051097 URL: http://svn.apache.org/viewvc?rev=1051097&view=rev Log: Updated the Javadoc Modified: directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/subtree/Subentry.java Modified: directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/subtree/Subentry.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/subtree/Subentry.java?rev=1051097&r1=1051096&r2=1051097&view=diff ============================================================================== --- directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/subtree/Subentry.java (original) +++ directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/subtree/Subentry.java Mon Dec 20 13:29:32 2010 @@ -29,7 +29,8 @@ import org.apache.directory.shared.ldap. /** * An operational view of a subentry within the system. A Subentry can have * many types (Collective, Schema, AccessControl or Trigger) but only one - * Subtree Specification. + * Subtree Specification. This subtreeSpecification will apply to all the + * subentry's roles. * * @author Apache Directory Project */ @@ -40,10 +41,9 @@ public class Subentry /** The administratives roles */ private Set administrativeRoles; - - + /** - * Stores the subtree + * Stores the subtreeSpecification * * @param ss The subtree specification */ @@ -63,10 +63,9 @@ public class Subentry /** + * Stores the set of roles for this subentry * - * TODO setAdministrativeRoles. - * - * @param administrativeRoles + * @param administrativeRoles The roles to be added */ final void setAdministrativeRoles( Set administrativeRoles ) { @@ -74,6 +73,9 @@ public class Subentry } + /** + * @return The list of roles for this subentry + */ final Set getAdministrativeRoles() { return administrativeRoles; @@ -124,6 +126,26 @@ public class Subentry */ public String toString() { - return "Subentry[" + administrativeRoles + ", " + ss + "]"; + StringBuilder sb = new StringBuilder(); + sb.append( "Subentry[" ); + + boolean isFirst = true; + + for ( AdministrativeRole role : administrativeRoles ) + { + if ( isFirst ) + { + isFirst = false; + } + else + { + sb.append( ", " ); + } + + sb.append( role ); + } + sb.append( "]" ); + + return sb.toString(); } }