directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r375785 [16/28] - in /directory/trunks: apacheds/ apacheds/core-plugin/src/main/antlr/ apacheds/core-plugin/src/main/java/org/apache/directory/ apacheds/core-plugin/src/main/java/org/apache/directory/server/ apacheds/core-plugin/src/main/ja...
Date Wed, 08 Feb 2006 00:18:49 GMT
Modified: directory/trunks/apacheds/server-installers/src/main/installers/server.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-installers/src/main/installers/server.xml?rev=375785&r1=375784&r2=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-installers/src/main/installers/server.xml (original)
+++ directory/trunks/apacheds/server-installers/src/main/installers/server.xml Tue Feb  7 16:10:02 2006
@@ -7,7 +7,7 @@
   <bean id="environment" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
     <property name="properties">
       <props>
-        <prop key="asn.1.berlib.provider">org.apache.ldap.common.codec.TwixProvider</prop>
+        <prop key="asn.1.berlib.provider">org.apache.directory.common.codec.TwixProvider</prop>
         <prop key="java.naming.security.authentication">simple</prop>
         <prop key="java.naming.security.principal">uid=admin,ou=system</prop>
         <prop key="java.naming.security.credentials">secret</prop>
@@ -31,7 +31,7 @@
     </property>
   </bean>
   
-  <bean id="configuration" class="org.apache.ldap.server.configuration.MutableServerStartupConfiguration">
+  <bean id="configuration" class="org.apache.directory.server.configuration.MutableServerStartupConfiguration">
     <property name="workingDirectory"><value>example.com</value></property>
 
     <!-- Uncomment below to have the server load entries on startup!        -->
@@ -66,101 +66,101 @@
     </property>
     <property name="bootstrapSchemas">
       <set>
-        <bean class="org.apache.ldap.server.schema.bootstrap.AutofsSchema"/>
-        <bean class="org.apache.ldap.server.schema.bootstrap.CorbaSchema"/>
-        <bean class="org.apache.ldap.server.schema.bootstrap.CoreSchema"/>
-        <bean class="org.apache.ldap.server.schema.bootstrap.CosineSchema"/>
-        <bean class="org.apache.ldap.server.schema.bootstrap.ApacheSchema"/>
-        <bean class="org.apache.ldap.server.schema.bootstrap.CollectiveSchema"/>
-        <bean class="org.apache.ldap.server.schema.bootstrap.InetorgpersonSchema"/>
-        <bean class="org.apache.ldap.server.schema.bootstrap.JavaSchema"/>
-        <bean class="org.apache.ldap.server.schema.bootstrap.Krb5kdcSchema"/>
-        <bean class="org.apache.ldap.server.schema.bootstrap.NisSchema"/>
-        <bean class="org.apache.ldap.server.schema.bootstrap.SystemSchema"/>
-        <bean class="org.apache.ldap.server.schema.bootstrap.ApachednsSchema"/>
+        <bean class="org.apache.directory.server.schema.bootstrap.AutofsSchema"/>
+        <bean class="org.apache.directory.server.schema.bootstrap.CorbaSchema"/>
+        <bean class="org.apache.directory.server.schema.bootstrap.CoreSchema"/>
+        <bean class="org.apache.directory.server.schema.bootstrap.CosineSchema"/>
+        <bean class="org.apache.directory.server.schema.bootstrap.ApacheSchema"/>
+        <bean class="org.apache.directory.server.schema.bootstrap.CollectiveSchema"/>
+        <bean class="org.apache.directory.server.schema.bootstrap.InetorgpersonSchema"/>
+        <bean class="org.apache.directory.server.schema.bootstrap.JavaSchema"/>
+        <bean class="org.apache.directory.server.schema.bootstrap.Krb5kdcSchema"/>
+        <bean class="org.apache.directory.server.schema.bootstrap.NisSchema"/>
+        <bean class="org.apache.directory.server.schema.bootstrap.SystemSchema"/>
+        <bean class="org.apache.directory.server.schema.bootstrap.ApachednsSchema"/>
       </set>
     </property>
     
     <property name="extendedOperationHandlers">
       <list>
-        <bean class="org.apache.ldap.server.protocol.support.extended.GracefulShutdownHandler"/>
-        <bean class="org.apache.ldap.server.protocol.support.extended.LaunchDiagnosticUiHandler"/>
+        <bean class="org.apache.directory.server.protocol.support.extended.GracefulShutdownHandler"/>
+        <bean class="org.apache.directory.server.protocol.support.extended.LaunchDiagnosticUiHandler"/>
       </list>
     </property>
     
     <property name="interceptorConfigurations">
       <list>
-        <bean class="org.apache.ldap.server.configuration.MutableInterceptorConfiguration">
+        <bean class="org.apache.directory.server.configuration.MutableInterceptorConfiguration">
           <property name="name"><value>normalizationService</value></property>
           <property name="interceptor">
-            <bean class="org.apache.ldap.server.normalization.NormalizationService" />
+            <bean class="org.apache.directory.server.normalization.NormalizationService" />
           </property>
         </bean>
-        <bean class="org.apache.ldap.server.configuration.MutableInterceptorConfiguration">
+        <bean class="org.apache.directory.server.configuration.MutableInterceptorConfiguration">
           <property name="name"><value>authenticationService</value></property>
           <property name="interceptor">
-            <bean class="org.apache.ldap.server.authn.AuthenticationService" />
+            <bean class="org.apache.directory.server.authn.AuthenticationService" />
           </property>
         </bean>
-        <bean class="org.apache.ldap.server.configuration.MutableInterceptorConfiguration">
+        <bean class="org.apache.directory.server.configuration.MutableInterceptorConfiguration">
           <property name="name"><value>referralService</value></property>
           <property name="interceptor">
-            <bean class="org.apache.ldap.server.referral.ReferralService" />
+            <bean class="org.apache.directory.server.referral.ReferralService" />
           </property>
         </bean>
-        <bean class="org.apache.ldap.server.configuration.MutableInterceptorConfiguration">
+        <bean class="org.apache.directory.server.configuration.MutableInterceptorConfiguration">
           <property name="name"><value>authorizationService</value></property>
           <property name="interceptor">
-            <bean class="org.apache.ldap.server.authz.AuthorizationService" />
+            <bean class="org.apache.directory.server.authz.AuthorizationService" />
           </property>
         </bean>
-        <bean class="org.apache.ldap.server.configuration.MutableInterceptorConfiguration">
+        <bean class="org.apache.directory.server.configuration.MutableInterceptorConfiguration">
           <property name="name"><value>oldAuthorizationService</value></property>
           <property name="interceptor">
-            <bean class="org.apache.ldap.server.authz.OldAuthorizationService" />
+            <bean class="org.apache.directory.server.authz.OldAuthorizationService" />
           </property>
         </bean>
-        <bean class="org.apache.ldap.server.configuration.MutableInterceptorConfiguration">
+        <bean class="org.apache.directory.server.configuration.MutableInterceptorConfiguration">
           <property name="name"><value>exceptionService</value></property>
           <property name="interceptor">
-            <bean class="org.apache.ldap.server.exception.ExceptionService" />
+            <bean class="org.apache.directory.server.exception.ExceptionService" />
           </property>
         </bean>
-        <bean class="org.apache.ldap.server.configuration.MutableInterceptorConfiguration">
+        <bean class="org.apache.directory.server.configuration.MutableInterceptorConfiguration">
           <property name="name"><value>schemaService</value></property>
           <property name="interceptor">
-            <bean class="org.apache.ldap.server.schema.SchemaService" />
+            <bean class="org.apache.directory.server.schema.SchemaService" />
           </property>
         </bean>
-        <bean class="org.apache.ldap.server.configuration.MutableInterceptorConfiguration">
+        <bean class="org.apache.directory.server.configuration.MutableInterceptorConfiguration">
           <property name="name"><value>subentryService</value></property>
           <property name="interceptor">
-            <bean class="org.apache.ldap.server.subtree.SubentryService" />
+            <bean class="org.apache.directory.server.subtree.SubentryService" />
           </property>
         </bean>
-        <bean class="org.apache.ldap.server.configuration.MutableInterceptorConfiguration">
+        <bean class="org.apache.directory.server.configuration.MutableInterceptorConfiguration">
           <property name="name"><value>operationalAttributeService</value></property>
           <property name="interceptor">
-            <bean class="org.apache.ldap.server.operational.OperationalAttributeService" />
+            <bean class="org.apache.directory.server.operational.OperationalAttributeService" />
           </property>
         </bean>
-        <bean class="org.apache.ldap.server.configuration.MutableInterceptorConfiguration">
+        <bean class="org.apache.directory.server.configuration.MutableInterceptorConfiguration">
           <property name="name"><value>collectiveAttributeService</value></property>
           <property name="interceptor">
-            <bean class="org.apache.ldap.server.collective.CollectiveAttributeService" />
+            <bean class="org.apache.directory.server.collective.CollectiveAttributeService" />
           </property>
         </bean>
-        <bean class="org.apache.ldap.server.configuration.MutableInterceptorConfiguration">
+        <bean class="org.apache.directory.server.configuration.MutableInterceptorConfiguration">
           <property name="name"><value>eventService</value></property>
           <property name="interceptor">
-            <bean class="org.apache.ldap.server.event.EventService" />
+            <bean class="org.apache.directory.server.event.EventService" />
           </property>
         </bean>
       </list>
     </property>
   </bean>
   
-  <bean id="examplePartitionConfiguration" class="org.apache.ldap.server.configuration.MutableDirectoryPartitionConfiguration">
+  <bean id="examplePartitionConfiguration" class="org.apache.directory.server.configuration.MutableDirectoryPartitionConfiguration">
     <property name="name"><value>example</value></property>
     <property name="suffix"><value>dc=example,dc=com</value></property>
     <property name="indexedAttributes">
@@ -186,7 +186,7 @@
     <property name="customEditors">
       <map>
         <entry key="javax.naming.directory.Attributes">
-          <bean class="org.apache.ldap.server.configuration.AttributesPropertyEditor"/>
+          <bean class="org.apache.directory.server.configuration.AttributesPropertyEditor"/>
         </entry>
       </map>
    </property>

Copied: directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java (from r375781, directory/trunks/apacheds/server-jndi/src/main/java/org/apache/ldap/server/configuration/MutableServerStartupConfiguration.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java?p2=directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java&p1=directory/trunks/apacheds/server-jndi/src/main/java/org/apache/ldap/server/configuration/MutableServerStartupConfiguration.java&r1=375781&r2=375785&rev=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-jndi/src/main/java/org/apache/ldap/server/configuration/MutableServerStartupConfiguration.java (original)
+++ directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/MutableServerStartupConfiguration.java Tue Feb  7 16:10:02 2006
@@ -16,7 +16,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.ldap.server.configuration;
+package org.apache.directory.server.configuration;
 
 import java.io.File;
 import java.util.Collection;

Copied: directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/ServerStartupConfiguration.java (from r375781, directory/trunks/apacheds/server-jndi/src/main/java/org/apache/ldap/server/configuration/ServerStartupConfiguration.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/ServerStartupConfiguration.java?p2=directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/ServerStartupConfiguration.java&p1=directory/trunks/apacheds/server-jndi/src/main/java/org/apache/ldap/server/configuration/ServerStartupConfiguration.java&r1=375781&r2=375785&rev=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-jndi/src/main/java/org/apache/ldap/server/configuration/ServerStartupConfiguration.java (original)
+++ directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/configuration/ServerStartupConfiguration.java Tue Feb  7 16:10:02 2006
@@ -16,7 +16,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.ldap.server.configuration;
+package org.apache.directory.server.configuration;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -24,10 +24,13 @@
 import java.util.List;
 import java.io.File;
 
-import org.apache.ldap.server.protocol.ExtendedOperationHandler;
+import org.apache.directory.server.core.configuration.ConfigurationException;
+import org.apache.directory.server.core.configuration.ConfigurationUtil;
+import org.apache.directory.server.core.configuration.StartupConfiguration;
+import org.apache.directory.server.ldap.ExtendedOperationHandler;
+import org.apache.directory.server.protocol.shared.store.LdifLoadFilter;
 import org.apache.mina.registry.ServiceRegistry;
 import org.apache.mina.registry.SimpleServiceRegistry;
-import org.apache.protocol.common.store.LdifLoadFilter;
 
 
 /**

Copied: directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java (from r375781, directory/trunks/apacheds/server-jndi/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java?p2=directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java&p1=directory/trunks/apacheds/server-jndi/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java&r1=375781&r2=375785&rev=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-jndi/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java (original)
+++ directory/trunks/apacheds/server-jndi/src/main/java/org/apache/directory/server/jndi/ServerContextFactory.java Tue Feb  7 16:10:02 2006
@@ -14,7 +14,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.ldap.server.jndi;
+package org.apache.directory.server.jndi;
 
 
 import java.io.File;
@@ -33,21 +33,26 @@
 import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
 
-import org.apache.changepw.ChangePasswordConfiguration;
-import org.apache.changepw.ChangePasswordServer;
 import org.apache.commons.lang.StringUtils;
-import org.apache.kerberos.kdc.KdcConfiguration;
-import org.apache.kerberos.kdc.KerberosServer;
+import org.apache.directory.server.changepw.ChangePasswordConfiguration;
+import org.apache.directory.server.changepw.ChangePasswordServer;
+import org.apache.directory.server.configuration.ServerStartupConfiguration;
+import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.jndi.CoreContextFactory;
+import org.apache.directory.server.core.partition.DirectoryPartitionNexus;
+import org.apache.directory.server.kerberos.kdc.KdcConfiguration;
+import org.apache.directory.server.kerberos.kdc.KerberosServer;
+import org.apache.directory.server.ldap.ExtendedOperationHandler;
+import org.apache.directory.server.ldap.LdapProtocolProvider;
+import org.apache.directory.server.ntp.NtpConfiguration;
+import org.apache.directory.server.ntp.NtpServer;
+import org.apache.directory.server.protocol.shared.LoadStrategy;
+import org.apache.directory.server.protocol.shared.store.LdifFileLoader;
+import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
+import org.apache.directory.shared.ldap.exception.LdapNamingException;
+import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
 import org.apache.kerberos.store.JndiPrincipalStoreImpl;
 import org.apache.kerberos.store.PrincipalStore;
-import org.apache.ldap.common.exception.LdapConfigurationException;
-import org.apache.ldap.common.exception.LdapNamingException;
-import org.apache.ldap.common.message.extended.NoticeOfDisconnect;
-import org.apache.ldap.server.DirectoryService;
-import org.apache.ldap.server.configuration.ServerStartupConfiguration;
-import org.apache.ldap.server.partition.DirectoryPartitionNexus;
-import org.apache.ldap.server.protocol.ExtendedOperationHandler;
-import org.apache.ldap.server.protocol.LdapProtocolProvider;
 import org.apache.mina.common.DefaultIoFilterChainBuilder;
 import org.apache.mina.common.IoAcceptor;
 import org.apache.mina.common.IoFilterChainBuilder;
@@ -57,10 +62,6 @@
 import org.apache.mina.registry.Service;
 import org.apache.mina.registry.ServiceRegistry;
 import org.apache.mina.transport.socket.nio.SocketAcceptor;
-import org.apache.ntp.NtpConfiguration;
-import org.apache.ntp.NtpServer;
-import org.apache.protocol.common.LoadStrategy;
-import org.apache.protocol.common.store.LdifFileLoader;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -375,7 +376,7 @@
         try
         {
             chain = ( IoFilterChainBuilder ) Class.forName(
-                    "org.apache.ldap.server.jndi.ssl.LdapsInitializer",
+                    "org.apache.directory.server.ssl.LdapsInitializer",
                     true,
                     ServerContextFactory.class.getClassLoader() ).getMethod(
                             "init", new Class[] { ServerStartupConfiguration.class } ).invoke(

Modified: directory/trunks/apacheds/server-main/apacheds.sh
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-main/apacheds.sh?rev=375785&r1=375784&r2=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-main/apacheds.sh (original)
+++ directory/trunks/apacheds/server-main/apacheds.sh Tue Feb  7 16:10:02 2006
@@ -1,9 +1,9 @@
 #!/bin/sh
-if [ -e target/org.apache.ldap.server.standalone.simple.main-0.9.4-SNAPSHOT-app.jar ] ; then
+if [ -e target/apacheds-server-main-1.0-RC1-SNAPSHOT-app.jar ] ; then
   echo uber jar exists
 else
   echo uber jar not found need to build it
   mvn clean assembly:assembly
 fi
 
-java -Dlog4j.configuration=file://$(pwd)/log4j.properties -jar target/org.apache.ldap.server.standalone.simple.main-0.9.4-SNAPSHOT-app.jar server.xml 
+java -Dlog4j.configuration=file://$(pwd)/log4j.properties -jar target/apacheds-server-main-1.0-RC1-SNAPSHOT-app.jar server.xml 

Modified: directory/trunks/apacheds/server-main/pom.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-main/pom.xml?rev=375785&r1=375784&r2=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-main/pom.xml (original)
+++ directory/trunks/apacheds/server-main/pom.xml Tue Feb  7 16:10:02 2006
@@ -54,7 +54,7 @@
       	<configuration>
       	  <archive>
       	    <manifest>
-      	      <mainClass>org.apache.ldap.server.ServerMain</mainClass>
+      	      <mainClass>org.apache.directory.server.UberjarMain</mainClass>
       	    </manifest>
       	  </archive>
       	</configuration>
@@ -66,7 +66,7 @@
       	<configuration>
       	  <archive>
       	    <manifest>
-      	      <mainClass>org.apache.ldap.server.ServerMain</mainClass>
+      	      <mainClass>org.apache.directory.server.UberjarMain</mainClass>
       	    </manifest> 
       	  </archive>
           <descriptor>src/main/assembly/apacheds-main.xml</descriptor>

Copied: directory/trunks/apacheds/server-main/src/main/java/org/apache/directory/server/Service.java (from r375660, directory/trunks/apacheds/server-main/src/main/java/org/apache/ldap/server/DirectoryServer.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-main/src/main/java/org/apache/directory/server/Service.java?p2=directory/trunks/apacheds/server-main/src/main/java/org/apache/directory/server/Service.java&p1=directory/trunks/apacheds/server-main/src/main/java/org/apache/ldap/server/DirectoryServer.java&r1=375660&r2=375785&rev=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-main/src/main/java/org/apache/ldap/server/DirectoryServer.java (original)
+++ directory/trunks/apacheds/server-main/src/main/java/org/apache/directory/server/Service.java Tue Feb  7 16:10:02 2006
@@ -14,7 +14,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.ldap.server;
+package org.apache.directory.server;
 
 
 import java.io.File;
@@ -25,10 +25,10 @@
 
 import org.apache.directory.daemon.DaemonApplication;
 import org.apache.directory.daemon.InstallationLayout;
-import org.apache.ldap.server.configuration.MutableServerStartupConfiguration;
-import org.apache.ldap.server.configuration.ShutdownConfiguration;
-import org.apache.ldap.server.configuration.SyncConfiguration;
-import org.apache.ldap.server.jndi.ServerContextFactory;
+import org.apache.directory.server.configuration.MutableServerStartupConfiguration;
+import org.apache.directory.server.core.configuration.ShutdownConfiguration;
+import org.apache.directory.server.core.configuration.SyncConfiguration;
+import org.apache.directory.server.jndi.ServerContextFactory;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -43,9 +43,9 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class DirectoryServer implements DaemonApplication 
+public class Service implements DaemonApplication 
 {
-    private static final Logger log = LoggerFactory.getLogger( DirectoryServer.class );
+    private static final Logger log = LoggerFactory.getLogger( Service.class );
     private Properties env;
     private Thread workerThread = null;
     private SynchWorker worker = new SynchWorker();

Copied: directory/trunks/apacheds/server-main/src/main/java/org/apache/directory/server/UberjarMain.java (from r375660, directory/trunks/apacheds/server-main/src/main/java/org/apache/ldap/server/ServerMain.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-main/src/main/java/org/apache/directory/server/UberjarMain.java?p2=directory/trunks/apacheds/server-main/src/main/java/org/apache/directory/server/UberjarMain.java&p1=directory/trunks/apacheds/server-main/src/main/java/org/apache/ldap/server/ServerMain.java&r1=375660&r2=375785&rev=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-main/src/main/java/org/apache/ldap/server/ServerMain.java (original)
+++ directory/trunks/apacheds/server-main/src/main/java/org/apache/directory/server/UberjarMain.java Tue Feb  7 16:10:02 2006
@@ -14,7 +14,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.ldap.server;
+package org.apache.directory.server;
 
 
 import java.io.File;
@@ -29,7 +29,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class ServerMain
+public class UberjarMain
 {
     /**
      * Takes a single argument, the path to the installation home, which contains 
@@ -39,7 +39,7 @@
      */
     public static void main( String[] args ) throws Exception
     {
-        DirectoryServer server = new DirectoryServer();
+        Service server = new Service();
 
         if ( args.length > 0 && new File( args[0] ).isDirectory() )
         {

Copied: directory/trunks/apacheds/server-sar/src/main/java/org/apache/directory/server/sar/DirectoryService.java (from r375781, directory/trunks/apacheds/server-sar/src/main/java/org/apache/directory/server/jmx/DirectoryService.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-sar/src/main/java/org/apache/directory/server/sar/DirectoryService.java?p2=directory/trunks/apacheds/server-sar/src/main/java/org/apache/directory/server/sar/DirectoryService.java&p1=directory/trunks/apacheds/server-sar/src/main/java/org/apache/directory/server/jmx/DirectoryService.java&r1=375781&r2=375785&rev=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-sar/src/main/java/org/apache/directory/server/jmx/DirectoryService.java (original)
+++ directory/trunks/apacheds/server-sar/src/main/java/org/apache/directory/server/sar/DirectoryService.java Tue Feb  7 16:10:02 2006
@@ -15,15 +15,15 @@
  *   limitations under the License.
  *
  */
-package org.apache.directory.server.jmx;
+package org.apache.directory.server.sar;
 
 
-import org.apache.ldap.server.configuration.Configuration;
-import org.apache.ldap.server.configuration.MutableDirectoryPartitionConfiguration;
-import org.apache.ldap.server.configuration.MutableServerStartupConfiguration;
-import org.apache.ldap.server.configuration.ShutdownConfiguration;
-import org.apache.ldap.server.configuration.SyncConfiguration;
-import org.apache.ldap.server.jndi.ServerContextFactory;
+import org.apache.directory.server.configuration.MutableServerStartupConfiguration;
+import org.apache.directory.server.core.configuration.Configuration;
+import org.apache.directory.server.core.configuration.MutableDirectoryPartitionConfiguration;
+import org.apache.directory.server.core.configuration.ShutdownConfiguration;
+import org.apache.directory.server.core.configuration.SyncConfiguration;
+import org.apache.directory.server.jndi.ServerContextFactory;
 
 import org.apache.mina.registry.ServiceRegistry;
 import org.apache.mina.registry.SimpleServiceRegistry;
@@ -368,7 +368,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#getContextProviderURL()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#getContextProviderURL()
      */
     public String getContextProviderURL()
     {
@@ -379,7 +379,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#getContextSecurityAuthentication()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#getContextSecurityAuthentication()
      */
     public String getContextSecurityAuthentication()
     {
@@ -390,7 +390,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#getContextSecurityCredentials()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#getContextSecurityCredentials()
      */
     public String getContextSecurityCredentials()
     {
@@ -401,7 +401,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#getContextSecurityPrincipal()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#getContextSecurityPrincipal()
      */
     public String getContextSecurityPrincipal()
     {
@@ -412,7 +412,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#getEmbeddedCustomRootPartitionName()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#getEmbeddedCustomRootPartitionName()
      */
     public String getEmbeddedCustomRootPartitionName()
     {
@@ -423,7 +423,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#getEmbeddedLDAPPort()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#getEmbeddedLDAPPort()
      */
     public int getEmbeddedLDAPPort()
     {
@@ -434,7 +434,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#getEmbeddedLDAPSPort()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#getEmbeddedLDAPSPort()
      */
     public int getEmbeddedLDAPSPort()
     {
@@ -445,7 +445,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#getEmbeddedLDIFdir()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#getEmbeddedLDIFdir()
      */
     public String getEmbeddedLDIFdir()
     {
@@ -456,7 +456,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#getEmbeddedWkdir()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#getEmbeddedWkdir()
      */
     public String getEmbeddedWkdir()
     {
@@ -467,7 +467,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#isEmbeddedAnonymousAccess()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#isEmbeddedAnonymousAccess()
      */
     public boolean isEmbeddedAnonymousAccess()
     {
@@ -478,7 +478,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#isEmbeddedLDAPNetworkingSupport()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#isEmbeddedLDAPNetworkingSupport()
      */
     public boolean isEmbeddedLDAPNetworkingSupport()
     {
@@ -489,7 +489,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#isEmbeddedServerEnabled()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#isEmbeddedServerEnabled()
      */
     public boolean isEmbeddedServerEnabled()
     {
@@ -500,7 +500,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#openDirContext()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#openDirContext()
      */
     public DirContext openDirContext() throws NamingException
     {
@@ -513,7 +513,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setContextProviderURL(java.lang.String)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setContextProviderURL(java.lang.String)
      */
     public void setContextProviderURL( String providerURL )
     {
@@ -524,7 +524,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setContextSecurityAuthentication(java.lang.String)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setContextSecurityAuthentication(java.lang.String)
      */
     public void setContextSecurityAuthentication( String securityAuthentication )
     {
@@ -535,7 +535,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setContextSecurityCredentials(java.lang.String)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setContextSecurityCredentials(java.lang.String)
      */
     public void setContextSecurityCredentials( String securityCredentials )
     {
@@ -546,7 +546,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setContextSecurityprincipal(java.lang.String)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setContextSecurityprincipal(java.lang.String)
      */
     public void setContextSecurityPrincipal( String securityPrincipal )
     {
@@ -557,7 +557,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setEmbeddedAnonymousAccess(boolean)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setEmbeddedAnonymousAccess(boolean)
      */
     public void setEmbeddedAnonymousAccess( boolean anonymousAccess )
     {
@@ -568,7 +568,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setEmbeddedCustomRootPartitionName(java.lang.String)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setEmbeddedCustomRootPartitionName(java.lang.String)
      */
     public void setEmbeddedCustomRootPartitionName( String rootPartitianName )
     {
@@ -579,7 +579,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setEmbeddedLDAPNetworkingSupport(boolean)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setEmbeddedLDAPNetworkingSupport(boolean)
      */
     public void setEmbeddedLDAPNetworkingSupport( boolean ldapNetworkingSupport )
     {
@@ -590,7 +590,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setEmbeddedLDAPPort(int)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setEmbeddedLDAPPort(int)
      */
     public void setEmbeddedLDAPPort( int ldapPort )
     {
@@ -601,7 +601,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setEmbeddedLDAPSPort(int)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setEmbeddedLDAPSPort(int)
      */
     public void setEmbeddedLDAPSPort( int ldapsPort )
     {
@@ -612,7 +612,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setEmbeddedLDIFdir(java.lang.String)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setEmbeddedLDIFdir(java.lang.String)
      */
     public void setEmbeddedLDIFdir( String LDIFdir )
     {
@@ -623,7 +623,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setEmbeddedServerEnabled(boolean)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setEmbeddedServerEnabled(boolean)
      */
     public void setEmbeddedServerEnabled( boolean enabled )
     {
@@ -634,7 +634,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setEmbeddedWkdir(java.lang.String)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setEmbeddedWkdir(java.lang.String)
      */
     public void setEmbeddedWkdir( String wkdir )
     {
@@ -645,7 +645,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#getContextFactory()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#getContextFactory()
      */
     public String getContextFactory()
     {
@@ -656,7 +656,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setContextFactory(java.lang.String)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setContextFactory(java.lang.String)
      */
     public void setContextFactory( String factoryClass )
     {
@@ -667,7 +667,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#changedEmbeddedAdminPassword(java.lang.String,
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#changedEmbeddedAdminPassword(java.lang.String,
      *      java.lang.String)
      */
     public String changedEmbeddedAdminPassword( String oldPassword, String newPassword )
@@ -725,7 +725,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#flushEmbeddedServerData()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#flushEmbeddedServerData()
      */
     public boolean flushEmbeddedServerData()
     {
@@ -788,7 +788,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#getEmbeddedAdditionalEnvProperties()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#getEmbeddedAdditionalEnvProperties()
      */
     public Element getEmbeddedAdditionalEnvProperties()
     {
@@ -799,7 +799,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#getEmbeddedCustomBootstrapSchemas()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#getEmbeddedCustomBootstrapSchemas()
      */
     public Element getEmbeddedCustomBootstrapSchema()
     {
@@ -810,7 +810,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setEmbeddedAdditionalEnvProperties(java.util.Properties)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setEmbeddedAdditionalEnvProperties(java.util.Properties)
      */
     public void setEmbeddedAdditionalEnvProperties( Element env )
     {
@@ -821,7 +821,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setEmbeddedCustomBootstrapSchemas(java.util.Properties)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setEmbeddedCustomBootstrapSchemas(java.util.Properties)
      */
     public void setEmbeddedCustomBootstrapSchema( Element cfg )
     {
@@ -832,7 +832,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#isEmbeddedAccessControlEnabled()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#isEmbeddedAccessControlEnabled()
      */
     public boolean isEmbeddedAccessControlEnabled()
     {
@@ -843,7 +843,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#isEmbeddedEnableChangePassword()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#isEmbeddedEnableChangePassword()
      */
     public boolean isEmbeddedEnableChangePassword()
     {
@@ -854,7 +854,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#isEmbeddedEnableKerberos()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#isEmbeddedEnableKerberos()
      */
     public boolean isEmbeddedEnableKerberos()
     {
@@ -865,7 +865,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#isEmbeddedEnableNtp()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#isEmbeddedEnableNtp()
      */
     public boolean isEmbeddedEnableNtp()
     {
@@ -876,7 +876,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setEmbeddedAccessControlEnabled(boolean)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setEmbeddedAccessControlEnabled(boolean)
      */
     public void setEmbeddedAccessControlEnabled( boolean enabled )
     {
@@ -887,7 +887,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setEmbeddedEnableChangePassword(boolean)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setEmbeddedEnableChangePassword(boolean)
      */
     public void setEmbeddedEnableChangePassword( boolean enabled )
     {
@@ -898,7 +898,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setEmbeddedEnableKerberos(boolean)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setEmbeddedEnableKerberos(boolean)
      */
     public void setEmbeddedEnableKerberos( boolean enabled )
     {
@@ -909,7 +909,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setEmbeddedEnableNtp(boolean)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setEmbeddedEnableNtp(boolean)
      */
     public void setEmbeddedEnableNtp( boolean enabled )
     {
@@ -920,7 +920,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#getEmbeddedLDIFFilters()
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#getEmbeddedLDIFFilters()
      */
     public Element getEmbeddedLDIFFilters()
     {
@@ -931,7 +931,7 @@
     /*
      * (non-Javadoc)
      * 
-     * @see org.apache.ldap.server.jmx.DirectoryServiceMBean#setEmbeddedLDIFFilters(org.w3c.dom.Element)
+     * @see org.apache.directory.server.jmx.DirectoryServiceMBean#setEmbeddedLDIFFilters(org.w3c.dom.Element)
      */
     public void setEmbeddedLDIFFilters( Element fil )
     {

Copied: directory/trunks/apacheds/server-sar/src/main/java/org/apache/directory/server/sar/DirectoryServiceMBean.java (from r375781, directory/trunks/apacheds/server-sar/src/main/java/org/apache/directory/server/jmx/DirectoryServiceMBean.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-sar/src/main/java/org/apache/directory/server/sar/DirectoryServiceMBean.java?p2=directory/trunks/apacheds/server-sar/src/main/java/org/apache/directory/server/sar/DirectoryServiceMBean.java&p1=directory/trunks/apacheds/server-sar/src/main/java/org/apache/directory/server/jmx/DirectoryServiceMBean.java&r1=375781&r2=375785&rev=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-sar/src/main/java/org/apache/directory/server/jmx/DirectoryServiceMBean.java (original)
+++ directory/trunks/apacheds/server-sar/src/main/java/org/apache/directory/server/sar/DirectoryServiceMBean.java Tue Feb  7 16:10:02 2006
@@ -15,7 +15,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.directory.server.jmx;
+package org.apache.directory.server.sar;
 
 import org.w3c.dom.Element;
 

Modified: directory/trunks/apacheds/server-sar/src/main/resources/META-INF/jboss-service.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-sar/src/main/resources/META-INF/jboss-service.xml?rev=375785&r1=375784&r2=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-sar/src/main/resources/META-INF/jboss-service.xml (original)
+++ directory/trunks/apacheds/server-sar/src/main/resources/META-INF/jboss-service.xml Tue Feb  7 16:10:02 2006
@@ -2,12 +2,12 @@
 <!DOCTYPE server>
 
 <server>
-	<mbean code="org.apache.ldap.server.jmx.DirectoryService"
+	<mbean code="org.apache.directory.server.sar.DirectoryService"
 		name="apacheds.system:service=Directory">
 
 		<attribute name="EmbeddedServerEnabled">true</attribute>
 		<attribute name="ContextFactory">
-			org.apache.ldap.server.jndi.ServerContextFactory
+			org.apache.directory.server.jndi.ServerContextFactory
 		</attribute>
 		<attribute name="ContextProviderURL">
 			uid=admin,ou=system
@@ -41,7 +41,7 @@
 			-->
 			<xml-properties>
 				<config-property name="Krb5KdcEntryFilter">
-					org.apache.protocol.common.store.Krb5KdcEntryFilter
+					org.apache.directory.server.protocol.common.store.Krb5KdcEntryFilter
 				</config-property>
 			</xml-properties>
 		</attribute>

Copied: directory/trunks/apacheds/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java (from r375660, directory/trunks/apacheds/server-ssl/src/main/java/org/apache/ldap/server/jndi/ssl/LdapsInitializer.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java?p2=directory/trunks/apacheds/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java&p1=directory/trunks/apacheds/server-ssl/src/main/java/org/apache/ldap/server/jndi/ssl/LdapsInitializer.java&r1=375660&r2=375785&rev=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-ssl/src/main/java/org/apache/ldap/server/jndi/ssl/LdapsInitializer.java (original)
+++ directory/trunks/apacheds/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java Tue Feb  7 16:10:02 2006
@@ -14,7 +14,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.ldap.server.jndi.ssl;
+package org.apache.directory.server.ssl;
 
 import java.io.FileInputStream;
 import java.io.IOException;
@@ -29,8 +29,8 @@
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.TrustManager;
 
-import org.apache.ldap.server.configuration.ServerStartupConfiguration;
-import org.apache.ldap.server.jndi.ssl.support.ServerX509TrustManager;
+import org.apache.directory.server.configuration.ServerStartupConfiguration;
+import org.apache.directory.server.ssl.support.ServerX509TrustManager;
 import org.apache.mina.common.DefaultIoFilterChainBuilder;
 import org.apache.mina.common.IoFilterChainBuilder;
 import org.apache.mina.filter.SSLFilter;

Copied: directory/trunks/apacheds/server-ssl/src/main/java/org/apache/directory/server/ssl/support/ServerX509TrustManager.java (from r375781, directory/trunks/apacheds/server-ssl/src/main/java/org/apache/ldap/server/jndi/ssl/support/ServerX509TrustManager.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-ssl/src/main/java/org/apache/directory/server/ssl/support/ServerX509TrustManager.java?p2=directory/trunks/apacheds/server-ssl/src/main/java/org/apache/directory/server/ssl/support/ServerX509TrustManager.java&p1=directory/trunks/apacheds/server-ssl/src/main/java/org/apache/ldap/server/jndi/ssl/support/ServerX509TrustManager.java&r1=375781&r2=375785&rev=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-ssl/src/main/java/org/apache/ldap/server/jndi/ssl/support/ServerX509TrustManager.java (original)
+++ directory/trunks/apacheds/server-ssl/src/main/java/org/apache/directory/server/ssl/support/ServerX509TrustManager.java Tue Feb  7 16:10:02 2006
@@ -14,7 +14,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.ldap.server.jndi.ssl.support;
+package org.apache.directory.server.ssl.support;
 
 import java.security.cert.CertificateException;
 import java.security.cert.X509Certificate;

Copied: directory/trunks/apacheds/server-ssl/src/test/java/org/apache/directory/server/ssl/LdapsTest.java (from r375660, directory/trunks/apacheds/server-ssl/src/test/java/org/apache/ldap/server/jndi/ssl/LdapsTest.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-ssl/src/test/java/org/apache/directory/server/ssl/LdapsTest.java?p2=directory/trunks/apacheds/server-ssl/src/test/java/org/apache/directory/server/ssl/LdapsTest.java&p1=directory/trunks/apacheds/server-ssl/src/test/java/org/apache/ldap/server/jndi/ssl/LdapsTest.java&r1=375660&r2=375785&rev=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-ssl/src/test/java/org/apache/ldap/server/jndi/ssl/LdapsTest.java (original)
+++ directory/trunks/apacheds/server-ssl/src/test/java/org/apache/directory/server/ssl/LdapsTest.java Tue Feb  7 16:10:02 2006
@@ -14,7 +14,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.ldap.server.jndi.ssl;
+package org.apache.directory.server.ssl;
 
 import java.io.FileOutputStream;
 import java.io.InputStream;
@@ -28,8 +28,8 @@
 import javax.naming.directory.DirContext;
 import javax.naming.directory.InitialDirContext;
 
-import org.apache.ldap.server.AbstractServerTest;
-import org.apache.ldap.server.jndi.ssl.support.SSLSocketFactory;
+import org.apache.directory.server.ssl.support.SSLSocketFactory;
+import org.apache.directory.server.unit.AbstractServerTest;
 import org.apache.mina.util.AvailablePortFinder;
 
 

Copied: directory/trunks/apacheds/server-ssl/src/test/java/org/apache/directory/server/ssl/support/BogusSSLContextFactory.java (from r375781, directory/trunks/apacheds/server-ssl/src/test/java/org/apache/ldap/server/jndi/ssl/support/BogusSSLContextFactory.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-ssl/src/test/java/org/apache/directory/server/ssl/support/BogusSSLContextFactory.java?p2=directory/trunks/apacheds/server-ssl/src/test/java/org/apache/directory/server/ssl/support/BogusSSLContextFactory.java&p1=directory/trunks/apacheds/server-ssl/src/test/java/org/apache/ldap/server/jndi/ssl/support/BogusSSLContextFactory.java&r1=375781&r2=375785&rev=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-ssl/src/test/java/org/apache/ldap/server/jndi/ssl/support/BogusSSLContextFactory.java (original)
+++ directory/trunks/apacheds/server-ssl/src/test/java/org/apache/directory/server/ssl/support/BogusSSLContextFactory.java Tue Feb  7 16:10:02 2006
@@ -16,7 +16,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.ldap.server.jndi.ssl.support;
+package org.apache.directory.server.ssl.support;
 
 import java.io.IOException;
 import java.io.InputStream;

Copied: directory/trunks/apacheds/server-ssl/src/test/java/org/apache/directory/server/ssl/support/BogusTrustManagerFactory.java (from r375781, directory/trunks/apacheds/server-ssl/src/test/java/org/apache/ldap/server/jndi/ssl/support/BogusTrustManagerFactory.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-ssl/src/test/java/org/apache/directory/server/ssl/support/BogusTrustManagerFactory.java?p2=directory/trunks/apacheds/server-ssl/src/test/java/org/apache/directory/server/ssl/support/BogusTrustManagerFactory.java&p1=directory/trunks/apacheds/server-ssl/src/test/java/org/apache/ldap/server/jndi/ssl/support/BogusTrustManagerFactory.java&r1=375781&r2=375785&rev=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-ssl/src/test/java/org/apache/ldap/server/jndi/ssl/support/BogusTrustManagerFactory.java (original)
+++ directory/trunks/apacheds/server-ssl/src/test/java/org/apache/directory/server/ssl/support/BogusTrustManagerFactory.java Tue Feb  7 16:10:02 2006
@@ -16,7 +16,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.ldap.server.jndi.ssl.support;
+package org.apache.directory.server.ssl.support;
 
 import java.security.InvalidAlgorithmParameterException;
 import java.security.KeyStore;

Copied: directory/trunks/apacheds/server-ssl/src/test/java/org/apache/directory/server/ssl/support/SSLSocketFactory.java (from r375781, directory/trunks/apacheds/server-ssl/src/test/java/org/apache/ldap/server/jndi/ssl/support/SSLSocketFactory.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-ssl/src/test/java/org/apache/directory/server/ssl/support/SSLSocketFactory.java?p2=directory/trunks/apacheds/server-ssl/src/test/java/org/apache/directory/server/ssl/support/SSLSocketFactory.java&p1=directory/trunks/apacheds/server-ssl/src/test/java/org/apache/ldap/server/jndi/ssl/support/SSLSocketFactory.java&r1=375781&r2=375785&rev=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-ssl/src/test/java/org/apache/ldap/server/jndi/ssl/support/SSLSocketFactory.java (original)
+++ directory/trunks/apacheds/server-ssl/src/test/java/org/apache/directory/server/ssl/support/SSLSocketFactory.java Tue Feb  7 16:10:02 2006
@@ -16,7 +16,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.ldap.server.jndi.ssl.support;
+package org.apache.directory.server.ssl.support;
 
 import java.io.IOException;
 import java.net.InetAddress;

Modified: directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/ApachedsTools.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/ApachedsTools.java?rev=375785&r1=375784&r2=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/ApachedsTools.java (original)
+++ directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/ApachedsTools.java Tue Feb  7 16:10:02 2006
@@ -31,7 +31,7 @@
 import org.apache.commons.cli.Options;
 import org.apache.commons.cli.ParseException;
 import org.apache.commons.cli.PosixParser;
-import org.apache.ldap.server.configuration.ServerStartupConfiguration;
+import org.apache.directory.server.configuration.ServerStartupConfiguration;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.FileSystemXmlApplicationContext;
 

Modified: directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/DiagnosticCommand.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/DiagnosticCommand.java?rev=375785&r1=375784&r2=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/DiagnosticCommand.java (original)
+++ directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/DiagnosticCommand.java Tue Feb  7 16:10:02 2006
@@ -25,7 +25,7 @@
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
 import org.apache.directory.daemon.AvailablePortFinder;
-import org.apache.ldap.common.message.extended.LaunchDiagnosticUiRequest;
+import org.apache.directory.shared.ldap.message.extended.LaunchDiagnosticUiRequest;
 
 
 /**

Modified: directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/DisconnectNotificationCommand.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/DisconnectNotificationCommand.java?rev=375785&r1=375784&r2=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/DisconnectNotificationCommand.java (original)
+++ directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/DisconnectNotificationCommand.java Tue Feb  7 16:10:02 2006
@@ -32,8 +32,8 @@
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
 import org.apache.directory.daemon.AvailablePortFinder;
-import org.apache.ldap.common.message.extended.GracefulDisconnect;
-import org.apache.ldap.common.message.extended.NoticeOfDisconnect;
+import org.apache.directory.shared.ldap.message.extended.GracefulDisconnect;
+import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
 
 
 /**

Modified: directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java?rev=375785&r1=375784&r2=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java (original)
+++ directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java Tue Feb  7 16:10:02 2006
@@ -38,17 +38,17 @@
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
+import org.apache.directory.server.core.partition.impl.btree.Tuple;
+import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
+import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmMasterTable;
+import org.apache.directory.server.core.schema.AttributeTypeRegistry;
+import org.apache.directory.server.core.schema.bootstrap.BootstrapRegistries;
+import org.apache.directory.server.core.schema.bootstrap.BootstrapSchemaLoader;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
+import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.UsageEnum;
 
-import org.apache.ldap.common.message.LockableAttributeImpl;
-import org.apache.ldap.common.message.LockableAttributesImpl;
-import org.apache.ldap.common.schema.AttributeType;
-import org.apache.ldap.common.schema.UsageEnum;
-import org.apache.ldap.server.partition.impl.btree.Tuple;
-import org.apache.ldap.server.partition.impl.btree.jdbm.JdbmIndex;
-import org.apache.ldap.server.partition.impl.btree.jdbm.JdbmMasterTable;
-import org.apache.ldap.server.schema.AttributeTypeRegistry;
-import org.apache.ldap.server.schema.bootstrap.BootstrapRegistries;
-import org.apache.ldap.server.schema.bootstrap.BootstrapSchemaLoader;
 
 
 /**

Modified: directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/GracefulShutdownCommand.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/GracefulShutdownCommand.java?rev=375785&r1=375784&r2=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/GracefulShutdownCommand.java (original)
+++ directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/GracefulShutdownCommand.java Tue Feb  7 16:10:02 2006
@@ -25,7 +25,7 @@
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
 import org.apache.directory.daemon.AvailablePortFinder;
-import org.apache.ldap.common.message.extended.GracefulShutdownRequest;
+import org.apache.directory.shared.ldap.message.extended.GracefulShutdownRequest;
 
 
 /**

Modified: directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/ToolCommand.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/ToolCommand.java?rev=375785&r1=375784&r2=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/ToolCommand.java (original)
+++ directory/trunks/apacheds/server-tools/src/main/java/org/apache/directory/server/tools/ToolCommand.java Tue Feb  7 16:10:02 2006
@@ -22,7 +22,7 @@
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Options;
 import org.apache.directory.daemon.InstallationLayout;
-import org.apache.ldap.server.configuration.ServerStartupConfiguration;
+import org.apache.directory.server.configuration.ServerStartupConfiguration;
 
 
 /**

Copied: directory/trunks/apacheds/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java (from r375781, directory/trunks/apacheds/server-unit/src/main/java/org/apache/ldap/server/AbstractServerTest.java)
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java?p2=directory/trunks/apacheds/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java&p1=directory/trunks/apacheds/server-unit/src/main/java/org/apache/ldap/server/AbstractServerTest.java&r1=375781&r2=375785&rev=375785&view=diff
==============================================================================
--- directory/trunks/apacheds/server-unit/src/main/java/org/apache/ldap/server/AbstractServerTest.java (original)
+++ directory/trunks/apacheds/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java Tue Feb  7 16:10:02 2006
@@ -14,7 +14,7 @@
  *   limitations under the License.
  *
  */
-package org.apache.ldap.server;
+package org.apache.directory.server.unit;
 
 
 import java.io.File;
@@ -33,15 +33,15 @@
 import junit.framework.TestCase;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.ldap.common.exception.LdapConfigurationException;
-import org.apache.ldap.common.ldif.LdifIterator;
-import org.apache.ldap.common.ldif.LdifParser;
-import org.apache.ldap.common.ldif.LdifParserImpl;
-import org.apache.ldap.common.message.LockableAttributesImpl;
-import org.apache.ldap.common.name.LdapName;
-import org.apache.ldap.server.configuration.MutableServerStartupConfiguration;
-import org.apache.ldap.server.configuration.ShutdownConfiguration;
-import org.apache.ldap.server.jndi.ServerContextFactory;
+import org.apache.directory.server.configuration.MutableServerStartupConfiguration;
+import org.apache.directory.server.core.configuration.ShutdownConfiguration;
+import org.apache.directory.server.jndi.ServerContextFactory;
+import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
+import org.apache.directory.shared.ldap.ldif.LdifIterator;
+import org.apache.directory.shared.ldap.ldif.LdifParser;
+import org.apache.directory.shared.ldap.ldif.LdifParserImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
+import org.apache.directory.shared.ldap.name.LdapName;
 import org.apache.mina.util.AvailablePortFinder;
 
 
@@ -148,7 +148,7 @@
         super.tearDown();
         Hashtable env = new Hashtable();
         env.put( Context.PROVIDER_URL, "ou=system" );
-        env.put( Context.INITIAL_CONTEXT_FACTORY, "org.apache.ldap.server.jndi.ServerContextFactory" );
+        env.put( Context.INITIAL_CONTEXT_FACTORY, "org.apache.directory.server.jndi.ServerContextFactory" );
         env.putAll( new ShutdownConfiguration().toJndiEnvironment() );
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );

Added: directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/AddObjectClassesToEntryTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/AddObjectClassesToEntryTest.java?rev=375785&view=auto
==============================================================================
--- directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/AddObjectClassesToEntryTest.java (added)
+++ directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/AddObjectClassesToEntryTest.java Tue Feb  7 16:10:02 2006
@@ -0,0 +1,168 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.directory.server;
+
+
+import javax.naming.directory.*;
+import javax.naming.NamingException;
+
+import org.apache.directory.server.unit.AbstractServerTest;
+
+import java.util.Hashtable;
+
+
+/**
+ * Test case to verify DIREVE-216.  Starts up the server binds via SUN JNDI provider
+ * to perform add modify operations on entries.
+ * 
+ * @author szoerner
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class AddObjectClassesToEntryTest extends AbstractServerTest
+{
+    private static final String RDN = "cn=The Person";
+
+    private DirContext ctx = null;
+
+
+    /**
+     * Create an entry for a person.
+     */
+    public void setUp() throws Exception
+    {
+        super.setUp();
+
+        Hashtable env = new Hashtable();
+        env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
+        env.put( "java.naming.provider.url", "ldap://localhost:" + port + "/ou=system" );
+        env.put( "java.naming.security.principal", "uid=admin,ou=system" );
+        env.put( "java.naming.security.credentials", "secret" );
+        env.put( "java.naming.security.authentication", "simple" );
+        ctx = new InitialDirContext( env );
+
+        // Create a person
+        Attributes attributes = new BasicAttributes( true );
+        Attribute attribute = new BasicAttribute( "objectClass" );
+        attribute.add( "top" );
+        attribute.add( "person" );
+        attributes.put( attribute );
+        attributes.put( "cn", "The Person" );
+        attributes.put( "sn", "Person" );
+        attributes.put( "description", "this is a person" );
+        DirContext person = ctx.createSubcontext( RDN, attributes );
+
+        assertNotNull( person );
+    }
+
+
+    /**
+     * Remove the person.
+     */
+    public void tearDown() throws Exception
+    {
+        ctx.unbind(RDN);
+        ctx.close();
+        ctx = null;
+        super.tearDown();
+    }
+
+
+    /**
+     * Just a little test to check wether the person is created correctly after
+     * setup.
+     * 
+     * @throws NamingException
+     */
+    public void testSetUpTearDown() throws NamingException
+    {
+        DirContext person = (DirContext) ctx.lookup(RDN);
+        assertNotNull(person);
+
+        // Check object classes
+
+        Attributes attributes = person.getAttributes("");
+        Attribute ocls = attributes.get("objectClass");
+
+        String[] expectedOcls = { "top", "person" };
+        for ( int i = 0; i < expectedOcls.length; i++ )
+        {
+            String name = expectedOcls[i];
+            assertTrue( "object class " + name + " is NOT present when it should be!",
+                    ocls.contains( name ) );
+        }
+    }
+
+
+    /**
+     * This is the original defect as in JIRA DIREVE-216.
+     * 
+     * @throws NamingException
+     */
+    public void testAddObjectClasses() throws NamingException
+    {
+
+        // modify object classes, add two more
+        Attributes attributes = new BasicAttributes( true );
+        Attribute ocls = new BasicAttribute("objectClass");
+        ocls.add("organizationalPerson");
+        ocls.add("inetOrgPerson");
+        attributes.put(ocls);
+
+        DirContext person = (DirContext) ctx.lookup(RDN);
+        person.modifyAttributes("", DirContext.ADD_ATTRIBUTE, attributes);
+
+        // Read again from directory
+        person = (DirContext) ctx.lookup(RDN);
+        attributes = person.getAttributes("");
+        Attribute newOcls = attributes.get("objectClass");
+
+        String[] expectedOcls = { "top", "person", "organizationalPerson",
+                "inetOrgPerson" };
+        for (int i = 0; i < expectedOcls.length; i++) {
+            String name = expectedOcls[i];
+            assertTrue("object class " + name + " is present", newOcls
+                    .contains(name));
+        }
+    }
+
+
+    /**
+     * This changes a single attribute value. Just as a reference.
+     * 
+     * @throws NamingException
+     */
+    public void testModifyDescription() throws NamingException
+    {
+        String newDescription = "More info on the user ...";
+
+        // modify object classes, add two more
+        Attributes attributes = new BasicAttributes( true );
+        Attribute desc = new BasicAttribute("description", newDescription);
+        attributes.put(desc);
+
+        DirContext person = (DirContext) ctx.lookup(RDN);
+        person.modifyAttributes("", DirContext.REPLACE_ATTRIBUTE, attributes);
+
+        // Read again from directory
+        person = (DirContext) ctx.lookup(RDN);
+        attributes = person.getAttributes("");
+        Attribute newDesc = attributes.get("description");
+
+        assertTrue("new Description", newDesc.contains(newDescription));
+    }
+}

Added: directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/BadDnTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/BadDnTest.java?rev=375785&view=auto
==============================================================================
--- directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/BadDnTest.java (added)
+++ directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/BadDnTest.java Tue Feb  7 16:10:02 2006
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2004 Solarsis Group LLC.
+ *
+ * Licensed under the Open Software License, Version 2.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://opensource.org/licenses/osl-2.1.php
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.directory.server;
+
+
+import java.util.Hashtable;
+
+import javax.naming.AuthenticationException;
+import javax.naming.ldap.InitialLdapContext;
+import javax.naming.ldap.LdapContext;
+
+import org.apache.directory.server.unit.AbstractServerTest;
+
+
+/**
+ * Tests the effects of using a bad dn in various operations.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class BadDnTest extends AbstractServerTest
+{
+    /**
+     * Bind as a user.
+     */
+    public LdapContext bind( String bindDn, String password ) throws Exception
+    {
+        Hashtable env = new Hashtable();
+        env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
+        env.put( "java.naming.provider.url", "ldap://localhost:" + port + "/ou=system" );
+        env.put( "java.naming.security.principal", bindDn );
+        env.put( "java.naming.security.credentials", password );
+        env.put( "java.naming.security.authentication", "simple" );
+
+        LdapContext ctx = new InitialLdapContext( env, null );
+        assertNotNull( ctx );
+        return ctx;
+    }
+
+
+    /**
+     * Test with bindDn which is not even found under any namingContext of the
+     * server.
+     */
+    public void testBadBindDnNotInContext() throws Exception
+    {
+        try
+        {
+            bind( "cn=bogus", "blah" );
+            fail( "should never get here due to a " );
+        }
+        catch ( AuthenticationException e )
+        {
+        }
+    }
+
+
+    /**
+     * Test with bindDn that is under a naming context but points to non-existant user.
+     * @todo make this pass: see http://issues.apache.org/jira/browse/DIREVE-339
+     */
+//    public void testBadBindDnMalformed() throws Exception
+//    {
+//        try
+//        {
+//            bind( "system", "blah" );
+//            fail( "should never get here due to a " );
+//        }
+//        catch ( InvalidNameException e ){}
+//    }
+
+    
+    /**
+     * Test with bindDn that is under a naming context but points to non-existant user.
+     */
+    public void testBadBindDnInContext() throws Exception
+    {
+        try
+        {
+            bind( "cn=bogus,ou=system", "blah" );
+            fail( "should never get here due to a " );
+        }
+        catch ( AuthenticationException e )
+        {
+        }
+    }
+}

Added: directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/ChangeListener.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/ChangeListener.java?rev=375785&view=auto
==============================================================================
--- directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/ChangeListener.java (added)
+++ directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/ChangeListener.java Tue Feb  7 16:10:02 2006
@@ -0,0 +1,130 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.directory.server;
+
+
+import java.util.Hashtable;
+
+import javax.naming.Context;
+import javax.naming.NamingEnumeration;
+import javax.naming.directory.SearchResult;
+import javax.naming.ldap.Control;
+import javax.naming.ldap.HasControls;
+import javax.naming.ldap.InitialLdapContext;
+
+import org.apache.directory.shared.ldap.codec.search.controls.EntryChangeControl;
+import org.apache.directory.shared.ldap.codec.search.controls.EntryChangeControlDecoder;
+import org.apache.directory.shared.ldap.message.PersistentSearchControl;
+
+
+/**
+ * A simple change listener application that prints out changes returned using
+ * the psearch control.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class ChangeListener
+{
+    public static void main( String[] args ) throws Exception
+    {
+        Hashtable env = new Hashtable();
+        env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
+        env.put( "java.naming.provider.url", "ldap://localhost:10389/ou=system" );
+        env.put( "java.naming.security.principal", "uid=admin,ou=system" );
+        env.put( "java.naming.security.credentials", "secret" );
+        env.put( "java.naming.security.authentication", "simple" );
+        InitialLdapContext ctx = new InitialLdapContext( env, null );
+        Runtime.getRuntime().addShutdownHook( new Thread( new ShutdownHook( ctx ) ) );
+        PersistentSearchControl control = new PersistentSearchControl();
+        control.setChangesOnly( false );
+        control.setReturnECs( true );
+        control.setCritical( true );
+        control.setChangeTypes( PersistentSearchControl.ALL_CHANGES );
+        Control[] ctxCtls = new Control[] { control };
+        
+        try
+        {
+            Control[] respCtls;
+            ctx.setRequestControls( ctxCtls );
+            EntryChangeControl ecCtl = null;
+            NamingEnumeration list = ctx.search( "", "objectClass=*", null );
+            while( list.hasMore() )
+            {
+                SearchResult result = ( SearchResult ) list.next();
+                if ( result instanceof HasControls )
+                {
+                    respCtls = ( ( HasControls ) result ).getControls();
+                    if ( respCtls != null )
+                    {
+                        for ( int ii = 0; ii < respCtls.length; ii ++ )
+                        {
+                            if ( respCtls[ii].getID().equals( 
+                                org.apache.directory.shared.ldap.message.EntryChangeControl.CONTROL_OID ) )
+                            {
+                                EntryChangeControlDecoder decoder = new EntryChangeControlDecoder();
+                                ecCtl = ( EntryChangeControl ) decoder.decode( respCtls[ii].getEncodedValue() );
+                            }
+                        }
+                    }
+                }
+                
+                StringBuffer buf = new StringBuffer();
+                buf.append( "DN: " ).append( result.getName() ).append( "\n" );
+                if ( ecCtl != null )
+                {
+                    System.out.println( "================ NOTIFICATION ================" );
+                    buf.append( "    EntryChangeControl =\n" );
+                    buf.append( "        changeType   : " ).append( ecCtl.getChangeType() ).append( "\n" );
+                    buf.append( "        previousDN   : " ).append( ecCtl.getPreviousDn() ).append( "\n" );
+                    buf.append( "        changeNumber : " ).append( ecCtl.getChangeNumber() ).append( "\n" );
+                }
+                
+                System.out.println( buf.toString() );
+                
+                if ( ecCtl != null )
+                {
+                    System.out.println( "==============================================" );
+                }
+            }
+        }
+        catch( Exception e ) 
+        {
+            e.printStackTrace();
+        }
+    }
+    
+    
+    static class ShutdownHook implements Runnable
+    {
+        final Context ctx;
+        
+        ShutdownHook( Context ctx )
+        {
+            this.ctx = ctx;
+        }
+        
+        public void run()
+        {
+            if ( ctx != null )
+            {
+                try { ctx.close(); } catch( Exception e ){ e.printStackTrace(); };
+            }
+        }
+    }
+}
+

Added: directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/MatchingRuleCompareTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/MatchingRuleCompareTest.java?rev=375785&view=auto
==============================================================================
--- directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/MatchingRuleCompareTest.java (added)
+++ directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/MatchingRuleCompareTest.java Tue Feb  7 16:10:02 2006
@@ -0,0 +1,241 @@
+/*
+ * Copyright (c) 2004 Solarsis Group LLC.
+ *
+ * Licensed under the Open Software License, Version 2.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://opensource.org/licenses/osl-2.1.php
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.directory.server;
+
+import java.util.Hashtable;
+
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.SearchControls;
+import javax.naming.ldap.InitialLdapContext;
+import javax.naming.ldap.LdapContext;
+
+import org.apache.directory.server.unit.AbstractServerTest;
+
+/**
+ * Tests with compare operations on attributes which use different matching
+ * rules. Created to demonstrate JIRA DIREVE-243 ("Compare operation does not
+ * adhere to some matching rules").
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class MatchingRuleCompareTest extends AbstractServerTest
+{
+    private LdapContext ctx = null;
+
+    public static final String PERSON_CN = "Tori Amos";
+    public static final String PERSON_SN = "Amos";
+    public static final String PERSON_RDN = "cn=" + PERSON_CN;
+    public static final String PERSON_TELEPHONE = "1234567890abc";
+    public static final String PERSON_PWD = "Secret1!";
+
+    public static final String GROUP_CN = "Artists";
+    public static final String GROUP_RDN = "cn=" + GROUP_CN;
+
+    protected Attributes getPersonAttributes(String sn, String cn)
+    {
+        Attributes attributes = new BasicAttributes();
+        Attribute attribute = new BasicAttribute("objectClass");
+        attribute.add("top");
+        attribute.add("person");
+        attributes.put(attribute);
+        attributes.put("cn", cn);
+        attributes.put("sn", sn);
+
+        return attributes;
+    }
+
+    protected Attributes getGroupOfNamesAttributes(String cn, String member)
+    {
+        Attributes attributes = new BasicAttributes();
+        Attribute attribute = new BasicAttribute("objectClass");
+        attribute.add("top");
+        attribute.add("groupOfNames");
+        attributes.put(attribute);
+        attributes.put("cn", cn);
+        attributes.put("member", member);
+
+        return attributes;
+    }
+
+    /**
+     * Create context, a person entry and a group.
+     */
+    public void setUp() throws Exception
+    {
+        super.setUp();
+
+        Hashtable env = new Hashtable();
+        env.put("java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory");
+        env.put("java.naming.provider.url", "ldap://localhost:" + port + "/ou=system");
+        env.put("java.naming.security.principal", "uid=admin,ou=system");
+        env.put("java.naming.security.credentials", "secret");
+        env.put("java.naming.security.authentication", "simple");
+
+        ctx = new InitialLdapContext(env, null);
+        assertNotNull(ctx);
+
+        // Create a person
+        Attributes attributes = this.getPersonAttributes(PERSON_SN, PERSON_CN);
+        attributes.put("telephoneNumber", PERSON_TELEPHONE);
+        attributes.put("userPassword", PERSON_PWD);
+        ctx.createSubcontext(PERSON_RDN, attributes);
+
+        // Create a group
+        DirContext member = (DirContext) ctx.lookup(PERSON_RDN);
+        attributes = this.getGroupOfNamesAttributes(GROUP_CN, member.getNameInNamespace());
+        ctx.createSubcontext(GROUP_RDN, attributes);
+    }
+
+    /**
+     * Remove entries and close context.
+     */
+    public void tearDown() throws Exception
+    {
+        ctx.unbind(PERSON_RDN);
+        ctx.unbind(GROUP_RDN);
+
+        ctx.close();
+
+        super.tearDown();
+    }
+
+    /**
+     * Compare with caseIgnoreMatch matching rule.
+     * 
+     * @throws NamingException
+     */
+    public void testCaseIgnoreMatch() throws NamingException
+    {
+        // Setting up search controls for compare op
+        SearchControls ctls = new SearchControls();
+        ctls.setReturningAttributes(new String[] {}); // no attributes
+        ctls.setSearchScope(SearchControls.OBJECT_SCOPE);
+
+        String[] values = { PERSON_SN, PERSON_SN.toUpperCase(), PERSON_SN.toLowerCase(), PERSON_SN + "X" };
+        boolean[] expected = { true, true, true, false };
+
+        for (int i = 0; i < values.length; i++) {
+            String value = values[i];
+
+            NamingEnumeration enumeration = ctx.search(PERSON_RDN, "sn={0}", new String[] { value }, ctls);
+            boolean result = enumeration.hasMore();
+
+            assertEquals("compare sn value '" + PERSON_SN + "' with '" + value + "'", expected[i], result);
+
+            enumeration.close();
+        }
+    }
+
+    //
+
+    /**
+     * Compare with telephoneNumberMatch matching rule.
+     * 
+     * @throws NamingException
+     */
+
+// Comment this out until we have the telephone number match working.
+
+//    public void testTelephoneNumberMatch() throws NamingException
+//    {
+//        // Setting up search controls for compare op
+//        SearchControls ctls = new SearchControls();
+//        ctls.setReturningAttributes(new String[] {}); // no attributes
+//        ctls.setSearchScope(SearchControls.OBJECT_SCOPE);
+//
+//        String[] values = { "", "1234567890abc", "   1234567890 A B C", "123 456 7890 abc", "123-456-7890 abC",
+//                "123456-7890 A bc" };
+//        boolean[] expected = { false, true, true, true, true, true };
+//
+//        for (int i = 0; i < values.length; i++) {
+//            String value = values[i];
+//
+//            NamingEnumeration enumeration = ctx.search(PERSON_RDN, "telephoneNumber={0}", new String[] { value }, ctls);
+//            boolean result = enumeration.hasMore();
+//
+//            assertEquals("compare '" + PERSON_TELEPHONE + "' with '" + value + "'", expected[i], result);
+//
+//            enumeration.close();
+//        }
+//    }
+
+    /**
+     * Compare with octetStringMatch matching rule.
+     * 
+     * @throws NamingException
+     */
+    public void testOctetStringMatch() throws NamingException
+    {
+        // Setting up search controls for compare op
+        SearchControls ctls = new SearchControls();
+        ctls.setReturningAttributes(new String[] {}); // no attributes
+        ctls.setSearchScope(SearchControls.OBJECT_SCOPE);
+
+        String[] values = { "", PERSON_PWD, PERSON_PWD.toUpperCase(), PERSON_PWD.toLowerCase(), PERSON_PWD + "X" };
+        boolean[] expected = { false, true, false, false, false };
+
+        for (int i = 0; i < values.length; i++) {
+            String value = values[i];
+
+            NamingEnumeration enumeration = ctx.search(PERSON_RDN, "userPassword={0}", new String[] { value }, ctls);
+            boolean result = enumeration.hasMore();
+
+            assertEquals("compare '" + PERSON_PWD + "' with '" + value + "'", expected[i], result);
+
+            enumeration.close();
+        }
+    }
+
+    /**
+     * Compare with distinguishedNameMatch matching rule.
+     * 
+     * @throws NamingException
+     */
+    public void testDistinguishedNameMatch() throws NamingException
+    {
+        // determine member DN of person
+        DirContext member = (DirContext) ctx.lookup(PERSON_RDN);
+        String memberDN = member.getNameInNamespace();
+
+        // Setting up search controls for compare op
+        SearchControls ctls = new SearchControls();
+        ctls.setReturningAttributes(new String[] {}); // no attributes
+        ctls.setSearchScope(SearchControls.OBJECT_SCOPE);
+
+        String[] values = { "", memberDN, "cn=nobody", memberDN.toLowerCase(),
+                PERSON_RDN + " , " + ctx.getNameInNamespace() };
+        boolean[] expected = { false, true, false, true, true };
+
+        for (int i = 0; i < values.length; i++) {
+            String value = values[i];
+
+            NamingEnumeration enumeration = ctx.search(GROUP_RDN, "member={0}", new Object[] { value }, ctls);
+            boolean result = enumeration.hasMore();
+
+            assertEquals("compare '" + memberDN + "' with '" + value + "'", expected[i], result);
+
+            enumeration.close();
+        }
+    }
+
+}



Mime
View raw message