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 2010/03/04 00:29:20 UTC
svn commit: r918771 [1/4] - in /directory/apacheds/trunk:
core-entry/src/main/java/org/apache/directory/server/core/entry/
core-entry/src/test/java/org/apache/directory/server/core/entry/
core-integ/src/main/java/org/apache/directory/server/core/integ/...
Author: elecharny
Date: Wed Mar 3 23:29:19 2010
New Revision: 918771
URL: http://svn.apache.org/viewvc?rev=918771&view=rev
Log:
Renamed LdapDN, applied to apachedDS
Modified:
directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ClonedServerEntry.java
directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java
directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryFactory.java
directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java
directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerSearchResult.java
directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java
directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ReferralIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/CompareReferralIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/DeleteReferralIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/ModifyReferralIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveAndRenameReferralIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveReferralIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/RenameReferralIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/SearchReferralIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/BackupUtilitiesSP.java
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/ListUtilsSP.java
directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java
directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java
directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java
directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockCoreSession.java
directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockDirectoryService.java
directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockInterceptor.java
directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockOperation.java
directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockOperationManager.java
directory/apacheds/trunk/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
directory/apacheds/trunk/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java
directory/apacheds/trunk/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyInterceptor.java
directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java
Modified: directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ClonedServerEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ClonedServerEntry.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ClonedServerEntry.java (original)
+++ directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ClonedServerEntry.java Wed Mar 3 23:29:19 2010
@@ -35,7 +35,7 @@
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.entry.Value;
import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -321,7 +321,7 @@
}
- public LdapDN getDn()
+ public DN getDn()
{
return clonedEntry.getDn();
}
@@ -393,7 +393,7 @@
}
- public void setDn( LdapDN dn )
+ public void setDn( DN dn )
{
clonedEntry.setDn( dn );
}
@@ -487,9 +487,9 @@
class EmptyEntry implements ServerEntry
{
- LdapDN dn;
+ DN dn;
- EmptyEntry( LdapDN dn )
+ EmptyEntry( DN dn )
{
this.dn = dn;
}
@@ -679,7 +679,7 @@
return null;
}
- public LdapDN getDn()
+ public DN getDn()
{
return null;
}
@@ -740,7 +740,7 @@
return Collections.emptyList();
}
- public void setDn( LdapDN dn )
+ public void setDn( DN dn )
{
this.dn = dn;
}
Modified: directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java (original)
+++ directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java Wed Mar 3 23:29:19 2010
@@ -38,8 +38,8 @@
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.entry.Value;
import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
-import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.name.LdapDNSerializer;
+import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.DnSerializer;
import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.ldap.schema.SchemaManager;
import org.apache.directory.shared.ldap.util.StringTools;
@@ -209,7 +209,7 @@
/* no protection ! */ DefaultServerEntry()
{
schemaManager = null;
- dn = LdapDN.EMPTY_LDAPDN;
+ dn = DN.EMPTY_DN;
}
@@ -226,7 +226,7 @@
public DefaultServerEntry( SchemaManager schemaManager )
{
this.schemaManager = schemaManager;
- dn = LdapDN.EMPTY_LDAPDN;
+ dn = DN.EMPTY_DN;
// Initialize the ObjectClass object
initObjectClassAT( schemaManager );
@@ -255,11 +255,11 @@
// We will clone the existing entry, because it may be normalized
if ( entry.getDn() != null )
{
- dn = (LdapDN)entry.getDn().clone();
+ dn = (DN)entry.getDn().clone();
}
else
{
- dn = LdapDN.EMPTY_LDAPDN;
+ dn = DN.EMPTY_DN;
}
if ( !dn.isNormalized( ) )
@@ -322,11 +322,11 @@
* @param registries The reference to the global registries
* @param dn The DN for this serverEntry. Can be null.
*/
- public DefaultServerEntry( SchemaManager schemaManager, LdapDN dn )
+ public DefaultServerEntry( SchemaManager schemaManager, DN dn )
{
if ( dn == null )
{
- dn = LdapDN.EMPTY_LDAPDN;
+ dn = DN.EMPTY_DN;
}
else
{
@@ -357,11 +357,11 @@
* @param dn The DN for this serverEntry. Can be null.
* @param attributeTypes The list of attributes to create, without value.
*/
- public DefaultServerEntry( SchemaManager schemaManager, LdapDN dn, AttributeType... attributeTypes )
+ public DefaultServerEntry( SchemaManager schemaManager, DN dn, AttributeType... attributeTypes )
{
if ( dn == null )
{
- dn = LdapDN.EMPTY_LDAPDN;
+ dn = DN.EMPTY_DN;
}
else
{
@@ -399,11 +399,11 @@
* @param attributeType The attribute to create, without value.
* @param upId The User Provided ID fro this AttributeType
*/
- public DefaultServerEntry( SchemaManager schemaManager, LdapDN dn, AttributeType attributeType, String upId )
+ public DefaultServerEntry( SchemaManager schemaManager, DN dn, AttributeType attributeType, String upId )
{
if ( dn == null )
{
- dn = LdapDN.EMPTY_LDAPDN;
+ dn = DN.EMPTY_DN;
}
else
{
@@ -441,11 +441,11 @@
* @param dn The DN for this serverEntry. Can be null.
* @param upIds The list of attributes to create.
*/
- public DefaultServerEntry( SchemaManager schemaManager, LdapDN dn, String... upIds )
+ public DefaultServerEntry( SchemaManager schemaManager, DN dn, String... upIds )
{
if ( dn == null )
{
- dn = LdapDN.EMPTY_LDAPDN;
+ dn = DN.EMPTY_DN;
}
else
{
@@ -473,11 +473,11 @@
* @param dn The DN for this serverEntry. Can be null
* @param attributes The list of attributes to create
*/
- public DefaultServerEntry( SchemaManager schemaManager, LdapDN dn, ServerAttribute... attributes )
+ public DefaultServerEntry( SchemaManager schemaManager, DN dn, ServerAttribute... attributes )
{
if ( dn == null )
{
- dn = LdapDN.EMPTY_LDAPDN;
+ dn = DN.EMPTY_DN;
}
else
{
@@ -2271,7 +2271,7 @@
// Clone the DN first.
if ( dn != null )
{
- clone.dn = (LdapDN)dn.clone();
+ clone.dn = (DN)dn.clone();
}
// clone the ServerAttribute Map
@@ -2321,7 +2321,7 @@
{
// First, the DN
// Write the DN
- LdapDNSerializer.serialize( dn, out );
+ DnSerializer.serialize( dn, out );
// Then the attributes.
out.writeInt( attributes.size() );
@@ -2369,7 +2369,7 @@
public void deserialize( ObjectInput in ) throws IOException, ClassNotFoundException
{
// Read the DN
- dn = LdapDNSerializer.deserialize( in );
+ dn = DnSerializer.deserialize( in );
// Read the number of attributes
int nbAttributes = in.readInt();
Modified: directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryFactory.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryFactory.java (original)
+++ directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryFactory.java Wed Mar 3 23:29:19 2010
@@ -22,7 +22,7 @@
import javax.naming.NamingException;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
/**
@@ -44,5 +44,5 @@
* Creates a new ServerEntry which has not yet been added to the
* directory.
*/
- ServerEntry newEntry( LdapDN dn ) throws NamingException;
+ ServerEntry newEntry( DN dn ) throws NamingException;
}
Modified: directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java (original)
+++ directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java Wed Mar 3 23:29:19 2010
@@ -42,7 +42,7 @@
import org.apache.directory.shared.ldap.entry.ModificationOperation;
import org.apache.directory.shared.ldap.entry.Value;
import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeIdentifierException;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.ldap.schema.SchemaManager;
import org.apache.directory.shared.ldap.schema.SchemaUtils;
@@ -196,7 +196,7 @@
*
* @throws InvalidAttributeIdentifierException If we get an invalid attribute
*/
- public static ServerEntry toServerEntry( Attributes attributes, LdapDN dn, SchemaManager schemaManager )
+ public static ServerEntry toServerEntry( Attributes attributes, DN dn, SchemaManager schemaManager )
throws InvalidAttributeIdentifierException
{
if ( attributes instanceof BasicAttributes )
Modified: directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerSearchResult.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerSearchResult.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerSearchResult.java (original)
+++ directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerSearchResult.java Wed Mar 3 23:29:19 2010
@@ -21,10 +21,10 @@
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
/**
- * Creates a wrapper around a SearchResult object so that we can use the LdapDN
+ * Creates a wrapper around a SearchResult object so that we can use the DN
* instead of parser it over and over
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -33,7 +33,7 @@
public class ServerSearchResult
{
/** Distinguished name for this result */
- private LdapDN dn;
+ private DN dn;
/** The associated entry */
private ServerEntry serverEntry;
@@ -45,7 +45,7 @@
private Object object;
- public ServerSearchResult( LdapDN dn, Object obj, ServerEntry serverEntry )
+ public ServerSearchResult( DN dn, Object obj, ServerEntry serverEntry )
{
this.dn = dn;
this.serverEntry = serverEntry;
@@ -53,7 +53,7 @@
}
- public ServerSearchResult( LdapDN dn, Object obj, ServerEntry serverEntry, boolean isRelative )
+ public ServerSearchResult( DN dn, Object obj, ServerEntry serverEntry, boolean isRelative )
{
this.dn = dn;
this.serverEntry = serverEntry;
@@ -62,7 +62,7 @@
}
- public ServerSearchResult( LdapDN dn, String className, Object obj, ServerEntry serverEntry )
+ public ServerSearchResult( DN dn, String className, Object obj, ServerEntry serverEntry )
{
this.dn = dn;
this.serverEntry = serverEntry;
@@ -70,7 +70,7 @@
}
- public ServerSearchResult( LdapDN dn, String className, Object obj, ServerEntry serverEntry, boolean isRelative )
+ public ServerSearchResult( DN dn, String className, Object obj, ServerEntry serverEntry, boolean isRelative )
{
this.dn = dn;
this.serverEntry = serverEntry;
@@ -81,7 +81,7 @@
/**
* @return The result DN
*/
- public LdapDN getDn()
+ public DN getDn()
{
return dn;
}
@@ -131,7 +131,7 @@
*/
public String toString()
{
- String name = (dn == null ? "null" : ( dn == LdapDN.EMPTY_LDAPDN ? "\"\"" : dn.getName() ) );
+ String name = (dn == null ? "null" : ( dn == DN.EMPTY_DN ? "\"\"" : dn.getName() ) );
return "ServerSearchResult : " + name + "\n" + serverEntry;
}
}
Modified: directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java (original)
+++ directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java Wed Mar 3 23:29:19 2010
@@ -50,7 +50,7 @@
import org.apache.directory.shared.ldap.entry.client.ClientEntry;
import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.ldap.schema.SchemaManager;
import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
@@ -88,7 +88,7 @@
// A Binary attribute
private static AttributeType atPwd;
- private static LdapDN EXAMPLE_DN;
+ private static DN EXAMPLE_DN;
/**
* Initialize the registries once for the whole test suite
@@ -128,7 +128,7 @@
atSN = schemaManager.lookupAttributeTypeRegistry( "sn" );
atPwd = schemaManager.lookupAttributeTypeRegistry( "userpassword" );
- EXAMPLE_DN = new LdapDN( "dc=example,dc=com" );
+ EXAMPLE_DN = new DN( "dc=example,dc=com" );
}
@@ -143,7 +143,7 @@
{
Entry entry = new DefaultServerEntry();
assertNotNull( entry );
- assertEquals( LdapDN.EMPTY_LDAPDN, entry.getDn() );
+ assertEquals( DN.EMPTY_DN, entry.getDn() );
assertEquals( 0, entry.size() );
}
@@ -156,13 +156,13 @@
{
Entry entry = new DefaultServerEntry( schemaManager );
assertNotNull( entry );
- assertEquals( LdapDN.EMPTY_LDAPDN, entry.getDn() );
+ assertEquals( DN.EMPTY_DN, entry.getDn() );
assertEquals( 0, entry.size() );
}
/**
- * Test for method DefaultServerEntry( registries, LdapDN )
+ * Test for method DefaultServerEntry( registries, DN )
*/
@Test
public void testDefaultServerEntryRegistriesDN() throws Exception
@@ -175,7 +175,7 @@
/**
- * Test for method DefaultServerEntry( registries, LdapDN, AttributeType... )
+ * Test for method DefaultServerEntry( registries, DN, AttributeType... )
*/
@Test
public void testDefaultServerEntryRegistriesDNAttributeTypeArray() throws Exception
@@ -191,7 +191,7 @@
/**
- * Test for method DefaultServerEntry( registries, LdapDN, AttributeType, upId )
+ * Test for method DefaultServerEntry( registries, DN, AttributeType, upId )
*/
@Test
public void testDefaultServerEntryRegistriesDNAttributeTypeUpId() throws Exception
@@ -207,7 +207,7 @@
/**
- * Test for method DefaultServerEntry( registries, LdapDN, AttributeType, upId )
+ * Test for method DefaultServerEntry( registries, DN, AttributeType, upId )
*/
@Test
public void testDefaultServerEntryRegistriesDNUpIdArray() throws Exception
@@ -641,7 +641,7 @@
*/
@Test public void testAddAtStringElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
// Test a simple addition
@@ -690,7 +690,7 @@
*/
@Test public void testAddAtBytesElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
@@ -747,7 +747,7 @@
*/
@Test public void testAddAtServerValueElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
@@ -852,7 +852,7 @@
*/
@Test public void testAddUpIdStringElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
// Test a simple addition
@@ -904,7 +904,7 @@
*/
@Test public void testAddUpIdBytesElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
@@ -961,7 +961,7 @@
*/
@Test public void testAddUpIdServerValueElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
@@ -1072,7 +1072,7 @@
*/
@Test public void testAddUpIdAtStringElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
// Test a simple addition
@@ -1121,7 +1121,7 @@
*/
@Test public void testAddUpIdAtBytesElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
@@ -1178,7 +1178,7 @@
*/
@Test public void testAddUpIdAtServerValueElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
@@ -1321,7 +1321,7 @@
assertEquals( entry1, entry2 );
entry2.setDn( EXAMPLE_DN );
- assertEquals( LdapDN.EMPTY_LDAPDN,entry1.getDn() );
+ assertEquals( DN.EMPTY_DN,entry1.getDn() );
entry1.setDn( EXAMPLE_DN );
entry2 = entry1.clone();
@@ -1741,7 +1741,7 @@
assertEquals( EXAMPLE_DN, entry.getDn() );
- LdapDN testDn = new LdapDN( "cn=test" );
+ DN testDn = new DN( "cn=test" );
entry.setDn( testDn );
assertEquals( testDn, entry.getDn() );
@@ -1759,7 +1759,7 @@
assertEquals( entry1.hashCode(), entry2.hashCode() );
- entry2.setDn( new LdapDN( "ou=system,dc=com" ) );
+ entry2.setDn( new DN( "ou=system,dc=com" ) );
assertNotSame( entry1.hashCode(), entry2.hashCode() );
entry2.setDn( EXAMPLE_DN );
@@ -2541,7 +2541,7 @@
*/
@Test public void tesPutServerAttributeElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
// first test a null SA addition. It should be allowed.
@@ -2621,7 +2621,7 @@
*/
@Test public void tesPutAtStringElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
// Test an empty AT
@@ -2678,7 +2678,7 @@
*/
@Test public void tesPutAtByteElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
// Test an empty AT
@@ -2740,7 +2740,7 @@
*/
@Test public void tesPutAtSVs() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
// Adding a null value to an attribute
@@ -2802,7 +2802,7 @@
*/
@Test public void tesPutUpIdStringElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
// Adding a null value should be possible
@@ -2864,7 +2864,7 @@
*/
@Test public void tesPutUpIdBytesElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
@@ -2927,7 +2927,7 @@
*/
@Test public void tesPutUpIDAtStringElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
// Test that we get an error when the ID or AT are null
@@ -2990,7 +2990,7 @@
*/
@Test public void tesPutUpIDAtBytesElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
@@ -3073,7 +3073,7 @@
*/
@Test public void tesPutUpIDAtSVElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
// Test that we get an error when the ID or AT are null
@@ -3151,7 +3151,7 @@
*/
@Test public void tesPutUpIDSVElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
// Test that we get an error when the ID or AT are null
@@ -3484,7 +3484,7 @@
*/
@Test public void testRemoveUpIdElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
AttributeType atPassword = schemaManager.lookupAttributeTypeRegistry( "userPassword" );
@@ -3543,7 +3543,7 @@
*/
@Test public void testSetATElipsis() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
ServerEntry entry = new DefaultServerEntry( schemaManager, dn );
List<EntryAttribute> result = null;
@@ -3622,7 +3622,7 @@
*/
@Test public void testSetUpID() throws Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
// First check that this method fails if we pass a null or empty ID
@@ -3757,14 +3757,14 @@
/**
- * Test method for setDN( LdapDN )
+ * Test method for setDN( DN )
*/
@Test
public void testSetDn()
{
Entry entry = new DefaultServerEntry( schemaManager );
- assertEquals( LdapDN.EMPTY_LDAPDN, entry.getDn() );
+ assertEquals( DN.EMPTY_DN, entry.getDn() );
entry.setDn( EXAMPLE_DN );
assertEquals( EXAMPLE_DN, entry.getDn() );
@@ -3796,7 +3796,7 @@
*/
@Test public void testToBasicAttributes() throws InvalidNameException, Exception
{
- LdapDN dn = new LdapDN( "cn=test" );
+ DN dn = new DN( "cn=test" );
DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
AttributeType OBJECT_CLASS_AT = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.OBJECT_CLASS_AT );
@@ -3894,7 +3894,7 @@
public void testCopyConstructorClientEntry() throws NamingException
{
Entry clientEntry = new DefaultClientEntry();
- clientEntry.setDn( new LdapDN( "ou=system" ) );
+ clientEntry.setDn( new DN( "ou=system" ) );
clientEntry.add( "cn", "test1", "test2" );
clientEntry.add( "objectClass", "top", "person" );
@@ -3917,7 +3917,7 @@
@Test
public void testToClientEntry() throws NamingException
{
- LdapDN dn = new LdapDN( "ou=system" );
+ DN dn = new DN( "ou=system" );
ServerEntry serverEntry = new DefaultServerEntry( schemaManager );
serverEntry.setDn( dn );
serverEntry.add( "cn", "test1", "test2" );
Modified: directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java (original)
+++ directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java Wed Mar 3 23:29:19 2010
@@ -46,7 +46,7 @@
import org.apache.directory.shared.ldap.ldif.ChangeType;
import org.apache.directory.shared.ldap.ldif.LdifEntry;
import org.apache.directory.shared.ldap.ldif.LdifReader;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.apache.directory.shared.ldap.name.RDN;
import org.apache.directory.shared.ldap.schema.registries.Schema;
import org.slf4j.Logger;
@@ -143,7 +143,7 @@
principalDn = "";
}
- LdapDN userDn = new LdapDN( principalDn );
+ DN userDn = new DN( principalDn );
userDn.normalize( service.getSchemaManager().getNormalizerMapping() );
LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
@@ -153,7 +153,7 @@
}
CoreSession session = service.getSession( principal );
- LdapContext ctx = new ServerLdapContext( service, session, new LdapDN( dn ) );
+ LdapContext ctx = new ServerLdapContext( service, session, new DN( dn ) );
return ctx;
}
@@ -166,7 +166,7 @@
principalDn = "";
}
- LdapDN userDn = new LdapDN( principalDn );
+ DN userDn = new DN( principalDn );
userDn.normalize( service.getSchemaManager().getNormalizerMapping() );
LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
@@ -200,7 +200,7 @@
public static void apply( DirectoryService service, LdifEntry entry ) throws Exception
{
- LdapDN dn = new LdapDN( entry.getDn() );
+ DN dn = new DN( entry.getDn() );
CoreSession session = service.getAdminSession();
switch( entry.getChangeType().getChangeType() )
@@ -223,7 +223,7 @@
// It's a move. The superior have changed
// Let's see if it's a rename too
RDN oldRdn = dn.getRdn();
- LdapDN newSuperior = new LdapDN( entry.getNewSuperior() );
+ DN newSuperior = new DN( entry.getNewSuperior() );
if ( dn.size() == 0 )
{
@@ -261,7 +261,7 @@
public static LdifEntry getUserAddLdif( String dnstr, byte[] password, String cn, String sn )
throws InvalidNameException, NamingException
{
- LdapDN dn = new LdapDN( dnstr );
+ DN dn = new DN( dnstr );
LdifEntry ldif = new LdifEntry();
ldif.setDn( dnstr );
ldif.setChangeType( ChangeType.Add );
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java Wed Mar 3 23:29:19 2010
@@ -37,7 +37,7 @@
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.server.core.jndi.ServerLdapContext;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.apache.directory.shared.ldap.util.ArrayUtils;
import org.apache.directory.shared.ldap.util.StringTools;
import org.junit.Test;
@@ -80,7 +80,7 @@
{
String userDn = "uid=admin,ou=system";
LdapContext ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "secret".getBytes() ), new LdapDN( "ou=system" ) );
+ service.getSession( new DN( userDn ), "secret".getBytes() ), new DN( "ou=system" ) );
Attributes attrs = ctx.getAttributes( "uid=admin" );
performAdminAccountChecks( attrs );
assertTrue( ArrayUtils.isEquals( attrs.get( "userPassword" ).get(), StringTools.getBytesUtf8( "secret" ) ) );
@@ -90,7 +90,7 @@
service.startup();
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "secret".getBytes() ), new LdapDN( "ou=system" ) );
+ service.getSession( new DN( userDn ), "secret".getBytes() ), new DN( "ou=system" ) );
attrs = ctx.getAttributes( "uid=admin" );
performAdminAccountChecks( attrs );
assertTrue( ArrayUtils.isEquals( attrs.get( "userPassword" ).get(), StringTools.getBytesUtf8( "secret" ) ) );
@@ -104,7 +104,7 @@
apply( service, getUserAddLdif() );
String userDn = "uid=akarasulu,ou=users,ou=system";
LdapContext ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test".getBytes() ), new DN( userDn ) );
Attributes attrs = ctx.getAttributes( "" );
Attribute ou = attrs.get( "ou" );
@@ -140,7 +140,7 @@
{
String userDn = "uid=admin,ou=system";
assertNotNull( new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "secret".getBytes() ), new LdapDN( userDn ) ) );
+ service.getSession( new DN( userDn ), "secret".getBytes() ), new DN( userDn ) ) );
}
@@ -156,7 +156,7 @@
apply( service, getUserAddLdif() );
String userDn = "uid=akarasulu,ou=users,ou=system";
assertNotNull( new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn ) ) );
+ service.getSession( new DN( userDn ), "test".getBytes() ), new DN( userDn ) ) );
}
@@ -167,7 +167,7 @@
String userDn = "uid=akarasulu,ou=users,ou=system";
LdapContext ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test".getBytes() ), new DN( userDn ) );
assertNotNull( ctx );
Attributes attrs = ctx.getAttributes( "" );
Attribute ou = attrs.get( "ou" );
@@ -201,7 +201,7 @@
try
{
new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test".getBytes() ), new DN( userDn ) );
fail( "Authentication with old password should fail" );
}
catch ( NamingException e )
@@ -212,7 +212,7 @@
// close and try again now with new password (should fail)
ctx.close();
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "newpwd".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "newpwd".getBytes() ), new DN( userDn ) );
attrs = ctx.getAttributes( "" );
ou = attrs.get( "ou" );
assertTrue( ou.contains( "Engineering" ) );
@@ -242,7 +242,7 @@
apply( service, getUserAddLdif() );
String userDn = "uid=akarasulu,ou=users,ou=system";
LdapContext ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test".getBytes() ), new DN( userDn ) );
// Check that we can get the attributes
Attributes attrs = ctx.getAttributes( "" );
@@ -260,7 +260,7 @@
try
{
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test".getBytes() ), new DN( userDn ) );
fail( "Authentication with old password should fail" );
}
catch ( Exception e )
@@ -277,7 +277,7 @@
// try again now with new password (should be successfull)
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "secret".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "secret".getBytes() ), new DN( userDn ) );
attrs = ctx.getAttributes( "" );
assertNotNull( attrs );
assertTrue( attrs.get( "uid" ).contains( "akarasulu" ) );
@@ -286,7 +286,7 @@
// cache is updated (should be successfull)
ctx.close();
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "secret".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "secret".getBytes() ), new DN( userDn ) );
attrs = ctx.getAttributes( "" );
assertNotNull( attrs );
assertTrue( attrs.get( "uid" ).contains( "akarasulu" ) );
@@ -299,7 +299,7 @@
apply( service, getUserAddLdif() );
String userDn = "uid=akarasulu,ou=users,ou=system";
LdapContext ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test".getBytes() ), new DN( userDn ) );
// Check that we can get the attributes
Attributes attrs = ctx.getAttributes( "" );
@@ -317,7 +317,7 @@
try
{
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test".getBytes() ), new DN( userDn ) );
fail( "Authentication with old password should fail" );
}
catch ( Exception e )
@@ -334,7 +334,7 @@
// try again now with new password (should be successfull)
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "secret".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "secret".getBytes() ), new DN( userDn ) );
attrs = ctx.getAttributes( "" );
assertNotNull( attrs );
assertTrue( attrs.get( "uid" ).contains( "akarasulu" ) );
@@ -342,7 +342,7 @@
// close and try again now with new password, to check that the
// cache is updated (should be successfull)
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "secret".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "secret".getBytes() ), new DN( userDn ) );
attrs = ctx.getAttributes( "" );
assertNotNull( attrs );
assertTrue( attrs.get( "uid" ).contains( "akarasulu" ) );
@@ -355,7 +355,7 @@
apply( service, getUserAddLdif() );
String userDn = "uid=akarasulu,ou=users,ou=system";
LdapContext ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test".getBytes() ), new DN( userDn ) );
// Check that we can get the attributes
Attributes attrs = ctx.getAttributes( "" );
@@ -373,7 +373,7 @@
try
{
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test".getBytes() ), new DN( userDn ) );
fail( "Authentication with old password should fail" );
}
catch ( Exception e )
@@ -390,7 +390,7 @@
// try again now with new password (should be successful)
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test123".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test123".getBytes() ), new DN( userDn ) );
attrs = ctx.getAttributes( "" );
assertNotNull( attrs );
assertTrue( attrs.get( "uid" ).contains( "akarasulu" ) );
@@ -398,7 +398,7 @@
// close and try again now with new password, to check that the
// cache is updated (should be successfull)
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test123".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test123".getBytes() ), new DN( userDn ) );
attrs = ctx.getAttributes( "" );
assertNotNull( attrs );
assertTrue( attrs.get( "uid" ).contains( "akarasulu" ) );
@@ -411,7 +411,7 @@
apply( service, getUserAddLdif() );
String userDn = "uid=akarasulu,ou=users,ou=system";
LdapContext ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test".getBytes() ), new DN( userDn ) );
// Check that we can get the attributes
Attributes attrs = ctx.getAttributes( "" );
@@ -429,7 +429,7 @@
try
{
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test".getBytes() ), new DN( userDn ) );
fail( "Authentication with old password should fail" );
}
catch ( Exception e )
@@ -446,7 +446,7 @@
// try again now with new password (should be successfull)
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "secret".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "secret".getBytes() ), new DN( userDn ) );
attrs = ctx.getAttributes( "" );
assertNotNull( attrs );
assertTrue( attrs.get( "uid" ).contains( "akarasulu" ) );
@@ -454,7 +454,7 @@
// try again now with new password, to check that the
// cache is updated (should be successfull)
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "secret".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "secret".getBytes() ), new DN( userDn ) );
attrs = ctx.getAttributes( "" );
assertNotNull( attrs );
assertTrue( attrs.get( "uid" ).contains( "akarasulu" ) );
@@ -467,7 +467,7 @@
apply( service, getUserAddLdif() );
String userDn = "uid=akarasulu,ou=users,ou=system";
LdapContext ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test".getBytes() ), new DN( userDn ) );
// Check that we can get the attributes
Attributes attrs = ctx.getAttributes( "" );
@@ -485,7 +485,7 @@
try
{
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test".getBytes() ), new DN( userDn ) );
fail( "Authentication with old password should fail" );
}
catch ( Exception e )
@@ -502,7 +502,7 @@
// try again now with new password (should be successful)
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "secret".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "secret".getBytes() ), new DN( userDn ) );
attrs = ctx.getAttributes( "" );
assertNotNull( attrs );
assertTrue( attrs.get( "uid" ).contains( "akarasulu" ) );
@@ -510,7 +510,7 @@
// try again now with new password, to check that the
// cache is updated (should be successfull)
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "secret".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "secret".getBytes() ), new DN( userDn ) );
attrs = ctx.getAttributes( "" );
assertNotNull( attrs );
assertTrue( attrs.get( "uid" ).contains( "akarasulu" ) );
@@ -523,7 +523,7 @@
apply( service, getUserAddLdif() );
String userDn = "uid=akarasulu,ou=users,ou=system";
LdapContext ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test".getBytes() ), new DN( userDn ) );
// Check that we can get the attributes
Attributes attrs = ctx.getAttributes( "" );
@@ -541,7 +541,7 @@
try
{
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test".getBytes() ), new DN( userDn ) );
fail( "Authentication with old password should fail" );
}
catch ( Exception e )
@@ -558,7 +558,7 @@
// try again now with new password (should be successfull)
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "secret".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "secret".getBytes() ), new DN( userDn ) );
attrs = ctx.getAttributes( "" );
assertNotNull( attrs );
assertTrue( attrs.get( "uid" ).contains( "akarasulu" ) );
@@ -566,7 +566,7 @@
// try again now with new password, to check that the
// cache is updated (should be successfull)
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "secret".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "secret".getBytes() ), new DN( userDn ) );
attrs = ctx.getAttributes( "" );
assertNotNull( attrs );
assertTrue( attrs.get( "uid" ).contains( "akarasulu" ) );
@@ -581,13 +581,13 @@
// bind as akarasulu
String userDn = "uid=akarasulu,ou=users,ou=system";
LdapContext ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test".getBytes() ), new DN( userDn ) );
ctx.close();
// bind as admin
userDn = "uid=admin,ou=system";
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "secret".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "secret".getBytes() ), new DN( userDn ) );
// now modify the password for akarasulu (while we're admin)
Attribute userPasswordAttribute = new BasicAttribute( "userPassword", "newpwd" );
@@ -598,7 +598,7 @@
try
{
ctx = new ServerLdapContext( service,
- service.getSession( new LdapDN( userDn ), "test".getBytes() ), new LdapDN( userDn ) );
+ service.getSession( new DN( userDn ), "test".getBytes() ), new DN( userDn ) );
fail( "Authentication with old password should fail" );
}
catch ( Exception e )
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationIT.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationIT.java Wed Mar 3 23:29:19 2010
@@ -38,7 +38,7 @@
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -85,7 +85,7 @@
try
{
- LdapDN userName = new LdapDN( "uid=" + uid + ",ou=users,ou=system" );
+ DN userName = new DN( "uid=" + uid + ",ou=users,ou=system" );
DirContext userContext = getContextAs( userName, password );
userContext.createSubcontext( entryRdn, testEntry );
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java Wed Mar 3 23:29:19 2010
@@ -49,7 +49,7 @@
import org.apache.directory.shared.ldap.filter.SearchScope;
import org.apache.directory.shared.ldap.ldif.LdifEntry;
import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.apache.directory.shared.ldap.name.RDN;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -81,7 +81,7 @@
try
{
- service.getAdminSession().delete( new LdapDN( "uid=admin,ou=system") );
+ service.getAdminSession().delete( new DN( "uid=admin,ou=system") );
fail( "User 'admin' should not be able to delete his account" );
}
catch ( LdapNoPermissionException e )
@@ -107,7 +107,7 @@
try
{
service.getAdminSession().rename(
- new LdapDN( "uid=admin,ou=system" ),
+ new DN( "uid=admin,ou=system" ),
new RDN( "uid=alex" ),
false );
fail( "admin should not be able to rename his account" );
@@ -144,7 +144,7 @@
Modification mod = new ClientModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
mods.add( mod );
- LdapDN userDn = new LdapDN( "uid=akarasulu,ou=users,ou=system" );
+ DN userDn = new DN( "uid=akarasulu,ou=users,ou=system" );
userDn.normalize( service.getSchemaManager().getAttributeTypeRegistry().getNormalizerMapping() );
LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
CoreSession akarasuluSession = service.getSession( principal );
@@ -152,7 +152,7 @@
try
{
akarasuluSession.modify(
- new LdapDN( "uid=admin,ou=system" ), mods );
+ new DN( "uid=admin,ou=system" ), mods );
fail( "User 'uid=admin,ou=system' should not be able to modify attributes on admin" );
}
catch ( Exception e )
@@ -177,7 +177,7 @@
try
{
ExprNode filter = FilterParser.parse( "(objectClass=*)" );
- service.getAdminSession().search( new LdapDN( "ou=system" ), SearchScope.SUBTREE, filter , AliasDerefMode.DEREF_ALWAYS, null );
+ service.getAdminSession().search( new DN( "ou=system" ), SearchScope.SUBTREE, filter , AliasDerefMode.DEREF_ALWAYS, null );
}
catch ( LdapNoPermissionException e )
{
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthzAuthnIT.java Wed Mar 3 23:29:19 2010
@@ -29,7 +29,7 @@
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -62,7 +62,7 @@
{
createUser( "billyd", "billyd" );
- LdapDN userName = new LdapDN( "uid=billyd,ou=users,ou=system" );
+ DN userName = new DN( "uid=billyd,ou=users,ou=system" );
try
{
// Authenticate to RootDSE
@@ -86,7 +86,7 @@
{
createUser( "billyd", "billyd" );
- LdapDN userName = new LdapDN( "uid=billyd,ou=users,ou=system" );
+ DN userName = new DN( "uid=billyd,ou=users,ou=system" );
try
{
// Authenticate to "ou=system"
@@ -126,7 +126,7 @@
+ "protectedItems { entry }, "
+ "grantsAndDenials { grantBrowse } } } } }" );
- LdapDN userName = new LdapDN( "uid=billyd,ou=users,ou=system" );
+ DN userName = new DN( "uid=billyd,ou=users,ou=system" );
try
{
// Authenticate to "ou=system"
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AutzIntegUtils.java Wed Mar 3 23:29:19 2010
@@ -38,7 +38,7 @@
import org.apache.directory.server.core.DirectoryService;
import org.apache.directory.server.core.subtree.SubentryInterceptor;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
/**
@@ -112,7 +112,7 @@
objectClass.add( "groupOfUniqueNames" );
group.put( "uniqueMember", firstMemberDn );
adminCtx.createSubcontext( "cn=" + cn + ",ou=groups", group );
- return new LdapDN( "cn=" + cn + ",ou=groups,ou=system" );
+ return new DN( "cn=" + cn + ",ou=groups,ou=system" );
}
@@ -154,7 +154,7 @@
user.put( "sn", uid );
user.put( "cn", uid );
adminCtx.createSubcontext( "uid=" + uid + ",ou=users", user );
- return new LdapDN( "uid=" + uid + ",ou=users,ou=system" );
+ return new DN( "uid=" + uid + ",ou=users,ou=system" );
}
@@ -179,7 +179,7 @@
// TODO might be ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED
group.put( "uniqueMember", "uid=admin, ou=system" );
adminCtx.createSubcontext( "cn=" + groupName + ",ou=groups", group );
- return new LdapDN( "cn=" + groupName + ",ou=groups,ou=system" );
+ return new DN( "cn=" + groupName + ",ou=groups,ou=system" );
}
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationIT.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationIT.java Wed Mar 3 23:29:19 2010
@@ -38,7 +38,7 @@
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.server.core.jndi.ServerLdapContext;
import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -96,13 +96,13 @@
try
{
// create the entry as admin
- LdapDN userName = new LdapDN( "uid=" + uid + ",ou=users,ou=system" );
+ DN userName = new DN( "uid=" + uid + ",ou=users,ou=system" );
adminContext.createSubcontext( entryRdn, testEntry );
// compare the telephone numbers
DirContext userContext = getContextAs( userName, password );
ServerLdapContext ctx = ( ServerLdapContext ) userContext.lookup( "" );
- ctx.compare( new LdapDN( entryRdn + ",ou=system" ), "telephoneNumber", number );
+ ctx.compare( new DN( entryRdn + ",ou=system" ), "telephoneNumber", number );
// don't return compare result which can be false but true since op was permitted
return true;
@@ -282,7 +282,7 @@
adminCtx.createSubcontext( "uid=bob,ou=users", user );
ServerLdapContext ctx = ( ServerLdapContext ) adminCtx.lookup( "" );
- assertTrue( ctx.compare( new LdapDN( "uid=bob,ou=users,ou=system" ), "userPassword", "bobspassword" ) );
+ assertTrue( ctx.compare( new DN( "uid=bob,ou=users,ou=system" ), "userPassword", "bobspassword" ) );
}
}
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationIT.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationIT.java Wed Mar 3 23:29:19 2010
@@ -36,7 +36,7 @@
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -90,7 +90,7 @@
try
{
// create the entry as the admin
- LdapDN userName = new LdapDN( "uid=" + uid + ",ou=users,ou=system" );
+ DN userName = new DN( "uid=" + uid + ",ou=users,ou=system" );
adminContext.createSubcontext( entryRdn, testEntry );
// delete the newly created context as the user
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationIT.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationIT.java Wed Mar 3 23:29:19 2010
@@ -47,7 +47,7 @@
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -105,7 +105,7 @@
try
{
// create the entry as admin
- LdapDN userName = new LdapDN( "uid=" + uid + ",ou=users,ou=system" );
+ DN userName = new DN( "uid=" + uid + ",ou=users,ou=system" );
adminContext.createSubcontext( entryRdn, testEntry );
// modify the entry as the user
@@ -162,7 +162,7 @@
try
{
// create the entry as admin
- LdapDN userName = new LdapDN( "uid=" + uid + ",ou=users,ou=system" );
+ DN userName = new DN( "uid=" + uid + ",ou=users,ou=system" );
adminContext.createSubcontext( entryRdn, testEntry );
// modify the entry as the user
@@ -201,7 +201,7 @@
try
{
// modify the entry as the user
- Name userEntry = new LdapDN( "uid=" + uid + ",ou=users,ou=system" );
+ Name userEntry = new DN( "uid=" + uid + ",ou=users,ou=system" );
DirContext userContext = getContextAs( userEntry, password, userEntry.toString() );
userContext.modifyAttributes( "", modOp, mods );
return true;
@@ -230,7 +230,7 @@
try
{
// modify the entry as the user
- Name userEntry = new LdapDN( "uid=" + uid + ",ou=users,ou=system" );
+ Name userEntry = new DN( "uid=" + uid + ",ou=users,ou=system" );
DirContext userContext = getContextAs( userEntry, password, userEntry.toString() );
userContext.modifyAttributes( "", mods );
return true;
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationIT.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationIT.java Wed Mar 3 23:29:19 2010
@@ -39,7 +39,7 @@
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -93,7 +93,7 @@
// create the new entry as the admin user
adminContext.createSubcontext( entryRdn, testEntry );
- LdapDN userName = new LdapDN( "uid=" + uid + ",ou=users,ou=system" );
+ DN userName = new DN( "uid=" + uid + ",ou=users,ou=system" );
DirContext userContext = getContextAs( userName, password );
userContext.rename( entryRdn, newRdn );
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationIT.java Wed Mar 3 23:29:19 2010
@@ -55,7 +55,7 @@
import org.apache.directory.server.core.integ.FrameworkRunner;
import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -121,7 +121,7 @@
Name[] childRdns = new Name[children.length];
for ( int ii = 0; ii < children.length && count[0] < sizeLimit; ii++ )
{
- Name childRdn = new LdapDN();
+ Name childRdn = new DN();
childRdn.addAll( parent );
childRdn.add( "ou=" + ii );
childRdns[ii] = childRdn;
@@ -178,7 +178,7 @@
while ( results.hasMore() )
{
SearchResult result = results.next();
- Name childRdn = new LdapDN( result.getName() );
+ Name childRdn = new DN( result.getName() );
childRdn.remove( 0 );
recursivelyDelete( childRdn );
}
@@ -257,8 +257,8 @@
cons = new SearchControls();
}
- Name base = addSearchData( new LdapDN(), 3, 10 );
- Name userDn = new LdapDN( "uid=" + uid + ",ou=users,ou=system" );
+ Name base = addSearchData( new DN(), 3, 10 );
+ Name userDn = new DN( "uid=" + uid + ",ou=users,ou=system" );
try
{
results.clear();
@@ -306,9 +306,9 @@
cons = new SearchControls();
}
- Name base = addSearchData( new LdapDN(), 3, 10 );
+ Name base = addSearchData( new DN(), 3, 10 );
addEntryACI( rdn, aci );
- Name userDn = new LdapDN( "uid=" + uid + ",ou=users,ou=system" );
+ Name userDn = new DN( "uid=" + uid + ",ou=users,ou=system" );
try
{
results.clear();
@@ -346,7 +346,7 @@
public void testAddSearchData() throws Exception
{
LdapContext sysRoot = getSystemContext( service );
- Name base = addSearchData( new LdapDN(), 3, 10 );
+ Name base = addSearchData( new DN(), 3, 10 );
SearchControls controls = new SearchControls();
controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
NamingEnumeration<SearchResult> results = sysRoot.search( base, "(objectClass=*)", controls );
@@ -693,7 +693,7 @@
// try a search operation which should fail without any prescriptive ACI
SearchControls cons = new SearchControls();
cons.setSearchScope( SearchControls.SUBTREE_SCOPE );
- LdapDN rdn = new LdapDN( "ou=tests" );
+ DN rdn = new DN( "ou=tests" );
assertFalse( checkSearchAsWithEntryACI( "billyd", "billyd", cons, rdn, aci, 9 ) );
// now add a subentry that enables anyone to search below ou=system
@@ -737,7 +737,7 @@
// try a search operation which should fail without any prescriptive ACI
SearchControls cons = new SearchControls();
cons.setSearchScope( SearchControls.SUBTREE_SCOPE );
- LdapDN rdn = new LdapDN( "ou=tests" );
+ DN rdn = new DN( "ou=tests" );
assertFalse( checkSearchAsWithEntryACI( "billyd", "billyd", cons, rdn, aci, 9 ) );
// now add a subentry that enables anyone to search below ou=system
@@ -782,7 +782,7 @@
*/
private SearchResult checkCanSearhSubentryAs( String uid, String password, Name rdn ) throws Exception
{
- DirContext userCtx = getContextAs( new LdapDN( "uid=" + uid + ",ou=users,ou=system" ), password );
+ DirContext userCtx = getContextAs( new DN( "uid=" + uid + ",ou=users,ou=system" ), password );
SearchControls cons = new SearchControls();
cons.setSearchScope( SearchControls.OBJECT_SCOPE );
SearchResult result = null;
@@ -828,7 +828,7 @@
+ "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
// check and see if we can access the subentry now
- assertNotNull( checkCanSearhSubentryAs( "billyd", "billyd", new LdapDN( "cn=anybodySearch" ) ) );
+ assertNotNull( checkCanSearhSubentryAs( "billyd", "billyd", new DN( "cn=anybodySearch" ) ) );
// now add a denial to prevent all users except the admin from accessing the subentry
addSubentryACI( "{ " + "identificationTag \"searchAci\", " + "precedence 14, " + "authenticationLevel none, "
@@ -837,7 +837,7 @@
+ "grantsAndDenials { denyRead, denyReturnDN, denyBrowse } } } } }" );
// now we should not be able to access the subentry with a search
- assertNull( checkCanSearhSubentryAs( "billyd", "billyd", new LdapDN( "cn=anybodySearch" ) ) );
+ assertNull( checkCanSearhSubentryAs( "billyd", "billyd", new DN( "cn=anybodySearch" ) ) );
}
@@ -856,7 +856,7 @@
+ "grantsAndDenials { grantRead, grantReturnDN, grantBrowse, grantDiscloseOnError } } } } }" );
// get a context as the user and try a lookup of a non-existant entry under ou=groups,ou=system
- DirContext userCtx = getContextAs( new LdapDN( "uid=billyd,ou=users,ou=system" ), "billyd" );
+ DirContext userCtx = getContextAs( new DN( "uid=billyd,ou=users,ou=system" ), "billyd" );
try
{
userCtx.lookup( "cn=blah,ou=groups" );
@@ -913,7 +913,7 @@
+ "grantsAndDenials { grantRead, grantReturnDN, grantBrowse } } } } }" );
// check and see if we can access the subentry now
- assertNotNull( checkCanSearhSubentryAs( "billyd", "billyd", new LdapDN( "ou=phoneBook,uid=billyd,ou=users" ) ) );
+ assertNotNull( checkCanSearhSubentryAs( "billyd", "billyd", new DN( "ou=phoneBook,uid=billyd,ou=users" ) ) );
// now add a denial to prevent all users except the admin from accessing the subentry
addPrescriptiveACI( "anybodySearchTheirSubordinates", "{ " + "identificationTag \"anybodyDontSearchTheirSubordinates\", " + "precedence 14, " + "authenticationLevel none, "
@@ -922,6 +922,6 @@
+ "grantsAndDenials { denyRead, denyReturnDN, denyBrowse } } } } }" );
// now we should not be able to access the subentry with a search
- assertNull( checkCanSearhSubentryAs( "billyd", "billyd", new LdapDN( "ou=phoneBook,uid=billyd,ou=users" ) ) );
+ assertNull( checkCanSearhSubentryAs( "billyd", "billyd", new DN( "ou=phoneBook,uid=billyd,ou=users" ) ) );
}
}
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java Wed Mar 3 23:29:19 2010
@@ -38,7 +38,7 @@
import org.apache.directory.server.core.jndi.CoreContextFactory;
import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
import org.apache.directory.shared.ldap.csn.CsnFactory;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.apache.directory.shared.ldap.schema.SchemaUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -65,7 +65,7 @@
// Test AddContextPartition
service.addPartition( partition );
- LdapDN suffixDn = new LdapDN( "ou=removable" );
+ DN suffixDn = new DN( "ou=removable" );
suffixDn.normalize( service.getSchemaManager().getNormalizerMapping() );
ServerEntry ctxEntry = new DefaultServerEntry( service.getSchemaManager(), suffixDn );
ctxEntry.put( "objectClass", "top" );
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ReferralIT.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ReferralIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ReferralIT.java Wed Mar 3 23:29:19 2010
@@ -59,7 +59,7 @@
import org.apache.directory.shared.ldap.exception.LdapReferralException;
import org.apache.directory.shared.ldap.ldif.LdifEntry;
import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -272,8 +272,8 @@
}
catch ( PartialResultException pre )
{
- assertEquals( "cn=alex karasulu,ou=apache", ((LdapDN)pre.getRemainingName()).getName() );
- assertEquals( LdapDN.EMPTY_LDAPDN, pre.getResolvedName() );
+ assertEquals( "cn=alex karasulu,ou=apache", ((DN)pre.getRemainingName()).getName() );
+ assertEquals( DN.EMPTY_DN, pre.getResolvedName() );
}
}
@@ -308,8 +308,8 @@
}
catch ( LdapReferralException lre )
{
- assertEquals( "cn=alex karasulu,ou=apache", ((LdapDN)lre.getRemainingName()).getName() );
- assertEquals( "ou=users,ou=system", ((LdapDN)lre.getResolvedName()).getName() );
+ assertEquals( "cn=alex karasulu,ou=apache", ((DN)lre.getRemainingName()).getName() );
+ assertEquals( "ou=users,ou=system", ((DN)lre.getResolvedName()).getName() );
}
}
@@ -329,7 +329,7 @@
// Attempt to add a normal entry below the referral ancestor. We should
// encounter referral errors with referral setting set to throw.
// -------------------------------------------------------------------
- LdapDN userDN = new LdapDN( "cn=alex karasulu,ou=apache,ou=users,ou=system" );
+ DN userDN = new DN( "cn=alex karasulu,ou=apache,ou=users,ou=system" );
ServerEntry userEntry = new DefaultServerEntry( service.getSchemaManager(), userDN );
userEntry.add( "ObjectClass", "top", "person" );
@@ -343,8 +343,8 @@
}
catch ( PartialResultException pre )
{
- assertEquals( "cn=alex karasulu,ou=apache", ((LdapDN)pre.getRemainingName()).getName() );
- assertEquals( LdapDN.EMPTY_LDAPDN, pre.getResolvedName() );
+ assertEquals( "cn=alex karasulu,ou=apache", ((DN)pre.getRemainingName()).getName() );
+ assertEquals( DN.EMPTY_DN, pre.getResolvedName() );
}
}
@@ -431,7 +431,7 @@
{
if ( td.refCtx instanceof ServerLdapContext )
{
- LdapDN dn = new LdapDN( "cn=alex karasulu,ou=users,ou=system" );
+ DN dn = new DN( "cn=alex karasulu,ou=users,ou=system" );
( ( ServerLdapContext ) td.refCtx ).compare( dn, "sn", "karasulu" );
}
else
@@ -471,7 +471,7 @@
{
if ( td.refCtx instanceof ServerLdapContext )
{
- LdapDN dn = new LdapDN( "cn=alex karasulu,ou=apache,ou=users,ou=system" );
+ DN dn = new DN( "cn=alex karasulu,ou=apache,ou=users,ou=system" );
( ( ServerLdapContext ) td.refCtx ).compare( dn, "sn", "karasulu" );
}
else
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java Wed Mar 3 23:29:19 2010
@@ -45,7 +45,7 @@
import org.apache.directory.server.core.entry.ServerEntry;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -122,7 +122,7 @@
userEntry.put( "cn", "Emmanuel Lecharny" );
// Core API entry
- LdapDN dn = new LdapDN( "cn=Emmanuel Lecharny, ou=apache, ou=people, o=MNN, c=WW, ou=system" );
+ DN dn = new DN( "cn=Emmanuel Lecharny, ou=apache, ou=people, o=MNN, c=WW, ou=system" );
serverEntry = new DefaultServerEntry( service.getSchemaManager(), dn );
serverEntry.put( "ObjectClass", "top", "person" );
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/CompareReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/CompareReferralIT.java?rev=918771&r1=918770&r2=918771&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/CompareReferralIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/CompareReferralIT.java Wed Mar 3 23:29:19 2010
@@ -47,7 +47,7 @@
import org.apache.directory.server.core.entry.ServerEntry;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -127,7 +127,7 @@
userEntry.put( "cn", "Emmanuel Lecharny" );
// Core API entry
- LdapDN dn = new LdapDN( "cn=Emmanuel Lecharny, ou=apache, ou=people, o=MNN, c=WW, ou=system" );
+ DN dn = new DN( "cn=Emmanuel Lecharny, ou=apache, ou=people, o=MNN, c=WW, ou=system" );
serverEntry = new DefaultServerEntry( service.getSchemaManager(), dn );
serverEntry.put( "ObjectClass", "top", "person" );
@@ -231,7 +231,7 @@
try
{
- session.compare( new LdapDN( "cn=Emmanuel Lecharny,ou=Roles,o=MNN,c=WW,ou=system" ), "cn", "Emmanuel Lecharny", false );
+ session.compare( new DN( "cn=Emmanuel Lecharny,ou=Roles,o=MNN,c=WW,ou=system" ), "cn", "Emmanuel Lecharny", false );
fail();
}
catch ( ReferralException re )
@@ -265,7 +265,7 @@
try
{
- session.compare( new LdapDN( "cn=Emmanuel Lecharny,ou=Roles,o=MNN,c=WW,ou=system" ), "cn", "Emmanuel Lecharny", true );
+ session.compare( new DN( "cn=Emmanuel Lecharny,ou=Roles,o=MNN,c=WW,ou=system" ), "cn", "Emmanuel Lecharny", true );
fail();
}
catch ( PartialResultException pre )
@@ -385,7 +385,7 @@
try
{
- session.compare( new LdapDN( "ou=Roles,o=MNN,c=WW,ou=system" ), "ou", "roles", false );
+ session.compare( new DN( "ou=Roles,o=MNN,c=WW,ou=system" ), "ou", "roles", false );
fail();
}
catch ( ReferralException re )
@@ -417,6 +417,6 @@
{
CoreSession session = service.getAdminSession();
- assertTrue( session.compare( new LdapDN( "ou=Roles,o=MNN,c=WW,ou=system" ), "ou", "roles", true ) );
+ assertTrue( session.compare( new DN( "ou=Roles,o=MNN,c=WW,ou=system" ), "ou", "roles", true ) );
}
}