directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r677957 - in /directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model: v152/ServerXmlIOV152.java v153/ServerXmlIOV153.java
Date Fri, 18 Jul 2008 16:10:46 GMT
Author: pamarcelot
Date: Fri Jul 18 09:10:46 2008
New Revision: 677957

URL: http://svn.apache.org/viewvc?rev=677957&view=rev
Log:
Fixed a bug which caused Apache DS (1.5.2 and 1.5.3) to not be launched correctly when only
LDAP is enabled, only LDAPS is enabled or when LDAPS is disabled when LDAP is enabled. It
now produces a compliant server.xml file.

Modified:
    directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerXmlIOV152.java
    directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/ServerXmlIOV153.java

Modified: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerXmlIOV152.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerXmlIOV152.java?rev=677957&r1=677956&r2=677957&view=diff
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerXmlIOV152.java
(original)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerXmlIOV152.java
Fri Jul 18 09:10:46 2008
@@ -1939,29 +1939,28 @@
      */
     private void createLdapsServerBean( Element root, ServerConfigurationV152 serverConfiguration
)
     {
-        if ( serverConfiguration.isEnableLdaps() )
-        {
-            // Adding the 'ldapServer' element
-            Element ldapServerElement = root.addElement( ServerXmlIOV152.ELEMENT_LDAP_SERVER
);
+        // Adding the 'ldapServer' element
+        Element ldapServerElement = root.addElement( ServerXmlIOV152.ELEMENT_LDAP_SERVER
);
 
-            // Id
-            ldapServerElement.addAttribute( ServerXmlIOV152.ATTRIBUTE_ID, ServerXmlIOV152.ELEMENT_LDAPS_SERVER
);
+        // Id
+        ldapServerElement.addAttribute( ServerXmlIOV152.ATTRIBUTE_ID, ServerXmlIOV152.ELEMENT_LDAPS_SERVER
);
 
-            // IpPort
-            ldapServerElement.addAttribute( ServerXmlIOV152.ATTRIBUTE_IP_PORT, "" + serverConfiguration.getLdapsPort()
);
+        // IpPort
+        ldapServerElement.addAttribute( ServerXmlIOV152.ATTRIBUTE_IP_PORT, "" + serverConfiguration.getLdapsPort()
);
 
-            // Enabled
-            ldapServerElement.addAttribute( ServerXmlIOV152.ATTRIBUTE_ENABLED, "" + "true"
);
+        // Enabled
+        ldapServerElement.addAttribute( ServerXmlIOV152.ATTRIBUTE_ENABLED, "" + serverConfiguration.isEnableLdaps()
);
 
-            // EnableLdaps
-            ldapServerElement.addAttribute( ServerXmlIOV152.ATTRIBUTE_ENABLE_LDAPS, "" +
"true" );
+        // EnableLdaps
+        ldapServerElement.addAttribute( ServerXmlIOV152.ATTRIBUTE_ENABLE_LDAPS, ""
+            + serverConfiguration.isEnableLdaps() );
 
-            // Adding 'directoryService' element
-            ldapServerElement.addElement( ServerXmlIOV152.VALUE_DIRECTORY_SERVICE ).setText(
"#directoryService" );
+        // Adding 'directoryService' element
+        ldapServerElement.addElement( ServerXmlIOV152.VALUE_DIRECTORY_SERVICE ).setText(
"#directoryService" );
+
+        // Adding 'socketAcceptor' element
+        ldapServerElement.addElement( ServerXmlIOV152.ELEMENT_SOCKET_ACCEPTOR ).setText(
"#socketAcceptor" );
 
-            // Adding 'socketAcceptor' element
-            ldapServerElement.addElement( ServerXmlIOV152.ELEMENT_SOCKET_ACCEPTOR ).setText(
"#socketAcceptor" );
-        }
     }
 
 
@@ -2131,19 +2130,8 @@
         // Adding 'ldapServer' element
         apacheDSElement.addElement( ServerXmlIOV152.ELEMENT_LDAP_SERVER ).setText( "#ldapServer"
);
 
-        // LDAP Protocol
-        if ( serverConfiguration.isEnableLdaps() )
-        {
-            // Adding 'ldapsServer' element
-            apacheDSElement.addElement( ServerXmlIOV152.ELEMENT_LDAPS_SERVER ).setText( "#ldapsServer"
);
-        }
-
-        // LDAPS Protocol
-        if ( serverConfiguration.isEnableLdaps() )
-        {
-            // Adding 'ldapsServer' element
-            apacheDSElement.addElement( ServerXmlIOV152.ELEMENT_LDAPS_SERVER ).setText( "#ldapsServer"
);
-        }
+        // Adding 'ldapsServer' element
+        apacheDSElement.addElement( ServerXmlIOV152.ELEMENT_LDAPS_SERVER ).setText( "#ldapsServer"
);
     }
 
 

Modified: directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/ServerXmlIOV153.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/ServerXmlIOV153.java?rev=677957&r1=677956&r2=677957&view=diff
==============================================================================
--- directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/ServerXmlIOV153.java
(original)
+++ directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v153/ServerXmlIOV153.java
Fri Jul 18 09:10:46 2008
@@ -1990,29 +1990,27 @@
      */
     private void createLdapsServerBean( Element root, ServerConfigurationV153 serverConfiguration
)
     {
-        if ( serverConfiguration.isEnableLdaps() )
-        {
-            // Adding the 'ldapServer' element
-            Element ldapServerElement = root.addElement( ServerXmlIOV153.ELEMENT_LDAP_SERVER
);
+        // Adding the 'ldapServer' element
+        Element ldapServerElement = root.addElement( ServerXmlIOV153.ELEMENT_LDAP_SERVER
);
 
-            // Id
-            ldapServerElement.addAttribute( ServerXmlIOV153.ATTRIBUTE_ID, ServerXmlIOV153.ELEMENT_LDAPS_SERVER
);
+        // Id
+        ldapServerElement.addAttribute( ServerXmlIOV153.ATTRIBUTE_ID, ServerXmlIOV153.ELEMENT_LDAPS_SERVER
);
 
-            // IpPort
-            ldapServerElement.addAttribute( ServerXmlIOV153.ATTRIBUTE_IP_PORT, "" + serverConfiguration.getLdapsPort()
);
+        // IpPort
+        ldapServerElement.addAttribute( ServerXmlIOV153.ATTRIBUTE_IP_PORT, "" + serverConfiguration.getLdapsPort()
);
 
-            // Enabled
-            ldapServerElement.addAttribute( ServerXmlIOV153.ATTRIBUTE_ENABLED, "" + "true"
);
+        // Enabled
+        ldapServerElement.addAttribute( ServerXmlIOV153.ATTRIBUTE_ENABLED, "" + serverConfiguration.isEnableLdaps()
);
 
-            // EnableLdaps
-            ldapServerElement.addAttribute( ServerXmlIOV153.ATTRIBUTE_ENABLE_LDAPS, "" +
"true" );
+        // EnableLdaps
+        ldapServerElement.addAttribute( ServerXmlIOV153.ATTRIBUTE_ENABLE_LDAPS, ""
+            + serverConfiguration.isEnableLdaps() );
 
-            // Adding 'directoryService' element
-            ldapServerElement.addElement( ServerXmlIOV153.VALUE_DIRECTORY_SERVICE ).setText(
"#directoryService" );
+        // Adding 'directoryService' element
+        ldapServerElement.addElement( ServerXmlIOV153.VALUE_DIRECTORY_SERVICE ).setText(
"#directoryService" );
 
-            // Adding 'socketAcceptor' element
-            ldapServerElement.addElement( ServerXmlIOV153.ELEMENT_SOCKET_ACCEPTOR ).setText(
"#socketAcceptor" );
-        }
+        // Adding 'socketAcceptor' element
+        ldapServerElement.addElement( ServerXmlIOV153.ELEMENT_SOCKET_ACCEPTOR ).setText(
"#socketAcceptor" );
     }
 
 
@@ -2208,19 +2206,8 @@
         // Adding 'ldapServer' element
         apacheDSElement.addElement( ServerXmlIOV153.ELEMENT_LDAP_SERVER ).setText( "#ldapServer"
);
 
-        // LDAP Protocol
-        if ( serverConfiguration.isEnableLdaps() )
-        {
-            // Adding 'ldapsServer' element
-            apacheDSElement.addElement( ServerXmlIOV153.ELEMENT_LDAPS_SERVER ).setText( "#ldapsServer"
);
-        }
-
-        // LDAPS Protocol
-        if ( serverConfiguration.isEnableLdaps() )
-        {
-            // Adding 'ldapsServer' element
-            apacheDSElement.addElement( ServerXmlIOV153.ELEMENT_LDAPS_SERVER ).setText( "#ldapsServer"
);
-        }
+        // Adding 'ldapsServer' element
+        apacheDSElement.addElement( ServerXmlIOV153.ELEMENT_LDAPS_SERVER ).setText( "#ldapsServer"
);
     }
 
 



Mime
View raw message