directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r692919 [3/4] - in /directory/apacheds/trunk: protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/kdc/ protocol-ldap/src/main/java/org/apache/directory/server/ldap/ protocol-ldap/src/main/java/org/apache/directory/server/ld...
Date Sun, 07 Sep 2008 19:00:24 GMT
Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/extended/StoredProcedureIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/extended/StoredProcedureIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/extended/StoredProcedureIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/extended/StoredProcedureIT.java Sun Sep  7 12:00:21 2008
@@ -29,7 +29,7 @@
 import org.apache.directory.server.integ.LdapServerFactory;
 import org.apache.directory.server.integ.SiRunner;
 import org.apache.directory.server.ldap.ExtendedOperationHandler;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.SimpleMechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.cramMD5.CramMd5MechanismHandler;
@@ -76,12 +76,12 @@
     private Map<String, OidNormalizer> oids;
 
     
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
 
     
     public static class Factory implements LdapServerFactory
     {
-        public LdapServer newInstance() throws Exception
+        public LdapService newInstance() throws Exception
         {
             DirectoryService service = new DefaultDirectoryService();
             IntegrationUtils.doDelete( service.getWorkingDirectory() );
@@ -92,12 +92,12 @@
             // on the system and somewhere either under target directory
             // or somewhere in a temp area of the machine.
 
-            LdapServer ldapServer = new LdapServer();
-            ldapServer.setDirectoryService( service );
-            ldapServer.setSocketAcceptor( new SocketAcceptor( null ) );
-            ldapServer.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
-            ldapServer.setEnabled( true );
-            ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
+            LdapService ldapService = new LdapService();
+            ldapService.setDirectoryService( service );
+            ldapService.setSocketAcceptor( new SocketAcceptor( null ) );
+            ldapService.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
+            ldapService.setEnabled( true );
+            ldapService.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
 
             // Setup SASL Mechanisms
             
@@ -117,13 +117,13 @@
             mechanismHandlerMap.put( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
             mechanismHandlerMap.put( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler );
 
-            ldapServer.setSaslMechanismHandlers( mechanismHandlerMap );
+            ldapService.setSaslMechanismHandlers( mechanismHandlerMap );
 
-            Set<ExtendedOperationHandler> handlers = new HashSet<ExtendedOperationHandler>( ldapServer.getExtendedOperationHandlers() );
+            Set<ExtendedOperationHandler> handlers = new HashSet<ExtendedOperationHandler>( ldapService.getExtendedOperationHandlers() );
             handlers.add( new StoredProcedureExtendedOperationHandler() );
-            ldapServer.setExtendedOperationHandlers( handlers );
+            ldapService.setExtendedOperationHandlers( handlers );
 
-            return ldapServer;
+            return ldapService;
         }
     }
     
@@ -133,7 +133,7 @@
     {
         Hashtable<String, Object> env = new Hashtable<String, Object>();
         env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( "java.naming.provider.url", "ldap://localhost:" + ldapServer.getIpPort() + "/ou=system" );
+        env.put( "java.naming.provider.url", "ldap://localhost:" + ldapService.getIpPort() + "/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" );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/IllegalModificationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/IllegalModificationIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/IllegalModificationIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/IllegalModificationIT.java Sun Sep  7 12:00:21 2008
@@ -26,7 +26,7 @@
 import org.apache.directory.server.integ.SiRunner;
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredConnection;
 
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import static org.junit.Assert.fail;
@@ -75,13 +75,13 @@
 {
     private static final String DN = "cn=Kate Bush,ou=system";
 
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
     
 
     @Test
     public void testIllegalModification() throws Exception
     {
-        LDAPConnection con = getWiredConnection( ldapServer );
+        LDAPConnection con = getWiredConnection( ldapService );
         LDAPAttribute attr = new LDAPAttribute( "description" );
         LDAPModification mod = new LDAPModification( LDAPModification.ADD, attr );
 
@@ -104,7 +104,7 @@
     @Test
     public void testIllegalModification2() throws Exception
     {
-        LDAPConnection con = getWiredConnection( ldapServer );
+        LDAPConnection con = getWiredConnection( ldapService );
 
         // first a valid attribute
         LDAPAttribute attr = new LDAPAttribute( "description", "The description" );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java Sun Sep  7 12:00:21 2008
@@ -44,7 +44,7 @@
 import org.apache.directory.server.integ.SiRunner;
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
 
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import static org.junit.Assert.fail;
@@ -91,7 +91,7 @@
     private static final String PERSON_DESCRIPTION = "an American singer-songwriter";
     private static final String RDN_DEBBIE_HARRY = "cn=Debbie Harry";
 
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
     
 
     /**
@@ -119,7 +119,7 @@
     @Test
     public void testAddNewAttributeValue() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Add telephoneNumber attribute
         String newValue = "1234567890";
@@ -141,7 +141,7 @@
     @Test
     public void testAddNewAttributeValues() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Add telephoneNumber attribute
         String[] newValues =
@@ -169,7 +169,7 @@
     @Test
     public void testAddAdditionalAttributeValue() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // A new description attribute value
         String newValue = "A new description for this person";
@@ -199,7 +199,7 @@
     @Test
     public void testAddExistingAttributeValue() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Change description attribute
         Attributes attrs = new BasicAttributes( "description", PERSON_DESCRIPTION, true );
@@ -236,7 +236,7 @@
     @Test
     public void testAddExistingNthAttributesDirServer664() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Change description attribute
         Attributes attrs = new BasicAttributes( true );
@@ -284,7 +284,7 @@
     @Test
     public void testTwoDescriptionDirServer643() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Change description attribute
         Attributes attrs = new BasicAttributes( true );
@@ -313,7 +313,7 @@
     @Test
     public void testAddDuplicateValueToExistingAttribute() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // modify object classes, add a new value twice
         Attribute ocls = new BasicAttribute( "objectClass", "organizationalPerson" );
@@ -346,7 +346,7 @@
     @Test
     public void testAddDuplicateValueToNewAttribute() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // add the same description value twice
         Attribute desc = new BasicAttribute( "description", "another description value besides songwriter" );
@@ -374,7 +374,7 @@
     @Test
     public void testSearchBadAttribute() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Add a not existing attribute
         String newValue = "unbelievable";
@@ -402,7 +402,7 @@
     @Test
     public void testAttributeValueMultiMofificationDIRSERVER_636() throws Exception 
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create a person entry
         Attributes attrs = getPersonAttributes("Bush", "Kate Bush");
@@ -456,7 +456,7 @@
     @Test
     public void testModifyOperationalAttributeAdd() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         ModificationItem modifyOp = new ModificationItem( DirContext.ADD_ATTRIBUTE, new BasicAttribute(
             "subschemaSubentry", "cn=anotherSchema" ) );
@@ -488,7 +488,7 @@
     @Test
      public void testDNAttributeMemberMofificationDIRSERVER_687() throws Exception 
      {
-         DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+         DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
          
         // Create a person entry
         Attributes attrs = getPersonAttributes("Bush", "Kate Bush");
@@ -529,7 +529,7 @@
     @Test
     public void testModifyAddWithInvalidNumberOfAttributeValues() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         Attributes attrs = new BasicAttributes( true );
         Attribute ocls = new BasicAttribute( "objectClass" );
@@ -565,7 +565,7 @@
     @Test
     public void testAddNewBinaryAttributeValue() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Add a binary attribute
         byte[] newValue = new byte[]{0x00, 0x01, 0x02, 0x03};

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReferralIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReferralIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReferralIT.java Sun Sep  7 12:00:21 2008
@@ -34,7 +34,7 @@
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredConnection;
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContextThrowOnRefferal;
 
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.apache.directory.server.operations.compare.CompareIT;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.junit.Test;
@@ -108,7 +108,7 @@
 {
     private static final Logger LOG = LoggerFactory.getLogger( CompareIT.class );
     
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
     
 
     /**
@@ -117,7 +117,7 @@
     @Test
     public void testOnReferralWithManageDsaITControl() throws Exception
     {
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         LDAPConstraints constraints = new LDAPConstraints();
         constraints.setClientControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
         constraints.setServerControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
@@ -142,7 +142,7 @@
     @Test
     public void testOnReferral() throws Exception
     {
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         LDAPConstraints constraints = new LDAPConstraints();
         constraints.setReferrals( false );
         conn.setConstraints( constraints );
@@ -172,7 +172,7 @@
     @Test
     public void testThrowOnReferralWithJndi() throws Exception
     {
-        LdapContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        LdapContext ctx = getWiredContextThrowOnRefferal( ldapService );
         
         // modify failure
         Attribute attr = new BasicAttribute( "description", "referral to akarasulu" );
@@ -200,7 +200,7 @@
     {
         LOG.debug( "" );
 
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         LDAPConstraints constraints = new LDAPConstraints();
         conn.setConstraints( constraints );
 

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java Sun Sep  7 12:00:21 2008
@@ -40,7 +40,7 @@
 import org.apache.directory.server.integ.SiRunner;
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
 
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import static org.junit.Assert.fail;
@@ -75,7 +75,7 @@
     private static final String RDN = "cn=Tori Amos";
 
     
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
     
 
     /**
@@ -124,7 +124,7 @@
     @Test
     public void testRemoveAttemptWithoutChange() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Get the attributes and check the contents
         Attributes tori = ctx.getAttributes( RDN );
@@ -167,7 +167,7 @@
     @Test
     public void testRemoveNotRequiredAttribute() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Remove description Attribute
         Attribute attr = new BasicAttribute( "description" );
@@ -191,7 +191,7 @@
     @Test
     public void testRemoveTwoNotRequiredAttributes() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // add telephoneNumber to entry
         Attributes tn = new BasicAttributes( "telephoneNumber", "12345678", true );
@@ -221,7 +221,7 @@
     @Test
     public void testRemoveRequiredAttribute() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Remove sn attribute
         Attribute attr = new BasicAttribute( "sn" );
@@ -248,7 +248,7 @@
     @Test
     public void testRemovePartOfRdn() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Remove sn attribute
         Attribute attr = new BasicAttribute( "cn" );
@@ -275,7 +275,7 @@
     @Test
     public void testRemovePartOfRdnNotRequired() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Change RDN to another attribute
         String newRdn = "description=an American singer-songwriter";
@@ -312,7 +312,7 @@
     @Test
     public void testRemoveAttributeNotPresent() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Remove telephoneNumber Attribute
         Attribute attr = new BasicAttribute( "telephoneNumber" );
@@ -340,7 +340,7 @@
     @Test
     public void testRemoveAttributeValueNotPresent() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Remove telephoneNumber Attribute
         Attribute attr = new BasicAttribute( "telephoneNumber", "12345" );
@@ -370,7 +370,7 @@
     @Test
     public void testRemoveAttributeNotValid() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Remove phantasy attribute
         Attribute attr = new BasicAttribute( "XXX" );
@@ -399,7 +399,7 @@
     @Test
     public void testReplaceNonExistingAttribute() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create an entry
         Attributes attrs = getInetOrgPersonAttributes( "Bush", "Kate Bush" );
@@ -445,7 +445,7 @@
     @Test
     public void testReplaceRdnByEmptyValueAttribute() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create an entry
         Attributes attrs = getPersonAttributes( "Bush", "Kate Bush" );
@@ -477,7 +477,7 @@
     @Test
     public void testRemoveRdnAttribute() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create an entry
         Attributes attrs = getPersonAttributes( "Bush", "Kate Bush" );
@@ -509,7 +509,7 @@
     @Test
     public void testRemoveRdnAttributeValue() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create an entry
         Attributes attrs = getPersonAttributes( "Bush", "Kate Bush" );
@@ -541,7 +541,7 @@
     @Test
     public void testDeleteOclAttrWithTopPersonOrganizationalpersonInetorgperson() throws Exception 
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create an entry
         Attributes attrs = getInetOrgPersonAttributes("Bush", "Kate Bush");
@@ -574,7 +574,7 @@
     @Test
     public void testDeleteOclAttrWithTopPersonOrganizationalpersonInetorgpersonVariant() throws Exception 
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create an entry
         Attributes attrs = getInetOrgPersonAttributes("Bush", "Kate Bush");

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReplaceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReplaceIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReplaceIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReplaceIT.java Sun Sep  7 12:00:21 2008
@@ -47,7 +47,7 @@
 import org.apache.directory.server.integ.SiRunner;
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
 
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.SimpleMechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.cramMD5.CramMd5MechanismHandler;
@@ -98,12 +98,12 @@
 {
     private static final String BASE = "ou=system";
 
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
     
     
     public static class Factory implements LdapServerFactory
     {
-        public LdapServer newInstance() throws Exception
+        public LdapService newInstance() throws Exception
         {
             DirectoryService service = new DefaultDirectoryService();
             IntegrationUtils.doDelete( service.getWorkingDirectory() );
@@ -129,12 +129,12 @@
             // on the system and somewhere either under target directory
             // or somewhere in a temp area of the machine.
 
-            LdapServer ldapServer = new LdapServer();
-            ldapServer.setDirectoryService( service );
-            ldapServer.setSocketAcceptor( new SocketAcceptor( null ) );
-            ldapServer.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
-            ldapServer.addExtendedOperationHandler( new StartTlsHandler() );
-            ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
+            LdapService ldapService = new LdapService();
+            ldapService.setDirectoryService( service );
+            ldapService.setSocketAcceptor( new SocketAcceptor( null ) );
+            ldapService.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
+            ldapService.addExtendedOperationHandler( new StartTlsHandler() );
+            ldapService.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
 
             // Setup SASL Mechanisms
             
@@ -154,9 +154,9 @@
             mechanismHandlerMap.put( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
             mechanismHandlerMap.put( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler );
 
-            ldapServer.setSaslMechanismHandlers( mechanismHandlerMap );
+            ldapService.setSaslMechanismHandlers( mechanismHandlerMap );
 
-            return ldapServer;
+            return ldapService;
         }
     }
     
@@ -166,7 +166,7 @@
     @Test
     public void testReplaceNotPresentAttribute() throws Exception 
     {
-        DirContext sysRoot = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext sysRoot = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         String rdn = "cn=Kate Bush";
 
@@ -199,7 +199,7 @@
     @Test
     public void testReplaceNonExistingAttribute() throws Exception 
     {
-        DirContext sysRoot = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext sysRoot = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         String rdn = "cn=Kate Bush";
 
@@ -232,7 +232,7 @@
     @Test
     public void testReplaceNonExistingAttributeManyMods() throws Exception 
     {
-        DirContext sysRoot = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext sysRoot = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         String rdn = "cn=Kate Bush";
 
@@ -267,10 +267,10 @@
     @Test
     public void testReplaceNonExistingIndexedAttribute() throws Exception 
     {
-        DirContext sysRoot = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext sysRoot = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         String rdn = "cn=Kim Wilde";
-        //ldapServer.getDirectoryService().getPartitions();
+        //ldapService.getDirectoryService().getPartitions();
 
         Attribute attr = new BasicAttribute( "ou", "test" );
         ModificationItem item = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyDnReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyDnReferralIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyDnReferralIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyDnReferralIT.java Sun Sep  7 12:00:21 2008
@@ -36,7 +36,7 @@
 import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
 import org.apache.directory.server.core.integ.annotations.CleanupLevel;
 import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -97,7 +97,7 @@
 {
     private static final Logger LOG = LoggerFactory.getLogger( ModifyDnReferralIT.class );
     
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
     
 
     /**
@@ -106,7 +106,7 @@
     @Test
     public void testOnReferralWithManageDsaITControl() throws Exception
     {
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         LDAPConstraints constraints = new LDAPSearchConstraints();
         constraints.setClientControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
         constraints.setServerControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
@@ -129,7 +129,7 @@
     @Test
     public void testNewSuperiorOnReferralWithManageDsaITControl() throws Exception
     {
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         LDAPConstraints constraints = new LDAPSearchConstraints();
         constraints.setClientControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
         constraints.setServerControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
@@ -155,7 +155,7 @@
     @Test
     public void testOnReferral() throws Exception
     {
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         LDAPConstraints constraints = new LDAPConstraints();
         constraints.setReferrals( false );
         conn.setConstraints( constraints );
@@ -184,7 +184,7 @@
     @Test
     public void testNewSupierorOnReferral() throws Exception
     {
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         LDAPConstraints constraints = new LDAPConstraints();
         constraints.setReferrals( false );
         conn.setConstraints( constraints );
@@ -212,7 +212,7 @@
     @Test
     public void testThrowOnReferralWithJndi() throws Exception
     {
-        LdapContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        LdapContext ctx = getWiredContextThrowOnRefferal( ldapService );
         
         // ModifyDN referrals failure
         try
@@ -238,7 +238,7 @@
     {
         LOG.debug( "" );
 
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         LDAPConstraints constraints = new LDAPConstraints();
         conn.setConstraints( constraints );
 
@@ -266,7 +266,7 @@
     {
         LOG.debug( "" );
 
-        LDAPConnection conn = getWiredConnection( ldapServer );
+        LDAPConnection conn = getWiredConnection( ldapService );
         LDAPConstraints constraints = new LDAPConstraints();
         conn.setConstraints( constraints );
 

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java Sun Sep  7 12:00:21 2008
@@ -36,7 +36,7 @@
 import org.apache.directory.server.core.integ.Level;
 import org.apache.directory.server.core.integ.annotations.CleanupLevel;
 import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -62,7 +62,7 @@
 {
     private static final String BASE = "ou=system";
 
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
     
     
     /**
@@ -106,7 +106,7 @@
     @Test
     public void testModifyRdnAndDeleteOld() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create a person, cn value is rdn
         String oldCn = "Myra Ellen Amos";
@@ -155,7 +155,7 @@
     @Test
     public void testModifyRdnAndDontDeleteOldFalse() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create a person, cn value is rdn
         String oldCn = "Myra Ellen Amos";
@@ -202,7 +202,7 @@
     @Test
     public void testModifyRdnAndKeepOld() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create a person, cn value is rdn
         String oldCn = "Myra Ellen Amos";
@@ -250,7 +250,7 @@
     @Test
     public void testModifyRdnAndDeleteOldVariant() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create a person, cn value is rdn
         String oldCn = "Myra Ellen Amos";
@@ -305,7 +305,7 @@
     @Test
     public void testModifyRdnDifferentAttribute() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create a person, cn value is rdn
         String cnVal = "Tori Amos";
@@ -355,7 +355,7 @@
     @Test
     public void testModifyRdnDifferentAttributeDeleteOldFails() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create a person, cn value is rdn
         String cnVal = "Tori Amos";
@@ -390,7 +390,7 @@
     @Test
     public void testModifyRdnAndDeleteOldWithChild() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create an organizational unit, ou value is rdn
         String oldOu = "Writers";
@@ -460,7 +460,7 @@
     @Test
     public void testModifyRdnWithEncodedNewRdn() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create a person "cn=Tori Amos", cn value is rdn
         String cnVal = "Tori Amos";
@@ -513,7 +513,7 @@
     @Test
     public void testModifyRdnWithEscapedPoundNewRdn() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // Create a person "cn=Tori Amos", cn value is rdn
         String cnVal = "Tori Amos";
@@ -567,7 +567,7 @@
     @Test
     public void testModifyMultiValuedRdnVariant1() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         Attributes attributes = createPerson( "cn" );
         String oldRdn = getRdn( attributes, "cn" );
@@ -607,7 +607,7 @@
     @Test
     public void testModifyMultiValuedRdnVariant2() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         Attributes attributes = createPerson( "cn" );
         String oldRdn = getRdn( attributes, "cn" );
@@ -647,7 +647,7 @@
     @Test
     public void testModifyMultiValuedRdnVariant3() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         Attributes attributes = createPerson( "description" );
         String oldRdn = getRdn( attributes, "description" );
@@ -687,7 +687,7 @@
     @Test
     public void testModifyMultiValuedRdnVariant4() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         Attributes attributes = createPerson( "description" );
         String oldRdn = getRdn( attributes, "description" );
@@ -730,7 +730,7 @@
     @Ignore ( "Until this is fixed: https://issues.apache.org/jira/browse/DIRSERVER-1231" )
     public void testModifyMultiValuedRdnVariant5() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         Attributes attributes = createPerson( "cn" );
         attributes.put( "telephoneNumber", "12345" );
@@ -777,7 +777,7 @@
     @Ignore ( "Until this is fixed: https://issues.apache.org/jira/browse/DIRSERVER-1231" )
     public void testModifyMultiValuedRdnVariant6() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         Attributes attributes = createPerson( "cn" );
         attributes.put( "telephoneNumber", "12345" );
@@ -837,7 +837,7 @@
     @Test
     public void testModifyMultiValuedRdnVariant7() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         Attributes attributes = createPerson( "cn", "sn" );
         String oldRdn = getRdn( attributes, "cn", "sn" );
@@ -879,7 +879,7 @@
     @Test
     public void testModifyMultiValuedRdnVariant8() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         Attributes attributes = createPerson( "cn", "sn" );
         String oldRdn = getRdn( attributes, "cn", "sn" );
@@ -936,7 +936,7 @@
     @Test
     public void testModifyRdnOperationalAttribute() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // create the entry
         Attributes attributes = createPerson( "cn" );
@@ -981,7 +981,7 @@
     @Test
     public void testModifyRdnObjectClassAttribute() throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         // create the entry
         Attributes attributes = createPerson( "cn" );
@@ -1026,7 +1026,7 @@
 
     private Attributes createPerson( String... rdnTypes ) throws Exception
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         
         Attributes attributes = new BasicAttributes( true );
         Attribute attribute = new BasicAttribute( "objectClass" );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/MoveIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/MoveIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/MoveIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/MoveIT.java Sun Sep  7 12:00:21 2008
@@ -29,7 +29,7 @@
 import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
 import org.apache.directory.server.core.integ.annotations.CleanupLevel;
 import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -70,13 +70,13 @@
     private static final String NEW_DN = "uid=akarasulu,ou=NewSuperior,ou=system";
     private static final String NEW_DN2 = "uid=elecharny,ou=NewSuperior,ou=system";
     
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
     
 
     @Test
     public void testMoveNoRdnChange() throws Exception
     {
-        LdapContext ctx = getWiredContext( ldapServer );
+        LdapContext ctx = getWiredContext( ldapService );
         ctx.rename( DN, NEW_DN );
         
         SearchControls controls = new SearchControls();
@@ -98,7 +98,7 @@
     @Test
     public void testMoveAndRdnChange() throws Exception
     {
-        LdapContext ctx = getWiredContext( ldapServer );
+        LdapContext ctx = getWiredContext( ldapService );
         ctx.rename( DN, NEW_DN2 );
         
         SearchControls controls = new SearchControls();

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/IndexedNegationSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/IndexedNegationSearchIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/IndexedNegationSearchIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/IndexedNegationSearchIT.java Sun Sep  7 12:00:21 2008
@@ -35,7 +35,7 @@
 import org.apache.directory.server.integ.SiRunner;
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
 
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.SimpleMechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.cramMD5.CramMd5MechanismHandler;
@@ -149,12 +149,12 @@
 )
 public class IndexedNegationSearchIT 
 {
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
 
     
     public static class Factory implements LdapServerFactory
     {
-        public LdapServer newInstance() throws Exception
+        public LdapService newInstance() throws Exception
         {
             DirectoryService service = new DefaultDirectoryService();
             IntegrationUtils.doDelete( service.getWorkingDirectory() );
@@ -180,12 +180,12 @@
             // on the system and somewhere either under target directory
             // or somewhere in a temp area of the machine.
 
-            LdapServer ldapServer = new LdapServer();
-            ldapServer.setDirectoryService( service );
-            ldapServer.setSocketAcceptor( new SocketAcceptor( null ) );
-            ldapServer.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
-            ldapServer.addExtendedOperationHandler( new StartTlsHandler() );
-            ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
+            LdapService ldapService = new LdapService();
+            ldapService.setDirectoryService( service );
+            ldapService.setSocketAcceptor( new SocketAcceptor( null ) );
+            ldapService.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
+            ldapService.addExtendedOperationHandler( new StartTlsHandler() );
+            ldapService.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
 
             // Setup SASL Mechanisms
             
@@ -205,9 +205,9 @@
             mechanismHandlerMap.put( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
             mechanismHandlerMap.put( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler );
 
-            ldapServer.setSaslMechanismHandlers( mechanismHandlerMap );
+            ldapService.setSaslMechanismHandlers( mechanismHandlerMap );
 
-            return ldapServer;
+            return ldapService;
         }
     }
     
@@ -281,7 +281,7 @@
     
     Set<SearchResult> getActorResults( String filter ) throws Exception
     {
-        DirContext ctx = getWiredContext( ldapServer );
+        DirContext ctx = getWiredContext( ldapService );
         Set<SearchResult> results = new HashSet<SearchResult>();
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -297,7 +297,7 @@
     
     Set<SearchResult> getResults( String filter ) throws Exception
     {
-        DirContext ctx = getWiredContext( ldapServer );
+        DirContext ctx = getWiredContext( ldapService );
         Set<SearchResult> results = new HashSet<SearchResult>();
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/NegationSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/NegationSearchIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/NegationSearchIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/NegationSearchIT.java Sun Sep  7 12:00:21 2008
@@ -34,7 +34,7 @@
 import org.apache.directory.server.integ.SiRunner;
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
 
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -108,7 +108,7 @@
 )
 public class NegationSearchIT 
 {
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
 
     
     /**
@@ -163,7 +163,7 @@
     
     Set<SearchResult> getResults( String filter ) throws Exception
     {
-        DirContext ctx = getWiredContext( ldapServer );
+        DirContext ctx = getWiredContext( ldapService );
         Set<SearchResult> results = new HashSet<SearchResult>();
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java Sun Sep  7 12:00:21 2008
@@ -48,7 +48,7 @@
 import org.apache.directory.server.integ.SiRunner;
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
 
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.apache.directory.shared.ldap.codec.search.controls.ChangeType;
 import org.apache.directory.shared.ldap.codec.search.controls.EntryChangeControlCodec;
 import org.apache.directory.shared.ldap.codec.search.controls.EntryChangeControlDecoder;
@@ -91,7 +91,7 @@
     private static final String PERSON_DESCRIPTION = "an American singer-songwriter";
     private static final String RDN = "cn=Tori Amos";
 
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
     
 
     /**
@@ -126,8 +126,8 @@
     public void setUpListener( boolean returnECs, PersistentSearchControl control, boolean ignoreEmptyRegistryCheck ) 
         throws Exception
     {
-        ctx = ( EventDirContext ) getWiredContext( ldapServer).lookup( BASE );
-        eventService = ldapServer.getDirectoryService().getEventService();
+        ctx = ( EventDirContext ) getWiredContext( ldapService).lookup( BASE );
+        eventService = ldapService.getDirectoryService().getEventService();
         List<RegistrationEntry> registrationEntryList = eventService.getRegistrationEntries();
         
         if ( ! ignoreEmptyRegistryCheck )
@@ -152,8 +152,8 @@
     
     public void setUpListener() throws Exception
     {
-        ctx = ( EventDirContext ) getWiredContext( ldapServer).lookup( BASE );
-        eventService = ldapServer.getDirectoryService().getEventService();
+        ctx = ( EventDirContext ) getWiredContext( ldapService).lookup( BASE );
+        eventService = ldapService.getDirectoryService().getEventService();
         List<RegistrationEntry> registrationEntryList = eventService.getRegistrationEntries();
         assertTrue( registrationEntryList.isEmpty() );
         
@@ -582,7 +582,7 @@
 
             try
             {
-                ctx = ( LdapContext ) getWiredContext( ldapServer).lookup( BASE );
+                ctx = ( LdapContext ) getWiredContext( ldapService).lookup( BASE );
                 ctx.setRequestControls( ctxCtls );
                 isReady = true;
                 LOG.debug( "PSearchListener is ready and about to issue persistent search request." );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchIT.java Sun Sep  7 12:00:21 2008
@@ -38,7 +38,7 @@
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContextThrowOnRefferal;
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
 
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.junit.Before;
@@ -115,7 +115,7 @@
 )
 public class ReferralSearchIT
 {
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
 
     
     @Before
@@ -127,21 +127,21 @@
         "objectClass: referral\n" +
         "objectClass: extensibleObject\n" +
         "c: europ\n" +
-        "ref: ldap://localhost:" + ldapServer.getIpPort() + "/c=france,ou=system\n\n" +
+        "ref: ldap://localhost:" + ldapService.getIpPort() + "/c=france,ou=system\n\n" +
 
         "dn: c=america,ou=Countries,ou=system\n" +
         "objectClass: top\n" +
         "objectClass: referral\n" +
         "objectClass: extensibleObject\n" +
         "c: america\n" +
-        "ref: ldap://localhost:" + ldapServer.getIpPort() + "/c=usa,ou=system\n\n";
+        "ref: ldap://localhost:" + ldapService.getIpPort() + "/c=usa,ou=system\n\n";
 
         LdifReader reader = new LdifReader( new StringReader( ldif ) );
         while ( reader.hasNext() )
         {
             LdifEntry entry = reader.next();
-            ldapServer.getDirectoryService().getAdminSession().add( 
-                new DefaultServerEntry( ldapServer.getDirectoryService().getRegistries(), entry.getEntry() ) ); 
+            ldapService.getDirectoryService().getAdminSession().add( 
+                new DefaultServerEntry( ldapService.getDirectoryService().getRegistries(), entry.getEntry() ) ); 
         }
     }
     
@@ -149,7 +149,7 @@
     @Test
     public void testSearchBaseIsReferral() throws Exception
     {
-        DirContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        DirContext ctx = getWiredContextThrowOnRefferal( ldapService );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
         
@@ -173,7 +173,7 @@
     @Test
     public void testSearchBaseParentIsReferral() throws Exception
     {
-        DirContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        DirContext ctx = getWiredContextThrowOnRefferal( ldapService );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
 
@@ -196,7 +196,7 @@
     @Test
     public void testSearchBaseAncestorIsReferral() throws Exception
     {
-        DirContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        DirContext ctx = getWiredContextThrowOnRefferal( ldapService );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
 
@@ -221,7 +221,7 @@
     @Test
     public void testSearchContinuations() throws Exception
     {
-        DirContext ctx = getWiredContext( ldapServer );
+        DirContext ctx = getWiredContext( ldapService );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
@@ -299,7 +299,7 @@
     @Test
     public void testSearchWithReferralThrow() throws Exception
     {
-        DirContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        DirContext ctx = getWiredContextThrowOnRefferal( ldapService );
 
         try
         {
@@ -311,7 +311,7 @@
         catch ( ReferralException re )
         {
             String referral = (String)re.getReferralInfo();
-            assertEquals( "ldap://localhost:" + ldapServer.getIpPort() + "/c=usa,ou=system??sub", referral );
+            assertEquals( "ldap://localhost:" + ldapService.getIpPort() + "/c=usa,ou=system??sub", referral );
         }
     }
 
@@ -326,7 +326,7 @@
     @Test
     public void testSearchBaseWithReferralThrow() throws Exception
     {
-        DirContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        DirContext ctx = getWiredContextThrowOnRefferal( ldapService );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -339,7 +339,7 @@
         catch ( ReferralException re )
         {
             String referral = (String)re.getReferralInfo();
-            assertEquals( "ldap://localhost:" + ldapServer.getIpPort() + "/c=usa,ou=system??base", referral );
+            assertEquals( "ldap://localhost:" + ldapService.getIpPort() + "/c=usa,ou=system??base", referral );
         }
     }
 
@@ -354,7 +354,7 @@
     @Test
     public void testSearchOneLevelWithReferralThrow() throws Exception
     {
-        DirContext ctx = getWiredContextThrowOnRefferal( ldapServer );
+        DirContext ctx = getWiredContextThrowOnRefferal( ldapService );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -367,7 +367,7 @@
         catch ( ReferralException re )
         {
             String referral = (String)re.getReferralInfo();
-            assertEquals( "ldap://localhost:" + ldapServer.getIpPort() + "/c=usa,ou=system??one", referral );
+            assertEquals( "ldap://localhost:" + ldapService.getIpPort() + "/c=usa,ou=system??one", referral );
         }
     }
 }
\ No newline at end of file

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java Sun Sep  7 12:00:21 2008
@@ -31,7 +31,7 @@
 import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
 import org.apache.directory.server.core.integ.annotations.CleanupLevel;
 import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -167,7 +167,7 @@
     private static final String FILTER = "(objectclass=subschema)";
 
     
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
     
 
     protected void checkForAttributes( Attributes attrs, String[] attrNames )
@@ -188,7 +188,7 @@
     @Test
     public void testRequestOperationalAttributes() throws Exception
     {
-        DirContext ctx = getWiredContext( ldapServer );
+        DirContext ctx = getWiredContext( ldapService );
         SearchControls ctls = new SearchControls();
 
         String[] attrNames =
@@ -220,7 +220,7 @@
     @Test
     public void testRequestAllOperationalAttributes() throws Exception
     {
-        DirContext ctx = getWiredContext( ldapServer );
+        DirContext ctx = getWiredContext( ldapService );
         SearchControls ctls = new SearchControls();
 
         ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -252,7 +252,7 @@
     @Test
     public void testSearchingNewSchemaElements() throws Exception
     {
-        DirContext ctx = getWiredContext( ldapServer );
+        DirContext ctx = getWiredContext( ldapService );
         
         // create an entry with the schema objectClass personActiveDirectory
         Attributes person = new BasicAttributes( "objectClass", "top", true );
@@ -297,7 +297,7 @@
     @Test
     public void testRequestWithoutManageDsaITControl() throws Exception
     {
-        DirContext ctx = getWiredContext( ldapServer );
+        DirContext ctx = getWiredContext( ldapService );
 
         // this removes the ManageDsaIT control from the search request
         ctx.addToEnvironment( DirContext.REFERRAL, "throw" );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java Sun Sep  7 12:00:21 2008
@@ -43,7 +43,7 @@
 import org.apache.directory.server.core.integ.annotations.CleanupLevel;
 import org.apache.directory.server.core.subtree.SubentryInterceptor;
 import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
 
@@ -169,7 +169,7 @@
 {
     private static final String BASE = "ou=system";
     
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
     
     private static final String RDN = "cn=Tori Amos";
     private static final String RDN2 = "cn=Rolling-Stones";
@@ -261,7 +261,7 @@
     @Test
     public void testSearchByBinaryAttribute() throws Exception 
     {
-        DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
+        DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
         byte[] certData = new byte[] { 0x34, 0x56, 0x4e, 0x5f };
         
         // Search for kate by cn first
@@ -291,7 +291,7 @@
     @Test
     public void testSearch() throws Exception
     {
-        LdapContext ctx = getWiredContext( ldapServer );
+        LdapContext ctx = getWiredContext( ldapService );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
         controls.setTimeLimit( 10 );
@@ -343,7 +343,7 @@
      */
     private Set<String> search( String filter ) throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         NamingEnumeration<SearchResult> ii = ctx.search( "", filter, controls );
@@ -432,7 +432,7 @@
     @Test
     public void testSearchWithBackslashEscapedBase() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         // create additional entry
         Attributes attributes = this.getPersonAttributes( "Ferry", "Bryan Ferry" );
@@ -474,7 +474,7 @@
     @Test
     public void testSearchValue() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         // Setting up search controls for compare op
         SearchControls ctls = new SearchControls();
@@ -613,7 +613,7 @@
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
         controls.setReturningAttributes( new String[] { "objectClasses" } );
 
-        LdapContext ctx = getWiredContext( ldapServer );
+        LdapContext ctx = getWiredContext( ldapService );
 
         NamingEnumeration<SearchResult> results = ctx.search( "cn=schema", "objectClass=subschema", controls );
         assertTrue( results.hasMore() );
@@ -646,7 +646,7 @@
      */
     private void createAccessControlSubentry( String cn, String subtree, String aciItem ) throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         DirContext adminCtx = ctx;
 
@@ -679,7 +679,7 @@
     @Test
     public void testAddWithObjectclasses() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         SearchControls ctls = new SearchControls();
         ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -715,7 +715,7 @@
     @Test
     public void testAddWithMissingObjectclasses() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         String rdn = "cn=Kate Bush";
         SearchControls ctls = new SearchControls();
@@ -748,7 +748,7 @@
     @Test
     public void testSubentryControl() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         // create a real access control subentry
         createAccessControlSubentry( 
@@ -810,7 +810,7 @@
     @Test
     public void testMultiValuedRdnContent() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         Attributes attrs = getPersonAttributes( "Bush", "Kate Bush" );
         String rdn = "cn=Kate Bush+sn=Bush";
@@ -844,7 +844,7 @@
     @Test
     public void testMultiValuedRdnName() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         Attributes attrs = getPersonAttributes( "Bush", "Kate Bush" );
         String rdn = "cn=Kate Bush+sn=Bush";
@@ -875,7 +875,7 @@
     @Test
     public void testSearchJpeg() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -908,7 +908,7 @@
     @Test
     public void testSearchOID() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -935,7 +935,7 @@
     @Test
     public void testSearchAttrCN() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -963,7 +963,7 @@
     @Test
     public void testSearchAttrName() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -994,7 +994,7 @@
     @Test
     public void testSearchAttrCommonName() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -1028,7 +1028,7 @@
     @Test
     public void testSearchAttrOID() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -1061,7 +1061,7 @@
     @Test
     public void testSearchAttrC_L() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         // create administrative area
         Attributes aaAttrs = new BasicAttributes( true );
@@ -1117,7 +1117,7 @@
     @Test
     public void testSearchUsersAttrs() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -1150,7 +1150,7 @@
     @Test
     public void testSearchOperationalAttrs() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -1183,7 +1183,7 @@
     @Test
     public void testSearchAllAttrs() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -1216,7 +1216,7 @@
     @Test
     public void testSearchBadDN() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         
@@ -1234,7 +1234,7 @@
     @Test
     public void testSearchInvalidDN() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
 
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
@@ -1257,7 +1257,7 @@
     @Test
     public void testSearchOperationalAttributes() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
         SearchControls ctls = new SearchControls();
 
         ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -1290,7 +1290,7 @@
     @Test
     public void testSearchUserAttributes() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
         SearchControls ctls = new SearchControls();
 
         ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -1323,7 +1323,7 @@
     @Test
     public void testSearchOperationalAndUserAttributes() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
         SearchControls ctls = new SearchControls();
  
         ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -1388,7 +1388,7 @@
     @Test
     public void testMissingAnyInSubstring_DIRSERVER_1180() throws Exception
     {
-        LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
+        LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
         Attributes attrs = new BasicAttributes( "objectClass", "inetOrgPerson", true );
         attrs.get( "objectClass" ).add( "organizationalPerson" );
         attrs.get( "objectClass" ).add( "person" );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchLimitsIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchLimitsIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchLimitsIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchLimitsIT.java Sun Sep  7 12:00:21 2008
@@ -35,7 +35,7 @@
 import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
 import static org.junit.Assert.*;
 
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -115,7 +115,7 @@
 )
 public class SearchLimitsIT 
 {
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
 
     
     /**
@@ -168,19 +168,19 @@
     @Before
     public void setUp() throws Exception
     {
-        oldMaxTimeLimit = ldapServer.getMaxTimeLimit();
-        oldMaxSizeLimit = ldapServer.getMaxSizeLimit();
+        oldMaxTimeLimit = ldapService.getMaxTimeLimit();
+        oldMaxSizeLimit = ldapService.getMaxSizeLimit();
         delayInterceptor = new DelayInducingInterceptor();
-        ldapServer.getDirectoryService().getInterceptorChain().addFirst( delayInterceptor );
+        ldapService.getDirectoryService().getInterceptorChain().addFirst( delayInterceptor );
     }
     
     
     @After
     public void tearDown() throws Exception
     {
-        ldapServer.setMaxTimeLimit( oldMaxTimeLimit );
-        ldapServer.setMaxSizeLimit( oldMaxSizeLimit );
-        ldapServer.getDirectoryService().getInterceptorChain().remove( DelayInducingInterceptor.class.getName() );
+        ldapService.setMaxTimeLimit( oldMaxTimeLimit );
+        ldapService.setMaxSizeLimit( oldMaxSizeLimit );
+        ldapService.getDirectoryService().getInterceptorChain().remove( DelayInducingInterceptor.class.getName() );
     }
     
 
@@ -197,7 +197,7 @@
     @Test ( expected = TimeLimitExceededException.class )
     public void testRequestConstrainedUnlimitByConfiguration() throws Exception
     {
-        ldapServer.setMaxTimeLimit( LdapServer.NO_TIME_LIMIT );
+        ldapService.setMaxTimeLimit( LdapService.NO_TIME_LIMIT );
         delayInterceptor.setDelayMillis( 500 );
         
         getActorsWithLimit( "(objectClass=*)", 499, 0 );
@@ -212,7 +212,7 @@
     @Test ( expected = TimeLimitExceededException.class )
     public void testRequestConstrainedLessThanConfiguration() throws Exception
     {
-        ldapServer.setMaxTimeLimit( 10000 ); // this is in seconds
+        ldapService.setMaxTimeLimit( 10000 ); // this is in seconds
         delayInterceptor.setDelayMillis( 500 );
         
         getActorsWithLimit( "(objectClass=*)", 499, 0 );
@@ -227,7 +227,7 @@
     @Test ( expected = TimeLimitExceededException.class )
     public void testRequestConstrainedGreaterThanConfiguration() throws Exception
     {
-        ldapServer.setMaxTimeLimit( 1 ); // this is in seconds
+        ldapService.setMaxTimeLimit( 1 ); // this is in seconds
         delayInterceptor.setDelayMillis( 1100 );
         
         getActorsWithLimit( "(objectClass=*)", 100000, 0 );
@@ -241,7 +241,7 @@
     @Test 
     public void testRequestUnlimitedConfigurationLimited() throws Exception
     {
-        ldapServer.setMaxTimeLimit( 1 ); // this is in seconds
+        ldapService.setMaxTimeLimit( 1 ); // this is in seconds
         delayInterceptor.setDelayMillis( 500 );
         
         getActorsWithLimit( "(objectClass=*)", 0, 0 );
@@ -255,7 +255,7 @@
     @Test ( expected = TimeLimitExceededException.class ) 
     public void testNonAdminRequestUnlimitedConfigurationLimited() throws Exception
     {
-        ldapServer.setMaxTimeLimit( 1 ); // this is in seconds
+        ldapService.setMaxTimeLimit( 1 ); // this is in seconds
         delayInterceptor.setDelayMillis( 500 );
         
         getActorsWithLimitNonAdmin( "(objectClass=*)", 0, 0 );
@@ -275,7 +275,7 @@
     @Test ( expected = SizeLimitExceededException.class )
     public void testRequestConstrainedUnlimitByConfigurationSize() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        ldapService.setMaxSizeLimit( LdapService.NO_SIZE_LIMIT );
         getActorsWithLimit( "(objectClass=*)", 0,  1 );
     }
     
@@ -288,7 +288,7 @@
     @Test ( expected = SizeLimitExceededException.class )
     public void testRequestConstrainedLessThanConfigurationSize() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 10000 ); 
+        ldapService.setMaxSizeLimit( 10000 ); 
         getActorsWithLimit( "(objectClass=*)", 0, 1 );
     }
 
@@ -301,7 +301,7 @@
     @Test
     public void testRequestConstrainedGreaterThanConfigurationSize() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 1 ); 
+        ldapService.setMaxSizeLimit( 1 ); 
         Set<String> set = getActorsWithLimit( "(objectClass=*)", 0, 100000 );
         assertEquals( 4, set.size() );
     }
@@ -315,7 +315,7 @@
     @Test ( expected = SizeLimitExceededException.class )
     public void testNonAdminRequestConstrainedGreaterThanConfigurationSize() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 1 ); 
+        ldapService.setMaxSizeLimit( 1 ); 
         getActorsWithLimitNonAdmin( "(objectClass=*)", 0, 100000 );
     }
 
@@ -327,7 +327,7 @@
     @Test 
     public void testRequestUnlimitedConfigurationLimitedSize() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 1 ); 
+        ldapService.setMaxSizeLimit( 1 ); 
         Set<String> set = getActorsWithLimit( "(objectClass=*)", 0, 0 );
         assertEquals( 4, set.size() );
     }
@@ -340,7 +340,7 @@
     @Test ( expected = SizeLimitExceededException.class ) 
     public void testNonAdminRequestUnlimitedConfigurationLimitedSize() throws Exception
     {
-        ldapServer.setMaxSizeLimit( 1 ); // this is in seconds
+        ldapService.setMaxSizeLimit( 1 ); // this is in seconds
         getActorsWithLimitNonAdmin( "(objectClass=*)", 0, 0 );
     }
 
@@ -354,7 +354,7 @@
     @Test(expected = SizeLimitExceededException.class)
     public void testRequestConstraintedLessThanExpectedSize() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        ldapService.setMaxSizeLimit( LdapService.NO_SIZE_LIMIT );
         getActorsWithLimit( "(objectClass=*)", 0, 3 );
     }
 
@@ -368,7 +368,7 @@
     @Test
     public void testRequestConstraintedEqualToExpectedSize() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        ldapService.setMaxSizeLimit( LdapService.NO_SIZE_LIMIT );
         Set<String> set = getActorsWithLimit( "(objectClass=*)", 0, 4 );
         assertEquals( 4, set.size() );
     }
@@ -383,7 +383,7 @@
     @Test
     public void testRequestConstraintedGreaterThanExpectedSize() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        ldapService.setMaxSizeLimit( LdapService.NO_SIZE_LIMIT );
         Set<String> set = getActorsWithLimit( "(objectClass=*)", 0, 5 );
         assertEquals( 4, set.size() );
     }
@@ -397,9 +397,9 @@
     @Test
     public void testRequestObjectScopeAndSizeLimit() throws Exception
     {
-        ldapServer.setMaxSizeLimit( LdapServer.NO_SIZE_LIMIT );
+        ldapService.setMaxSizeLimit( LdapService.NO_SIZE_LIMIT );
 
-        DirContext ctx = getWiredContext( ldapServer );
+        DirContext ctx = getWiredContext( ldapService );
         String filter = "(objectClass=*)";
         SearchControls controls = new SearchControls();
         controls.setTimeLimit( 0 );
@@ -420,7 +420,7 @@
     
     private Set<String> getActorsWithLimit( String filter, int timeLimitMillis, int sizeLimit ) throws Exception
     {
-        DirContext ctx = getWiredContext( ldapServer );
+        DirContext ctx = getWiredContext( ldapService );
         Set<String> results = new HashSet<String>();
         SearchControls controls = new SearchControls();
         controls.setTimeLimit( timeLimitMillis );
@@ -440,7 +440,7 @@
     private Set<String> getActorsWithLimitNonAdmin( String filter, int timeLimitMillis, int sizeLimit ) 
         throws Exception
     {
-        DirContext ctx = getWiredContext( ldapServer, "uid=jblack,ou=actors,ou=system", "secret" );
+        DirContext ctx = getWiredContext( ldapService, "uid=jblack,ou=actors,ou=system", "secret" );
         Set<String> results = new HashSet<String>();
         SearchControls controls = new SearchControls();
         controls.setTimeLimit( timeLimitMillis );

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsIT.java?rev=692919&r1=692918&r2=692919&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/ssl/LdapsIT.java Sun Sep  7 12:00:21 2008
@@ -28,7 +28,7 @@
 import org.apache.directory.server.core.integ.annotations.Factory;
 import org.apache.directory.server.integ.LdapServerFactory;
 import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.ldap.LdapService;
 import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.SimpleMechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.cramMD5.CramMd5MechanismHandler;
@@ -72,12 +72,12 @@
     private static final String RDN = "cn=The Person";
 
     
-    public static LdapServer ldapServer;
+    public static LdapService ldapService;
 
     
     public static class Factory implements LdapServerFactory
     {
-        public LdapServer newInstance() throws Exception
+        public LdapService newInstance() throws Exception
         {
             DirectoryService service = new DefaultDirectoryService();
             IntegrationUtils.doDelete( service.getWorkingDirectory() );
@@ -88,14 +88,14 @@
             // on the system and somewhere either under target directory
             // or somewhere in a temp area of the machine.
 
-            LdapServer ldapServer = new LdapServer();
-            ldapServer.setDirectoryService( service );
-            ldapServer.setSocketAcceptor( new SocketAcceptor( null ) );
-            ldapServer.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
-            ldapServer.setEnabled( true );
-            ldapServer.setEnableLdaps( true );
-            ldapServer.setConfidentialityRequired( true );
-            ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
+            LdapService ldapService = new LdapService();
+            ldapService.setDirectoryService( service );
+            ldapService.setSocketAcceptor( new SocketAcceptor( null ) );
+            ldapService.setIpPort( AvailablePortFinder.getNextAvailable( 1024 ) );
+            ldapService.setEnabled( true );
+            ldapService.setEnableLdaps( true );
+            ldapService.setConfidentialityRequired( true );
+            ldapService.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
 
             // Setup SASL Mechanisms
             
@@ -115,9 +115,9 @@
             mechanismHandlerMap.put( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
             mechanismHandlerMap.put( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler );
 
-            ldapServer.setSaslMechanismHandlers( mechanismHandlerMap );
+            ldapService.setSaslMechanismHandlers( mechanismHandlerMap );
 
-            return ldapServer;
+            return ldapService;
         }
     }
     
@@ -129,7 +129,7 @@
     {
         Hashtable<String, String> env = new Hashtable<String, String>();
         env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( "java.naming.provider.url", "ldap://localhost:" + ldapServer.getIpPort() + "/ou=system" );
+        env.put( "java.naming.provider.url", "ldap://localhost:" + ldapService.getIpPort() + "/ou=system" );
         env.put( "java.naming.ldap.factory.socket", SSLSocketFactory.class.getName() );
         env.put( "java.naming.security.principal", "uid=admin,ou=system" );
         env.put( "java.naming.security.credentials", "secret" );



Mime
View raw message