directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r329130 - in /directory/apacheds/trunk: ./ main/ main/src/main/java/org/apache/ldap/server/configuration/ main/src/main/java/org/apache/ldap/server/jndi/
Date Fri, 28 Oct 2005 06:46:23 GMT
Author: akarasulu
Date: Thu Oct 27 23:46:07 2005
New Revision: 329130

URL: http://svn.apache.org/viewcvs?rev=329130&view=rev
Log:
changes ...

 o added parameter to configuration to turn on the change password protocol
 o added deps for change password to pom for main
 o added enrique's configuration beans to startup the provider 



Modified:
    directory/apacheds/trunk/   (props changed)
    directory/apacheds/trunk/main/project.xml
    directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/configuration/MutableServerStartupConfiguration.java
    directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/configuration/ServerStartupConfiguration.java
    directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java

Propchange: directory/apacheds/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Oct 27 23:46:07 2005
@@ -1,4 +1,5 @@
 target
+apache.org
 .metadata
 *.md5
 *.log

Modified: directory/apacheds/trunk/main/project.xml
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/main/project.xml?rev=329130&r1=329129&r2=329130&view=diff
==============================================================================
--- directory/apacheds/trunk/main/project.xml (original)
+++ directory/apacheds/trunk/main/project.xml Thu Oct 27 23:46:07 2005
@@ -107,6 +107,11 @@
     </dependency>
     <dependency>
       <groupId>directory-protocols</groupId>
+      <artifactId>changepw-protocol</artifactId>
+      <version>0.5.1-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>directory-protocols</groupId>
       <artifactId>ntp-protocol</artifactId>
       <version>0.1-SNAPSHOT</version>
     </dependency>

Modified: directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/configuration/MutableServerStartupConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/configuration/MutableServerStartupConfiguration.java?rev=329130&r1=329129&r2=329130&view=diff
==============================================================================
--- directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/configuration/MutableServerStartupConfiguration.java
(original)
+++ directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/configuration/MutableServerStartupConfiguration.java
Thu Oct 27 23:46:07 2005
@@ -86,6 +86,11 @@
         super.setEnableKerberos( enableKerberos );
     }
 
+    public void setEnableChangePassword( boolean enableChangePassword )
+    {
+        super.setEnableChangePassword( enableChangePassword );
+    }
+
     public void setEnableNtp( boolean enableNtp )
     {
         super.setEnableNtp( enableNtp );
@@ -106,7 +111,8 @@
         super.setMinaServiceRegistry( minaServiceRegistry );
     }
 
-    public void setExtendedOperationHandlers(Collection handlers) {
-        super.setExtendedOperationHandlers(handlers);
+    public void setExtendedOperationHandlers( Collection handlers )
+    {
+        super.setExtendedOperationHandlers( handlers );
     }
 }

Modified: directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/configuration/ServerStartupConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/configuration/ServerStartupConfiguration.java?rev=329130&r1=329129&r2=329130&view=diff
==============================================================================
--- directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/configuration/ServerStartupConfiguration.java
(original)
+++ directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/configuration/ServerStartupConfiguration.java
Thu Oct 27 23:46:07 2005
@@ -28,7 +28,7 @@
 
 /**
  * A {@link StartupConfiguration} that starts up ApacheDS with network layer support.
- * 
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
@@ -41,6 +41,7 @@
     private int ldapPort = 389;
     private int ldapsPort = 636;
     private boolean enableKerberos;
+    private boolean enableChangePassword;
     private boolean enableNtp;
     private final Collection extendedOperationHandlers = new ArrayList();
 
@@ -73,6 +74,14 @@
     }
 
     /**
+     * Returns <tt>true</tt> if Change Password support is enabled.
+     */
+    public boolean isEnableChangePassword()
+    {
+        return enableChangePassword;
+    }
+
+    /**
      * Returns <tt>true</tt> if Kerberos support is enabled.
      */
     public boolean isEnableNtp()
@@ -86,6 +95,14 @@
     protected void setEnableKerberos( boolean enableKerberos )
     {
         this.enableKerberos = enableKerberos;
+    }
+
+    /**
+     * Sets whether to enable Change Password support or not.
+     */
+    protected void setEnableChangePassword( boolean enableChangePassword )
+    {
+        this.enableChangePassword = enableChangePassword;
     }
 
     /**

Modified: directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java?rev=329130&r1=329129&r2=329130&view=diff
==============================================================================
--- directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java
(original)
+++ directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java
Thu Oct 27 23:46:07 2005
@@ -38,6 +38,9 @@
 import org.apache.mina.registry.ServiceRegistry;
 import org.apache.ntp.NtpServer;
 import org.apache.ntp.NtpConfiguration;
+import org.apache.protocol.common.LoadStrategy;
+import org.apache.changepw.ChangePasswordServer;
+import org.apache.changepw.ChangePasswordConfiguration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -55,6 +58,7 @@
     private static Logger log = LoggerFactory.getLogger( ServerContextFactory.class.getName()
);
     private static Service ldapService;
     private static KerberosServer kdcServer;
+    private static ChangePasswordServer changePasswordServer;
     private static NtpServer ntpServer;
     private static ServiceRegistry minaRegistry;
 
@@ -89,6 +93,16 @@
                 kdcServer = null;
             }
 
+            if ( changePasswordServer != null )
+            {
+                changePasswordServer.destroy();
+                if ( log.isInfoEnabled() )
+                {
+                    log.info( "Unbind of Change Password Service complete: " + changePasswordServer
);
+                }
+                changePasswordServer = null;
+            }
+
             if ( ntpServer != null )
             {
                 ntpServer.destroy();
@@ -115,15 +129,21 @@
 
             if ( cfg.isEnableKerberos() )
             {
-                // construct the configuration, get the port, create the service, and prepare
kdc objects
-                KdcConfiguration kdcConfiguration = new KdcConfiguration( env );
+                KdcConfiguration kdcConfiguration = new KdcConfiguration( env, LoadStrategy.PROPS
);
                 PrincipalStore kdcStore = new JndiPrincipalStoreImpl( kdcConfiguration, this
);
                 kdcServer = new KerberosServer( kdcConfiguration, minaRegistry, kdcStore
);
             }
 
+            if ( cfg.isEnableChangePassword() )
+            {
+                ChangePasswordConfiguration changePasswordConfiguration = new ChangePasswordConfiguration(
env, LoadStrategy.PROPS );
+                PrincipalStore store = new JndiPrincipalStoreImpl( changePasswordConfiguration,
this );
+                changePasswordServer = new ChangePasswordServer( changePasswordConfiguration,
minaRegistry, store );
+            }
+
             if ( cfg.isEnableNtp() )
             {
-                NtpConfiguration ntpConfig = new NtpConfiguration( env );
+                NtpConfiguration ntpConfig = new NtpConfiguration( env, LoadStrategy.PROPS
);
                 ntpServer = new NtpServer( ntpConfig, minaRegistry );
             }
         }



Mime
View raw message