directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r657758 - /directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerXmlIOV152.java
Date Mon, 19 May 2008 08:48:18 GMT
Author: pamarcelot
Date: Mon May 19 01:48:17 2008
New Revision: 657758

URL: http://svn.apache.org/viewvc?rev=657758&view=rev
Log:
o Added support for parsing the supportedMechanisms, SaslQop, SaslRealms tags.
o Added support for writing the enabled flag to the protocols.

Modified:
    directory/studio/trunk/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerXmlIOV152.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=657758&r1=657757&r2=657758&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
Mon May 19 01:48:17 2008
@@ -36,7 +36,6 @@
 import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
 import org.apache.directory.studio.apacheds.configuration.model.ServerXmlIO;
 import org.apache.directory.studio.apacheds.configuration.model.ServerXmlIOException;
-import org.apache.directory.studio.apacheds.configuration.model.AbstractServerXmlIO.BooleanFormatException;
 import org.dom4j.Document;
 import org.dom4j.DocumentHelper;
 import org.dom4j.Element;
@@ -1106,6 +1105,56 @@
                         serverConfiguration.setMaxSizeLimit( Integer.parseInt( maxSizeLimitAttribute.getValue()
) );
                     }
 
+                    // Supported Mechanisms
+                    Element supportedMechanismsElement = ldapServerElement.element( "supportedMechanisms"
);
+                    if ( supportedMechanismsElement != null )
+                    {
+                        // Looping on all 'value' elements
+                        for ( Iterator<?> iterator = supportedMechanismsElement.elementIterator(
"value" ); iterator
+                            .hasNext(); )
+                        {
+                            // Getting the 'value' element
+                            Element supportedMechanismValueElement = ( Element ) iterator.next();
+
+                            // Adding the supported mechanism value
+                            serverConfiguration.addSupportedMechanism( supportedMechanismValueElement.getText().trim()
+                                .toUpperCase() );
+
+                        }
+                    }
+
+                    // SaslQop
+                    Element SaslQopElement = ldapServerElement.element( "saslQop" );
+                    if ( SaslQopElement != null )
+                    {
+                        // Looping on all 'value' elements
+                        for ( Iterator<?> iterator = SaslQopElement.elementIterator(
"value" ); iterator.hasNext(); )
+                        {
+                            // Getting the 'value' element
+                            Element saslQopValueElement = ( Element ) iterator.next();
+
+                            // Adding the SaslQop value
+                            serverConfiguration.addSaslQop( saslQopValueElement.getText().trim()
);
+
+                        }
+                    }
+
+                    // SaslRealms
+                    Element SaslRealmsElement = ldapServerElement.element( "saslRealms" );
+                    if ( SaslRealmsElement != null )
+                    {
+                        // Looping on all 'value' elements
+                        for ( Iterator<?> iterator = SaslRealmsElement.elementIterator(
"value" ); iterator.hasNext(); )
+                        {
+                            // Getting the 'value' element
+                            Element saslRealmValueElement = ( Element ) iterator.next();
+
+                            // Adding the SaslRealm value
+                            serverConfiguration.addSaslRealm( saslRealmValueElement.getText().trim()
);
+
+                        }
+                    }
+
                     // Extended operations
                     readExtendedOperations( ldapServerElement, serverConfiguration );
 
@@ -1589,6 +1638,9 @@
             // Adding the 'changePasswordServer' element
             Element changePasswordServerElement = root.addElement( "changePasswordServer"
);
 
+            // Enabled
+            changePasswordServerElement.addAttribute( "enabled", "" + serverConfiguration.isEnableChangePassword()
);
+
             // IpPort
             changePasswordServerElement.addAttribute( "ipPort", "" + serverConfiguration.getChangePasswordPort()
);
 
@@ -1619,6 +1671,9 @@
             // Adding the 'kdcServer' element
             Element kdcServerElement = root.addElement( "kdcServer" );
 
+            // Enabled
+            kdcServerElement.addAttribute( "enabled", "" + serverConfiguration.isEnableKerberos()
);
+
             // IpPort
             kdcServerElement.addAttribute( "ipPort", "" + serverConfiguration.getKerberosPort()
);
 
@@ -1649,6 +1704,9 @@
             // Adding the 'ntpServer' element
             Element ntpServerElement = root.addElement( "ntpServer" );
 
+            // Enabled
+            ntpServerElement.addAttribute( "enabled", "" + serverConfiguration.isEnableNtp()
);
+
             // IpPort
             ntpServerElement.addAttribute( "ipPort", "" + serverConfiguration.getNtpPort()
);
 
@@ -1676,6 +1734,9 @@
             // Adding the 'dnsServer' element
             Element dnsServerElement = root.addElement( "dnsServer" );
 
+            // Enabled
+            dnsServerElement.addAttribute( "enabled", "" + serverConfiguration.isEnableDns()
);
+
             // IpPort
             dnsServerElement.addAttribute( "ipPort", "" + serverConfiguration.getDnsPort()
);
 
@@ -1712,8 +1773,8 @@
             // IpPort
             ldapServerElement.addAttribute( "ipPort", "" + serverConfiguration.getLdapsPort()
);
 
-            // Enable
-            ldapServerElement.addAttribute( "enable", "" + "true" );
+            // Enabled
+            ldapServerElement.addAttribute( "enabled", "" + "true" );
 
             // EnableLdaps
             ldapServerElement.addAttribute( "enableLdaps", "" + "true" );



Mime
View raw message