You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2009/06/14 11:14:34 UTC
svn commit: r784530 [3/5] - in /directory:
apacheds/trunk/core/src/main/java/org/apache/directory/server/core/
apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/
apacheds/trunk/core/src/test/java/org/apache/directory/serv...
Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java?rev=784530&r1=784529&r2=784530&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/KeyDerivationServiceIT.java Sun Jun 14 09:14:31 2009
@@ -41,7 +41,7 @@
import org.apache.directory.server.kerberos.shared.io.decoder.EncryptionKeyDecoder;
import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
import org.apache.directory.server.kerberos.shared.store.KerberosAttribute;
-import org.apache.directory.server.ldap.LdapService;
+import org.apache.directory.server.ldap.LdapServer;
import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
import org.apache.directory.server.ldap.handlers.bind.cramMD5.CramMd5MechanismHandler;
import org.apache.directory.server.ldap.handlers.bind.digestMD5.DigestMd5MechanismHandler;
@@ -106,12 +106,12 @@
private static final String RDN = "uid=hnelson,ou=users,dc=example,dc=com";
- public static LdapService ldapService;
+ public static LdapServer ldapServer;
public static class Factory implements LdapServerFactory
{
- public LdapService newInstance() throws Exception
+ public LdapServer newInstance() throws Exception
{
DirectoryService service = new DefaultDirectoryService();
IntegrationUtils.doDelete( service.getWorkingDirectory() );
@@ -141,12 +141,12 @@
// on the system and somewhere either under target directory
// or somewhere in a temp area of the machine.
- LdapService ldapService = new LdapService();
- ldapService.setDirectoryService( service );
+ LdapServer ldapServer = new LdapServer();
+ ldapServer.setDirectoryService( service );
int port = AvailablePortFinder.getNextAvailable( 1024 );
- ldapService.setTcpTransport( new TcpTransport( port ) );
- ldapService.setAllowAnonymousAccess( false );
- ldapService.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
+ ldapServer.setTransports( new TcpTransport( port ) );
+ ldapServer.setAllowAnonymousAccess( false );
+ ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
// Setup SASL Mechanisms
@@ -166,10 +166,10 @@
mechanismHandlerMap.put( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
mechanismHandlerMap.put( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler );
- ldapService.setSaslMechanismHandlers( mechanismHandlerMap );
- ldapService.setSaslHost( "localhost" );
+ ldapServer.setSaslMechanismHandlers( mechanismHandlerMap );
+ ldapServer.setSaslHost( "localhost" );
- return ldapService;
+ return ldapServer;
}
}
@@ -209,7 +209,7 @@
@Before
public void setUp() throws Exception
{
- DirContext schemaRoot = ( DirContext ) getWiredContext( ldapService ).lookup( "ou=schema" );
+ DirContext schemaRoot = ( DirContext ) getWiredContext( ldapServer ).lookup( "ou=schema" );
// -------------------------------------------------------------------
// Enable the krb5kdc schema
@@ -233,7 +233,7 @@
schemaRoot.modifyAttributes( "cn=Krb5kdc", mods );
}
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( "dc=example,dc=com" );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( "dc=example,dc=com" );
Attributes attrs = getOrgUnitAttributes( "users" );
DirContext users = ctx.createSubcontext( "ou=users", attrs );
@@ -253,7 +253,7 @@
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "simple" );
env.put( Context.SECURITY_PRINCIPAL, "uid=hnelson,ou=users,dc=example,dc=com" );
@@ -324,7 +324,7 @@
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "simple" );
env.put( Context.SECURITY_PRINCIPAL, "uid=hnelson,ou=users,dc=example,dc=com" );
@@ -461,7 +461,7 @@
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "simple" );
env.put( Context.SECURITY_PRINCIPAL, "uid=hnelson,ou=users,dc=example,dc=com" );
@@ -590,7 +590,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:" + ldapService.getPort() + "/ou=users,dc=example,dc=com" );
+ env.put( "java.naming.provider.url", "ldap://localhost:" + ldapServer.getPort() + "/ou=users,dc=example,dc=com" );
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/kerberos/PasswordPolicyServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java?rev=784530&r1=784529&r2=784530&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/kerberos/PasswordPolicyServiceIT.java Sun Jun 14 09:14:31 2009
@@ -36,7 +36,7 @@
import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
import org.apache.directory.server.integ.LdapServerFactory;
import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapService;
+import org.apache.directory.server.ldap.LdapServer;
import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
import org.apache.directory.server.ldap.handlers.bind.cramMD5.CramMd5MechanismHandler;
import org.apache.directory.server.ldap.handlers.bind.digestMD5.DigestMd5MechanismHandler;
@@ -94,12 +94,12 @@
private DirContext users;
- public static LdapService ldapService;
+ public static LdapServer ldapServer;
public static class Factory implements LdapServerFactory
{
- public LdapService newInstance() throws Exception
+ public LdapServer 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.
- LdapService ldapService = new LdapService();
- ldapService.setDirectoryService( service );
+ LdapServer ldapServer = new LdapServer();
+ ldapServer.setDirectoryService( service );
int port = AvailablePortFinder.getNextAvailable( 1024 );
- ldapService.setTcpTransport( new TcpTransport( port ) );
- ldapService.setAllowAnonymousAccess( false );
- ldapService.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
+ ldapServer.setTransports( new TcpTransport( port ) );
+ ldapServer.setAllowAnonymousAccess( false );
+ ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
// Setup SASL Mechanisms
@@ -154,10 +154,10 @@
mechanismHandlerMap.put( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
mechanismHandlerMap.put( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler );
- ldapService.setSaslMechanismHandlers( mechanismHandlerMap );
- ldapService.setSaslHost( "localhost" );
+ ldapServer.setSaslMechanismHandlers( mechanismHandlerMap );
+ ldapServer.setSaslHost( "localhost" );
- return ldapService;
+ return ldapServer;
}
}
@@ -172,7 +172,7 @@
Attributes attrs;
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:" + ldapService.getPort() + "/dc=example,dc=com" );
+ env.put( "java.naming.provider.url", "ldap://localhost:" + ldapServer.getPort() + "/dc=example,dc=com" );
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/add/AddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java?rev=784530&r1=784529&r2=784530&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java Sun Jun 14 09:14:31 2009
@@ -74,9 +74,8 @@
import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
import org.apache.directory.server.integ.LdapServerFactory;
-import org.apache.directory.server.integ.ServerIntegrationUtils;
import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapService;
+import org.apache.directory.server.ldap.LdapServer;
import org.apache.directory.server.ldap.handlers.extended.StoredProcedureExtendedOperationHandler;
import org.apache.directory.server.protocol.shared.transport.TcpTransport;
import org.apache.directory.server.xdbm.Index;
@@ -160,7 +159,7 @@
private static final String BASE_DIRECTORY_APACHE_ORG = "dc=directory,dc=apache,dc=org";
- public static LdapService ldapService;
+ public static LdapServer ldapServer;
/**
@@ -169,7 +168,7 @@
*/
public static class Factory implements LdapServerFactory
{
- public LdapService newInstance() throws Exception
+ public LdapServer newInstance() throws Exception
{
DirectoryService service = new DefaultDirectoryService();
IntegrationUtils.doDelete( service.getWorkingDirectory() );
@@ -205,14 +204,14 @@
// on the system and somewhere either under target directory
// or somewhere in a temp area of the machine.
- LdapService ldapService = new LdapService();
- ldapService.setDirectoryService( service );
+ LdapServer ldapServer = new LdapServer();
+ ldapServer.setDirectoryService( service );
int port = AvailablePortFinder.getNextAvailable( 1024 );
- ldapService.setTcpTransport( new TcpTransport( port ) );
- ldapService.setAllowAnonymousAccess( true );
- ldapService.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
+ ldapServer.setTransports( new TcpTransport( port ) );
+ ldapServer.setAllowAnonymousAccess( true );
+ ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
- return ldapService;
+ return ldapServer;
}
}
@@ -225,7 +224,7 @@
@Test
public void testAddObjectClasses() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// modify object classes, add two more
Attributes attributes = new BasicAttributes( true );
@@ -259,7 +258,7 @@
@Test
public void testModifyDescription() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
String newDescription = "More info on the user ...";
@@ -288,7 +287,7 @@
@Test
public void testAddWithMissingRequiredAttributes() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// person without sn
Attributes attrs = new BasicAttributes( true );
@@ -320,7 +319,7 @@
@Test
public void testAddEntryWithTwoDescriptions() throws Exception
{
- LDAPConnection con = getWiredConnection( ldapService );
+ LDAPConnection con = getWiredConnection( ldapServer );
LDAPAttributeSet attrs = new LDAPAttributeSet();
LDAPAttribute ocls = new LDAPAttribute( "objectclass", new String[]
{ "top", "person" } );
@@ -362,7 +361,7 @@
@Test
public void testAddEntryWithTwoDescriptionsVariant() throws Exception
{
- LDAPConnection con = getWiredConnection( ldapService );
+ LDAPConnection con = getWiredConnection( ldapServer );
LDAPAttributeSet attrs = new LDAPAttributeSet();
LDAPAttribute ocls = new LDAPAttribute( "objectclass", new String[]
{ "top", "person" } );
@@ -405,7 +404,7 @@
@Test
public void testAddEntryWithTwoDescriptionsSecondVariant() throws Exception
{
- LDAPConnection con = getWiredConnection( ldapService );
+ LDAPConnection con = getWiredConnection( ldapServer );
LDAPAttributeSet attrs = new LDAPAttributeSet();
LDAPAttribute ocls = new LDAPAttribute( "objectclass", new String[]
{ "top", "person" } );
@@ -447,7 +446,7 @@
@Test
public void testAddWithInvalidNumberOfAttributeValues() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// add inetOrgPerson with two displayNames
Attributes attrs = new BasicAttributes( true );
@@ -481,7 +480,7 @@
@Test
public void testAddAlias() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// Create entry
Attributes entry = new BasicAttributes( true );
@@ -521,7 +520,7 @@
@Test
public void testAddAliasInContainer() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// Create container
Attributes container = new BasicAttributes( true );
@@ -588,7 +587,7 @@
ne = containerCtx.search( "ou=bestFruit", "(objectClass=*)", controls );
assertTrue( ne.hasMore() );
sr = ne.next();
- assertEquals( "ldap://localhost:"+ ldapService.getPort() +"/ou=favorite,ou=Fruits,ou=system", sr.getName() );
+ assertEquals( "ldap://localhost:"+ ldapServer.getPort() +"/ou=favorite,ou=Fruits,ou=system", sr.getName() );
assertFalse( ne.hasMore() );
// Remove alias and entry
@@ -610,7 +609,7 @@
@Test
public void testAddDeleteAlias() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// Create entry ou=favorite,ou=system
Attributes entry = new BasicAttributes( true );
@@ -653,7 +652,7 @@
public void testAddDeleteAlias2() throws Exception
{
// use a partition with suffix size 2
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE_EXAMPLE_COM );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE_EXAMPLE_COM );
// Create entry ou=favorite,dc=example,dc=com
Attributes entry = new BasicAttributes( true );
@@ -696,7 +695,7 @@
public void testAddDeleteAlias3() throws Exception
{
// use a partition with suffix size 3
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE_DIRECTORY_APACHE_ORG );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE_DIRECTORY_APACHE_ORG );
// Create entry ou=favorite,dc=directory,dc=apache,dc=org
Attributes entry = new BasicAttributes( true );
@@ -733,7 +732,7 @@
@Test
public void testOnReferralWithManageDsaITControl() throws Exception
{
- LDAPConnection conn = getWiredConnection( ldapService );
+ LDAPConnection conn = getWiredConnection( ldapServer );
LDAPConstraints constraints = new LDAPSearchConstraints();
constraints.setClientControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
constraints.setServerControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
@@ -799,7 +798,7 @@
@Test
public void testOnReferralWitJNDIIgnore() throws Exception
{
- LdapContext MNNCtx = getContext( ServerDNConstants.ADMIN_SYSTEM_DN, ldapService.getDirectoryService(), "uid=akarasuluref,ou=users,ou=system" );
+ LdapContext MNNCtx = getContext( ServerDNConstants.ADMIN_SYSTEM_DN, ldapServer.getDirectoryService(), "uid=akarasuluref,ou=users,ou=system" );
// Set to 'ignore'
MNNCtx.addToEnvironment( Context.REFERRAL, "ignore" );
@@ -830,7 +829,7 @@
{
LOG.debug( "" );
- LDAPConnection conn = getWiredConnection( ldapService );
+ LDAPConnection conn = getWiredConnection( ldapServer );
LDAPConstraints constraints = new LDAPConstraints();
conn.setConstraints( constraints );
@@ -863,7 +862,7 @@
@Test
public void testOnReferral() throws Exception
{
- LDAPConnection conn = getWiredConnection( ldapService );
+ LDAPConnection conn = getWiredConnection( ldapServer );
LDAPConstraints constraints = new LDAPConstraints();
constraints.setReferrals( false );
conn.setConstraints( constraints );
@@ -898,7 +897,7 @@
@Test
public void testThrowOnReferralWithJndi() throws Exception
{
- LdapContext ctx = getWiredContextThrowOnRefferal( ldapService );
+ LdapContext ctx = getWiredContextThrowOnRefferal( ldapServer );
SearchControls controls = new SearchControls();
controls.setReturningAttributes( new String[0] );
controls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -930,7 +929,7 @@
@Test
public void testDIRSERVER_1183() throws Exception
{
- LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
+ LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
Attributes attrs = new BasicAttributes( "objectClass", "inetOrgPerson", true );
attrs.get( "objectClass" ).add( "organizationalPerson" );
attrs.get( "objectClass" ).add( "person" );
@@ -948,7 +947,7 @@
@Test
public void testAddEntryNoRDNInEntry() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// Create a person
Attributes person = new BasicAttributes( "objectClass", "inetOrgPerson", true );
@@ -986,7 +985,7 @@
@Test
public void testAddEntryDifferentRDNInEntry() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// Create a person
Attributes person = new BasicAttributes( "objectClass", "inetOrgPerson", true );
@@ -1031,7 +1030,7 @@
@Test
public void testAddEntryDifferentRDNSingleValuedInEntry() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// Create a person
Attributes person = new BasicAttributes( "objectClass", "inetOrgPerson", true );
@@ -1072,7 +1071,7 @@
@Test
public void testAddEntryComposedRDN() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// Create a person
Attributes person = new BasicAttributes( "objectClass", "inetOrgPerson", true );
@@ -1122,8 +1121,8 @@
public void testAddPDUExceedingMaxSize() throws Exception
{
// Limit the PDU size to 1024
- ldapService.getDirectoryService().setMaxPDUSize( 1024 );
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ ldapServer.getDirectoryService().setMaxPDUSize( 1024 );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// modify object classes, add two more
Attributes attributes = new BasicAttributes( true );
@@ -1154,9 +1153,9 @@
// Test again with a bigger size
// Limit the PDU size to 1024
- ldapService.getDirectoryService().setMaxPDUSize( 4096 );
+ ldapServer.getDirectoryService().setMaxPDUSize( 4096 );
- ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
person = ( DirContext ) ctx.lookup( RDN );
try
@@ -1170,7 +1169,7 @@
}
// Read again from directory
- ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
person = ( DirContext ) ctx.lookup( RDN );
assertNotNull( person );
@@ -1190,7 +1189,7 @@
@Test
public void testAddUnescapedRdnValue_DIRSERVER_1311() throws Exception
{
- LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( BASE );
+ LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( BASE );
Attributes tori = new BasicAttributes( true );
Attribute toriOC = new BasicAttribute( "objectClass" );
@@ -1288,7 +1287,7 @@
@Test
public void test_DIRSERVER_1357() throws Exception
{
- DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
+ DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
Attributes salesAttrs = getOrgUnitAttributes( "sales" );
ctx.createSubcontext( "ou=sales", salesAttrs );
Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java?rev=784530&r1=784529&r2=784530&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddingEntriesWithSpecialCharactersInRDNIT.java Sun Jun 14 09:14:31 2009
@@ -38,7 +38,7 @@
import org.apache.directory.server.core.integ.annotations.CleanupLevel;
import org.apache.directory.server.integ.ServerIntegrationUtils;
import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapService;
+import org.apache.directory.server.ldap.LdapServer;
import org.apache.directory.shared.ldap.name.LdapDN;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -54,7 +54,7 @@
@CleanupLevel( Level.CLASS )
public class AddingEntriesWithSpecialCharactersInRDNIT
{
- public static LdapService ldapService;
+ public static LdapServer ldapServer;
protected Attributes getPersonAttributes( String sn, String cn )
@@ -92,7 +92,7 @@
@Test
public void testAddingWithHashRdn() throws Exception
{
- DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
+ DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
Attributes attrs = getPersonAttributes( "Bush", "Kate#Bush" );
String rdn = "cn=Kate\\#Bush";
@@ -127,7 +127,7 @@
@Test
public void testAddingWithCommaInRdn() throws Exception
{
- DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
+ DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
Attributes attrs = getPersonAttributes( "Bush", "Bush, Kate" );
String rdn = "cn=Bush\\, Kate";
@@ -161,7 +161,7 @@
@Test
public void testAddingWithQuotesInRdn() throws Exception
{
- DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
+ DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
Attributes attrs = getPersonAttributes( "Messer", "Mackie \"The Knife\" Messer" );
String rdn = "cn=Mackie \\\"The Knife\\\" Messer";
@@ -198,7 +198,7 @@
@Test
public void testAddingWithBackslashInRdn() throws Exception
{
- DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
+ DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
Attributes attrs = getOrgUnitAttributes( "AC\\DC" );
String rdn = "ou=AC\\\\DC";
@@ -236,7 +236,7 @@
@Test
public void testAddingWithGreaterSignInRdn() throws Exception
{
- DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
+ DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
Attributes attrs = getOrgUnitAttributes( "East -> West" );
String rdn = "ou=East -\\> West";
@@ -271,7 +271,7 @@
@Test
public void testAddingWithLessSignInRdn() throws Exception
{
- DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
+ DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
Attributes attrs = getOrgUnitAttributes( "Scissors 8<" );
String rdn = "ou=Scissors 8\\<";
@@ -306,7 +306,7 @@
@Test
public void testAddingWithSemicolonInRdn() throws Exception
{
- DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
+ DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
Attributes attrs = getOrgUnitAttributes( "semicolon group;" );
String rdn = "ou=semicolon group\\;";
@@ -341,7 +341,7 @@
@Test
public void testAddingWithEqualsInRdn() throws Exception
{
- DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
+ DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
Attributes attrs = getOrgUnitAttributes( "nomen=omen" );
String rdn = "ou=nomen\\=omen";
Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java?rev=784530&r1=784529&r2=784530&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java Sun Jun 14 09:14:31 2009
@@ -32,7 +32,7 @@
import org.apache.directory.server.core.integ.annotations.CleanupLevel;
import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapService;
+import org.apache.directory.server.ldap.LdapServer;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -79,7 +79,7 @@
)
public class BindIT
{
- public static LdapService ldapService;
+ public static LdapServer ldapServer;
/**
@@ -93,7 +93,7 @@
{
try
{
- getWiredContext( ldapService, "cn=bogus", "blah" );
+ getWiredContext( ldapServer, "cn=bogus", "blah" );
fail( "should never get here due to a " );
}
catch ( AuthenticationException e )
@@ -126,7 +126,7 @@
{
try
{
- getWiredContext( ldapService, "cn=bogus,ou=system", "blah" );
+ getWiredContext( ldapServer, "cn=bogus,ou=system", "blah" );
fail( "should never get here due to a " );
}
catch ( AuthenticationException e )
@@ -143,7 +143,7 @@
try
{
conn = new LDAPConnection();
- conn.connect( 100, "localhost", ldapService.getPort(), "uid=admin,ou=system", "secret" );
+ conn.connect( 100, "localhost", ldapServer.getPort(), "uid=admin,ou=system", "secret" );
fail( "try to connect with illegal version number should fail" );
}
catch ( LDAPException e )
@@ -174,7 +174,7 @@
try
{
- conn.connect( 3, "localhost", ldapService.getPort(),
+ conn.connect( 3, "localhost", ldapServer.getPort(),
"uid=akarasuluref,ou=users,ou=system", "secret", constraints );
fail( "try to connect with illegal version number should fail" );
}
@@ -185,7 +185,7 @@
try
{
- conn.connect( 3, "localhost", ldapService.getPort(),
+ conn.connect( 3, "localhost", ldapServer.getPort(),
"uid=akarasuluref,ou=users,ou=system", "secret" );
fail( "try to connect with illegal version number should fail" );
}
Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java?rev=784530&r1=784529&r2=784530&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/MiscBindIT.java Sun Jun 14 09:14:31 2009
@@ -48,7 +48,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.LdapService;
+import org.apache.directory.server.ldap.LdapServer;
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;
@@ -94,12 +94,12 @@
)
public class MiscBindIT
{
- public static LdapService ldapService;
+ public static LdapServer ldapServer;
public static class Factory implements LdapServerFactory
{
- public LdapService newInstance() throws Exception
+ public LdapServer newInstance() throws Exception
{
DirectoryService service = new DefaultDirectoryService();
IntegrationUtils.doDelete( service.getWorkingDirectory() );
@@ -119,12 +119,12 @@
// on the system and somewhere either under target directory
// or somewhere in a temp area of the machine.
- LdapService ldapService = new LdapService();
- ldapService.setDirectoryService( service );
+ LdapServer ldapServer = new LdapServer();
+ ldapServer.setDirectoryService( service );
int port = AvailablePortFinder.getNextAvailable( 1024 );
- ldapService.setTcpTransport( new TcpTransport( port ) );
- ldapService.setAllowAnonymousAccess( true );
- ldapService.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
+ ldapServer.setTransports( new TcpTransport( port ) );
+ ldapServer.setAllowAnonymousAccess( true );
+ ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
// Setup SASL Mechanisms
@@ -144,9 +144,9 @@
mechanismHandlerMap.put( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
mechanismHandlerMap.put( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler );
- ldapService.setSaslMechanismHandlers( mechanismHandlerMap );
+ ldapServer.setSaslMechanismHandlers( mechanismHandlerMap );
- return ldapService;
+ return ldapServer;
}
}
@@ -158,15 +158,15 @@
@Before
public void recordAnnonymous() throws NamingException
{
- oldAnnonymousAccess = ldapService.getDirectoryService().isAllowAnonymousAccess();
+ oldAnnonymousAccess = ldapServer.getDirectoryService().isAllowAnonymousAccess();
}
@After
public void revertAnonnymous()
{
- ldapService.getDirectoryService().setAllowAnonymousAccess( oldAnnonymousAccess );
- ldapService.setAllowAnonymousAccess( oldAnnonymousAccess );
+ ldapServer.getDirectoryService().setAllowAnonymousAccess( oldAnnonymousAccess );
+ ldapServer.setAllowAnonymousAccess( oldAnnonymousAccess );
}
@@ -179,14 +179,14 @@
@Test
public void testDisableAnonymousBinds() throws Exception
{
- ldapService.getDirectoryService().setAllowAnonymousAccess( false );
- ldapService.setAllowAnonymousAccess( false );
+ ldapServer.getDirectoryService().setAllowAnonymousAccess( false );
+ ldapServer.setAllowAnonymousAccess( false );
// Use the SUN JNDI provider to hit server port and bind as anonymous
InitialDirContext ic = null;
final Hashtable<String, Object> env = new Hashtable<String, Object>();
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() + "/ou=system" );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() + "/ou=system" );
env.put( Context.SECURITY_AUTHENTICATION, "none" );
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
@@ -205,7 +205,7 @@
}
}
- ldapService.getDirectoryService().setAllowAnonymousAccess( false );
+ ldapServer.getDirectoryService().setAllowAnonymousAccess( false );
try
{
@@ -241,12 +241,12 @@
@Test
public void testEnableAnonymousBindsOnRootDSE() throws Exception
{
- ldapService.getDirectoryService().setAllowAnonymousAccess( true );
+ ldapServer.getDirectoryService().setAllowAnonymousAccess( true );
// Use the SUN JNDI provider to hit server port and bind as anonymous
Hashtable<String, Object> env = new Hashtable<String, Object>();
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() + "/" );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() + "/" );
env.put( Context.SECURITY_AUTHENTICATION, "none" );
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
@@ -279,12 +279,12 @@
@Test
public void testAnonymousBindsEnabledBaseSearch() throws Exception
{
- ldapService.getDirectoryService().setAllowAnonymousAccess( true );
+ ldapServer.getDirectoryService().setAllowAnonymousAccess( true );
// Use the SUN JNDI provider to hit server port and bind as anonymous
Hashtable<String, Object> env = new Hashtable<String, Object>();
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() + "/" );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() + "/" );
env.put( Context.SECURITY_AUTHENTICATION, "none" );
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
@@ -316,13 +316,13 @@
@Test
public void testAdminAccessBug() throws Exception
{
- ldapService.getDirectoryService().setAllowAnonymousAccess( true );
+ ldapServer.getDirectoryService().setAllowAnonymousAccess( true );
// Use the SUN JNDI provider to hit server port and bind as anonymous
final Hashtable<String, Object> env = new Hashtable<String, Object>();
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
env.put( "java.naming.ldap.version", "3" );
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
@@ -357,11 +357,11 @@
@Test
public void testUserAuthOnMixedCaseSuffix() throws Exception
{
- ldapService.getDirectoryService().setAllowAnonymousAccess( true );
+ ldapServer.getDirectoryService().setAllowAnonymousAccess( true );
Hashtable<String, Object> env = new Hashtable<String, Object>();
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() + "/dc=aPache,dc=org" );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() + "/dc=aPache,dc=org" );
env.put( "java.naming.ldap.version", "3" );
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
InitialDirContext ctx = new InitialDirContext( env );
@@ -446,11 +446,11 @@
}
};
- ldapService.getDirectoryService().setAllowAnonymousAccess( true );
+ ldapServer.getDirectoryService().setAllowAnonymousAccess( true );
Hashtable<String, Object> env = new Hashtable<String, Object>();
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() + "/ou=system" );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() + "/ou=system" );
env.put( "java.naming.ldap.version", "3" );
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
env.put( Context.SECURITY_AUTHENTICATION, "simple" );
Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java?rev=784530&r1=784529&r2=784530&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java Sun Jun 14 09:14:31 2009
@@ -50,7 +50,7 @@
import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
import org.apache.directory.server.integ.LdapServerFactory;
import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapService;
+import org.apache.directory.server.ldap.LdapServer;
import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
import org.apache.directory.server.ldap.handlers.bind.cramMD5.CramMd5MechanismHandler;
import org.apache.directory.server.ldap.handlers.bind.digestMD5.DigestMd5MechanismHandler;
@@ -118,13 +118,13 @@
)
public class SaslBindIT
{
- public static LdapService ldapService;
+ public static LdapServer ldapServer;
public BogusNtlmProvider provider = new BogusNtlmProvider();
public static class Factory implements LdapServerFactory
{
- public LdapService newInstance() throws Exception
+ public LdapServer newInstance() throws Exception
{
DirectoryService service = new DefaultDirectoryService();
IntegrationUtils.doDelete( service.getWorkingDirectory() );
@@ -150,12 +150,12 @@
// on the system and somewhere either under target directory
// or somewhere in a temp area of the machine.
- LdapService ldapService = new LdapService();
+ LdapServer ldapServer = new LdapServer();
int port = AvailablePortFinder.getNextAvailable( 1024 );
- ldapService.setTcpTransport( new TcpTransport( port ) );
- ldapService.setDirectoryService( service );
- ldapService.setAllowAnonymousAccess( false );
- ldapService.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
+ ldapServer.setTransports( new TcpTransport( port ) );
+ ldapServer.setDirectoryService( service );
+ ldapServer.setAllowAnonymousAccess( false );
+ ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
// Setup SASL Mechanisms
@@ -175,10 +175,10 @@
mechanismHandlerMap.put( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
mechanismHandlerMap.put( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler );
- ldapService.setSaslMechanismHandlers( mechanismHandlerMap );
- ldapService.setSaslHost( "localhost" );
+ ldapServer.setSaslMechanismHandlers( mechanismHandlerMap );
+ ldapServer.setSaslHost( "localhost" );
- return ldapService;
+ return ldapServer;
}
}
@@ -188,7 +188,7 @@
{
provider = new BogusNtlmProvider();
NtlmMechanismHandler handler = ( NtlmMechanismHandler )
- ldapService.getSaslMechanismHandlers().get( SupportedSaslMechanisms.NTLM );
+ ldapServer.getSaslMechanismHandlers().get( SupportedSaslMechanisms.NTLM );
handler.setNtlmProvider( provider );
}
@@ -203,14 +203,14 @@
{
// We have to tell the server that it should accept anonymous
// auth, because we are reading the rootDSE
- ldapService.setAllowAnonymousAccess( true );
- ldapService.getDirectoryService().setAllowAnonymousAccess( true );
+ ldapServer.setAllowAnonymousAccess( true );
+ ldapServer.getDirectoryService().setAllowAnonymousAccess( true );
// Point on rootDSE
DirContext context = new InitialDirContext();
Attributes attrs = context.getAttributes( "ldap://localhost:"
- + ldapService.getPort(), new String[]
+ + ldapServer.getPort(), new String[]
{ "supportedSASLMechanisms" } );
NamingEnumeration<? extends Attribute> answer = attrs.getAll();
@@ -240,7 +240,7 @@
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "PLAIN" );
env.put( Context.SECURITY_PRINCIPAL, "uid=hnelson,ou=users,dc=example,dc=com" );
@@ -278,7 +278,7 @@
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "" );
env.put( Context.SECURITY_PRINCIPAL, "uid=hnelson,ou=users,dc=example,dc=com" );
@@ -304,13 +304,13 @@
@Test
public void testAnonymousBelowRootDSE()
{
- ldapService.getDirectoryService().setAllowAnonymousAccess( false );
+ ldapServer.getDirectoryService().setAllowAnonymousAccess( false );
try
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
DirContext context = new InitialDirContext( env );
@@ -342,7 +342,7 @@
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "CRAM-MD5" );
env.put( Context.SECURITY_PRINCIPAL, "hnelson" );
@@ -381,7 +381,7 @@
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "CRAM-MD5" );
env.put( Context.SECURITY_PRINCIPAL, "hnelson" );
@@ -411,7 +411,7 @@
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "DIGEST-MD5" );
env.put( Context.SECURITY_PRINCIPAL, "hnelson" );
@@ -451,7 +451,7 @@
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "DIGEST-MD5" );
env.put( Context.SECURITY_PRINCIPAL, "hnelson" );
@@ -489,7 +489,7 @@
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "DIGEST-MD5" );
env.put( Context.SECURITY_PRINCIPAL, "hnelson" );
@@ -598,8 +598,8 @@
NtlmSaslBindClient( String mechanism ) throws Exception
{
this.mechanism = mechanism;
- setDefaultPort( ldapService.getPort() );
- connect( "localhost", ldapService.getPort() );
+ setDefaultPort( ldapServer.getPort() );
+ connect( "localhost", ldapServer.getPort() );
setTcpNoDelay( false );
LOG.debug( "isConnected() = {}", isConnected() );
Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java?rev=784530&r1=784529&r2=784530&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java Sun Jun 14 09:14:31 2009
@@ -38,7 +38,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.LdapService;
+import org.apache.directory.server.ldap.LdapServer;
import static org.junit.Assert.fail;
import static org.junit.Assert.assertTrue;
@@ -74,7 +74,7 @@
private static final String BASE = "ou=users,ou=system";
- public static LdapService ldapService;
+ public static LdapServer ldapServer;
/**
@@ -121,7 +121,7 @@
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "simple" );
env.put( Context.SECURITY_PRINCIPAL, "uid=hnelson," + BASE );
env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -159,7 +159,7 @@
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "simple" );
env.put( Context.SECURITY_PRINCIPAL, "uid=hnelson," + BASE );
env.put( Context.SECURITY_CREDENTIALS, "badsecret" );
@@ -188,7 +188,7 @@
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "simple" );
env.put( Context.SECURITY_PRINCIPAL, "hnelson" );
@@ -218,7 +218,7 @@
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "simple" );
env.put( Context.SECURITY_PRINCIPAL, "uid=unknown,ou=system" );
env.put( Context.SECURITY_CREDENTIALS, "secret" );
@@ -244,13 +244,13 @@
@Test
public void testSimpleBindNoUserNoPassword()
{
- boolean oldValue = ldapService.getDirectoryService().isAllowAnonymousAccess();
- ldapService.getDirectoryService().setAllowAnonymousAccess( false );
- ldapService.setAllowAnonymousAccess( false );
+ boolean oldValue = ldapServer.getDirectoryService().isAllowAnonymousAccess();
+ ldapServer.getDirectoryService().setAllowAnonymousAccess( false );
+ ldapServer.setAllowAnonymousAccess( false );
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "simple" );
env.put( Context.SECURITY_PRINCIPAL, "" );
env.put( Context.SECURITY_CREDENTIALS, "" );
@@ -295,8 +295,8 @@
{
}
- ldapService.getDirectoryService().setAllowAnonymousAccess( oldValue );
- ldapService.setAllowAnonymousAccess( oldValue );
+ ldapServer.getDirectoryService().setAllowAnonymousAccess( oldValue );
+ ldapServer.setAllowAnonymousAccess( oldValue );
}
@@ -308,7 +308,7 @@
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "simple" );
env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
env.put( Context.SECURITY_CREDENTIALS, "" );
@@ -338,7 +338,7 @@
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
env.put( Context.SECURITY_AUTHENTICATION, "simple" );
env.put( Context.SECURITY_PRINCIPAL, "" );
@@ -366,14 +366,14 @@
@Test
public void testAnonymousRootDSE()
{
- boolean oldValue = ldapService.getDirectoryService().isAllowAnonymousAccess();
- ldapService.getDirectoryService().setAllowAnonymousAccess( false );
+ boolean oldValue = ldapServer.getDirectoryService().isAllowAnonymousAccess();
+ ldapServer.getDirectoryService().setAllowAnonymousAccess( false );
try
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
- env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapService.getPort() );
+ env.put( Context.PROVIDER_URL, "ldap://localhost:" + ldapServer.getPort() );
DirContext context = new InitialDirContext( env );
@@ -398,7 +398,7 @@
}
finally
{
- ldapService.getDirectoryService().setAllowAnonymousAccess( oldValue );
+ ldapServer.getDirectoryService().setAllowAnonymousAccess( oldValue );
}
}
}
Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/compare/CompareIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/compare/CompareIT.java?rev=784530&r1=784529&r2=784530&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/compare/CompareIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/compare/CompareIT.java Sun Jun 14 09:14:31 2009
@@ -38,7 +38,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.LdapService;
+import org.apache.directory.server.ldap.LdapServer;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -92,7 +92,7 @@
{
private static final Logger LOG = LoggerFactory.getLogger( CompareIT.class );
- public static LdapService ldapService;
+ public static LdapServer ldapServer;
/**
@@ -102,7 +102,7 @@
@Test
public void testNormalCompare() throws Exception
{
- LDAPConnection conn = getWiredConnection( ldapService );
+ LDAPConnection conn = getWiredConnection( ldapServer );
// comparison success
LDAPAttribute attribute = new LDAPAttribute( "sn", "karasulu" );
@@ -124,7 +124,7 @@
@Test
public void testNormalCompareMissingAttribute() throws Exception
{
- LDAPConnection conn = getWiredConnection( ldapService );
+ LDAPConnection conn = getWiredConnection( ldapServer );
// comparison success
LDAPAttribute attribute = new LDAPAttribute( "sn", "karasulu" );
@@ -153,7 +153,7 @@
@Test
public void testOnReferralWithManageDsaITControl() throws Exception
{
- LDAPConnection conn = getWiredConnection( ldapService );
+ LDAPConnection conn = getWiredConnection( ldapServer );
LDAPConstraints constraints = new LDAPConstraints();
constraints.setClientControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
constraints.setServerControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
@@ -179,7 +179,7 @@
@Test
public void testOnReferral() throws Exception
{
- LDAPConnection conn = getWiredConnection( ldapService );
+ LDAPConnection conn = getWiredConnection( ldapServer );
LDAPConstraints constraints = new LDAPConstraints();
constraints.setReferrals( false );
conn.setConstraints( constraints );
@@ -213,7 +213,7 @@
@Test
public void testThrowOnReferralWithJndi() throws Exception
{
- LdapContext ctx = getWiredContextThrowOnRefferal( ldapService );
+ LdapContext ctx = getWiredContextThrowOnRefferal( ldapServer );
SearchControls controls = new SearchControls();
controls.setReturningAttributes( new String[0] );
controls.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -253,9 +253,9 @@
@Test
public void testCompareWithoutAuthentication() throws LDAPException
{
- ldapService.getDirectoryService().setAllowAnonymousAccess( false );
+ ldapServer.getDirectoryService().setAllowAnonymousAccess( false );
LDAPConnection conn = new LDAPConnection();
- conn.connect( "localhost", ldapService.getPort() );
+ conn.connect( "localhost", ldapServer.getPort() );
LDAPAttribute attr = new LDAPAttribute( "uid", "admin" );
try
@@ -278,7 +278,7 @@
{
LOG.debug( "" );
- LDAPConnection conn = getWiredConnection( ldapService );
+ LDAPConnection conn = getWiredConnection( ldapServer );
LDAPConstraints constraints = new LDAPConstraints();
conn.setConstraints( constraints );
Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/compare/MatchingRuleCompareIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/compare/MatchingRuleCompareIT.java?rev=784530&r1=784529&r2=784530&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/compare/MatchingRuleCompareIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/compare/MatchingRuleCompareIT.java Sun Jun 14 09:14:31 2009
@@ -31,7 +31,7 @@
import org.apache.directory.server.core.integ.annotations.CleanupLevel;
import org.apache.directory.server.integ.ServerIntegrationUtils;
import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapService;
+import org.apache.directory.server.ldap.LdapServer;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -67,7 +67,7 @@
)
public class MatchingRuleCompareIT
{
- public static LdapService ldapService;
+ public static LdapServer ldapServer;
public static final String PERSON_CN = "Tori Amos";
public static final String PERSON_SN = "Amos";
@@ -87,7 +87,7 @@
@Test
public void testCaseIgnoreMatch() throws Exception
{
- DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
+ DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
// Setting up search controls for compare op
SearchControls ctls = new SearchControls();
@@ -194,7 +194,7 @@
@Test
public void testDistinguishedNameMatch() throws Exception
{
- DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapService ).lookup( "ou=system" );
+ DirContext ctx = ( DirContext ) ServerIntegrationUtils.getWiredContext( ldapServer ).lookup( "ou=system" );
// determine member DN of person
DirContext member = ( DirContext ) ctx.lookup( PERSON_RDN );
Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/delete/DeleteIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/delete/DeleteIT.java?rev=784530&r1=784529&r2=784530&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/delete/DeleteIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/delete/DeleteIT.java Sun Jun 14 09:14:31 2009
@@ -42,7 +42,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.LdapService;
+import org.apache.directory.server.ldap.LdapServer;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -91,7 +91,7 @@
{
private static final Logger LOG = LoggerFactory.getLogger( DeleteIT.class );
- public static LdapService ldapService;
+ public static LdapServer ldapServer;
/**
@@ -101,7 +101,7 @@
@Test
public void testNormalDeleteFailContextNotEmpty() throws Exception
{
- LDAPConnection conn = getWiredConnection( ldapService );
+ LDAPConnection conn = getWiredConnection( ldapServer );
// delete failure on non-leaf entry
try
@@ -125,7 +125,7 @@
@Test
public void testNormalDelete() throws Exception
{
- LDAPConnection conn = getWiredConnection( ldapService );
+ LDAPConnection conn = getWiredConnection( ldapServer );
// delete success
conn.delete( "ou=computers,uid=akarasulu,ou=users,ou=system" );
@@ -152,7 +152,7 @@
@Test
public void testDeleteNonExistent() throws Exception
{
- LDAPConnection conn = getWiredConnection( ldapService );
+ LDAPConnection conn = getWiredConnection( ldapServer );
// delete failure non-existent entry
try
@@ -175,7 +175,7 @@
@Test
public void testOnReferralWithManageDsaITControl() throws Exception
{
- LDAPConnection conn = getWiredConnection( ldapService );
+ LDAPConnection conn = getWiredConnection( ldapServer );
LDAPConstraints constraints = new LDAPSearchConstraints();
constraints.setClientControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
constraints.setServerControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, new byte[0] ) );
@@ -206,7 +206,7 @@
@Test
public void testOnReferral() throws Exception
{
- LDAPConnection conn = getWiredConnection( ldapService );
+ LDAPConnection conn = getWiredConnection( ldapServer );
LDAPConstraints constraints = new LDAPConstraints();
constraints.setReferrals( false );
conn.setConstraints( constraints );
@@ -235,7 +235,7 @@
@Test
public void testThrowOnReferralWithJndi() throws Exception
{
- LdapContext ctx = getWiredContextThrowOnRefferal( ldapService );
+ LdapContext ctx = getWiredContextThrowOnRefferal( ldapServer );
// delete success
ctx.destroySubcontext( "ou=computers,uid=akarasulu,ou=users,ou=system" );
@@ -273,7 +273,7 @@
{
LOG.debug( "" );
- LDAPConnection conn = getWiredConnection( ldapService );
+ LDAPConnection conn = getWiredConnection( ldapServer );
LDAPConstraints constraints = new LDAPConstraints();
conn.setConstraints( constraints );
@@ -300,7 +300,7 @@
*/
public void testDeleteWithIllegalName() throws Exception
{
- LDAPConnection conn = getWiredConnection( ldapService );
+ LDAPConnection conn = getWiredConnection( ldapServer );
try
{
Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/extended/ExtendedIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/extended/ExtendedIT.java?rev=784530&r1=784529&r2=784530&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/extended/ExtendedIT.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/extended/ExtendedIT.java Sun Jun 14 09:14:31 2009
@@ -31,7 +31,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.LdapService;
+import org.apache.directory.server.ldap.LdapServer;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -48,7 +48,7 @@
@CleanupLevel ( Level.SUITE )
public class ExtendedIT
{
- public static LdapService ldapService;
+ public static LdapServer ldapServer;
/**
@@ -62,7 +62,7 @@
@Test
public void testUnknownExtendedOperation() throws Exception
{
- LdapContext ctx = ( LdapContext ) getWiredContext( ldapService ).lookup( "ou=system" );
+ LdapContext ctx = ( LdapContext ) getWiredContext( ldapServer ).lookup( "ou=system" );
try
{
ctx.extendedOperation( new UnknownExtendedOperationRequest() );
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=784530&r1=784529&r2=784530&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 Jun 14 09:14:31 2009
@@ -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.LdapService;
+import org.apache.directory.server.ldap.LdapServer;
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 LdapService ldapService;
+ public static LdapServer ldapServer;
public static class Factory implements LdapServerFactory
{
- public LdapService newInstance() throws Exception
+ public LdapServer 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.
- LdapService ldapService = new LdapService();
- ldapService.setDirectoryService( service );
+ LdapServer ldapServer = new LdapServer();
+ ldapServer.setDirectoryService( service );
int port = AvailablePortFinder.getNextAvailable( 1024 );
- ldapService.setTcpTransport( new TcpTransport( port ) );
- ldapService.setEnabled( true );
- ldapService.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
+ ldapServer.setTransports( new TcpTransport( port ) );
+ ldapServer.setEnabled( true );
+ ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
// Setup SASL Mechanisms
@@ -117,13 +117,13 @@
mechanismHandlerMap.put( SupportedSaslMechanisms.NTLM, ntlmMechanismHandler );
mechanismHandlerMap.put( SupportedSaslMechanisms.GSS_SPNEGO, ntlmMechanismHandler );
- ldapService.setSaslMechanismHandlers( mechanismHandlerMap );
+ ldapServer.setSaslMechanismHandlers( mechanismHandlerMap );
- Set<ExtendedOperationHandler> handlers = new HashSet<ExtendedOperationHandler>( ldapService.getExtendedOperationHandlers() );
+ Set<ExtendedOperationHandler> handlers = new HashSet<ExtendedOperationHandler>( ldapServer.getExtendedOperationHandlers() );
handlers.add( new StoredProcedureExtendedOperationHandler() );
- ldapService.setExtendedOperationHandlers( handlers );
+ ldapServer.setExtendedOperationHandlers( handlers );
- return ldapService;
+ return ldapServer;
}
}
@@ -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:" + ldapService.getPort() + "/ou=system" );
+ env.put( "java.naming.provider.url", "ldap://localhost:" + ldapServer.getPort() + "/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=784530&r1=784529&r2=784530&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 Jun 14 09:14:31 2009
@@ -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.LdapService;
+import org.apache.directory.server.ldap.LdapServer;
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 LdapService ldapService;
+ public static LdapServer ldapServer;
@Test
public void testIllegalModification() throws Exception
{
- LDAPConnection con = getWiredConnection( ldapService );
+ LDAPConnection con = getWiredConnection( ldapServer );
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( ldapService );
+ LDAPConnection con = getWiredConnection( ldapServer );
// 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=784530&r1=784529&r2=784530&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 Jun 14 09:14:31 2009
@@ -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.LdapService;
+import org.apache.directory.server.ldap.LdapServer;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -92,7 +92,7 @@
private static final String PERSON_DESCRIPTION = "an American singer-songwriter";
private static final String RDN_DEBBIE_HARRY = "cn=Debbie Harry";
- public static LdapService ldapService;
+ public static LdapServer ldapServer;
/**
@@ -120,7 +120,7 @@
@Test
public void testAddNewAttributeValue() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// Add telephoneNumber attribute
String newValue = "1234567890";
@@ -145,7 +145,7 @@
@Test
public void testAddNewAttributeValues() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// Add telephoneNumber attribute
String[] newValues =
@@ -176,7 +176,7 @@
@Test
public void testAddAdditionalAttributeValue() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// A new description attribute value
String newValue = "A new description for this person";
@@ -206,7 +206,7 @@
@Test
public void testAddExistingAttributeValue() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// Change description attribute
Attributes attrs = new BasicAttributes( "description", PERSON_DESCRIPTION, true );
@@ -243,7 +243,7 @@
@Test
public void testAddExistingNthAttributesDirServer664() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// Change description attribute
Attributes attrs = new BasicAttributes( true );
@@ -291,7 +291,7 @@
@Test
public void testTwoDescriptionDirServer643() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// Change description attribute
Attributes attrs = new BasicAttributes( true );
@@ -320,7 +320,7 @@
@Test
public void testAddDuplicateValueToExistingAttribute() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// modify object classes, add a new value twice
Attribute ocls = new BasicAttribute( "objectClass", "organizationalPerson" );
@@ -353,7 +353,7 @@
@Test
public void testAddDuplicateValueToNewAttribute() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// add the same description value twice
Attribute desc = new BasicAttribute( "description", "another description value besides songwriter" );
@@ -381,7 +381,7 @@
@Test
public void testSearchBadAttribute() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// Add a not existing attribute
String newValue = "unbelievable";
@@ -409,7 +409,7 @@
@Test
public void testAttributeValueMultiMofificationDIRSERVER_636() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// Create a person entry
Attributes attrs = getPersonAttributes("Bush", "Kate Bush");
@@ -463,7 +463,7 @@
@Test
public void testModifyOperationalAttributeAdd() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
ModificationItem modifyOp = new ModificationItem( DirContext.ADD_ATTRIBUTE, new BasicAttribute(
"subschemaSubentry", "cn=anotherSchema" ) );
@@ -495,7 +495,7 @@
@Test
public void testDNAttributeMemberMofificationDIRSERVER_687() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// Create a person entry
Attributes attrs = getPersonAttributes("Bush", "Kate Bush");
@@ -536,7 +536,7 @@
@Test
public void testModifyAddWithInvalidNumberOfAttributeValues() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
Attributes attrs = new BasicAttributes( true );
Attribute ocls = new BasicAttribute( "objectClass" );
@@ -572,7 +572,7 @@
@Test
public void testAddNewBinaryAttributeValue() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// Add a binary attribute
byte[] newValue = new byte[]{0x00, 0x01, 0x02, 0x03};
@@ -596,7 +596,7 @@
@Test
public void testAddNewBinaryAttributeValueAbove0x80() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).lookup( BASE );
// Add a binary attribute
byte[] newValue = new byte[]{(byte)0x80, (byte)0x81, (byte)0x82, (byte)0x83};
@@ -621,7 +621,7 @@
@Test
public void testRetrieveEntryWithBinaryAttributeValue() throws Exception
{
- DirContext ctx = ( DirContext ) getWiredContext( ldapService ).lookup( BASE );
+ DirContext ctx = ( DirContext ) getWiredContext( ldapServer ).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=784530&r1=784529&r2=784530&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 Jun 14 09:14:31 2009
@@ -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.LdapService;
+import org.apache.directory.server.ldap.LdapServer;
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 LdapService ldapService;
+ public static LdapServer ldapServer;
/**
@@ -117,7 +117,7 @@
@Test
public void testOnReferralWithManageDsaITControl() throws Exception
{
- LDAPConnection conn = getWiredConnection( ldapService );
+ LDAPConnection conn = getWiredConnection( ldapServer );
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( ldapService );
+ LDAPConnection conn = getWiredConnection( ldapServer );
LDAPConstraints constraints = new LDAPConstraints();
constraints.setReferrals( false );
conn.setConstraints( constraints );
@@ -172,7 +172,7 @@
@Test
public void testThrowOnReferralWithJndi() throws Exception
{
- LdapContext ctx = getWiredContextThrowOnRefferal( ldapService );
+ LdapContext ctx = getWiredContextThrowOnRefferal( ldapServer );
// modify failure
Attribute attr = new BasicAttribute( "description", "referral to akarasulu" );
@@ -200,7 +200,7 @@
{
LOG.debug( "" );
- LDAPConnection conn = getWiredConnection( ldapService );
+ LDAPConnection conn = getWiredConnection( ldapServer );
LDAPConstraints constraints = new LDAPConstraints();
conn.setConstraints( constraints );