directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1025786 - /directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/
Date Wed, 20 Oct 2010 22:36:50 GMT
Author: elecharny
Date: Wed Oct 20 22:36:49 2010
New Revision: 1025786

URL: http://svn.apache.org/viewvc?rev=1025786&view=rev
Log:
Added toString() methods

Removed:
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/BaseAdsBean.java
Modified:
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ChangeLogBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ChangePasswordServerBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DSBasedServerBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DhcpServerBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DirectoryServiceBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DnsServerBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ExtendedOpHandlerBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/IndexBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmIndexBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmPartitionBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/JournalBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/LdapServerBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/NtpServerBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/PartitionBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/SaslMechanisHandlerBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ServerBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/TcpTransportBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/TransportBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/UdpTransportBean.java

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/AdsBaseBean.java
Wed Oct 20 22:36:49 2010
@@ -81,16 +81,13 @@ public abstract class AdsBaseBean 
     }
     
     
-    /**
-     * {@inheritDoc}
-     */
-    public String toString()
+    protected String toStringBoolean( String tabs, String name, boolean value )
     {
         StringBuilder sb = new StringBuilder();
+
+        sb.append( name ).append( " : " );
         
-        sb.append( "Enabled : " );
-        
-        if ( enabled )
+        if ( value )
         {
             sb.append( "TRUE" );
         }
@@ -101,11 +98,46 @@ public abstract class AdsBaseBean 
         
         sb.append( '\n' );
         
+        return sb.toString();
+    }
+    
+    
+    protected String toString( String tabs, String name, String value )
+    {
+        if ( value != null )
+        {
+            return name + " : " + value + "\n";
+        }
+        else
+        {
+            return "";
+        }
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( toStringBoolean( tabs, "enabled", enabled ) );
+        
         if ( !StringTools.isEmpty( description ) )
         {
-            sb.append( "Description : '" ).append( description ).append( "'\n" );
+            sb.append( tabs ).append( "description : '" ).append( description ).append( "'\n"
);
         }
         
         return sb.toString();
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ChangeLogBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ChangeLogBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ChangeLogBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ChangeLogBean.java
Wed Oct 20 22:36:49 2010
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.server.config.beans;
 
+
 /**
  * A class used to store the ChangeLog configuration.
  *
@@ -79,4 +80,28 @@ public class ChangeLogBean extends AdsBa
     {
         this.changelogexposed = changeLogExposed;
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( tabs ).append( "ChangeLog :\n" );
+        sb.append( tabs ).append( "  changeLog id :" ).append( changelogid ).append( '\n'
);
+        sb.append( toStringBoolean( tabs, "  changeLog exposed", changelogexposed ) );
+        
+        return sb.toString();
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ChangePasswordServerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ChangePasswordServerBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ChangePasswordServerBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ChangePasswordServerBean.java
Wed Oct 20 22:36:49 2010
@@ -204,4 +204,44 @@ public class ChangePasswordServerBean ex
     {
         this.chgpwdserviceprincipal = chgPwdServicePrincipal;
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( tabs ).append( "ChangePasswordServer :\n" );
+        sb.append( super.toString( tabs + "  " ) );
+        sb.append( tabs ).append( "  change password service principal :" ).append( chgpwdserviceprincipal
).append( '\n' );
+        sb.append( tabs ).append( "  KRB primary realm :" ).append( krbprimaryrealm ).append(
'\n' );
+        sb.append( tabs ).append( "  encryption types : \n" );
+        
+        if ( krbencryptiontypes != null )
+        {
+            for ( String encryptionType : krbencryptiontypes )
+            {
+                sb.append( tabs ).append( "    encryptionType :" ).append( encryptionType
).append( '\n' );
+            }
+        }
+        
+        sb.append( tabs ).append( "  change password policy category count :" ).append( chgpwdpolicycategorycount
).append( '\n' );
+        sb.append( tabs ).append( "  change password policy password length :" ).append(
chgpwdpolicypasswordlength ).append( '\n' );
+        sb.append( tabs ).append( "  change password policy token size :" ).append( chgpwdpolicytokensize
).append( '\n' );
+        sb.append( tabs ).append( "  KRB allowable clock skew :" ).append( krballowableclockskew
).append( '\n' );
+        sb.append( toStringBoolean( tabs, "  KRB empty addresses allowed", krbemptyaddressesallowed
) );
+
+        return sb.toString();
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DSBasedServerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DSBasedServerBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DSBasedServerBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DSBasedServerBean.java
Wed Oct 20 22:36:49 2010
@@ -63,4 +63,22 @@ public class DSBasedServerBean extends S
     {
         this.searchbasedn = searchBaseDn;
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        return super.toString( tabs ) + tabs + "SearchBaseDN : \n" + searchbasedn + "\n";
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DhcpServerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DhcpServerBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DhcpServerBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DhcpServerBean.java
Wed Oct 20 22:36:49 2010
@@ -37,4 +37,27 @@ public class DhcpServerBean extends DSBa
         // Enabled by default
         setEnabled( true );
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( tabs ).append( "DhcpServer :\n" );
+        sb.append( super.toString( tabs + "  " ) );
+
+        return sb.toString();
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DirectoryServiceBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DirectoryServiceBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DirectoryServiceBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DirectoryServiceBean.java
Wed Oct 20 22:36:49 2010
@@ -380,41 +380,69 @@ public class DirectoryServiceBean extend
         
         sb.append( super.toString() );
         
+        sb.append( "DirectoryServiceBean : \n" );
+        
         // Dump the must attributes
-        sb.append( "directoryService ID : " ).append( directoryserviceid ).append( '\n' );
-        sb.append( "replica ID : " ).append( dsreplicaid ).append( '\n' );
-        sb.append( "working directory : " ).append( dsworkingdirectory ).append( '\n' );
-        sb.append( "interceptors : \n" );
+        sb.append( "  directoryService ID : " ).append( directoryserviceid ).append( '\n'
);
+        sb.append( "  replica ID : " ).append( dsreplicaid ).append( '\n' );
+        sb.append( "  working directory : " ).append( dsworkingdirectory ).append( '\n' );
+        sb.append( "  interceptors : \n" );
         
         if ( interceptors != null )
         {
             for ( InterceptorBean interceptor : interceptors )
             {
-                sb.append( interceptor.toString( "  " ) );
+                sb.append( interceptor.toString( "    " ) );
             }
         }
         
-        sb.append( "partitions : \n" );
+        sb.append( "  partitions : \n" );
         
         if ( partitions != null )
         {
             for ( PartitionBean partition : partitions )
             {
-                sb.append( partition.toString( "  " ) );
+                sb.append( partition.toString( "    " ) );
             }
         }
         
         
-        sb.append( "servers : \n" );
+        sb.append( "  servers : \n" );
         
         if ( servers != null )
         {
             for ( ServerBean server : servers )
             {
-                sb.append( server.toString() );
+                sb.append( server.toString( "    " ) );
             }
         }
 
+        sb.append( toStringBoolean( "  ", "accessControl enabled", dsaccesscontrolenabled
) );
+        sb.append( toStringBoolean( "  ", "allow anonymous access", dsallowanonymousaccess
) );
+        sb.append( toStringBoolean( "  ", "denormalized attributes enabled", dsdenormalizeopattrsenabled
) );
+        sb.append( toStringBoolean( "  ", "password hidden", dspasswordhidden ) );
+        sb.append( "  max PDU size : " ).append( dsmaxpdusize ).append( '\n' );
+        sb.append( "  sync period millisecond : " ).append( dssyncperiodmillis ).append(
'\n' );
+        sb.append( "  test entries : " ).append( dstestentries ).append( '\n' );
+        
+        if ( journal != null )
+        {
+            sb.append( "  journal : \n" );
+            sb.append( journal.toString( "    " ) );
+        }
+        
+        if ( changelog != null )
+        {
+            sb.append( changelog.toString( "    " ) );
+        }
+        
+        if ( passwordpolicy != null )
+        {
+            sb.append( passwordpolicy.toString( "    " ) );
+        }
+        
+        sb.append( '\n' );
+
         return sb.toString();
     }
 }

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DnsServerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DnsServerBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DnsServerBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/DnsServerBean.java
Wed Oct 20 22:36:49 2010
@@ -37,4 +37,27 @@ public class DnsServerBean extends DSBas
         // Enabled by default
         setEnabled( true );
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( tabs ).append( "DnsServer :\n" );
+        sb.append( super.toString( tabs + "  " ) );
+
+        return sb.toString();
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ExtendedOpHandlerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ExtendedOpHandlerBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ExtendedOpHandlerBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ExtendedOpHandlerBean.java
Wed Oct 20 22:36:49 2010
@@ -76,4 +76,28 @@ public class ExtendedOpHandlerBean
     {
         this.extendedophandlerclass = extendedOpHandlerClass;
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( tabs ).append( "Extended operation handler :\n" );
+        sb.append( tabs ).append( "  extended operation ID :" ).append( extendedopid ).append(
'\n' );
+        sb.append( tabs ).append( "  extended operation handler class :" ).append( extendedophandlerclass
).append( '\n' );
+        
+        return sb.toString();
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/IndexBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/IndexBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/IndexBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/IndexBean.java
Wed Oct 20 22:36:49 2010
@@ -52,4 +52,27 @@ public abstract class IndexBean extends 
     {
         this.indexattributeid = indexAttributeId;
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( super.toString( tabs + "  " ) );
+        sb.append( tabs ).append( "  indexed attribute ID : " ).append( indexattributeid
).append( '\n' );
+
+        return sb.toString();
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmIndexBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmIndexBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmIndexBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmIndexBean.java
Wed Oct 20 22:36:49 2010
@@ -133,4 +133,31 @@ public class JdbmIndexBean<K, E> extends
     {
         this.indexworkingdir = indexWorkingDir;
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( tabs ).append( "JdbmIndexBean :\n" );
+        sb.append( super.toString( tabs + "  " ) );
+        sb.append( tabs ).append( "  index file name : " ).append( indexfilename );
+        sb.append( tabs ).append( "  index working directory : " ).append( indexworkingdir
);
+        sb.append( tabs ).append( "  index cache size : " ).append( indexcachesize );
+        sb.append( tabs ).append( "  index num dup limit : " ).append( indexnumduplimit );
+        
+        return sb.toString();
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmPartitionBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmPartitionBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmPartitionBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/JdbmPartitionBean.java
Wed Oct 20 22:36:49 2010
@@ -19,9 +19,6 @@
  */
 package org.apache.directory.server.config.beans;
 
-import java.util.Set;
-
-import org.apache.directory.shared.ldap.entry.Entry;
 
 
 /**
@@ -37,9 +34,6 @@ public class JdbmPartitionBean extends P
     /** Tells if the optimizer is enabled or not */
     private boolean jdbmpartitionoptimizerenabled = true;
     
-    /** The set of indexed attributes */
-    private Set<JdbmIndexBean<String, Entry>> jdbmindexes;
-
     /**
      * Create a new JdbmPartitionBean instance
      */
@@ -93,37 +87,26 @@ public class JdbmPartitionBean extends P
     
     
     /**
-     * Stores the list of index defined for this partition
-     * 
-     * @param jdbmIndexes The list of indexes to store
+     * {@inheritDoc}
      */
-    public void setIndexedAttributes( Set<JdbmIndexBean<String, Entry>> jdbmIndexes
)
+    public String toString( String tabs )
     {
-        this.jdbmindexes = jdbmIndexes;
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( tabs ).append( "JdbmPartitionBean :\n" );
+        sb.append( super.toString( tabs + "  " ) );
+        sb.append( tabs ).append( "  partition cache size" ).append( partitioncachesize ).append(
'\n' );
+        sb.append( toStringBoolean( tabs, "  jdbm partition optimizer enabled", jdbmpartitionoptimizerenabled
) );
+        
+        return sb.toString();
     }
-
-
-    /**
-     * Add some indexes to this partition
-     * 
-     * @param jdbmIndexes The added jdbmIndexes
-     */
-    public void addJdbmIndexes( JdbmIndexBean<String, Entry>... jdbmIndexes )
-    {
-        for ( JdbmIndexBean<String, Entry> jdbmIndex : jdbmIndexes )
-        {
-            this.jdbmindexes.add( jdbmIndex );
-        }
-    }
-
-
+    
+    
     /**
-     * Get the list of index defined for this partition
-     * 
-     * @return The list of defined indexes
+     * {@inheritDoc}
      */
-    public Set<JdbmIndexBean<String, Entry>> getJdbmIndexes()
+    public String toString()
     {
-        return jdbmindexes;
+        return toString( "" );
     }
 }

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/JournalBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/JournalBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/JournalBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/JournalBean.java
Wed Oct 20 22:36:49 2010
@@ -121,4 +121,30 @@ public class JournalBean extends AdsBase
     {
         this.journalrotation = journalRotation;
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( tabs ).append( "Journal :\n" );
+        sb.append( tabs ).append( "  journal id :" ).append( journalid ).append( '\n' );
+        sb.append( tabs ).append( "  journal file name :" ).append( journalfilename ).append(
'\n' );
+        sb.append( tabs ).append( "  journal working dir :" ).append( journalworkingdir ).append(
'\n' );
+        sb.append( tabs ).append( "  journal rotation :" ).append( journalrotation ).append(
'\n' );
+        
+        return sb.toString();
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/LdapServerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/LdapServerBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/LdapServerBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/LdapServerBean.java
Wed Oct 20 22:36:49 2010
@@ -325,4 +325,65 @@ public class LdapServerBean extends DSBa
             this.extendedophandlers.add( extendedOp );
         }
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( tabs ).append( "LdapServer :\n" );
+        sb.append( super.toString( tabs + "  " ) );
+        sb.append( tabs ).append( "  max size limit : " ).append( maxsizelimit );
+        sb.append( tabs ).append( "  max time limit : " ).append( maxtimelimit );
+        sb.append( toString( tabs, "  certificate password", certificatepassword ) );
+        sb.append( toString( tabs, "  keystore file", keystorefile ) );
+        sb.append( toString( tabs, "  sasl principal", saslprincipal ) );
+        sb.append( tabs ).append( "  sasl host : " ).append( saslhost );
+        sb.append( toStringBoolean( tabs, "  confidentiality required", confidentialityrequired
) );
+        sb.append( toStringBoolean( tabs, "  enable replication provider", enablereplprovider
) );
+        
+        if ( extendedophandlers != null )
+        {
+            sb.append( tabs ).append( "  extended operation handlers :\n" );
+            
+            for ( ExtendedOpHandlerBean extendedOpHandler : extendedophandlers )
+            {
+                sb.append( extendedOpHandler.toString( tabs + "    " ) );
+            }
+        }
+        
+        if ( saslmechhandlers != null )
+        {
+            sb.append( tabs ).append( "  SASL mechanism handlers :\n" );
+            
+            for ( SaslMechanisHandlerBean saslMechHandler : saslmechhandlers )
+            {
+                sb.append( saslMechHandler.toString( tabs + "    " ) );
+            }
+        }
+        
+        if ( saslrealms != null )
+        {
+            sb.append( tabs ).append( "  SASL realms :\n" );
+            
+            for ( String saslRealm : saslrealms )
+            {
+                sb.append( tabs ).append( "  " ).append( saslRealm ).append( "\n" );
+            }
+        }
+
+        return sb.toString();
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/NtpServerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/NtpServerBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/NtpServerBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/NtpServerBean.java
Wed Oct 20 22:36:49 2010
@@ -37,4 +37,27 @@ public class NtpServerBean extends Serve
         // Enabled by default
         setEnabled( true );
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( tabs ).append( "NtpServer :\n" );
+        sb.append( super.toString( tabs + "  " ) );
+
+        return sb.toString();
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/PartitionBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/PartitionBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/PartitionBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/PartitionBean.java
Wed Oct 20 22:36:49 2010
@@ -19,6 +19,8 @@
  */
 package org.apache.directory.server.config.beans;
 
+import java.util.Set;
+
 import org.apache.directory.shared.ldap.name.DN;
 
 /**
@@ -37,6 +39,9 @@ public abstract class PartitionBean exte
     /** Tells if the data should be flushed to disk immediately */
     private boolean partitionsynconwrite;
 
+    /** The list of declared indexes */
+    private Set<IndexBean> indexes;
+
     /**
      * Create a new PartitionBean instance
      */
@@ -44,6 +49,7 @@ public abstract class PartitionBean exte
     {
     }
 
+    
     /**
      * @return the partitionId
      */
@@ -52,6 +58,7 @@ public abstract class PartitionBean exte
         return partitionid;
     }
 
+    
     /**
      * @param partitionId the partitionId to set
      */
@@ -60,6 +67,7 @@ public abstract class PartitionBean exte
         this.partitionid = partitionId;
     }
 
+    
     /**
      * @return the partitionSuffix
      */
@@ -68,6 +76,7 @@ public abstract class PartitionBean exte
         return partitionsuffix;
     }
 
+    
     /**
      * @param partitionSuffix the partitionSuffix to set
      */
@@ -76,6 +85,7 @@ public abstract class PartitionBean exte
         this.partitionsuffix = partitionSuffix;
     }
 
+    
     /**
      * @return the partitionSyncOnWrite
      */
@@ -84,6 +94,7 @@ public abstract class PartitionBean exte
         return partitionsynconwrite;
     }
 
+    
     /**
      * @param partitionSyncOnWrite the partitionSyncOnWrite to set
      */
@@ -94,27 +105,45 @@ public abstract class PartitionBean exte
     
     
     /**
+     * @return the indexes
+     */
+    public Set<IndexBean> getIndexes()
+    {
+        return indexes;
+    }
+
+
+    /**
+     * @param partitions the indexes to set
+     */
+    public void setIndexes( Set<IndexBean> indexes )
+    {
+        this.indexes = indexes;
+    }
+    
+    
+    /**
      * {@inheritDoc}
      */
     public String toString( String tabs )
     {
         StringBuilder sb = new StringBuilder();
         
-        sb.append( tabs ).append( "partition ID" ).append( partitionid ).append( '\n' );
-        sb.append( tabs ).append( "suffix : " ).append( partitionsuffix ).append( '\n' );
-        sb.append( tabs ).append( "sync on write : " );
+        sb.append( super.toString( tabs + "  " ) );
+        sb.append( tabs ).append( "  partition ID" ).append( partitionid ).append( '\n' );
+        sb.append( tabs ).append( "  suffix : " ).append( partitionsuffix ).append( '\n'
);
+        sb.append( toStringBoolean( tabs, "  sync on write", partitionsynconwrite ) );
         
-        if ( partitionsynconwrite )
-        {
-            sb.append(  "TRUE" );
-        }
-        else
+        sb.append( tabs ).append( "  indexes : \n" );
+        
+        if ( indexes != null )
         {
-            sb.append(  "FALSE" );
+            for ( IndexBean index : indexes )
+            {
+                sb.append( index.toString( tabs + "    " ) );
+            }
         }
         
-        sb.append( '\n' );
-        
         return sb.toString();
     }
     

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/SaslMechanisHandlerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/SaslMechanisHandlerBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/SaslMechanisHandlerBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/SaslMechanisHandlerBean.java
Wed Oct 20 22:36:49 2010
@@ -96,4 +96,29 @@ public class SaslMechanisHandlerBean ext
     {
         this.ntlmmechprovider = ntlmMechProvider;
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( tabs ).append( "SASL mechanism handler :\n" );
+        sb.append( tabs ).append( "  SASL mechanism name :" ).append( saslmechname ).append(
'\n' );
+        sb.append( tabs ).append( "  SASL mechanism class name :" ).append( saslmechclassname
).append( '\n' );
+        sb.append( tabs ).append( "  NTLM mechanism provider :" ).append( ntlmmechprovider
).append( '\n' );
+        
+        return sb.toString();
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ServerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ServerBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ServerBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ServerBean.java
Wed Oct 20 22:36:49 2010
@@ -94,4 +94,36 @@ public abstract class ServerBean extends
     {
         this.serverid = serverId;
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( super.toString( tabs + "  " ) );
+        sb.append( tabs ).append( "  server id :" ).append( serverid ).append( '\n' );
+        sb.append( tabs ).append( "  transports : \n" );
+        
+        if ( transports != null )
+        {
+            for ( TransportBean transport : transports )
+            {
+                sb.append( transport.toString( tabs + "    " ) );
+            }
+        }
+        
+        return sb.toString();
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/TcpTransportBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/TcpTransportBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/TcpTransportBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/TcpTransportBean.java
Wed Oct 20 22:36:49 2010
@@ -33,4 +33,22 @@ public class TcpTransportBean extends Tr
     {
         super();
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        return tabs + "TCP transport : \n" + super.toString( "  " + tabs);
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/TransportBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/TransportBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/TransportBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/TransportBean.java
Wed Oct 20 22:36:49 2010
@@ -168,4 +168,41 @@ public class TransportBean extends AdsBa
     {
         this.transportid = transportId;
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( tabs ).append( "  transport id :" ).append( transportid ).append( '\n'
);
+        sb.append( tabs ).append( "  transport address :" );
+        
+        if ( transportaddress == null )
+        {
+            sb.append( tabs ).append( "  localhost" ).append( '\n' );
+        }
+        else
+        {
+            sb.append( transportaddress ).append( '\n' );
+        }
+
+        sb.append( tabs ).append( "  transport port :" ).append( systemport ).append( '\n'
);
+        sb.append( tabs ).append( "  transport backlog :" ).append( transportbacklog ).append(
'\n' );
+        sb.append( tabs ).append( "  transport nb threads :" ).append( transportnbthreads
).append( '\n' );
+        sb.append( toStringBoolean( tabs, "  SSL enabled", transportenablessl ) );
+
+        return sb.toString();
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/UdpTransportBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/UdpTransportBean.java?rev=1025786&r1=1025785&r2=1025786&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/UdpTransportBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/UdpTransportBean.java
Wed Oct 20 22:36:49 2010
@@ -33,4 +33,22 @@ public class UdpTransportBean extends Tr
     {
         super();
     }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString( String tabs )
+    {
+        return tabs + "UDP transport : \n" + super.toString( "  " + tabs);
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }



Mime
View raw message