directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r663162 - in /directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration: editor/v151/ editor/v152/ model/v151/ model/v152/
Date Wed, 04 Jun 2008 15:10:23 GMT
Author: pamarcelot
Date: Wed Jun  4 08:10:22 2008
New Revision: 663162

URL: http://svn.apache.org/viewvc?rev=663162&view=rev
Log:
Added the possiblity to enable/disabled the LDAP protocol for the 1.5.1 and 1.5.2 server configurations.

Modified:
    directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v151/GeneralPage.java
    directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v152/GeneralPage.java
    directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/ServerConfigurationV151.java
    directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/ServerXmlIOV151.java
    directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerConfigurationV152.java
    directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerXmlIOV152.java

Modified: directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v151/GeneralPage.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v151/GeneralPage.java?rev=663162&r1=663161&r2=663162&view=diff
==============================================================================
--- directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v151/GeneralPage.java
(original)
+++ directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v151/GeneralPage.java
Wed Jun  4 08:10:22 2008
@@ -576,7 +576,7 @@
         binaryAttributesTableViewer.setInput( binaryAttributes );
 
         // LDAP Protocol
-        enableLdapCheckbox.setSelection( true );
+        enableLdapCheckbox.setSelection( configuration.isEnableLdap() );
         ldapPortText.setEnabled( enableLdapCheckbox.getSelection() );
         ldapPortText.setText( "" + configuration.getLdapPort() );
 
@@ -871,7 +871,8 @@
         configuration.setPassword( passwordText.getText() );
 
         configuration.setBinaryAttributes( binaryAttributes );
-
+        
+        configuration.setEnableLdap( enableLdapCheckbox.getSelection() );
         configuration.setLdapPort( Integer.parseInt( ldapPortText.getText() ) );
         configuration.setEnableLdaps( enableLdapsCheckbox.getSelection() );
         configuration.setLdapsPort( Integer.parseInt( ldapsPortText.getText() ) );

Modified: directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v152/GeneralPage.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v152/GeneralPage.java?rev=663162&r1=663161&r2=663162&view=diff
==============================================================================
--- directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v152/GeneralPage.java
(original)
+++ directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v152/GeneralPage.java
Wed Jun  4 08:10:22 2008
@@ -384,7 +384,7 @@
             .getServerConfiguration();
 
         // LDAP Protocol
-        enableLdapCheckbox.setSelection( true );
+        enableLdapCheckbox.setSelection( configuration.isEnableLdap() );
         ldapPortText.setEnabled( enableLdapCheckbox.getSelection() );
         ldapPortText.setText( "" + configuration.getLdapPort() );
 
@@ -542,6 +542,7 @@
         ServerConfigurationV152 configuration = ( ServerConfigurationV152 ) ( ( ServerConfigurationEditor
) getEditor() )
             .getServerConfiguration();
 
+        configuration.setEnableLdap( enableLdapCheckbox.getSelection() );
         configuration.setLdapPort( Integer.parseInt( ldapPortText.getText() ) );
         configuration.setEnableLdaps( enableLdapsCheckbox.getSelection() );
         configuration.setLdapsPort( Integer.parseInt( ldapsPortText.getText() ) );

Modified: directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/ServerConfigurationV151.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/ServerConfigurationV151.java?rev=663162&r1=663161&r2=663162&view=diff
==============================================================================
--- directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/ServerConfigurationV151.java
(original)
+++ directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/ServerConfigurationV151.java
Wed Jun  4 08:10:22 2008
@@ -38,6 +38,9 @@
 {
     // LDAP Configuration
 
+    /** The flag for Enable LDAP */
+    private boolean enableLdap;
+
     /** The port */
     private int ldapPort;
 
@@ -627,6 +630,18 @@
 
 
     /**
+     * Gets the Enable LDAP flag.
+     *
+     * @return
+     *      true if LDAP is enabled
+     */
+    public boolean isEnableLdap()
+    {
+        return enableLdap;
+    }
+
+
+    /**
      * Gets the Enable LDAPS flag.
      *
      * @return
@@ -857,6 +872,18 @@
 
 
     /**
+     * Sets the Enable LDAP flag.
+     *
+     * @param enableLdap
+     *      the new value
+     */
+    public void setEnableLdap( boolean enableLdap )
+    {
+        this.enableLdap = enableLdap;
+    }
+
+
+    /**
      * Sets the Enable LDAPS flag.
      *
      * @param enableLdaps

Modified: directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/ServerXmlIOV151.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/ServerXmlIOV151.java?rev=663162&r1=663161&r2=663162&view=diff
==============================================================================
--- directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/ServerXmlIOV151.java
(original)
+++ directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v151/ServerXmlIOV151.java
Wed Jun  4 08:10:22 2008
@@ -455,6 +455,17 @@
     {
         Element ldapConfiguration = getBeanElementById( document, "ldapConfiguration" );
 
+        // Enabled
+        String enabled = readBeanProperty( "enabled", ldapConfiguration );
+        if ( enabled != null )
+        {
+            serverConfiguration.setEnableLdap( parseBoolean( enabled ) );
+        }
+        else
+        {
+            serverConfiguration.setEnableLdap( true );
+        }
+
         // IP Port
         String ipPort = readBeanProperty( "ipPort", ldapConfiguration );
         if ( ipPort != null )
@@ -853,7 +864,7 @@
     /**
      * Reads an Interceptor.
      *
-     * @param element
+     * @param elementc
      *      the Interceptor Element
      * @return
      *      the Interceptor or null if it could not be parsed
@@ -1131,7 +1142,8 @@
     private static void createLdapConfigurationBean( Element root, ServerConfigurationV151
serverConfiguration )
     {
         Element ldapConfiguration = createProtocolConfigurationBean( root, "ldapConfiguration",
-            "org.apache.directory.server.ldap.LdapConfiguration", true, serverConfiguration.getLdapPort()
);
+            "org.apache.directory.server.ldap.LdapConfiguration", serverConfiguration.isEnableLdap(),
+            serverConfiguration.getLdapPort() );
 
         // AllowAnonymousAccess
         Element propertyElement = ldapConfiguration.addElement( "property" );

Modified: directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerConfigurationV152.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerConfigurationV152.java?rev=663162&r1=663161&r2=663162&view=diff
==============================================================================
--- directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerConfigurationV152.java
(original)
+++ directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerConfigurationV152.java
Wed Jun  4 08:10:22 2008
@@ -38,6 +38,9 @@
 {
     // LDAP Configuration
 
+    /** The flag for Enable LDAP */
+    private boolean enableLdap;
+
     /** The port */
     private int ldapPort;
 
@@ -558,6 +561,18 @@
 
 
     /**
+     * Gets the Enable LDAP flag.
+     *
+     * @return
+     *      true if LDAP is enabled
+     */
+    public boolean isEnableLdap()
+    {
+        return enableLdap;
+    }
+
+
+    /**
      * Gets the Enable LDAPS flag.
      *
      * @return
@@ -774,6 +789,18 @@
 
 
     /**
+     * Sets the Enable LDAP flag.
+     *
+     * @param enableLdap
+     *      the new value
+     */
+    public void setEnableLdap( boolean enableLdap )
+    {
+        this.enableLdap = enableLdap;
+    }
+
+
+    /**
      * Sets the Enable NTP flag.
      *
      * @param enableNtp

Modified: directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerXmlIOV152.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerXmlIOV152.java?rev=663162&r1=663161&r2=663162&view=diff
==============================================================================
--- directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerXmlIOV152.java
(original)
+++ directory/studio/branches/apacheds-plugin-branch/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/model/v152/ServerXmlIOV152.java
Wed Jun  4 08:10:22 2008
@@ -1044,7 +1044,7 @@
                         if ( enabledAttribute == null )
                         {
                             // By default, the protocol is not enabled
-                            serverConfiguration.setEnableDns( false );
+                            serverConfiguration.setEnableLdaps( false );
                         }
                         else
                         {
@@ -1109,6 +1109,18 @@
                 // Checking if the 'ldapServer' element is the one for LDAP
                 if ( ServerXmlIOV152.ELEMENT_LDAP_SERVER.equalsIgnoreCase( idAttribute.getValue()
) )
                 {
+                    // Getting the 'enabled' attribute
+                    org.dom4j.Attribute enabledAttribute = ldapServerElement
+                        .attribute( ServerXmlIOV152.ATTRIBUTE_ENABLED );
+                    if ( enabledAttribute == null )
+                    {
+                        // By default, the protocol is enabled
+                        serverConfiguration.setEnableLdap( true );
+                    }
+                    else
+                    {
+                        serverConfiguration.setEnableLdap( parseBoolean( enabledAttribute.getValue()
) );
+                    }
                     // IpPort
                     org.dom4j.Attribute ipPortAttribute = ldapServerElement
                         .attribute( ServerXmlIOV152.ATTRIBUTE_IP_PORT );
@@ -1965,6 +1977,9 @@
         // Adding the 'ldapServer' element
         Element ldapServerElement = root.addElement( ServerXmlIOV152.ELEMENT_LDAP_SERVER
);
 
+        // Enabled
+        ldapServerElement.addAttribute( ServerXmlIOV152.ATTRIBUTE_ENABLED, "" + serverConfiguration.isEnableLdap()
);
+
         // Id
         ldapServerElement.addAttribute( ServerXmlIOV152.ATTRIBUTE_ID, ServerXmlIOV152.ELEMENT_LDAP_SERVER
);
 



Mime
View raw message