directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r494176 [1/2] - in /directory/trunks/apacheds/core-unit/src: main/java/org/apache/directory/server/core/unit/ test/java/org/apache/directory/server/core/ test/java/org/apache/directory/server/core/authn/ test/java/org/apache/directory/serve...
Date Mon, 08 Jan 2007 19:43:34 GMT
Author: elecharny
Date: Mon Jan  8 11:43:32 2007
New Revision: 494176

URL: http://svn.apache.org/viewvc?view=rev&rev=494176
Log:
Patch for DIRSERVER-783.
- No more BasicAttribute and BasicAttributes. Use AttributeImpl and AttributesImpl now.
- No more ModificationItem. use ModificationItemImpl now
- lot of refactoring of imports : no more import xxx.*;

Modified:
    directory/trunks/apacheds/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/CreateContextITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DestroyContextITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ModifyContextITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ReferralITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/RootDSEITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/SearchContextITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/operational/BinaryAttributeFilterITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/schema/IllegalModifyAddITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceObjectClassChangeHandlingITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/AbstractTriggerServiceTest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/DefaulTriggerServiceITest.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersITest.java

Modified: directory/trunks/apacheds/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java (original)
+++ directory/trunks/apacheds/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java Mon Jan  8 11:43:32 2007
@@ -31,7 +31,7 @@
 import java.util.Iterator;
 
 import javax.naming.Context;
-import javax.naming.directory.BasicAttributes;
+import javax.naming.directory.Attributes;
 import javax.naming.ldap.InitialLdapContext;
 import javax.naming.ldap.LdapContext;
 
@@ -40,6 +40,7 @@
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.shared.ldap.ldif.Entry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.NamespaceTools;
 
@@ -132,6 +133,8 @@
     
     protected void setUp() throws Exception
     {
+        super.setUp();
+        
         if ( ! isExternal )
         {
             // Add indices for ou, uid, and objectClass
@@ -141,7 +144,7 @@
             indexedAttributes.add( "objectClass" );
             
             // Build the root entry for the new partition
-            BasicAttributes attributes = new BasicAttributes( "objectClass", "top", true );
+            Attributes attributes = new AttributesImpl( "objectClass", "top", true );
             attributes.get( "objectClass" ).add( "organizationalUnit" );
             attributes.put( "ou", "test" );
             

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/SearchOpsITest.java Mon Jan  8 11:43:32 2007
@@ -27,16 +27,16 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
-import javax.naming.directory.ModificationItem;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
 import org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration;
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 
 
 /**
@@ -49,7 +49,7 @@
 {
     private DirContext addNisPosixGroup( String name, int gid ) throws NamingException
     {
-        Attributes attrs = new BasicAttributes( "objectClass", "top", true );
+        Attributes attrs = new AttributesImpl( "objectClass", "top", true );
         attrs.get( "objectClass" ).add( "posixGroup" );
         attrs.put( "cn", name );
         attrs.put( "gidNumber", String.valueOf( gid ) );
@@ -68,7 +68,7 @@
         {
             MutablePartitionConfiguration sysConf = new MutablePartitionConfiguration();
             sysConf.setName( "system" );
-            Attributes attrs = new BasicAttributes( "objectClass", "top", true );
+            Attributes attrs = new AttributesImpl( "objectClass", "top", true );
             attrs.get( "objectClass" ).add( "organizationalUnit" );
             attrs.put( "ou", "system" );
             sysConf.setContextEntry( attrs );
@@ -99,9 +99,9 @@
         // if nis is disabled then enable it
         if ( isNisDisabled )
         {
-            Attribute disabled = new BasicAttribute( "m-disabled" );
-            ModificationItem[] mods = new ModificationItem[] { 
-                new ModificationItem( DirContext.REMOVE_ATTRIBUTE, disabled ) };
+            Attribute disabled = new AttributeImpl( "m-disabled" );
+            ModificationItemImpl[] mods = new ModificationItemImpl[] { 
+                new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE, disabled ) };
             schemaRoot.modifyAttributes( "cn=nis", mods );
         }
         

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationITest.java Mon Jan  8 11:43:32 2007
@@ -32,13 +32,13 @@
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.InitialDirContext;
-import javax.naming.directory.ModificationItem;
 import javax.naming.ldap.InitialLdapContext;
 
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.util.ArrayUtils;
 
 
@@ -347,9 +347,9 @@
         assertTrue( attrs.get( "roomnumber" ).contains( "4612" ) );
         
         // now modify the password for akarasulu
-        LockableAttributeImpl userPasswordAttribute = new LockableAttributeImpl( "userPassword", "newpwd" );
-        ic.modifyAttributes( "uid=akarasulu,ou=users", new ModificationItem[] { 
-            new ModificationItem( DirContext.REPLACE_ATTRIBUTE, userPasswordAttribute ) } );
+        AttributeImpl userPasswordAttribute = new AttributeImpl( "userPassword", "newpwd" );
+        ic.modifyAttributes( "uid=akarasulu,ou=users", new ModificationItemImpl[] { 
+            new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, userPasswordAttribute ) } );
         
         // close and try with old password (should fail)
         ic.close();

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AbstractAuthorizationITest.java Mon Jan  8 11:43:32 2007
@@ -23,11 +23,17 @@
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.core.subtree.SubentryService;
 import org.apache.directory.server.core.unit.AbstractTestCase;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
-import javax.naming.directory.*;
 import javax.naming.NamingException;
 import javax.naming.Name;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.InitialDirContext;
+
 import java.util.Hashtable;
 
 
@@ -104,8 +110,8 @@
     public Name createGroup( String cn, String firstMemberDn ) throws NamingException
     {
         DirContext adminCtx = getContextAsAdmin();
-        Attributes group = new BasicAttributes( "cn", cn, true );
-        Attribute objectClass = new BasicAttribute( "objectClass" );
+        Attributes group = new AttributesImpl( "cn", cn, true );
+        Attribute objectClass = new AttributeImpl( "objectClass" );
         group.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "groupOfUniqueNames" );
@@ -142,9 +148,9 @@
     public Name createUser( String uid, String password ) throws NamingException
     {
         DirContext adminCtx = getContextAsAdmin();
-        Attributes user = new BasicAttributes( "uid", uid, true );
+        Attributes user = new AttributesImpl( "uid", uid, true );
         user.put( "userPassword", password );
-        Attribute objectClass = new BasicAttribute( "objectClass" );
+        Attribute objectClass = new AttributeImpl( "objectClass" );
         user.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "person" );
@@ -165,8 +171,8 @@
     public Name createGroup( String groupName ) throws NamingException
     {
         DirContext adminCtx = getContextAsAdmin();
-        Attributes group = new BasicAttributes( true );
-        Attribute objectClass = new BasicAttribute( "objectClass" );
+        Attributes group = new AttributesImpl( true );
+        Attribute objectClass = new AttributeImpl( "objectClass" );
         group.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "groupOfUniqueNames" );
@@ -187,7 +193,7 @@
     public void addUserToGroup( String userUid, String groupCn ) throws NamingException
     {
         DirContext adminCtx = getContextAsAdmin();
-        Attributes changes = new BasicAttributes( "uniqueMember", "uid=" + userUid + ",ou=users,ou=system", true );
+        Attributes changes = new AttributesImpl( "uniqueMember", "uid=" + userUid + ",ou=users,ou=system", true );
         adminCtx.modifyAttributes( "cn=" + groupCn + ",ou=groups", DirContext.ADD_ATTRIBUTE, changes );
     }
 
@@ -202,7 +208,7 @@
     public void removeUserFromGroup( String userUid, String groupCn ) throws NamingException
     {
         DirContext adminCtx = getContextAsAdmin();
-        Attributes changes = new BasicAttributes( "uniqueMember", "uid=" + userUid + ",ou=users,ou=system", true );
+        Attributes changes = new AttributesImpl( "uniqueMember", "uid=" + userUid + ",ou=users,ou=system", true );
         adminCtx.modifyAttributes( "cn=" + groupCn + ",ou=groups", DirContext.REMOVE_ATTRIBUTE, changes );
     }
 
@@ -281,13 +287,13 @@
         Attribute administrativeRole = ap.get( "administrativeRole" );
         if ( administrativeRole == null || !administrativeRole.contains( SubentryService.AC_AREA ) )
         {
-            Attributes changes = new BasicAttributes( "administrativeRole", SubentryService.AC_AREA, true );
+            Attributes changes = new AttributesImpl( "administrativeRole", SubentryService.AC_AREA, true );
             adminCtx.modifyAttributes( "", DirContext.ADD_ATTRIBUTE, changes );
         }
 
         // now add the A/C subentry below ou=system
-        Attributes subentry = new BasicAttributes( "cn", cn, true );
-        Attribute objectClass = new BasicAttribute( "objectClass" );
+        Attributes subentry = new AttributesImpl( "cn", cn, true );
+        Attribute objectClass = new AttributeImpl( "objectClass" );
         subentry.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "subentry" );
@@ -311,7 +317,7 @@
         DirContext adminCtx = getContextAsAdmin();
 
         // modify the entry relative to ou=system to include the aciItem
-        Attributes changes = new BasicAttributes( "entryACI", aciItem, true );
+        Attributes changes = new AttributesImpl( "entryACI", aciItem, true );
         adminCtx.modifyAttributes( rdn, DirContext.ADD_ATTRIBUTE, changes );
     }
 
@@ -327,7 +333,7 @@
         DirContext adminCtx = getContextAsAdmin();
 
         // modify the entry relative to ou=system to include the aciItem
-        Attributes changes = new BasicAttributes( "subentryACI", aciItem, true );
+        Attributes changes = new AttributesImpl( "subentryACI", aciItem, true );
         adminCtx.modifyAttributes( "", DirContext.ADD_ATTRIBUTE, changes );
     }
 }

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AddAuthorizationITest.java Mon Jan  8 11:43:32 2007
@@ -21,10 +21,14 @@
 
 
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 import javax.naming.NamingException;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
 
 
 /**
@@ -51,8 +55,8 @@
      */
     public boolean checkCanAddEntryAs( String uid, String password, String entryRdn ) throws NamingException
     {
-        Attributes testEntry = new BasicAttributes( "ou", "testou", true );
-        Attribute objectClass = new BasicAttribute( "objectClass" );
+        Attributes testEntry = new AttributesImpl( "ou", "testou", true );
+        Attribute objectClass = new AttributeImpl( "objectClass" );
         testEntry.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "organizationalUnit" );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminITest.java Mon Jan  8 11:43:32 2007
@@ -24,11 +24,14 @@
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.directory.*;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.util.ArrayUtils;
 
 
@@ -86,7 +89,7 @@
      */
     public void testModifyOnAdminByAdmin() throws NamingException
     {
-        Attributes attributes = new LockableAttributesImpl();
+        Attributes attributes = new AttributesImpl();
         attributes.put( "userPassword", "replaced" );
         sysRoot.modifyAttributes( "uid=admin", DirContext.REPLACE_ATTRIBUTE, attributes );
         Attributes newAttrs = sysRoot.getAttributes( "uid=admin" );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminITest.java Mon Jan  8 11:43:32 2007
@@ -24,11 +24,14 @@
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.directory.*;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.core.unit.AbstractNonAdminTestCase;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 
 
 /**
@@ -83,7 +86,7 @@
      */
     public void testModifyOnAdminByNonAdmin()
     {
-        Attributes attributes = new LockableAttributesImpl();
+        Attributes attributes = new AttributesImpl();
         attributes.put( "userPassword", "replaced" );
 
         try

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/CompareAuthorizationITest.java Mon Jan  8 11:43:32 2007
@@ -22,10 +22,14 @@
 
 import org.apache.directory.server.core.jndi.ServerLdapContext;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 import javax.naming.NamingException;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
 
 
 /**
@@ -59,8 +63,8 @@
         throws NamingException
     {
         // create the entry with the telephoneNumber attribute to compare
-        Attributes testEntry = new BasicAttributes( "ou", "testou", true );
-        Attribute objectClass = new BasicAttribute( "objectClass" );
+        Attributes testEntry = new AttributesImpl( "ou", "testou", true );
+        Attribute objectClass = new AttributeImpl( "objectClass" );
         testEntry.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "organizationalUnit" );
@@ -205,9 +209,9 @@
     public void testPasswordCompare() throws NamingException
     {
         DirContext adminCtx = getContextAsAdmin();
-        Attributes user = new BasicAttributes( "uid", "bob", true );
+        Attributes user = new AttributesImpl( "uid", "bob", true );
         user.put( "userPassword", "bobspassword".getBytes() );
-        Attribute objectClass = new BasicAttribute( "objectClass" );
+        Attribute objectClass = new AttributeImpl( "objectClass" );
         user.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "person" );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/DeleteAuthorizationITest.java Mon Jan  8 11:43:32 2007
@@ -21,10 +21,14 @@
 
 
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 import javax.naming.NamingException;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
 
 
 /**
@@ -56,8 +60,8 @@
      */
     public boolean checkCanDeleteEntryAs( String uid, String password, String entryRdn ) throws NamingException
     {
-        Attributes testEntry = new BasicAttributes( "ou", "testou", true );
-        Attribute objectClass = new BasicAttribute( "objectClass" );
+        Attributes testEntry = new AttributesImpl( "ou", "testou", true );
+        Attribute objectClass = new AttributeImpl( "objectClass" );
         testEntry.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "organizationalUnit" );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java Mon Jan  8 11:43:32 2007
@@ -21,12 +21,18 @@
 
 
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 import javax.naming.NamingException;
 import javax.naming.NamingEnumeration;
 import javax.naming.Name;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+
 import java.util.List;
 import java.util.ArrayList;
 
@@ -57,12 +63,12 @@
      * false otherwise.
      * @throws javax.naming.NamingException if there are problems conducting the test
      */
-    public boolean checkCanModifyAs( String uid, String password, String entryRdn, ModificationItem[] mods )
+    public boolean checkCanModifyAs( String uid, String password, String entryRdn, ModificationItemImpl[] mods )
         throws NamingException
     {
         // create the entry with the telephoneNumber attribute to modify
-        Attributes testEntry = new BasicAttributes( "ou", "testou", true );
-        Attribute objectClass = new BasicAttribute( "objectClass" );
+        Attributes testEntry = new AttributesImpl( "ou", "testou", true );
+        Attribute objectClass = new AttributeImpl( "objectClass" );
         testEntry.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "organizationalUnit" );
@@ -117,8 +123,8 @@
         throws NamingException
     {
         // create the entry with the telephoneNumber attribute to modify
-        Attributes testEntry = new BasicAttributes( "ou", "testou", true );
-        Attribute objectClass = new BasicAttribute( "objectClass" );
+        Attributes testEntry = new AttributesImpl( "ou", "testou", true );
+        Attribute objectClass = new AttributeImpl( "objectClass" );
         testEntry.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "organizationalUnit" );
@@ -192,7 +198,7 @@
      * false otherwise.
      * @throws javax.naming.NamingException if there are problems conducting the test
      */
-    public boolean checkCanSelfModify( String uid, String password, ModificationItem[] mods ) throws NamingException
+    public boolean checkCanSelfModify( String uid, String password, ModificationItemImpl[] mods ) throws NamingException
     {
         try
         {
@@ -217,17 +223,17 @@
      * @return the array of modification items represting the changes
      * @throws NamingException if there are problems accessing attributes
      */
-    private ModificationItem[] toItems( int modOp, Attributes changes ) throws NamingException
+    private ModificationItemImpl[] toItems( int modOp, Attributes changes ) throws NamingException
     {
         List mods = new ArrayList();
         NamingEnumeration list = changes.getAll();
         while ( list.hasMore() )
         {
             Attribute attr = ( Attribute ) list.next();
-            mods.add( new ModificationItem( modOp, attr ) );
+            mods.add( new ModificationItemImpl( modOp, attr ) );
         }
-        ModificationItem[] modArray = new ModificationItem[mods.size()];
-        return ( ModificationItem[] ) mods.toArray( modArray );
+        ModificationItemImpl[] modArray = new ModificationItemImpl[mods.size()];
+        return ( ModificationItemImpl[] ) mods.toArray( modArray );
     }
 
 
@@ -241,7 +247,7 @@
         createUser( "billyd", "billyd" );
 
         // create the password modification
-        ModificationItem[] mods = toItems( DirContext.REPLACE_ATTRIBUTE, new BasicAttributes( "userPassword",
+        ModificationItemImpl[] mods = toItems( DirContext.REPLACE_ATTRIBUTE, new AttributesImpl( "userPassword",
             "williams", true ) );
 
         // try a modify operation which should fail without any ACI
@@ -274,7 +280,7 @@
         // ----------------------------------------------------------------------------------
 
         // create the add modifications
-        ModificationItem[] mods = toItems( DirContext.ADD_ATTRIBUTE, new BasicAttributes( "registeredAddress",
+        ModificationItemImpl[] mods = toItems( DirContext.ADD_ATTRIBUTE, new AttributesImpl( "registeredAddress",
             "100 Park Ave.", true ) );
 
         // create the non-admin user
@@ -309,7 +315,7 @@
         // ----------------------------------------------------------------------------------
 
         // now let's test to see if we can perform a modify with a delete op
-        mods = toItems( DirContext.REMOVE_ATTRIBUTE, new BasicAttributes( "telephoneNumber", "867-5309", true ) );
+        mods = toItems( DirContext.REMOVE_ATTRIBUTE, new AttributesImpl( "telephoneNumber", "867-5309", true ) );
 
         // make sure we cannot remove the telephone number from the test entry
         assertFalse( checkCanModifyAs( "billyd", "billyd", "ou=testou", mods ) );
@@ -331,7 +337,7 @@
         // ----------------------------------------------------------------------------------
 
         // now let's test to see if we can perform a modify with a delete op
-        mods = toItems( DirContext.REPLACE_ATTRIBUTE, new BasicAttributes( "telephoneNumber", "867-5309", true ) );
+        mods = toItems( DirContext.REPLACE_ATTRIBUTE, new AttributesImpl( "telephoneNumber", "867-5309", true ) );
 
         // make sure we cannot remove the telephone number from the test entry
         assertFalse( checkCanModifyAs( "billyd", "billyd", "ou=testou", mods ) );
@@ -357,7 +363,7 @@
         // Modify with Attribute Addition
         // ----------------------------------------------------------------------------------
         // create the add modifications
-        Attributes changes = new BasicAttributes( "registeredAddress", "100 Park Ave.", true );
+        Attributes changes = new AttributesImpl( "registeredAddress", "100 Park Ave.", true );
 
         // try a modify operation which should fail without any ACI
         assertFalse( checkCanModifyAs( "billyd", "billyd", "ou=testou", DirContext.ADD_ATTRIBUTE, changes ) );
@@ -379,7 +385,7 @@
         // ----------------------------------------------------------------------------------
 
         // now let's test to see if we can perform a modify with a delete op
-        changes = new BasicAttributes( "telephoneNumber", "867-5309", true );
+        changes = new AttributesImpl( "telephoneNumber", "867-5309", true );
 
         // make sure we cannot remove the telephone number from the test entry
         assertFalse( checkCanModifyAs( "billyd", "billyd", "ou=testou", DirContext.REMOVE_ATTRIBUTE, changes ) );
@@ -401,7 +407,7 @@
         // ----------------------------------------------------------------------------------
 
         // now let's test to see if we can perform a modify with a delete op
-        changes = new BasicAttributes( "telephoneNumber", "867-5309", true );
+        changes = new AttributesImpl( "telephoneNumber", "867-5309", true );
 
         // make sure we cannot remove the telephone number from the test entry
         assertFalse( checkCanModifyAs( "billyd", "billyd", "ou=testou", DirContext.REPLACE_ATTRIBUTE, changes ) );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/MoveRenameAuthorizationITest.java Mon Jan  8 11:43:32 2007
@@ -21,10 +21,14 @@
 
 
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 import javax.naming.NamingException;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
 
 
 /**
@@ -53,8 +57,8 @@
     public boolean checkCanRenameAs( String uid, String password, String entryRdn, String newRdn )
         throws NamingException
     {
-        Attributes testEntry = new BasicAttributes( "ou", "testou", true );
-        Attribute objectClass = new BasicAttribute( "objectClass" );
+        Attributes testEntry = new AttributesImpl( "ou", "testou", true );
+        Attribute objectClass = new AttributeImpl( "objectClass" );
         testEntry.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "organizationalUnit" );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/authz/SearchAuthorizationITest.java Mon Jan  8 11:43:32 2007
@@ -22,14 +22,19 @@
 
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
-import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 import javax.naming.NamingException;
 import javax.naming.Name;
 import javax.naming.NamingEnumeration;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+
 import java.util.Map;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -64,12 +69,12 @@
         Attributes[] attributes = new Attributes[count];
         for ( int ii = 0; ii < count; ii++ )
         {
-            attributes[ii] = new LockableAttributesImpl();
-            Attribute oc = new LockableAttributeImpl( "objectClass" );
+            attributes[ii] = new AttributesImpl();
+            Attribute oc = new AttributeImpl( "objectClass" );
             oc.add( "top" );
             oc.add( "organizationalUnit" );
             attributes[ii].put( oc );
-            Attribute ou = new LockableAttributeImpl( "ou" );
+            Attribute ou = new AttributeImpl( "ou" );
             ou.add( String.valueOf( ii ) );
             ou.add( "testEntry" );
             attributes[ii].put( ou );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceITest.java Mon Jan  8 11:43:32 2007
@@ -21,12 +21,18 @@
 
 
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
-import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
-import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 
 import javax.naming.NamingException;
 import javax.naming.NamingEnumeration;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+
 import java.util.Map;
 import java.util.HashMap;
 
@@ -41,8 +47,8 @@
 {
     public Attributes getTestEntry( String cn )
     {
-        Attributes subentry = new LockableAttributesImpl();
-        Attribute objectClass = new LockableAttributeImpl( "objectClass" );
+        Attributes subentry = new AttributesImpl();
+        Attribute objectClass = new AttributeImpl( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( "person" );
         subentry.put( objectClass );
@@ -54,8 +60,8 @@
 
     public Attributes getTestSubentry()
     {
-        Attributes subentry = new LockableAttributesImpl();
-        Attribute objectClass = new LockableAttributeImpl( "objectClass" );
+        Attributes subentry = new AttributesImpl();
+        Attribute objectClass = new AttributeImpl( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( "subentry" );
         objectClass.add( "collectiveAttributeSubentry" );
@@ -69,8 +75,8 @@
 
     public Attributes getTestSubentry2()
     {
-        Attributes subentry = new LockableAttributesImpl();
-        Attribute objectClass = new LockableAttributeImpl( "objectClass" );
+        Attributes subentry = new AttributesImpl();
+        Attribute objectClass = new AttributeImpl( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( "subentry" );
         objectClass.add( "collectiveAttributeSubentry" );
@@ -84,8 +90,8 @@
 
     public Attributes getTestSubentry3()
     {
-        Attributes subentry = new LockableAttributesImpl();
-        Attribute objectClass = new LockableAttributeImpl( "objectClass" );
+        Attributes subentry = new AttributesImpl();
+        Attribute objectClass = new AttributeImpl( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( "subentry" );
         objectClass.add( "collectiveAttributeSubentry" );
@@ -99,10 +105,10 @@
 
     public void addAdministrativeRole( String role ) throws NamingException
     {
-        Attribute attribute = new LockableAttributeImpl( "administrativeRole" );
+        Attribute attribute = new AttributeImpl( "administrativeRole" );
         attribute.add( role );
-        ModificationItem item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attribute );
-        super.sysRoot.modifyAttributes( "", new ModificationItem[]
+        ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attribute );
+        super.sysRoot.modifyAttributes( "", new ModificationItemImpl[]
             { item } );
     }
 
@@ -189,9 +195,9 @@
         // now modify entries included by the subentry to have collectiveExclusions
         // -------------------------------------------------------------------
 
-        ModificationItem[] items = new ModificationItem[]
-            { new ModificationItem( DirContext.ADD_ATTRIBUTE,
-                new LockableAttributeImpl( "collectiveExclusions", "c-ou" ) ) };
+        ModificationItemImpl[] items = new ModificationItemImpl[]
+            { new ModificationItemImpl( DirContext.ADD_ATTRIBUTE,
+                new AttributeImpl( "collectiveExclusions", "c-ou" ) ) };
         super.sysRoot.modifyAttributes( "ou=services,ou=configuration", items );
 
         // entry should not show the c-ou collective attribute anymore
@@ -245,8 +251,8 @@
         // now modify an entry to exclude all collective attributes
         // -------------------------------------------------------------------
 
-        items = new ModificationItem[]
-            { new ModificationItem( DirContext.REPLACE_ATTRIBUTE, new LockableAttributeImpl( "collectiveExclusions",
+        items = new ModificationItemImpl[]
+            { new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, new AttributeImpl( "collectiveExclusions",
                 "excludeAllCollectiveAttributes" ) ) };
         super.sysRoot.modifyAttributes( "ou=interceptors,ou=configuration", items );
 
@@ -310,9 +316,9 @@
         // now modify entries included by the subentry to have collectiveExclusions
         // -------------------------------------------------------------------
 
-        ModificationItem[] items = new ModificationItem[]
-            { new ModificationItem( DirContext.ADD_ATTRIBUTE,
-                new LockableAttributeImpl( "collectiveExclusions", "c-ou" ) ) };
+        ModificationItemImpl[] items = new ModificationItemImpl[]
+            { new ModificationItemImpl( DirContext.ADD_ATTRIBUTE,
+                new AttributeImpl( "collectiveExclusions", "c-ou" ) ) };
         super.sysRoot.modifyAttributes( "ou=services,ou=configuration", items );
         entries = getAllEntries();
 
@@ -369,8 +375,8 @@
         // now modify an entry to exclude all collective attributes
         // -------------------------------------------------------------------
 
-        items = new ModificationItem[]
-            { new ModificationItem( DirContext.REPLACE_ATTRIBUTE, new LockableAttributeImpl( "collectiveExclusions",
+        items = new ModificationItemImpl[]
+            { new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, new AttributeImpl( "collectiveExclusions",
                 "excludeAllCollectiveAttributes" ) ) };
         super.sysRoot.modifyAttributes( "ou=interceptors,ou=configuration", items );
         entries = getAllEntries();

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/configuration/DirectoryPartitionConfigurationITest.java Mon Jan  8 11:43:32 2007
@@ -26,7 +26,6 @@
 import javax.naming.InitialContext;
 import javax.naming.NameNotFoundException;
 import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttributes;
 
 import junit.framework.Assert;
 
@@ -36,6 +35,7 @@
 import org.apache.directory.server.core.jndi.CoreContextFactory;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 
 
 /**
@@ -57,7 +57,7 @@
         MutablePartitionConfiguration partitionCfg = new MutablePartitionConfiguration();
         partitionCfg.setName( "removable" );
         partitionCfg.setSuffix( "ou=removable" );
-        Attributes ctxEntry = new BasicAttributes( true );
+        Attributes ctxEntry = new AttributesImpl( true );
         ctxEntry.put( "objectClass", "top" );
         ctxEntry.put( "ou", "removable" );
         partitionCfg.setContextEntry( ctxEntry );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/event/EventServiceITest.java Mon Jan  8 11:43:32 2007
@@ -21,10 +21,19 @@
 
 
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 
 import javax.naming.NamingException;
-import javax.naming.directory.*;
-import javax.naming.event.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.SearchControls;
+import javax.naming.event.EventDirContext;
+import javax.naming.event.NamespaceChangeListener;
+import javax.naming.event.NamingEvent;
+import javax.naming.event.NamingExceptionEvent;
+import javax.naming.event.ObjectChangeListener;
+
 import java.util.List;
 import java.util.ArrayList;
 import java.util.EventObject;
@@ -47,8 +56,8 @@
         TestListener listener = new TestListener();
         EventDirContext ctx = ( EventDirContext ) super.sysRoot.lookup( "" );
         ctx.addNamingListener( "", SearchControls.SUBTREE_SCOPE, listener );
-        Attributes testEntry = new BasicAttributes( "ou", "testentry", true );
-        Attribute objectClass = new BasicAttribute( "objectClass", "top" );
+        Attributes testEntry = new AttributesImpl( "ou", "testentry", true );
+        Attribute objectClass = new AttributeImpl( "objectClass", "top" );
         objectClass.add( "organizationalUnit" );
         testEntry.put( objectClass );
         ctx.createSubcontext( "ou=testentry", testEntry );
@@ -84,8 +93,8 @@
         TestListener listener = new TestListener();
         EventDirContext ctx = ( EventDirContext ) super.sysRoot.lookup( "" );
         ctx.addNamingListener( "", SearchControls.SUBTREE_SCOPE, listener );
-        Attributes testEntry = new BasicAttributes( "ou", "testentry", true );
-        Attribute objectClass = new BasicAttribute( "objectClass", "top" );
+        Attributes testEntry = new AttributesImpl( "ou", "testentry", true );
+        Attribute objectClass = new AttributeImpl( "objectClass", "top" );
         objectClass.add( "organizationalUnit" );
         testEntry.put( objectClass );
         ctx.createSubcontext( "ou=testentry", testEntry );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceITest.java Mon Jan  8 11:43:32 2007
@@ -25,10 +25,7 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
-import javax.naming.directory.ModificationItem;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
@@ -38,6 +35,9 @@
 import org.apache.directory.shared.ldap.exception.LdapNameAlreadyBoundException;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 
 
@@ -85,7 +85,7 @@
         {
             SearchResult result = ( SearchResult ) list.next();
             assertNotNull( result.getAttributes() );
-            assertEquals( "uid=akarasulu,ou=users,ou=system", result.getName().toString() );
+            assertEquals( "uid=akarasulu,ou=users,ou=system", result.getName() );
         }
 
         assertFalse( list.hasMore() );
@@ -253,8 +253,8 @@
      */
     public void testFailModifyNoSuchObject() throws NamingException
     {
-        Attributes attrs = new BasicAttributes( true );
-        Attribute ou = new BasicAttribute( "ou" );
+        Attributes attrs = new AttributesImpl( true );
+        Attribute ou = new AttributeImpl( "ou" );
         ou.add( "users" );
         ou.add( "dummyValue" );
         attrs.put( ou );
@@ -270,8 +270,8 @@
             assertEquals( ResultCodeEnum.NO_SUCH_OBJECT, e.getResultCode() );
         }
 
-        ModificationItem[] mods = new ModificationItem[]
-            { new ModificationItem( DirContext.ADD_ATTRIBUTE, ou ) };
+        ModificationItemImpl[] mods = new ModificationItemImpl[]
+            { new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, ou ) };
 
         try
         {
@@ -292,8 +292,8 @@
      */
     public void testModifyControl() throws NamingException
     {
-        Attributes attrs = new BasicAttributes( true );
-        Attribute attr = new BasicAttribute( "ou" );
+        Attributes attrs = new AttributesImpl( true );
+        Attribute attr = new AttributeImpl( "ou" );
         attr.add( "dummyValue" );
         attrs.put( attr );
         sysRoot.modifyAttributes( "ou=users", DirContext.ADD_ATTRIBUTE, attrs );
@@ -301,10 +301,10 @@
         assertTrue( ou.contains( "users" ) );
         assertTrue( ou.contains( "dummyValue" ) );
 
-        attr = new BasicAttribute( "ou" );
+        attr = new AttributeImpl( "ou" );
         attr.add( "another" );
-        ModificationItem[] mods = new ModificationItem[]
-            { new ModificationItem( DirContext.ADD_ATTRIBUTE, attr ) };
+        ModificationItemImpl[] mods = new ModificationItemImpl[]
+            { new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr ) };
 
         sysRoot.modifyAttributes( "ou=users", mods );
         ou = sysRoot.getAttributes( "ou=users" ).get( "ou" );
@@ -381,7 +381,7 @@
         {
             SearchResult result = ( SearchResult ) list.next();
             assertNotNull( result.getAttributes() );
-            assertEquals( "uid=akarasulu,ou=users,ou=system", result.getName().toString() );
+            assertEquals( "uid=akarasulu,ou=users,ou=system", result.getName() );
         }
 
         assertFalse( list.hasMore() );
@@ -398,8 +398,8 @@
      */
     public void testFailAddOnAlias() throws NamingException
     {
-        Attributes attrs = new BasicAttributes( true );
-        Attribute attr = new BasicAttribute( "objectClass" );
+        Attributes attrs = new AttributesImpl( true );
+        Attribute attr = new AttributeImpl( "objectClass" );
         attr.add( "top" );
         attr.add( "alias" );
         attrs.put( attr );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/CreateContextITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/CreateContextITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/CreateContextITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/CreateContextITest.java Mon Jan  8 11:43:32 2007
@@ -26,13 +26,13 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 
 
 /**
@@ -45,8 +45,8 @@
 {
     protected Attributes getPersonAttributes( String sn, String cn )
     {
-        Attributes attrs = new BasicAttributes();
-        Attribute ocls = new BasicAttribute( "objectClass" );
+        Attributes attrs = new AttributesImpl();
+        Attribute ocls = new AttributeImpl( "objectClass" );
         ocls.add( "top" );
         ocls.add( "person" );
         attrs.put( ocls );
@@ -98,8 +98,8 @@
         /*
          * create ou=testing00,ou=system
          */
-        Attributes attributes = new BasicAttributes( true );
-        Attribute attribute = new BasicAttribute( "objectClass" );
+        Attributes attributes = new AttributesImpl( true );
+        Attribute attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -121,8 +121,8 @@
         /*
          * create ou=testing01,ou=system
          */
-        attributes = new BasicAttributes( true );
-        attribute = new BasicAttribute( "objectClass" );
+        attributes = new AttributesImpl( true );
+        attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -144,8 +144,8 @@
         /*
          * create ou=testing02,ou=system
          */
-        attributes = new BasicAttributes( true );
-        attribute = new BasicAttribute( "objectClass" );
+        attributes = new AttributesImpl( true );
+        attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -169,8 +169,8 @@
          */
         ctx = ( DirContext ) sysRoot.lookup( "ou=testing01" );
 
-        attributes = new BasicAttributes( true );
-        attribute = new BasicAttribute( "objectClass" );
+        attributes = new AttributesImpl( true );
+        attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -200,8 +200,8 @@
         /*
          * create ou=testing00,ou=system
          */
-        attributes = new BasicAttributes( true );
-        attribute = new BasicAttribute( "objectClass" );
+        attributes = new AttributesImpl( true );
+        attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -223,8 +223,8 @@
         /*
          * fail on recreate attempt for ou=testing00,ou=system
          */
-        attributes = new BasicAttributes( true );
-        attribute = new BasicAttribute( "objectClass" );
+        attributes = new AttributesImpl( true );
+        attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -247,8 +247,8 @@
     
     public void testCreateContextWithCompositeName() throws Exception
     {
-        Attributes attrs = new BasicAttributes( true );
-        Attribute objclass = new BasicAttribute( "objectClass" );
+        Attributes attrs = new AttributesImpl( true );
+        Attribute objclass = new AttributeImpl( "objectClass" );
         objclass.add( "top" );
         objclass.add( "extensibleObject" );
         attrs.put( objclass );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java Mon Jan  8 11:43:32 2007
@@ -22,11 +22,11 @@
 
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
 import org.apache.directory.server.core.jndi.CoreContextFactory;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 
 import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.Attribute;
-import javax.naming.directory.BasicAttribute;
 import javax.naming.directory.SearchResult;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.DirContext;
@@ -47,19 +47,19 @@
     protected void setUp() throws Exception
     {
         super.setUp();
-        Attributes people = new BasicAttributes( true );
-        Attribute attribute = new BasicAttribute( "objectClass" );
+        Attributes people = new AttributesImpl( true );
+        Attribute attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         people.put( attribute );
         people.put( "ou", "people" );
         sysRoot.createSubcontext( "ou=people", people );
 
-        Attributes user = new BasicAttributes( "uid", "bob" );
+        Attributes user = new AttributesImpl( "uid", "bob" );
         user.put( "cn", "Bob Hamilton" );
         user.put( "userPassword", "bobspassword".getBytes( "UTF-8" ) );
 
-        Attribute objectClass = new BasicAttribute( "objectClass" );
+        Attribute objectClass = new AttributeImpl( "objectClass" );
         user.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "person" );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java Mon Jan  8 11:43:32 2007
@@ -7,16 +7,16 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.InitialDirContext;
 import javax.naming.directory.InvalidAttributeIdentifierException;
 import javax.naming.directory.InvalidAttributeValueException;
-import javax.naming.directory.ModificationItem;
 import javax.naming.directory.SchemaViolationException;
 
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 
 /**
  * A test case which demonstrates the three defects described in DIRSERVER-791.
@@ -30,15 +30,15 @@
      */
     protected Attributes getTestEntryAttributes() {
 
-        Attributes attrs = new BasicAttributes();
-        Attribute ocls = new BasicAttribute("objectClass");
+        Attributes attrs = new AttributesImpl();
+        Attribute ocls = new AttributeImpl("objectClass");
         ocls.add("top");
         ocls.add("person");
         ocls.add("organizationalPerson");
         ocls.add("inetOrgPerson");
         attrs.put(ocls);
         
-        Attribute cn = new BasicAttribute("cn");
+        Attribute cn = new AttributeImpl("cn");
         cn.add("test");
         cn.add("aaa");
         attrs.put(cn);
@@ -68,9 +68,9 @@
         env.put( Context.PROVIDER_URL, "ou=system" );
 
         DirContext ctx = new InitialDirContext( env );
-        Attribute attr = new BasicAttribute("cn", "aaa");
-        ModificationItem modification = new ModificationItem( DirContext.REMOVE_ATTRIBUTE, attr );
-        ctx.modifyAttributes( "cn=test", new ModificationItem[] { modification } );
+        Attribute attr = new AttributeImpl("cn", "aaa");
+        ModificationItemImpl modification = new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE, attr );
+        ctx.modifyAttributes( "cn=test", new ModificationItemImpl[] { modification } );
 
         Attributes attrs = ctx.getAttributes("cn=test", new String[] { "cn" });
         Attribute cn = attrs.get("cn");
@@ -92,9 +92,9 @@
 
         DirContext ctx = new InitialDirContext( env );
 
-        Attribute attr = new BasicAttribute("cn", "test");
-        ModificationItem modification = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, attr);
-        ctx.modifyAttributes("cn=test", new ModificationItem[] { modification });
+        Attribute attr = new AttributeImpl("cn", "test");
+        ModificationItemImpl modification = new ModificationItemImpl(DirContext.REPLACE_ATTRIBUTE, attr);
+        ctx.modifyAttributes("cn=test", new ModificationItemImpl[] { modification });
 
         Attributes attrs = ctx.getAttributes("cn=test", new String[] { "cn" });
         Attribute cn = attrs.get("cn");
@@ -118,12 +118,12 @@
         DirContext ctx = new InitialDirContext( env );
 
 
-        Attribute attr = new BasicAttribute( "objectclass", "test" );
-        ModificationItem modification = new ModificationItem(DirContext.ADD_ATTRIBUTE, attr);
+        Attribute attr = new AttributeImpl( "objectclass", "test" );
+        ModificationItemImpl modification = new ModificationItemImpl(DirContext.ADD_ATTRIBUTE, attr);
         
         try 
         {
-            ctx.modifyAttributes("cn=test", new ModificationItem[] { modification });
+            ctx.modifyAttributes("cn=test", new ModificationItemImpl[] { modification });
             fail("Exception expected");
         } 
         catch ( SchemaViolationException sve ) 
@@ -163,12 +163,12 @@
         DirContext ctx = new InitialDirContext( env );
 
 
-        Attribute attr = new BasicAttribute("bootParameter", "test");
-        ModificationItem modification = new ModificationItem(DirContext.ADD_ATTRIBUTE, attr);
+        Attribute attr = new AttributeImpl("bootParameter", "test");
+        ModificationItemImpl modification = new ModificationItemImpl(DirContext.ADD_ATTRIBUTE, attr);
     
         try 
         {
-            ctx.modifyAttributes("cn=test", new ModificationItem[] { modification });
+            ctx.modifyAttributes("cn=test", new ModificationItemImpl[] { modification });
             fail("Exception expected");
         } 
         catch (SchemaViolationException sve) 

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DestroyContextITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DestroyContextITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DestroyContextITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/DestroyContextITest.java Mon Jan  8 11:43:32 2007
@@ -23,12 +23,12 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
 
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 
 
 /**
@@ -46,8 +46,8 @@
         /*
          * create ou=testing00,ou=system
          */
-        Attributes attributes = new BasicAttributes( true );
-        Attribute attribute = new BasicAttribute( "objectClass" );
+        Attributes attributes = new AttributesImpl( true );
+        Attribute attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -69,8 +69,8 @@
         /*
          * create ou=testing01,ou=system
          */
-        attributes = new BasicAttributes( true );
-        attribute = new BasicAttribute( "objectClass" );
+        attributes = new AttributesImpl( true );
+        attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -92,8 +92,8 @@
         /*
          * create ou=testing02,ou=system
          */
-        attributes = new BasicAttributes( true );
-        attribute = new BasicAttribute( "objectClass" );
+        attributes = new AttributesImpl( true );
+        attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -117,8 +117,8 @@
          */
         ctx = ( DirContext ) sysRoot.lookup( "ou=testing01" );
 
-        attributes = new BasicAttributes( true );
-        attribute = new BasicAttribute( "objectClass" );
+        attributes = new AttributesImpl( true );
+        attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectITest.java Mon Jan  8 11:43:32 2007
@@ -20,9 +20,14 @@
 package org.apache.directory.server.core.jndi;
 
 
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 
-import javax.naming.directory.*;
 
 
 /**
@@ -35,8 +40,8 @@
 {
     public void testExtensibleObjectModify() throws Exception
     {
-        Attributes attributes = new BasicAttributes( true );
-        Attribute attribute = new BasicAttribute( "objectClass" );
+        Attributes attributes = new AttributesImpl( true );
+        Attribute attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -55,11 +60,11 @@
         assertTrue( attribute.contains( "top" ) );
         assertTrue( attribute.contains( "organizationalUnit" ) );
 
-        Attributes newattribs = new BasicAttributes( true );
-        Attribute freeform = new BasicAttribute( "cn" );
+        Attributes newattribs = new AttributesImpl( true );
+        Attribute freeform = new AttributeImpl( "cn" );
         freeform.add( "testing" );
         newattribs.put( freeform );
-        Attribute objectClass = new BasicAttribute( "objectClass" );
+        Attribute objectClass = new AttributeImpl( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( "extensibleObject" );
         objectClass.add( "organizationalUnit" );
@@ -81,8 +86,8 @@
 
     public void testExtensibleObjectAdd() throws Exception
     {
-        Attributes attributes = new BasicAttributes( true );
-        Attribute attribute = new BasicAttribute( "objectClass" );
+        Attributes attributes = new AttributesImpl( true );
+        Attribute attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );
         attribute.add( "extensibleObject" );
         attribute.add( "organizationalUnit" );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java Mon Jan  8 11:43:32 2007
@@ -23,11 +23,18 @@
 import javax.naming.NamingException;
 import javax.naming.Context;
 import javax.naming.NamingEnumeration;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.core.configuration.MutablePartitionConfiguration;
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 
 import java.util.HashSet;
 import java.util.Set;
@@ -57,8 +64,8 @@
         indexedAttributes.add( "uid" );
         partition.setIndexedAttributes( indexedAttributes );
 
-        Attributes attrs = new BasicAttributes( true );
-        Attribute objectClass = new BasicAttribute( "objectClass" );
+        Attributes attrs = new AttributesImpl( true );
+        Attribute objectClass = new AttributeImpl( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( "domain" );
         objectClass.add( "extensibleObject" );
@@ -98,8 +105,8 @@
     {
         String dn = "ou=Test";
 
-        Attributes attributes = new BasicAttributes( true );
-        Attribute attribute = new BasicAttribute( "objectClass" );
+        Attributes attributes = new AttributesImpl( true );
+        Attribute attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -128,8 +135,8 @@
         String dn = "ou=Test";
         String description = "New Value";
 
-        Attributes attributes = new BasicAttributes( true );
-        Attribute attribute = new BasicAttribute( "objectClass" );
+        Attributes attributes = new AttributesImpl( true );
+        Attribute attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -139,8 +146,8 @@
         DirContext ctx = sysRoot.createSubcontext( dn, attributes );
         assertNotNull( ctx );
 
-        ModificationItem[] mods = new ModificationItem[1];
-        mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, new BasicAttribute( "description", description ) );
+        ModificationItemImpl[] mods = new ModificationItemImpl[1];
+        mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, new AttributeImpl( "description", description ) );
 
         sysRoot.modifyAttributes( dn, mods );
 
@@ -168,8 +175,8 @@
     {
         String dn = "ou=Test";
 
-        Attributes attributes = new BasicAttributes( true );
-        Attribute attribute = new BasicAttribute( "objectClass" );
+        Attributes attributes = new AttributesImpl( true );
+        Attribute attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ModifyContextITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ModifyContextITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ModifyContextITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ModifyContextITest.java Mon Jan  8 11:43:32 2007
@@ -23,11 +23,11 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
 
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 
 
 /**
@@ -48,8 +48,8 @@
             /*
              * create ou=testing00,ou=system
              */
-            Attributes attributes = new BasicAttributes( true );
-            Attribute attribute = new BasicAttribute( "objectClass" );
+            Attributes attributes = new AttributesImpl( true );
+            Attribute attribute = new AttributeImpl( "objectClass" );
             attribute.add( "top" );
             attribute.add( "organizationalUnit" );
             attributes.put( attribute );
@@ -71,8 +71,8 @@
             /*
              * create ou=testing01,ou=system
              */
-            attributes = new BasicAttributes( true );
-            attribute = new BasicAttribute( "objectClass" );
+            attributes = new AttributesImpl( true );
+            attribute = new AttributeImpl( "objectClass" );
             attribute.add( "top" );
             attribute.add( "organizationalUnit" );
             attributes.put( attribute );
@@ -94,8 +94,8 @@
             /*
              * create ou=testing02,ou=system
              */
-            attributes = new BasicAttributes( true );
-            attribute = new BasicAttribute( "objectClass" );
+            attributes = new AttributesImpl( true );
+            attribute = new AttributeImpl( "objectClass" );
             attribute.add( "top" );
             attribute.add( "organizationalUnit" );
             attributes.put( attribute );
@@ -119,8 +119,8 @@
              */
             ctx = ( DirContext ) sysRoot.lookup( "ou=testing01" );
 
-            attributes = new BasicAttributes( true );
-            attribute = new BasicAttribute( "objectClass" );
+            attributes = new AttributesImpl( true );
+            attribute = new AttributeImpl( "objectClass" );
             attribute.add( "top" );
             attribute.add( "organizationalUnit" );
             attributes.put( attribute );
@@ -147,7 +147,7 @@
 
     public void testModifyOperation() throws NamingException
     {
-        Attributes attributes = new BasicAttributes( true );
+        Attributes attributes = new AttributesImpl( true );
         attributes.put( "ou", "testCases" );
         sysRoot.modifyAttributes( "ou=testing00", DirContext.ADD_ATTRIBUTE, attributes );
         attributes = null;

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryITest.java Mon Jan  8 11:43:32 2007
@@ -27,13 +27,13 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.SchemaViolationException;
 import javax.naming.spi.DirObjectFactory;
 import javax.naming.spi.DirStateFactory;
 
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.util.ArrayUtils;
 
 
@@ -88,7 +88,7 @@
 
                 if ( inAttrs == null )
                 {
-                    outAttrs = new BasicAttributes( true );
+                    outAttrs = new AttributesImpl( true );
                 }
                 else
                 {
@@ -98,7 +98,7 @@
                 // Set up object class
                 if ( outAttrs.get( "objectclass" ) == null )
                 {
-                    BasicAttribute oc = new BasicAttribute( "objectclass", "person" );
+                    Attribute oc = new AttributeImpl( "objectclass", "person" );
                     oc.add( "top" );
                     outAttrs.put( oc );
                 }

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ReferralITest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ReferralITest.java?view=diff&rev=494176&r1=494175&r2=494176
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ReferralITest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/directory/server/core/jndi/ReferralITest.java Mon Jan  8 11:43:32 2007
@@ -33,10 +33,7 @@
 import javax.naming.NamingException;
 import javax.naming.ReferralException;
 import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
-import javax.naming.directory.ModificationItem;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.InitialLdapContext;
@@ -45,6 +42,9 @@
 import org.apache.directory.server.core.jndi.ServerLdapContext;
 import org.apache.directory.server.core.unit.AbstractAdminTestCase;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
@@ -146,7 +146,7 @@
         // -------------------------------------------------------------------
 
         // Add a referral entry ( should be fine with or without the control )
-        Attributes referral = new BasicAttributes( "objectClass", "top", true );
+        Attributes referral = new AttributesImpl( "objectClass", "top", true );
         referral.get( "objectClass" ).add( "referral" );
         referral.get( "objectClass" ).add( "extensibleObject" );
         referral.put( "ref", ref0 );
@@ -222,7 +222,7 @@
         // -------------------------------------------------------------------
 
         td.refCtx.addToEnvironment( Context.REFERRAL, "throw" );
-        Attributes userEntry = new BasicAttributes( "objectClass", "top", true );
+        Attributes userEntry = new AttributesImpl( "objectClass", "top", true );
         userEntry.get( "objectClass" ).add( "person" );
         userEntry.put( "sn", "karasulu" );
         userEntry.put( "cn", "alex karasulu" );
@@ -253,7 +253,7 @@
         // -------------------------------------------------------------------
 
         td.refCtx.addToEnvironment( Context.REFERRAL, "throw" );
-        Attributes userEntry = new BasicAttributes( "objectClass", "top", true );
+        Attributes userEntry = new AttributesImpl( "objectClass", "top", true );
         userEntry.get( "objectClass" ).add( "person" );
         userEntry.put( "sn", "karasulu" );
         userEntry.put( "cn", "alex karasulu" );
@@ -413,7 +413,7 @@
         td.refCtx.addToEnvironment( Context.REFERRAL, "throw" );
         try
         {
-            td.refCtx.modifyAttributes( "cn=alex karasulu", DirContext.ADD_ATTRIBUTE, new BasicAttributes(
+            td.refCtx.modifyAttributes( "cn=alex karasulu", DirContext.ADD_ATTRIBUTE, new AttributesImpl(
                 "description", "just some text", true ) );
             fail( "Should fail here throwing a ReferralException" );
         }
@@ -441,7 +441,7 @@
         td.refCtx.addToEnvironment( Context.REFERRAL, "throw" );
         try
         {
-            td.refCtx.modifyAttributes( "cn=alex karasulu,ou=apache", DirContext.ADD_ATTRIBUTE, new BasicAttributes(
+            td.refCtx.modifyAttributes( "cn=alex karasulu,ou=apache", DirContext.ADD_ATTRIBUTE, new AttributesImpl(
                 "description", "just some text", true ) );
             fail( "Should fail here throwing a ReferralException" );
         }
@@ -469,8 +469,8 @@
         td.refCtx.addToEnvironment( Context.REFERRAL, "throw" );
         try
         {
-            ModificationItem[] mods = new ModificationItem[]
-                { new ModificationItem( DirContext.ADD_ATTRIBUTE, new BasicAttribute( "description", "just some text" ) ) };
+            ModificationItemImpl[] mods = new ModificationItemImpl[]
+                { new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, new AttributeImpl( "description", "just some text" ) ) };
             td.refCtx.modifyAttributes( "cn=alex karasulu", mods );
             fail( "Should fail here throwing a ReferralException" );
         }
@@ -498,8 +498,8 @@
         td.refCtx.addToEnvironment( Context.REFERRAL, "throw" );
         try
         {
-            ModificationItem[] mods = new ModificationItem[]
-                { new ModificationItem( DirContext.ADD_ATTRIBUTE, new BasicAttribute( "description", "just some text" ) ) };
+            ModificationItemImpl[] mods = new ModificationItemImpl[]
+                { new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, new AttributeImpl( "description", "just some text" ) ) };
             td.refCtx.modifyAttributes( "cn=alex karasulu,ou=apache", mods );
             fail( "Should fail here throwing a ReferralException" );
         }
@@ -797,7 +797,7 @@
     public void createLocalUser() throws Exception
     {
         LdapContext userCtx = null;
-        Attributes referral = new BasicAttributes( "objectClass", "top", true );
+        Attributes referral = new AttributesImpl( "objectClass", "top", true );
         referral.get( "objectClass" ).add( "person" );
         referral.put( "cn", "akarasulu" );
         referral.put( "sn", "karasulu" );
@@ -826,7 +826,7 @@
     public void createDeepLocalUser() throws Exception
     {
         LdapContext userCtx = null;
-        Attributes referral = new BasicAttributes( "objectClass", "top", true );
+        Attributes referral = new AttributesImpl( "objectClass", "top", true );
         referral.get( "objectClass" ).add( "person" );
         referral.put( "cn", "akarasulu" );
         referral.put( "sn", "karasulu" );



Mime
View raw message