directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1025796 - /directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/
Date Thu, 21 Oct 2010 00:03:07 GMT
Author: elecharny
Date: Thu Oct 21 00:03:07 2010
New Revision: 1025796

URL: http://svn.apache.org/viewvc?rev=1025796&view=rev
Log:
o Switched the Set to List
o Fixed some toString() methods

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/ChangePasswordServerBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ConfigBean.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/DirectoryServiceBean.java
    directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/KdcServerBean.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/PartitionBean.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/TransportBean.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=1025796&r1=1025795&r2=1025796&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
Thu Oct 21 00:03:07 2010
@@ -85,7 +85,7 @@ public abstract class AdsBaseBean 
     {
         StringBuilder sb = new StringBuilder();
 
-        sb.append( name ).append( " : " );
+        sb.append( tabs ).append( name ).append( " : " );
         
         if ( value )
         {
@@ -106,7 +106,7 @@ public abstract class AdsBaseBean 
     {
         if ( value != null )
         {
-            return name + " : " + value + "\n";
+            return tabs + name + " : " + value + "\n";
         }
         else
         {

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=1025796&r1=1025795&r2=1025796&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
Thu Oct 21 00:03:07 2010
@@ -19,8 +19,8 @@
  */
 package org.apache.directory.server.config.beans;
 
-import java.util.HashSet;
-import java.util.Set;
+import java.util.ArrayList;
+import java.util.List;
 
 
 /**
@@ -37,7 +37,7 @@ public class ChangePasswordServerBean ex
     private boolean krbemptyaddressesallowed;
     
     /** The encryption types. */
-    private Set<String> krbencryptiontypes = new HashSet<String>();
+    private List<String> krbencryptiontypes = new ArrayList<String>();
     
     /** The primary realm. */
     private String krbprimaryrealm;
@@ -101,7 +101,7 @@ public class ChangePasswordServerBean ex
     /**
      * @return the krbEncryptionTypes
      */
-    public Set<String> getKrbEncryptionTypes()
+    public List<String> getKrbEncryptionTypes()
     {
         return krbencryptiontypes;
     }
@@ -110,7 +110,7 @@ public class ChangePasswordServerBean ex
     /**
      * @param krbEncryptionTypes the krbEncryptionTypes to set
      */
-    public void setKrbEncryptionTypes( Set<String> krbEncryptionTypes )
+    public void setKrbEncryptionTypes( List<String> krbEncryptionTypes )
     {
         this.krbencryptiontypes = krbEncryptionTypes;
     }
@@ -214,23 +214,24 @@ public class ChangePasswordServerBean ex
         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" );
+        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' );
         
-        if ( krbencryptiontypes != null )
+        if ( ( krbencryptiontypes != null ) && ( krbencryptiontypes.size() != 0 )
)
         {
+            sb.append( tabs ).append( "  encryption types : \n" );
+
             for ( String encryptionType : krbencryptiontypes )
             {
-                sb.append( tabs ).append( "    encryptionType :" ).append( encryptionType
).append( '\n' );
+                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( 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();

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ConfigBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ConfigBean.java?rev=1025796&r1=1025795&r2=1025796&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ConfigBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/ConfigBean.java
Thu Oct 21 00:03:07 2010
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.server.config.beans;
 
-import java.util.Set;
+import java.util.List;
 
 /**
  * The base class containing all the configuration hierarchy. This hierarchy
@@ -30,7 +30,7 @@ import java.util.Set;
 public class ConfigBean 
 {
     /** The DirectoryService beans */
-    private Set<DirectoryServiceBean> directoryServiceBeans;
+    private List<AdsBaseBean> directoryServiceBeans;
 
     /**
      * Create a new ConfigBean instance
@@ -56,7 +56,7 @@ public class ConfigBean 
     /**
      * @return the directoryServiceBeans
      */
-    public Set<DirectoryServiceBean> getDirectoryServiceBeans()
+    public List<AdsBaseBean> getDirectoryServiceBeans()
     {
         return directoryServiceBeans;
     }
@@ -65,7 +65,7 @@ public class ConfigBean 
     /**
      * @param directoryServiceBeans the directoryServiceBeans to set
      */
-    public void setDirectoryServiceBeans( Set<DirectoryServiceBean> directoryServiceBeans
)
+    public void setDirectoryServiceBeans( List<AdsBaseBean> directoryServiceBeans )
     {
         this.directoryServiceBeans = directoryServiceBeans;
     }

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=1025796&r1=1025795&r2=1025796&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
Thu Oct 21 00:03:07 2010
@@ -70,7 +70,7 @@ public class DSBasedServerBean extends S
      */
     public String toString( String tabs )
     {
-        return super.toString( tabs ) + tabs + "SearchBaseDN : \n" + searchbasedn + "\n";
+        return super.toString( tabs ) + tabs + "  SearchBaseDN : " + searchbasedn + "\n";
     }
     
     

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=1025796&r1=1025795&r2=1025796&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
Thu Oct 21 00:03:07 2010
@@ -20,6 +20,7 @@
 package org.apache.directory.server.config.beans;
 
 
+import java.util.List;
 import java.util.Set;
 
 import org.apache.directory.server.core.authn.PasswordPolicyConfiguration;
@@ -69,10 +70,10 @@ public class DirectoryServiceBean extend
     private Set<ServerBean> servers;
 
     /** The list of declared interceptors */
-    private Set<InterceptorBean> interceptors;
+    private List<InterceptorBean> interceptors;
 
     /** The set of associated partitions */
-    private Set<PartitionBean> partitions;
+    private List<PartitionBean> partitions;
 
     /** The reference to the Password Policy component */
     private PasswordPolicyConfiguration passwordpolicy;
@@ -138,7 +139,7 @@ public class DirectoryServiceBean extend
      *
      * @return the interceptors in the server.
      */
-    public Set<InterceptorBean> getInterceptors()
+    public List<InterceptorBean> getInterceptors()
     {
         return interceptors;
     }
@@ -149,7 +150,7 @@ public class DirectoryServiceBean extend
      *
      * @param interceptors the interceptors to be used in the server.
      */
-    public void setInterceptors( Set<InterceptorBean> interceptors )
+    public void setInterceptors( List<InterceptorBean> interceptors )
     {
         this.interceptors = interceptors;
     }
@@ -320,7 +321,7 @@ public class DirectoryServiceBean extend
     /**
      * @return the partitions
      */
-    public Set<PartitionBean> getPartitions()
+    public List<PartitionBean> getPartitions()
     {
         return partitions;
     }
@@ -329,7 +330,7 @@ public class DirectoryServiceBean extend
     /**
      * @param partitions the partitions to set
      */
-    public void setPartitions( Set<PartitionBean> partitions )
+    public void setPartitions( List<PartitionBean> partitions )
     {
         this.partitions = partitions;
     }
@@ -378,9 +379,8 @@ public class DirectoryServiceBean extend
     {
         StringBuilder sb = new StringBuilder();
         
-        sb.append( super.toString() );
-        
         sb.append( "DirectoryServiceBean : \n" );
+        sb.append( super.toString( "  " ) );
         
         // Dump the must attributes
         sb.append( "  directoryService ID : " ).append( directoryserviceid ).append( '\n'
);

Modified: directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/KdcServerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/KdcServerBean.java?rev=1025796&r1=1025795&r2=1025796&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/KdcServerBean.java
(original)
+++ directory/apacheds/branches/apacheds-config/server-config/src/main/java/org/apache/directory/server/config/beans/KdcServerBean.java
Thu Oct 21 00:03:07 2010
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.server.config.beans;
 
-import java.util.Set;
+import java.util.List;
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
@@ -102,7 +102,7 @@ public class KdcServerBean extends DSBas
     private boolean krbbodychecksumverified = DEFAULT_VERIFY_BODY_CHECKSUM;
 
     /** The encryption types. */
-    private Set<EncryptionType> krbencryptiontypes;
+    private List<EncryptionType> krbencryptiontypes;
 
     /** The service principal name. */
     private String krbkdcprincipal = DEFAULT_PRINCIPAL;
@@ -144,7 +144,7 @@ public class KdcServerBean extends DSBas
      *
      * @return The encryption types.
      */
-    public Set<EncryptionType> getKrbEncryptionTypes()
+    public List<EncryptionType> getKrbEncryptionTypes()
     {
         return krbencryptiontypes;
     }

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=1025796&r1=1025795&r2=1025796&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
Thu Oct 21 00:03:07 2010
@@ -19,7 +19,9 @@
  */
 package org.apache.directory.server.config.beans;
 
+import java.util.ArrayList;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
 
 
@@ -61,7 +63,7 @@ public class LdapServerBean extends DSBa
     private Set<SaslMechanisHandlerBean> saslmechhandlers = new HashSet<SaslMechanisHandlerBean>();
     
     /** The list of supported extended operation handlers */
-    private Set<ExtendedOpHandlerBean> extendedophandlers = new HashSet<ExtendedOpHandlerBean>();
+    private List<ExtendedOpHandlerBean> extendedophandlers = new ArrayList<ExtendedOpHandlerBean>();
 
     /**
      * Create a new LdapServerBean instance
@@ -300,7 +302,7 @@ public class LdapServerBean extends DSBa
     /**
      * @return the extendedOps
      */
-    public Set<ExtendedOpHandlerBean> getExtendedOps()
+    public List<ExtendedOpHandlerBean> getExtendedOps()
     {
         return extendedophandlers;
     }
@@ -309,7 +311,7 @@ public class LdapServerBean extends DSBa
     /**
      * @param extendedOps the extendedOps to set
      */
-    public void setExtendedOps( Set<ExtendedOpHandlerBean> extendedOps )
+    public void setExtendedOps( List<ExtendedOpHandlerBean> extendedOps )
     {
         this.extendedophandlers = extendedOps;
     }

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=1025796&r1=1025795&r2=1025796&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
Thu Oct 21 00:03:07 2010
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.server.config.beans;
 
-import java.util.Set;
+import java.util.List;
 
 import org.apache.directory.shared.ldap.name.DN;
 
@@ -40,7 +40,7 @@ public abstract class PartitionBean exte
     private boolean partitionsynconwrite;
 
     /** The list of declared indexes */
-    private Set<IndexBean> indexes;
+    private List<IndexBean> indexes;
 
     /**
      * Create a new PartitionBean instance
@@ -107,7 +107,7 @@ public abstract class PartitionBean exte
     /**
      * @return the indexes
      */
-    public Set<IndexBean> getIndexes()
+    public List<IndexBean> getIndexes()
     {
         return indexes;
     }
@@ -116,7 +116,7 @@ public abstract class PartitionBean exte
     /**
      * @param partitions the indexes to set
      */
-    public void setIndexes( Set<IndexBean> indexes )
+    public void setIndexes( List<IndexBean> indexes )
     {
         this.indexes = indexes;
     }

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=1025796&r1=1025795&r2=1025796&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
Thu Oct 21 00:03:07 2010
@@ -19,8 +19,8 @@
  */
 package org.apache.directory.server.config.beans;
 
-import java.util.HashSet;
-import java.util.Set;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * A class used to store the Server configuration. It can't be instanciated
@@ -33,7 +33,7 @@ public abstract class ServerBean extends
     private String serverid;
     
     /** The set of transports to use for this server */
-    private Set<TransportBean> transports = new HashSet<TransportBean>();;
+    private List<TransportBean> transports = new ArrayList<TransportBean>();
 
     /**
      * Create a new ServerBean instance
@@ -104,7 +104,7 @@ public abstract class ServerBean extends
         StringBuilder sb = new StringBuilder();
         
         sb.append( super.toString( tabs + "  " ) );
-        sb.append( tabs ).append( "  server id :" ).append( serverid ).append( '\n' );
+        sb.append( tabs ).append( "  server id : " ).append( serverid ).append( '\n' );
         sb.append( tabs ).append( "  transports : \n" );
         
         if ( transports != null )

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=1025796&r1=1025795&r2=1025796&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
Thu Oct 21 00:03:07 2010
@@ -177,22 +177,22 @@ public class TransportBean extends AdsBa
     {
         StringBuilder sb = new StringBuilder();
         
-        sb.append( tabs ).append( "  transport id :" ).append( transportid ).append( '\n'
);
-        sb.append( tabs ).append( "  transport address :" );
+        sb.append( toString( tabs, "transport id", transportid ) );
+        sb.append( tabs ).append( "transport address : " );
         
         if ( transportaddress == null )
         {
-            sb.append( tabs ).append( "  localhost" ).append( '\n' );
+            sb.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 ) );
+        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();
     }



Mime
View raw message