directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r691024 [1/2] - in /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core: authz/ changelog/ collective/ event/ exception/ jndi/
Date Mon, 01 Sep 2008 17:43:53 GMT
Author: elecharny
Date: Mon Sep  1 10:43:52 2008
New Revision: 691024

URL: http://svn.apache.org/viewvc?rev=691024&view=rev
Log:
Removed around 150 references to AttributesImpl and 300 references to AttributeImpl. (Those classes will be removed soon.)

Modified:
    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/AuthorizationServiceAsAdminIT.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/changelog/DefaultChangeLogIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/event/EventServiceIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/CreateContextIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169IT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759IT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783IT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791IT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DestroyContextIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ModifyContextIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ObjStateFactoryIT.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/SearchIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchWithIndicesITest.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/UniqueMemberIT.java

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=691024&r1=691023&r2=691024&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 Mon Sep  1 10:43:52 2008
@@ -29,8 +29,6 @@
 import org.apache.directory.server.core.integ.CiRunner;
 import org.apache.directory.server.core.integ.annotations.Factory;
 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 static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -40,6 +38,8 @@
 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;
 
 
@@ -72,8 +72,8 @@
      */
     public boolean checkCanAddEntryAs( String uid, String password, String entryRdn ) throws Exception
     {
-        Attributes testEntry = new AttributesImpl( "ou", "testou", true );
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes testEntry = new BasicAttributes( "ou", "testou", true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         testEntry.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "organizationalUnit" );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsAdminIT.java Mon Sep  1 10:43:52 2008
@@ -25,7 +25,6 @@
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 import org.apache.directory.server.core.integ.annotations.Factory;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.util.ArrayUtils;
 import org.apache.directory.shared.ldap.util.StringTools;
 
@@ -39,6 +38,7 @@
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
@@ -109,7 +109,7 @@
     public void testModifyOnAdminByAdmin() throws Exception
     {
         LdapContext sysRoot = getSystemContext( service );
-        Attributes attributes = new AttributesImpl();
+        Attributes attributes = new BasicAttributes( true );
         attributes.put( "userPassword", "replaced" );
         sysRoot.modifyAttributes( "uid=admin", DirContext.REPLACE_ATTRIBUTE, attributes );
         Attributes newAttrs = sysRoot.getAttributes( "uid=admin" );

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=691024&r1=691023&r2=691024&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 Mon Sep  1 10:43:52 2008
@@ -27,14 +27,14 @@
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 import org.apache.directory.server.core.subtree.SubentryInterceptor;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-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.Name;
 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.ldap.LdapContext;
@@ -132,8 +132,8 @@
     public static Name createGroup( String cn, String firstMemberDn ) throws Exception
     {
         DirContext adminCtx = getContextAsAdmin();
-        Attributes group = new AttributesImpl( "cn", cn, true );
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes group = new BasicAttributes( "cn", cn, true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         group.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "groupOfUniqueNames" );
@@ -170,9 +170,9 @@
     public static Name createUser( String uid, String password ) throws Exception
     {
         DirContext adminCtx = getContextAsAdmin();
-        Attributes user = new AttributesImpl( "uid", uid, true );
+        Attributes user = new BasicAttributes( "uid", uid, true );
         user.put( "userPassword", password );
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         user.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "person" );
@@ -197,8 +197,8 @@
     public static Name createGroup( String groupName ) throws Exception
     {
         DirContext adminCtx = getContextAsAdmin();
-        Attributes group = new AttributesImpl( true );
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes group = new BasicAttributes( true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         group.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "groupOfUniqueNames" );
@@ -221,7 +221,7 @@
     public static void addUserToGroup( String userUid, String groupCn ) throws Exception
     {
         DirContext adminCtx = getContextAsAdmin();
-        Attributes changes = new AttributesImpl( "uniqueMember", "uid=" + userUid + ",ou=users,ou=system", true );
+        Attributes changes = new BasicAttributes( "uniqueMember", "uid=" + userUid + ",ou=users,ou=system", true );
         adminCtx.modifyAttributes( "cn=" + groupCn + ",ou=groups", DirContext.ADD_ATTRIBUTE, changes );
     }
 
@@ -236,7 +236,7 @@
     public static void removeUserFromGroup( String userUid, String groupCn ) throws Exception
     {
         DirContext adminCtx = getContextAsAdmin();
-        Attributes changes = new AttributesImpl( "uniqueMember", "uid=" + userUid + ",ou=users,ou=system", true );
+        Attributes changes = new BasicAttributes( "uniqueMember", "uid=" + userUid + ",ou=users,ou=system", true );
         adminCtx.modifyAttributes( "cn=" + groupCn + ",ou=groups", DirContext.REMOVE_ATTRIBUTE, changes );
     }
 
@@ -319,13 +319,13 @@
         Attribute administrativeRole = ap.get( "administrativeRole" );
         if ( administrativeRole == null || !administrativeRole.contains( SubentryInterceptor.AC_AREA ) )
         {
-            Attributes changes = new AttributesImpl( "administrativeRole", SubentryInterceptor.AC_AREA, true );
+            Attributes changes = new BasicAttributes( "administrativeRole", SubentryInterceptor.AC_AREA, true );
             adminCtx.modifyAttributes( "", DirContext.ADD_ATTRIBUTE, changes );
         }
 
         // now add the A/C subentry below ou=system
-        Attributes subentry = new AttributesImpl( "cn", cn, true );
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes subentry = new BasicAttributes( "cn", cn, true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         subentry.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( SchemaConstants.SUBENTRY_OC );
@@ -349,7 +349,7 @@
         DirContext adminCtx = getContextAsAdmin();
 
         // modify the entry relative to ou=system to include the aciItem
-        Attributes changes = new AttributesImpl( "entryACI", aciItem, true );
+        Attributes changes = new BasicAttributes( "entryACI", aciItem, true );
         adminCtx.modifyAttributes( rdn, DirContext.ADD_ATTRIBUTE, changes );
     }
 
@@ -365,7 +365,7 @@
         DirContext adminCtx = getContextAsAdmin();
 
         // modify the entry relative to ou=system to include the aciItem
-        Attributes changes = new AttributesImpl( "subentryACI", aciItem, true );
+        Attributes changes = new BasicAttributes( "subentryACI", aciItem, true );
         adminCtx.modifyAttributes( "", DirContext.ADD_ATTRIBUTE, changes );
     }
     
@@ -381,14 +381,14 @@
     public static void changePresciptiveACI( String cn, String aciItem ) throws Exception
     {
         DirContext adminCtx = getContextAsAdmin();
-        Attributes changes = new AttributesImpl( "prescriptiveACI", aciItem );
+        Attributes changes = new BasicAttributes( "prescriptiveACI", aciItem, true );
         adminCtx.modifyAttributes( "cn=" + cn, DirContext.REPLACE_ATTRIBUTE, changes );
     }
     
     public static void addPrescriptiveACI( String cn, String aciItem ) throws Exception
     {
         DirContext adminCtx = getContextAsAdmin();
-        Attributes changes = new AttributesImpl( "prescriptiveACI", aciItem );
+        Attributes changes = new BasicAttributes( "prescriptiveACI", aciItem, true );
         adminCtx.modifyAttributes( "cn=" + cn, DirContext.ADD_ATTRIBUTE, changes );
     }
 }

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=691024&r1=691023&r2=691024&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 Mon Sep  1 10:43:52 2008
@@ -25,13 +25,13 @@
 import org.apache.directory.server.core.integ.annotations.Factory;
 import org.apache.directory.server.core.DirectoryService;
 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 org.junit.runner.RunWith;
 
 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 static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertFalse;
@@ -79,8 +79,8 @@
         throws Exception
     {
         // create the entry with the telephoneNumber attribute to compare
-        Attributes testEntry = new AttributesImpl( "ou", "testou", true );
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes testEntry = new BasicAttributes( "ou", "testou", true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         testEntry.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "organizationalUnit" );
@@ -264,9 +264,9 @@
     public void testPasswordCompare() throws Exception
     {
         DirContext adminCtx = getContextAsAdmin();
-        Attributes user = new AttributesImpl( "uid", "bob", true );
+        Attributes user = new BasicAttributes( "uid", "bob", true );
         user.put( "userPassword", "bobspassword" );
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         user.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "person" );

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=691024&r1=691023&r2=691024&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 Mon Sep  1 10:43:52 2008
@@ -23,8 +23,6 @@
 
 
 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.server.core.integ.CiRunner;
 import org.apache.directory.server.core.integ.annotations.Factory;
 import org.apache.directory.server.core.DirectoryService;
@@ -32,6 +30,8 @@
 
 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 static org.junit.Assert.assertTrue;
@@ -78,8 +78,8 @@
      */
     public boolean checkCanDeleteEntryAs( String uid, String password, String entryRdn ) throws Exception
     {
-        Attributes testEntry = new AttributesImpl( "ou", "testou", true );
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes testEntry = new BasicAttributes( "ou", "testou", true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         testEntry.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "organizationalUnit" );

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=691024&r1=691023&r2=691024&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 Mon Sep  1 10:43:52 2008
@@ -21,8 +21,6 @@
 
 
 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 org.apache.directory.server.core.integ.CiRunner;
@@ -35,6 +33,8 @@
 import javax.naming.Name;
 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 java.util.List;
@@ -89,8 +89,8 @@
         throws Exception
     {
         // create the entry with the telephoneNumber attribute to modify
-        Attributes testEntry = new AttributesImpl( "ou", "testou", true );
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes testEntry = new BasicAttributes( "ou", "testou", true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         testEntry.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "organizationalUnit" );
@@ -147,8 +147,8 @@
         throws Exception
     {
         // create the entry with the telephoneNumber attribute to modify
-        Attributes testEntry = new AttributesImpl( "ou", "testou", true );
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes testEntry = new BasicAttributes( "ou", "testou", true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         testEntry.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "organizationalUnit" );
@@ -272,7 +272,7 @@
         createUser( "billyd", "billyd" );
 
         // create the password modification
-        ModificationItemImpl[] mods = toItems( DirContext.REPLACE_ATTRIBUTE, new AttributesImpl( "userPassword",
+        ModificationItemImpl[] mods = toItems( DirContext.REPLACE_ATTRIBUTE, new BasicAttributes( "userPassword",
             "williams", true ) );
 
         // try a modify operation which should fail without any ACI
@@ -306,7 +306,7 @@
         // ----------------------------------------------------------------------------------
 
         // create the add modifications
-        ModificationItemImpl[] mods = toItems( DirContext.ADD_ATTRIBUTE, new AttributesImpl( "registeredAddress",
+        ModificationItemImpl[] mods = toItems( DirContext.ADD_ATTRIBUTE, new BasicAttributes( "registeredAddress",
             "100 Park Ave.", true ) );
 
         // create the non-admin user
@@ -341,7 +341,7 @@
         // ----------------------------------------------------------------------------------
 
         // now let's test to see if we can perform a modify with a delete op
-        mods = toItems( DirContext.REMOVE_ATTRIBUTE, new AttributesImpl( "telephoneNumber", "867-5309", true ) );
+        mods = toItems( DirContext.REMOVE_ATTRIBUTE, new BasicAttributes( "telephoneNumber", "867-5309", true ) );
 
         // make sure we cannot remove the telephone number from the test entry
         assertFalse( checkCanModifyAs( "billyd", "billyd", "ou=testou", mods ) );
@@ -363,7 +363,7 @@
         // ----------------------------------------------------------------------------------
 
         // now let's test to see if we can perform a modify with a delete op
-        mods = toItems( DirContext.REPLACE_ATTRIBUTE, new AttributesImpl( "telephoneNumber", "867-5309", true ) );
+        mods = toItems( DirContext.REPLACE_ATTRIBUTE, new BasicAttributes( "telephoneNumber", "867-5309", true ) );
 
         // make sure we cannot remove the telephone number from the test entry
         assertFalse( checkCanModifyAs( "billyd", "billyd", "ou=testou", mods ) );
@@ -389,7 +389,7 @@
         // Modify with Attribute Addition
         // ----------------------------------------------------------------------------------
         // create the add modifications
-        Attributes changes = new AttributesImpl( "registeredAddress", "100 Park Ave.", true );
+        Attributes changes = new BasicAttributes( "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 ) );
@@ -411,7 +411,7 @@
         // ----------------------------------------------------------------------------------
 
         // now let's test to see if we can perform a modify with a delete op
-        changes = new AttributesImpl( "telephoneNumber", "867-5309", true );
+        changes = new BasicAttributes( "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 ) );
@@ -433,7 +433,7 @@
         // ----------------------------------------------------------------------------------
 
         // now let's test to see if we can perform a modify with a delete op
-        changes = new AttributesImpl( "telephoneNumber", "867-5309", true );
+        changes = new BasicAttributes( "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 ) );
@@ -546,7 +546,7 @@
     {
         
         ModificationItemImpl[] mods = toItems( DirContext.ADD_ATTRIBUTE,
-            new AttributesImpl( "registeredAddress", "100 Park Ave.", true ) );
+            new BasicAttributes( "registeredAddress", "100 Park Ave.", true ) );
 
         createUser( "billyd", "billyd" );
 
@@ -558,7 +558,7 @@
         assertTrue( checkCanModifyAs( "billyd", "billyd", "ou=testou", mods ) );
         
         mods = toItems( DirContext.REPLACE_ATTRIBUTE,
-            new AttributesImpl( "registeredAddress", "200 Park Ave.", true ) );
+            new BasicAttributes( "registeredAddress", "200 Park Ave.", true ) );
         
         changePresciptiveACI( "modifyACI", "{ " + "identificationTag \"modifyAci\", "
             + "precedence 14, " + "authenticationLevel none, " + "itemOrUserFirst userFirst: { "
@@ -613,12 +613,12 @@
             " }" );
         
         ModificationItemImpl[] mods = toItems( DirContext.ADD_ATTRIBUTE,
-            new AttributesImpl( "description", "description 1", true ) );
+            new BasicAttributes( "description", "description 1", true ) );
         
         assertTrue( checkCanModifyAs( "billyd", "billyd", "ou=testou", mods ) );
         
-        AttributesImpl attrs = new AttributesImpl(true);
-        AttributeImpl attr = new AttributeImpl( "description" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute attr = new BasicAttribute( "description" );
         attr.add( "description 1" );
         attr.add( "description 2" );
         attrs.put( attr );

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=691024&r1=691023&r2=691024&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 Mon Sep  1 10:43:52 2008
@@ -23,8 +23,6 @@
 
 
 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.server.core.integ.CiRunner;
 import org.apache.directory.server.core.integ.annotations.Factory;
 import org.apache.directory.server.core.DirectoryService;
@@ -32,6 +30,8 @@
 
 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 static org.junit.Assert.assertTrue;
@@ -79,8 +79,8 @@
     public boolean checkCanRenameAs( String uid, String password, String entryRdn, String newRdn )
         throws Exception
     {
-        Attributes testEntry = new AttributesImpl( "ou", "testou", true );
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes testEntry = new BasicAttributes( "ou", "testou", true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         testEntry.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "organizationalUnit" );

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=691024&r1=691023&r2=691024&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 Mon Sep  1 10:43:52 2008
@@ -44,6 +44,8 @@
 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;
@@ -54,8 +56,6 @@
 import org.apache.directory.server.core.integ.annotations.Factory;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 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 org.junit.Test;
 import org.junit.runner.RunWith;
@@ -95,12 +95,12 @@
         Attributes[] attributes = new Attributes[count];
         for ( int ii = 0; ii < count; ii++ )
         {
-            attributes[ii] = new AttributesImpl();
-            Attribute oc = new AttributeImpl( "objectClass" );
+            attributes[ii] = new BasicAttributes( true );
+            Attribute oc = new BasicAttribute( "objectClass" );
             oc.add( "top" );
             oc.add( "organizationalUnit" );
             attributes[ii].put( oc );
-            Attribute ou = new AttributeImpl( "ou" );
+            Attribute ou = new BasicAttribute( "ou" );
             ou.add( String.valueOf( ii ) );
             ou.add( "testEntry" );
             attributes[ii].put( ou );
@@ -895,8 +895,8 @@
         
         // create an entry subordinate to the user
         DirContext billydCtx = AutzIntegUtils.getContextAsAdmin("uid=billyd,ou=users,ou=system");
-        Attributes phoneBook = new AttributesImpl( "ou", "phoneBook", true );
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes phoneBook = new BasicAttributes( "ou", "phoneBook", true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         phoneBook.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "organizationalUnit" );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/changelog/DefaultChangeLogIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/changelog/DefaultChangeLogIT.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/changelog/DefaultChangeLogIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/changelog/DefaultChangeLogIT.java Mon Sep  1 10:43:52 2008
@@ -25,8 +25,6 @@
 import static org.apache.directory.server.core.integ.state.TestServiceContext.startup;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 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 static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertNull;
@@ -41,6 +39,8 @@
 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.ldap.LdapContext;
 import java.util.Arrays;
@@ -71,7 +71,7 @@
         long revision = service.getChangeLog().getCurrentRevision();
 
         // add new test entry
-        AttributesImpl attrs = new AttributesImpl( "objectClass", "organizationalUnit", true );
+        Attributes attrs = new BasicAttributes( "objectClass", "organizationalUnit", true );
         attrs.put( "ou", "test0" );
         sysRoot.createSubcontext( "ou=test0", attrs );
         assertEquals( revision + 1, service.getChangeLog().getCurrentRevision() );
@@ -82,7 +82,7 @@
         assertEquals( revision + 1, t0.getRevision() );
 
         // add another test entry
-        attrs = new AttributesImpl( "objectClass", "organizationalUnit", true );
+        attrs = new BasicAttributes( "objectClass", "organizationalUnit", true );
         attrs.put( "ou", "test1" );
         sysRoot.createSubcontext( "ou=test1", attrs );
         assertEquals( revision + 2, service.getChangeLog().getCurrentRevision() );
@@ -100,7 +100,7 @@
         assertEquals( revision + 2, t1.getRevision() );
 
         // add third test entry
-        attrs = new AttributesImpl( "objectClass", "organizationalUnit", true );
+        attrs = new BasicAttributes( "objectClass", "organizationalUnit", true );
         attrs.put( "ou", "test2" );
         sysRoot.createSubcontext( "ou=test2", attrs );
         assertEquals( revision + 3, service.getChangeLog().getCurrentRevision() );
@@ -146,7 +146,7 @@
         assertEquals( revision, service.getChangeLog().getCurrentRevision() );
 
         // add new test entry
-        AttributesImpl attrs = new AttributesImpl( "objectClass", "organizationalUnit", true );
+        Attributes attrs = new BasicAttributes( "objectClass", "organizationalUnit", true );
         attrs.put( "ou", "test" );
         sysRoot.createSubcontext( "ou=test", attrs );
         assertEquals( revision + 1, service.getChangeLog().getCurrentRevision() );
@@ -169,7 +169,7 @@
     {
         LdapContext sysRoot = getSystemContext( service );
         Tag t0 = service.getChangeLog().tag();
-        AttributesImpl attrs = new AttributesImpl( "objectClass", "organizationalUnit", true );
+        Attributes attrs = new BasicAttributes( "objectClass", "organizationalUnit", true );
         attrs.put( "ou", "test" );
         sysRoot.createSubcontext( "ou=test", attrs );
 
@@ -195,7 +195,7 @@
         Tag t0 = service.getChangeLog().tag();
 
         // add new test entry
-        AttributesImpl attrs = new AttributesImpl( "objectClass", "organizationalUnit", true );
+        Attributes attrs = new BasicAttributes( "objectClass", "organizationalUnit", true );
         attrs.put( "ou", "test" );
         sysRoot.createSubcontext( "ou=test", attrs );
 
@@ -216,7 +216,7 @@
     public void testRevertDeleteOperations() throws Exception
     {
         LdapContext sysRoot = getSystemContext( service );
-        AttributesImpl attrs = new AttributesImpl( "objectClass", "organizationalUnit", true );
+        Attributes attrs = new BasicAttributes( "objectClass", "organizationalUnit", true );
         attrs.put( "ou", "test" );
         sysRoot.createSubcontext( "ou=test", attrs );
 
@@ -238,7 +238,7 @@
     public void testRevertRenameOperations() throws Exception
     {
         LdapContext sysRoot = getSystemContext( service );
-        AttributesImpl attrs = new AttributesImpl( "objectClass", "organizationalUnit", true );
+        Attributes attrs = new BasicAttributes( "objectClass", "organizationalUnit", true );
         attrs.put( "ou", "oldname" );
         sysRoot.createSubcontext( "ou=oldname", attrs );
 
@@ -262,7 +262,7 @@
     public void testRevertModifyOperations() throws Exception
     {
         LdapContext sysRoot = getSystemContext( service );
-        AttributesImpl attrs = new AttributesImpl( "objectClass", "organizationalUnit", true );
+        Attributes attrs = new BasicAttributes( "objectClass", "organizationalUnit", true );
         attrs.put( "ou", "test5" );
         sysRoot.createSubcontext( "ou=test5", attrs );
 
@@ -276,7 +276,7 @@
 
         // modify the test entry to add description and test new attr appears
         sysRoot.modifyAttributes( "ou=test5", DirContext.ADD_ATTRIBUTE,
-                new AttributesImpl( "description", "a desc value", true ) );
+                new BasicAttributes( "description", "a desc value", true ) );
         Attributes resusitated = sysRoot.getAttributes( "ou=test5" );
         assertNotNull( resusitated );
         Attribute description = resusitated.get( "description" );
@@ -295,7 +295,7 @@
 
         // add the attribute again and make sure it is old value
         sysRoot.modifyAttributes( "ou=test5", DirContext.ADD_ATTRIBUTE,
-                new AttributesImpl( "description", "old value", true ) );
+                new BasicAttributes( "description", "old value", true ) );
         resusitated = sysRoot.getAttributes( "ou=test5" );
         assertNotNull( resusitated );
         description = resusitated.get( "description" );
@@ -305,7 +305,7 @@
         // now tag then replace the value to "new value" and confirm
         Tag t1 = service.getChangeLog().tag();
         sysRoot.modifyAttributes( "ou=test5", DirContext.REPLACE_ATTRIBUTE,
-                new AttributesImpl( "description", "new value", true ) );
+                new BasicAttributes( "description", "new value", true ) );
         resusitated = sysRoot.getAttributes( "ou=test5" );
         assertNotNull( resusitated );
         description = resusitated.get( "description" );
@@ -327,7 +327,7 @@
 
         Tag t2 = service.getChangeLog().tag();
         sysRoot.modifyAttributes( "ou=test5", DirContext.REMOVE_ATTRIBUTE,
-                new AttributesImpl( "description", "old value", true ) );
+                new BasicAttributes( "description", "old value", true ) );
         resusitated = sysRoot.getAttributes( "ou=test5" );
         assertNotNull( resusitated );
         description = resusitated.get( "description" );
@@ -347,17 +347,17 @@
 
         // add a userPassword attribute so we can test replacing it
         sysRoot.modifyAttributes( "ou=test5", DirContext.ADD_ATTRIBUTE,
-                new AttributesImpl( "userPassword", "to be replaced", true ) );
+                new BasicAttributes( "userPassword", "to be replaced", true ) );
         assertPassword( sysRoot.getAttributes( "ou=test5" ), "to be replaced" );
 
         ModificationItemImpl[] mods = new ModificationItemImpl[]
         {
             new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE,
-                    new AttributeImpl( "description", "old value" ) ),
+                    new BasicAttribute( "description", "old value" ) ),
             new ModificationItemImpl( DirContext.ADD_ATTRIBUTE,
-                    new AttributeImpl( "seeAlso", "ou=added" ) ),
+                    new BasicAttribute( "seeAlso", "ou=added" ) ),
             new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE,
-                    new AttributeImpl( "userPassword", "a replaced value" ) )
+                    new BasicAttribute( "userPassword", "a replaced value" ) )
         };
         Tag t3 = service.getChangeLog().tag();
 

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java Mon Sep  1 10:43:52 2008
@@ -25,8 +25,6 @@
 import org.apache.directory.server.core.integ.SetupMode;
 import org.apache.directory.server.core.integ.annotations.Mode;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
-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 static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertNull;
@@ -40,6 +38,8 @@
 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;
@@ -63,8 +63,8 @@
 
     public Attributes getTestEntry( String cn )
     {
-        Attributes subentry = new AttributesImpl();
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes subentry = new BasicAttributes( true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( "person" );
         subentry.put( objectClass );
@@ -76,8 +76,8 @@
 
     public Attributes getTestSubentry()
     {
-        Attributes subentry = new AttributesImpl();
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes subentry = new BasicAttributes( true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( "subentry" );
         objectClass.add( "collectiveAttributeSubentry" );
@@ -91,8 +91,8 @@
 
     public Attributes getTestSubentry2()
     {
-        Attributes subentry = new AttributesImpl();
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes subentry = new BasicAttributes( true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( "subentry" );
         objectClass.add( "collectiveAttributeSubentry" );
@@ -106,8 +106,8 @@
 
     public Attributes getTestSubentry3()
     {
-        Attributes subentry = new AttributesImpl();
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes subentry = new BasicAttributes( true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( "subentry" );
         objectClass.add( "collectiveAttributeSubentry" );
@@ -121,7 +121,7 @@
 
     public void addAdministrativeRole( String role ) throws Exception
     {
-        Attribute attribute = new AttributeImpl( "administrativeRole" );
+        Attribute attribute = new BasicAttribute( "administrativeRole" );
         attribute.add( role );
         ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attribute );
         getSystemContext( service ).modifyAttributes( "", new ModificationItemImpl[] { item } );
@@ -232,7 +232,7 @@
 
         ModificationItemImpl[] items = new ModificationItemImpl[]
             { new ModificationItemImpl( DirContext.ADD_ATTRIBUTE,
-                new AttributeImpl( "collectiveExclusions", "c-ou" ) ) };
+                new BasicAttribute( "collectiveExclusions", "c-ou" ) ) };
         getSystemContext( service ).modifyAttributes( "ou=services,ou=configuration", items );
 
         // entry should not show the c-ou collective attribute anymore
@@ -303,7 +303,7 @@
         // -------------------------------------------------------------------
 
         items = new ModificationItemImpl[]
-            { new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, new AttributeImpl( "collectiveExclusions",
+            { new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, new BasicAttribute( "collectiveExclusions",
                 "excludeAllCollectiveAttributes" ) ) };
         getSystemContext( service ).modifyAttributes( "ou=interceptors,ou=configuration", items );
 
@@ -369,7 +369,7 @@
 
         ModificationItemImpl[] items = new ModificationItemImpl[]
             { new ModificationItemImpl( DirContext.ADD_ATTRIBUTE,
-                new AttributeImpl( "collectiveExclusions", "c-ou" ) ) };
+                new BasicAttribute( "collectiveExclusions", "c-ou" ) ) };
         getSystemContext( service ).modifyAttributes( "ou=services,ou=configuration", items );
         entries = getAllEntries();
 
@@ -427,7 +427,7 @@
         // -------------------------------------------------------------------
 
         items = new ModificationItemImpl[]
-            { new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, new AttributeImpl( "collectiveExclusions",
+            { new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, new BasicAttribute( "collectiveExclusions",
                 "excludeAllCollectiveAttributes" ) ) };
         getSystemContext( service ).modifyAttributes( "ou=interceptors,ou=configuration", items );
         entries = getAllEntries();
@@ -486,7 +486,7 @@
     {
         Attributes entry = getTestEntry( "Ersin Er" );
         getSystemContext( service ).createSubcontext( "cn=Ersin Er", entry );
-        Attributes changeSet = new AttributesImpl( "c-l", "Turkiye", true );
+        Attributes changeSet = new BasicAttributes( "c-l", "Turkiye", true );
         try
         {
             
@@ -505,7 +505,7 @@
     {
         Attributes entry = getTestEntry( "Ersin Er" );
         getSystemContext( service ).createSubcontext( "cn=Ersin Er", entry );
-        Attribute change = new AttributeImpl( "c-l", "Turkiye");
+        Attribute change = new BasicAttribute( "c-l", "Turkiye");
         ModificationItemImpl mod = new ModificationItemImpl(DirContext.ADD_ATTRIBUTE, change);
         try
         {

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/event/EventServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/event/EventServiceIT.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/event/EventServiceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/event/EventServiceIT.java Mon Sep  1 10:43:52 2008
@@ -23,8 +23,6 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.integ.CiRunner;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
 import static org.junit.Assert.assertEquals;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -32,6 +30,8 @@
 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.SearchControls;
 import javax.naming.event.EventDirContext;
 import javax.naming.event.NamespaceChangeListener;
@@ -68,8 +68,8 @@
         TestListener listener = new TestListener();
         EventDirContext ctx = ( EventDirContext ) getSystemContext( service ).lookup( "" );
         ctx.addNamingListener( "", SearchControls.SUBTREE_SCOPE, listener );
-        Attributes testEntry = new AttributesImpl( "ou", "testentry", true );
-        Attribute objectClass = new AttributeImpl( "objectClass", "top" );
+        Attributes testEntry = new BasicAttributes( "ou", "testentry", true );
+        Attribute objectClass = new BasicAttribute( "objectClass", "top" );
         objectClass.add( "organizationalUnit" );
         testEntry.put( objectClass );
         ctx.createSubcontext( "ou=testentry", testEntry );
@@ -118,8 +118,8 @@
         TestListener listener = new TestListener();
         EventDirContext ctx = ( EventDirContext ) getSystemContext( service ).lookup( "" );
         ctx.addNamingListener( "", SearchControls.SUBTREE_SCOPE, listener );
-        Attributes testEntry = new AttributesImpl( "ou", "testentry", true );
-        Attribute objectClass = new AttributeImpl( "objectClass", "top" );
+        Attributes testEntry = new BasicAttributes( "ou", "testentry", true );
+        Attribute objectClass = new BasicAttribute( "objectClass", "top" );
         objectClass.add( "organizationalUnit" );
         testEntry.put( objectClass );
         ctx.createSubcontext( "ou=testentry", testEntry );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java Mon Sep  1 10:43:52 2008
@@ -28,8 +28,6 @@
 import org.apache.directory.shared.ldap.exception.LdapNameAlreadyBoundException;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
-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 static org.junit.Assert.assertTrue;
@@ -44,6 +42,8 @@
 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;
@@ -70,8 +70,8 @@
 
     private DirContext createSubContext( DirContext ctx, String type, String value ) throws NamingException
     {
-        Attributes attrs = new AttributesImpl( type, value );
-        Attribute attr = new AttributeImpl( "ObjectClass" );
+        Attributes attrs = new BasicAttributes( type, value, true );
+        Attribute attr = new BasicAttribute( "ObjectClass" );
         attr.add( "top"  );
         attr.add( "person" );
         attr.add( "OrganizationalPerson" );
@@ -150,8 +150,8 @@
 
         try
         {
-            Attributes attrs = new AttributesImpl( "ou", "users" );
-            Attribute attr = new AttributeImpl( "ObjectClass" );
+            Attributes attrs = new BasicAttributes( "ou", "users", true );
+            Attribute attr = new BasicAttribute( "ObjectClass" );
             attr.add( "top"  );
             attr.add( "OrganizationalUnit" );
             attrs.put( attr );
@@ -168,8 +168,8 @@
 
         try
         {
-            Attributes attrs = new AttributesImpl( "ou", "uzerz" );
-            Attribute attr = new AttributeImpl( "ObjectClass" );
+            Attributes attrs = new BasicAttributes( "ou", "uzerz", true );
+            Attribute attr = new BasicAttribute( "ObjectClass" );
             attr.add( "top"  );
             attr.add( "OrganizationalUnit" );
             attrs.put( attr );
@@ -344,8 +344,8 @@
     {
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes attrs = new AttributesImpl( true );
-        Attribute ou = new AttributeImpl( "ou" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute ou = new BasicAttribute( "ou" );
         ou.add( "users" );
         ou.add( "dummyValue" );
         attrs.put( ou );
@@ -388,8 +388,8 @@
     {
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes attrs = new AttributesImpl( true );
-        Attribute attr = new AttributeImpl( "ou" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute attr = new BasicAttribute( "ou" );
         attr.add( "dummyValue" );
         attrs.put( attr );
         sysRoot.modifyAttributes( "ou=users", DirContext.ADD_ATTRIBUTE, attrs );
@@ -397,7 +397,7 @@
         assertTrue( ou.contains( "users" ) );
         assertTrue( ou.contains( "dummyValue" ) );
 
-        attr = new AttributeImpl( "ou" );
+        attr = new BasicAttribute( "ou" );
         attr.add( "another" );
         ModificationItemImpl[] mods = new ModificationItemImpl[]
             { new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr ) };
@@ -522,8 +522,8 @@
     {
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes attrs = new AttributesImpl( true );
-        Attribute attr = new AttributeImpl( "objectClass" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute attr = new BasicAttribute( "objectClass" );
         attr.add( "top" );
         attr.add( "alias" );
         attr.add( SchemaConstants.EXTENSIBLE_OBJECT_OC );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java Mon Sep  1 10:43:52 2008
@@ -25,8 +25,6 @@
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import org.junit.Test;
@@ -34,6 +32,8 @@
 
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
 import javax.naming.ldap.LdapContext;
 
 
@@ -107,10 +107,10 @@
     {
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes attrs = new AttributesImpl( true );
-        Attribute oc = new AttributeImpl( "ObjectClass", "top" );
-        Attribute cn = new AttributeImpl( "cn", "kevin Spacey" );
-        Attribute dc = new AttributeImpl( "dc", "ke" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "ObjectClass", "top" );
+        Attribute cn = new BasicAttribute( "cn", "kevin Spacey" );
+        Attribute dc = new BasicAttribute( "dc", "ke" );
         attrs.put( oc );
         attrs.put( cn );
         attrs.put( dc);
@@ -140,12 +140,12 @@
     {
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes attrs = new AttributesImpl( true );
-        Attribute oc = new AttributeImpl( "ObjectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "ObjectClass", "top" );
         oc.add( "person" );
-        Attribute cn = new AttributeImpl( "cn", "kevin Spacey" );
-        Attribute sn = new AttributeImpl( "sn", "ke" );
-        Attribute telephone = new AttributeImpl( "telephoneNumber", "0123456abc" );
+        Attribute cn = new BasicAttribute( "cn", "kevin Spacey" );
+        Attribute sn = new BasicAttribute( "sn", "ke" );
+        Attribute telephone = new BasicAttribute( "telephoneNumber", "0123456abc" );
         attrs.put( oc );
         attrs.put( cn );
         attrs.put( sn );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/CreateContextIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/CreateContextIT.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/CreateContextIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/CreateContextIT.java Mon Sep  1 10:43:52 2008
@@ -24,8 +24,6 @@
 import org.apache.directory.server.core.integ.CiRunner;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.junit.Test;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
@@ -62,8 +60,8 @@
 
     protected Attributes getPersonAttributes( String sn, String cn )
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute ocls = new AttributeImpl( "objectClass" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute ocls = new BasicAttribute( "objectClass" );
         ocls.add( "top" );
         ocls.add( "person" );
         attrs.put( ocls );
@@ -123,8 +121,8 @@
         /*
          * create ou=testing00,ou=system
          */
-        Attributes attributes = new AttributesImpl( true );
-        Attribute attribute = new AttributeImpl( "objectClass" );
+        Attributes attributes = new BasicAttributes( true );
+        Attribute attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -146,8 +144,8 @@
         /*
          * create ou=testing01,ou=system
          */
-        attributes = new AttributesImpl( true );
-        attribute = new AttributeImpl( "objectClass" );
+        attributes = new BasicAttributes( true );
+        attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -169,8 +167,8 @@
         /*
          * create ou=testing02,ou=system
          */
-        attributes = new AttributesImpl( true );
-        attribute = new AttributeImpl( "objectClass" );
+        attributes = new BasicAttributes( true );
+        attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -194,8 +192,8 @@
          */
         ctx = ( DirContext ) sysRoot.lookup( "ou=testing01" );
 
-        attributes = new AttributesImpl( true );
-        attribute = new AttributeImpl( "objectClass" );
+        attributes = new BasicAttributes( true );
+        attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -228,8 +226,8 @@
         /*
          * create ou=testing00,ou=system
          */
-        attributes = new AttributesImpl( true );
-        attribute = new AttributeImpl( "objectClass" );
+        attributes = new BasicAttributes( true );
+        attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -251,8 +249,8 @@
         /*
          * fail on recreate attempt for ou=testing00,ou=system
          */
-        attributes = new AttributesImpl( true );
-        attribute = new AttributeImpl( "objectClass" );
+        attributes = new BasicAttributes( true );
+        attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -278,8 +276,8 @@
     {
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes attrs = new AttributesImpl( true );
-        Attribute objclass = new AttributeImpl( "objectClass" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute objclass = new BasicAttribute( "objectClass" );
         objclass.add( "top" );
         objclass.add( "organizationalUnit" );
         attrs.put( objclass );
@@ -403,7 +401,7 @@
     {
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes attrs = new AttributesImpl( true );
+        Attributes attrs = new BasicAttributes( true );
 
         try
         {

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169IT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169IT.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169IT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169IT.java Mon Sep  1 10:43:52 2008
@@ -23,8 +23,6 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.integ.CiRunner;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
@@ -36,6 +34,8 @@
 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.SearchControls;
@@ -65,19 +65,19 @@
     {
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes people = new AttributesImpl( true );
-        Attribute attribute = new AttributeImpl( "objectClass" );
+        Attributes people = new BasicAttributes( true );
+        Attribute attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         people.put( attribute );
         people.put( "ou", "people" );
         sysRoot.createSubcontext( "ou=people", people );
 
-        Attributes user = new AttributesImpl( "uid", "bob" );
+        Attributes user = new BasicAttributes( "uid", "bob", true );
         user.put( "cn", "Bob Hamilton" );
         user.put( "userPassword", "bobspassword" );
 
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         user.put( objectClass );
         objectClass.add( "top" );
         objectClass.add( "person" );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759IT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759IT.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759IT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759IT.java Mon Sep  1 10:43:52 2008
@@ -25,8 +25,6 @@
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 import org.apache.directory.shared.ldap.constants.JndiPropertyConstants;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
@@ -37,6 +35,8 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.SearchControls;
 import javax.naming.ldap.LdapContext;
@@ -66,8 +66,8 @@
         /*
          * create ou=testing00,ou=system
          */
-        Attributes attributes = new AttributesImpl( true );
-        Attribute attribute = new AttributeImpl( "objectClass" );
+        Attributes attributes = new BasicAttributes( true );
+        Attribute attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -89,8 +89,8 @@
         /*
          * create ou=testing01,ou=system
          */
-        attributes = new AttributesImpl( true );
-        attribute = new AttributeImpl( "objectClass" );
+        attributes = new BasicAttributes( true );
+        attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -112,8 +112,8 @@
         /*
          * create ou=testing02,ou=system
          */
-        attributes = new AttributesImpl( true );
-        attribute = new AttributeImpl( "objectClass" );
+        attributes = new BasicAttributes( true );
+        attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -138,8 +138,8 @@
          */
         ctx = ( DirContext ) sysRoot.lookup( "ou=testing01" );
 
-        attributes = new AttributesImpl( true );
-        attribute = new AttributeImpl( "objectClass" );
+        attributes = new BasicAttributes( true );
+        attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783IT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783IT.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783IT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783IT.java Mon Sep  1 10:43:52 2008
@@ -22,8 +22,6 @@
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.integ.CiRunner;
-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.junit.Test;
 import static org.junit.Assert.assertTrue;
@@ -36,6 +34,8 @@
 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.SearchControls;
@@ -64,8 +64,8 @@
     public void testAddAnotherValueToAnAttribute() throws NamingException
     {
         // create a person without sn
-        Attributes attrs = new AttributesImpl();
-        Attribute ocls = new AttributeImpl("objectClass");
+        Attributes attrs = new BasicAttributes( true );
+        Attribute ocls = new BasicAttribute("objectClass");
 
         ocls.add("top");
         ocls.add("person");
@@ -86,20 +86,20 @@
 
         // Add the first value for description
         String description1 = "an American singer-songwriter";
-        Attribute firstDescr = new AttributeImpl("description", description1);
+        Attribute firstDescr = new BasicAttribute( "description", description1 );
         ModificationItemImpl modification = new ModificationItemImpl(DirContext.ADD_ATTRIBUTE, firstDescr);
         ctx.modifyAttributes(rdn, new ModificationItemImpl[] { modification });
 
         // Add a second value to description
         String description2 = "Grammy award winning";
-        Attribute otherDescr = new AttributeImpl("description", description2 );
+        Attribute otherDescr = new BasicAttribute( "description", description2 );
 
         modification = new ModificationItemImpl(DirContext.ADD_ATTRIBUTE, otherDescr );
         ctx.modifyAttributes(rdn, new ModificationItemImpl[] { modification } );
       
         // Add a third value to description
         String description3 = "MTV Music Award winning";
-        Attribute thirdDescr = new AttributeImpl("description", description3 );
+        Attribute thirdDescr = new BasicAttribute( "description", description3 );
 
         modification = new ModificationItemImpl(DirContext.ADD_ATTRIBUTE, thirdDescr );
         ctx.modifyAttributes(rdn, new ModificationItemImpl[] { modification });

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791IT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791IT.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791IT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791IT.java Mon Sep  1 10:43:52 2008
@@ -32,6 +32,8 @@
 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;
@@ -40,8 +42,6 @@
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.integ.CiRunner;
-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.junit.Test;
 import org.junit.runner.RunWith;
@@ -64,15 +64,15 @@
      */
     protected Attributes getTestEntryAttributes()
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute ocls = new AttributeImpl( "objectClass" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute ocls = new BasicAttribute( "objectClass" );
         ocls.add( "top" );
         ocls.add( "person" );
         ocls.add( "organizationalPerson" );
         ocls.add( "inetOrgPerson" );
         attrs.put( ocls );
 
-        Attribute cn = new AttributeImpl( "cn" );
+        Attribute cn = new BasicAttribute( "cn" );
         cn.add( "test" );
         cn.add( "aaa" );
         attrs.put( cn );
@@ -116,7 +116,7 @@
         DirContext ctx = new InitialDirContext( env );
 
         // remove "cn=aaa", which is not part of the RDN
-        Attribute attr = new AttributeImpl( "cn", "aaa" );
+        Attribute attr = new BasicAttribute( "cn", "aaa" );
         ModificationItemImpl modification = new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE, attr );
         ctx.modifyAttributes( "cn=test", new ModificationItemImpl[]
             { modification } );
@@ -151,7 +151,7 @@
         DirContext ctx = new InitialDirContext( env );
 
         // replace cn attribute with "cn=test", must remove the previous "cn=aaa"
-        Attribute attr = new AttributeImpl( "cn", "test" );
+        Attribute attr = new BasicAttribute( "cn", "test" );
         ModificationItemImpl modification = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
         ctx.modifyAttributes( "cn=test", new ModificationItemImpl[]
             { modification } );
@@ -189,7 +189,7 @@
         DirContext ctx = new InitialDirContext( env );
 
         // try to add an non-existing objectClass "test", must be rejected
-        Attribute attr = new AttributeImpl( "objectclass", "test" );
+        Attribute attr = new BasicAttribute( "objectclass", "test" );
         ModificationItemImpl modification = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr );
         try
         {
@@ -243,7 +243,7 @@
         DirContext ctx = new InitialDirContext( env );
 
         // try to add an unallowed attribute, must be rejected
-        Attribute attr = new AttributeImpl( "javaDoc", "test" );
+        Attribute attr = new BasicAttribute( "javaDoc", "test" );
         ModificationItemImpl modification = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr );
         try
         {

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DestroyContextIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DestroyContextIT.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DestroyContextIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/DestroyContextIT.java Mon Sep  1 10:43:52 2008
@@ -24,8 +24,6 @@
 import org.apache.directory.server.core.integ.CiRunner;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 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 static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
@@ -36,6 +34,8 @@
 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.ldap.LdapContext;
 
@@ -64,8 +64,8 @@
         /*
          * create ou=testing00,ou=system
          */
-        Attributes attributes = new AttributesImpl( true );
-        Attribute attribute = new AttributeImpl( "objectClass" );
+        Attributes attributes = new BasicAttributes( true );
+        Attribute attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -87,8 +87,8 @@
         /*
          * create ou=testing01,ou=system
          */
-        attributes = new AttributesImpl( true );
-        attribute = new AttributeImpl( "objectClass" );
+        attributes = new BasicAttributes( true );
+        attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -110,8 +110,8 @@
         /*
          * create ou=testing02,ou=system
          */
-        attributes = new AttributesImpl( true );
-        attribute = new AttributeImpl( "objectClass" );
+        attributes = new BasicAttributes( true );
+        attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -135,8 +135,8 @@
          */
         ctx = ( DirContext ) sysRoot.lookup( "ou=testing01" );
 
-        attributes = new AttributesImpl( true );
-        attribute = new AttributeImpl( "objectClass" );
+        attributes = new BasicAttributes( true );
+        attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectIT.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectIT.java Mon Sep  1 10:43:52 2008
@@ -23,13 +23,13 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.integ.CiRunner;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.junit.Test;import static org.junit.Assert.assertNotNull;import static org.junit.Assert.assertEquals;import static org.junit.Assert.assertTrue;
 import org.junit.runner.RunWith;
 
 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.ldap.LdapContext;
 
@@ -50,8 +50,8 @@
     public void testExtensibleObjectModify() throws Exception
     {
         LdapContext sysRoot = getSystemContext( service );
-        Attributes attributes = new AttributesImpl( true );
-        Attribute attribute = new AttributeImpl( "objectClass" );
+        Attributes attributes = new BasicAttributes( true );
+        Attribute attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -70,11 +70,11 @@
         assertTrue( attribute.contains( "top" ) );
         assertTrue( attribute.contains( "organizationalUnit" ) );
 
-        Attributes newattribs = new AttributesImpl( true );
-        Attribute freeform = new AttributeImpl( "cn" );
+        Attributes newattribs = new BasicAttributes( true );
+        Attribute freeform = new BasicAttribute( "cn" );
         freeform.add( "testing" );
         newattribs.put( freeform );
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( "extensibleObject" );
         objectClass.add( "organizationalUnit" );
@@ -98,8 +98,8 @@
     public void testExtensibleObjectAdd() throws Exception
     {
         LdapContext sysRoot = getSystemContext( service );
-        Attributes attributes = new AttributesImpl( true );
-        Attribute attribute = new AttributeImpl( "objectClass" );
+        Attributes attributes = new BasicAttributes( true );
+        Attribute attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "extensibleObject" );
         attribute.add( "organizationalUnit" );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/MixedCaseITest.java Mon Sep  1 10:43:52 2008
@@ -34,8 +34,6 @@
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.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 org.apache.directory.shared.ldap.name.LdapDN;
 
@@ -53,6 +51,8 @@
 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;
@@ -138,8 +138,8 @@
 
         String dn = "ou=Test";
 
-        Attributes attributes = new AttributesImpl( true );
-        Attribute attribute = new AttributeImpl( "objectClass" );
+        Attributes attributes = new BasicAttributes( true );
+        Attribute attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -168,8 +168,8 @@
         String dn = "ou=Test";
         String description = "New Value";
 
-        Attributes attributes = new AttributesImpl( true );
-        Attribute attribute = new AttributeImpl( "objectClass" );
+        Attributes attributes = new BasicAttributes( true );
+        Attribute attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -180,7 +180,7 @@
         assertNotNull( ctx );
 
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
-        mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, new AttributeImpl( "description", description ) );
+        mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, new BasicAttribute( "description", description ) );
 
         ctxRoot.modifyAttributes( dn, mods );
 
@@ -208,8 +208,8 @@
 
         String dn = "ou=Test";
 
-        Attributes attributes = new AttributesImpl( true );
-        Attribute attribute = new AttributeImpl( "objectClass" );
+        Attributes attributes = new BasicAttributes( true );
+        Attribute attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ModifyContextIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ModifyContextIT.java?rev=691024&r1=691023&r2=691024&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ModifyContextIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ModifyContextIT.java Mon Sep  1 10:43:52 2008
@@ -28,8 +28,6 @@
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertFalse;
@@ -42,6 +40,8 @@
 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.ldap.LdapContext;
 
@@ -75,8 +75,8 @@
         /*
          * create ou=testing00,ou=system
          */
-        Attributes attributes = new AttributesImpl( true );
-        Attribute attribute = new AttributeImpl( "objectClass" );
+        Attributes attributes = new BasicAttributes( true );
+        Attribute attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -98,8 +98,8 @@
         /*
          * create ou=testing01,ou=system
          */
-        attributes = new AttributesImpl( true );
-        attribute = new AttributeImpl( "objectClass" );
+        attributes = new BasicAttributes( true );
+        attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -121,8 +121,8 @@
         /*
          * create ou=testing02,ou=system
          */
-        attributes = new AttributesImpl( true );
-        attribute = new AttributeImpl( "objectClass" );
+        attributes = new BasicAttributes( true );
+        attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -146,8 +146,8 @@
          */
         ctx = ( DirContext ) sysRoot.lookup( "ou=testing01" );
 
-        attributes = new AttributesImpl( true );
-        attribute = new AttributeImpl( "objectClass" );
+        attributes = new BasicAttributes( true );
+        attribute = new BasicAttribute( "objectClass" );
         attribute.add( "top" );
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
@@ -181,8 +181,8 @@
 
         LdapContext sysRoot = getSystemContext( service );
 
-        Attribute attr = new AttributeImpl( "description" );
-        Attributes attrs = new AttributesImpl();
+        Attribute attr = new BasicAttribute( "description" );
+        Attributes attrs = new BasicAttributes( true );
         attrs.put( attr );
 
         try
@@ -208,7 +208,7 @@
         createData();
 
         LdapContext sysRoot = getSystemContext( service );
-        Attributes attributes = new AttributesImpl( true );
+        Attributes attributes = new BasicAttributes( true );
         attributes.put( "ou", "testCases" );
         sysRoot.modifyAttributes( "ou=testing00", DirContext.ADD_ATTRIBUTE, attributes );
 
@@ -242,7 +242,7 @@
         createData();
 
         LdapContext sysRoot = getSystemContext( service );
-        Attributes attributes = new AttributesImpl( true );
+        Attributes attributes = new BasicAttributes( true );
         attributes.put( "ou", "testCases" );
         
         try
@@ -264,7 +264,7 @@
         createData();
 
         LdapContext sysRoot = getSystemContext( service );
-        Attributes attributes = new AttributesImpl( true );
+        Attributes attributes = new BasicAttributes( true );
         attributes.put( "ou", "testCases" );
         sysRoot.modifyAttributes( "ou=testing00", DirContext.REMOVE_ATTRIBUTE, attributes );
 



Mime
View raw message