directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
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 GMT
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 <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -40,10 +41,9 @@ public class Subentry
 
     /** The administratives roles */
     private Set<AdministrativeRole> 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<AdministrativeRole> administrativeRoles
)
     {
@@ -74,6 +73,9 @@ public class Subentry
     }
 
 
+    /**
+     * @return The list of roles for this subentry
+     */
     final Set<AdministrativeRole> 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();
     }
 }



Mime
View raw message