directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r357549 - /directory/apacheds/branches/DN-refactoring/core/src/main/java/org/apache/ldap/server/schema/bootstrap/BootstrapObjectFactoryRegistry.java
Date Sun, 18 Dec 2005 23:19:35 GMT
Author: elecharny
Date: Sun Dec 18 15:19:29 2005
New Revision: 357549

URL: http://svn.apache.org/viewcvs?rev=357549&view=rev
Log:
Added a toString() method

Modified:
    directory/apacheds/branches/DN-refactoring/core/src/main/java/org/apache/ldap/server/schema/bootstrap/BootstrapObjectFactoryRegistry.java

Modified: directory/apacheds/branches/DN-refactoring/core/src/main/java/org/apache/ldap/server/schema/bootstrap/BootstrapObjectFactoryRegistry.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/DN-refactoring/core/src/main/java/org/apache/ldap/server/schema/bootstrap/BootstrapObjectFactoryRegistry.java?rev=357549&r1=357548&r2=357549&view=diff
==============================================================================
--- directory/apacheds/branches/DN-refactoring/core/src/main/java/org/apache/ldap/server/schema/bootstrap/BootstrapObjectFactoryRegistry.java
(original)
+++ directory/apacheds/branches/DN-refactoring/core/src/main/java/org/apache/ldap/server/schema/bootstrap/BootstrapObjectFactoryRegistry.java
Sun Dec 18 15:19:29 2005
@@ -23,6 +23,7 @@
 import javax.naming.directory.Attribute;
 import javax.naming.ldap.LdapContext;
 
+import org.apache.asn1.codec.util.StringUtils;
 import org.apache.ldap.server.jndi.ServerDirObjectFactory;
 import org.apache.ldap.server.schema.ObjectFactoryRegistry;
 import org.apache.ldap.server.schema.OidRegistry;
@@ -98,5 +99,35 @@
     public void register( ServerDirObjectFactory factory ) throws NamingException
     {
         byOid.put( oidRegistry.getOid( factory.getObjectClassId() ), factory );
+    }
+    
+    /**
+     * A String representation of this class
+     */
+    public String toString( String tabs )
+    {
+    	StringBuffer sb = new StringBuffer();
+    	
+    	sb.append( tabs ).append( "BootstrapObjectFactoryRegistry : {\n" );
+    	
+    	sb.append( tabs ).append(  "  By oid : \n" );
+    	
+    	sb.append( tabs ).append(  StringUtils.mapToString( byOid, "    " ) ) .append( '\n'
);
+    	
+    	sb.append( tabs ).append(  "  OidRegistry :\n" );
+    	
+    	sb.append( oidRegistry.toString( tabs +  "    " ) );
+    	
+    	sb.append( tabs ).append(  "}\n" );
+    	
+    	return sb.toString();
+    }
+
+    /**
+     * A String representation of this class
+     */
+    public String toString()
+    {
+    	return toString( "" );
     }
 }



Mime
View raw message