directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r691077 [1/2] - in /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core: normalization/ operational/ partition/ schema/ sp/ subtree/ trigger/
Date Mon, 01 Sep 2008 22:33:12 GMT
Author: elecharny
Date: Mon Sep  1 15:33:11 2008
New Revision: 691077

URL: http://svn.apache.org/viewvc?rev=691077&view=rev
Log:
Finishing to remove references to Attribute(s)Impl into core-integ

Modified:
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/normalization/NormalizationServiceIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/partition/PartitionIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceEntryModificationHandlingIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceObjectClassChangeHandlingIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/TriggerInterceptorIT.java

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/normalization/NormalizationServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/normalization/NormalizationServiceIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/normalization/NormalizationServiceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/normalization/NormalizationServiceIT.java Mon Sep  1 15:33:11 2008
@@ -23,7 +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.AttributesImpl;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertNotNull;
@@ -32,6 +31,7 @@
 
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttributes;
 import javax.naming.ldap.LdapContext;
 
 
@@ -67,11 +67,11 @@
 
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes attrs = new AttributesImpl( "objectClass", "organizationalUnit", true );
+        Attributes attrs = new BasicAttributes( "objectClass", "organizationalUnit", true );
         attrs.put( "ou", "direct report view" );
         sysRoot.createSubcontext( "ou=direct report view", attrs );
 
-        attrs = new AttributesImpl( "objectClass", "organizationalUnit", true );
+        attrs = new BasicAttributes( "objectClass", "organizationalUnit", true );
         attrs.put( "ou", "corporate category\\, operations" );
         sysRoot.createSubcontext( "ou=corporate category\\, operations,ou=direct report view", attrs );
 

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java Mon Sep  1 15:33:11 2008
@@ -28,8 +28,6 @@
 import org.apache.directory.shared.ldap.constants.JndiPropertyConstants;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 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 org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.util.StringTools;
 import static org.junit.Assert.assertEquals;
@@ -108,8 +106,8 @@
         LdapContext sysRoot = getSystemContext( service );
         createData( sysRoot );
 
-        Attributes attributes = new AttributesImpl( true );
-        Attribute oc = new AttributeImpl( "objectClass", "top" );
+        Attributes attributes = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "objectClass", "top" );
         oc.add( "person" );
         oc.add( "organizationalPerson" );
         oc.add( "inetOrgPerson" );
@@ -172,8 +170,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 );
@@ -440,7 +438,7 @@
         LdapContext sysRoot = getSystemContext( service );
         createData( sysRoot );
 
-        ModificationItem modifyOp = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, new AttributeImpl(
+        ModificationItem modifyOp = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, new BasicAttribute(
             "creatorsName", "cn=Tori Amos,dc=example,dc=com" ) );
 
         try

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/partition/PartitionIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/partition/PartitionIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/partition/PartitionIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/partition/PartitionIT.java Mon Sep  1 15:33:11 2008
@@ -31,7 +31,6 @@
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 
 import static org.apache.directory.server.core.integ.IntegrationUtils.getRootContext;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
 
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertNotNull;
@@ -43,6 +42,7 @@
 
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttributes;
 import javax.naming.ldap.LdapContext;
 
 
@@ -150,7 +150,7 @@
     public void addLookupDelete( String partitionSuffix ) throws Exception
     {
         LdapContext rootDSE = getRootContext( service );
-        Attributes attrs = new AttributesImpl( "objectClass", "organizationalUnit", true );
+        Attributes attrs = new BasicAttributes( "objectClass", "organizationalUnit", true );
         attrs.put( "ou", "people" );
         String entryDn = "ou=people," + partitionSuffix;
         rootDSE.createSubcontext( entryDn, attrs );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java Mon Sep  1 15:33:11 2008
@@ -28,8 +28,6 @@
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
-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;
@@ -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.ldap.LdapContext;
 
@@ -99,8 +99,8 @@
     @Test
     public void testAddAttributeType() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT, "top" );
         oc.add( MetaSchemaConstants.META_TOP_OC );
         oc.add( MetaSchemaConstants.META_ATTRIBUTE_TYPE_OC );
         attrs.put( oc );
@@ -229,9 +229,9 @@
         dn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
         
         ModificationItemImpl[] mods = new ModificationItemImpl[2];
-        Attribute attr = new AttributeImpl( MetaSchemaConstants.M_DESCRIPTION_AT, DESCRIPTION1 );
+        Attribute attr = new BasicAttribute( MetaSchemaConstants.M_DESCRIPTION_AT, DESCRIPTION1 );
         mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
-        attr = new AttributeImpl( MetaSchemaConstants.M_SYNTAX_AT, DIRSTR_SYNTAX_OID );
+        attr = new BasicAttribute( MetaSchemaConstants.M_SYNTAX_AT, DIRSTR_SYNTAX_OID );
         mods[1] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
         getSchemaContext( service ).modifyAttributes( dn, mods );
 
@@ -259,7 +259,7 @@
         LdapDN dn = getAttributeTypeContainer( "apachemeta" );
         dn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
         
-        Attributes mods = new AttributesImpl();
+        Attributes mods = new BasicAttributes( true );
         mods.put( MetaSchemaConstants.M_DESCRIPTION_AT, DESCRIPTION1 );
         mods.put( MetaSchemaConstants.M_SYNTAX_AT, DIRSTR_SYNTAX_OID );
         getSchemaContext( service ).modifyAttributes( dn, DirContext.REPLACE_ATTRIBUTE, mods );
@@ -283,8 +283,8 @@
     
     private void addDependeeAttributeType() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT, "top" );
         oc.add( MetaSchemaConstants.META_TOP_OC );
         oc.add( MetaSchemaConstants.META_ATTRIBUTE_TYPE_OC );
         attrs.put( oc );
@@ -468,8 +468,8 @@
     @Test
     public void testAddAttributeTypeToDisabledSchema() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT, "top" );
         oc.add( MetaSchemaConstants.META_TOP_OC );
         oc.add( MetaSchemaConstants.META_ATTRIBUTE_TYPE_OC );
         attrs.put( oc );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java Mon Sep  1 15:33:11 2008
@@ -32,8 +32,6 @@
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
-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;
@@ -50,6 +48,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 java.io.ByteArrayOutputStream;
 import java.io.InputStream;
@@ -112,8 +112,8 @@
     @Test
     public void testAddComparator() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT, "top" );
         oc.add( MetaSchemaConstants.META_TOP_OC );
         oc.add( MetaSchemaConstants.META_COMPARATOR_OC );
         attrs.put( oc );
@@ -142,8 +142,8 @@
             out.write( in.read() );
         }
         
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT, "top" );
         oc.add( MetaSchemaConstants.META_TOP_OC );
         oc.add( MetaSchemaConstants.META_COMPARATOR_OC );
         attrs.put( oc );
@@ -275,7 +275,7 @@
         dn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
         
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
-        Attribute attr = new AttributeImpl( MetaSchemaConstants.M_FQCN_AT, IntegerComparator.class.getName() );
+        Attribute attr = new BasicAttribute( MetaSchemaConstants.M_FQCN_AT, IntegerComparator.class.getName() );
         mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
         getSchemaContext( service ).modifyAttributes( dn, mods );
 
@@ -298,7 +298,7 @@
         LdapDN dn = getComparatorContainer( "apachemeta" );
         dn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
         
-        Attributes mods = new AttributesImpl();
+        Attributes mods = new BasicAttributes( true );
         mods.put( MetaSchemaConstants.M_FQCN_AT, IntegerComparator.class.getName() );
         getSchemaContext( service ).modifyAttributes( dn, DirContext.REPLACE_ATTRIBUTE, mods );
 
@@ -489,8 +489,8 @@
     @Test
     public void testAddComparatorToDisabledSchema() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT, "top" );
         oc.add( MetaSchemaConstants.META_TOP_OC );
         oc.add( MetaSchemaConstants.META_COMPARATOR_OC );
         attrs.put( oc );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java Mon Sep  1 15:33:11 2008
@@ -27,8 +27,6 @@
 import org.apache.directory.server.schema.registries.MatchingRuleRegistry;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
-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;
@@ -43,6 +41,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;
 
 
@@ -96,8 +96,8 @@
     @Test
     public void testAddMatchingRule() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT, "top" );
         oc.add( MetaSchemaConstants.META_TOP_OC );
         oc.add( MetaSchemaConstants.META_MATCHING_RULE_OC );
         attrs.put( oc );
@@ -222,9 +222,9 @@
         dn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
         
         ModificationItemImpl[] mods = new ModificationItemImpl[2];
-        Attribute attr = new AttributeImpl( MetaSchemaConstants.M_DESCRIPTION_AT, DESCRIPTION1 );
+        Attribute attr = new BasicAttribute( MetaSchemaConstants.M_DESCRIPTION_AT, DESCRIPTION1 );
         mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
-        attr = new AttributeImpl( MetaSchemaConstants.M_SYNTAX_AT, DIRSTR_SYNTAX_OID );
+        attr = new BasicAttribute( MetaSchemaConstants.M_SYNTAX_AT, DIRSTR_SYNTAX_OID );
         mods[1] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
         getSchemaContext( service ).modifyAttributes( dn, mods );
 
@@ -252,7 +252,7 @@
         LdapDN dn = getMatchingRuleContainer( "apachemeta" );
         dn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
         
-        Attributes mods = new AttributesImpl();
+        Attributes mods = new BasicAttributes( true );
         mods.put( MetaSchemaConstants.M_DESCRIPTION_AT, DESCRIPTION1 );
         mods.put( MetaSchemaConstants.M_SYNTAX_AT, DIRSTR_SYNTAX_OID );
         getSchemaContext( service ).modifyAttributes( dn, DirContext.REPLACE_ATTRIBUTE, mods );
@@ -442,8 +442,8 @@
     @Test
     public void testAddMatchingRuleToDisabledSchema() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT, "top" );
         oc.add( MetaSchemaConstants.META_TOP_OC );
         oc.add( MetaSchemaConstants.META_MATCHING_RULE_OC );
         attrs.put( oc );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java Mon Sep  1 15:33:11 2008
@@ -30,8 +30,6 @@
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
-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;
@@ -51,6 +49,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 java.io.ByteArrayOutputStream;
 import java.io.InputStream;
@@ -113,8 +113,8 @@
     @Test
     public void testAddNormalizer() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT, "top" );
         oc.add( MetaSchemaConstants.META_TOP_OC );
         oc.add( MetaSchemaConstants.META_NORMALIZER_OC );
         attrs.put( oc );
@@ -143,8 +143,8 @@
             out.write( in.read() );
         }
         
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT, "top" );
         oc.add( MetaSchemaConstants.META_TOP_OC );
         oc.add( MetaSchemaConstants.META_NORMALIZER_OC );
         attrs.put( oc );
@@ -278,7 +278,7 @@
         dn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
         
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
-        Attribute attr = new AttributeImpl( MetaSchemaConstants.M_FQCN_AT, DeepTrimNormalizer.class.getName() );
+        Attribute attr = new BasicAttribute( MetaSchemaConstants.M_FQCN_AT, DeepTrimNormalizer.class.getName() );
         mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
         getSchemaContext( service ).modifyAttributes( dn, mods );
 
@@ -301,7 +301,7 @@
         LdapDN dn = getNormalizerContainer( "apachemeta" );
         dn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
         
-        Attributes mods = new AttributesImpl();
+        Attributes mods = new BasicAttributes( true );
         mods.put( MetaSchemaConstants.M_FQCN_AT, DeepTrimNormalizer.class.getName() );
         getSchemaContext( service ).modifyAttributes( dn, DirContext.REPLACE_ATTRIBUTE, mods );
 
@@ -492,8 +492,8 @@
     @Test
     public void testAddNormalizerToDisabledSchema() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT, "top" );
         oc.add( MetaSchemaConstants.META_TOP_OC );
         oc.add( MetaSchemaConstants.META_NORMALIZER_OC );
         attrs.put( oc );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java Mon Sep  1 15:33:11 2008
@@ -26,8 +26,6 @@
 import org.apache.directory.server.schema.registries.ObjectClassRegistry;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
-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;
@@ -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;
 
 
@@ -91,8 +91,8 @@
     
     private void addObjectClass() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( "objectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "objectClass", "top" );
         oc.add( "metaTop" );
         oc.add( "metaObjectClass" );
         attrs.put( oc );
@@ -234,9 +234,9 @@
         dn.add( "m-oid" + "=" + OID );
         
         ModificationItemImpl[] mods = new ModificationItemImpl[2];
-        Attribute attr = new AttributeImpl( "m-description", DESCRIPTION1 );
+        Attribute attr = new BasicAttribute( "m-description", DESCRIPTION1 );
         mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
-        attr = new AttributeImpl( "m-name", NEW_NAME );
+        attr = new BasicAttribute( "m-name", NEW_NAME );
         mods[1] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
         getSchemaContext( service ).modifyAttributes( dn, mods );
 
@@ -264,7 +264,7 @@
         LdapDN dn = getObjectClassContainer( "apachemeta" );
         dn.add( "m-oid" + "=" + OID );
         
-        Attributes mods = new AttributesImpl();
+        Attributes mods = new BasicAttributes( true );
         mods.put( "m-description", DESCRIPTION1 );
         mods.put( "m-name", NEW_NAME );
         getSchemaContext( service ).modifyAttributes( dn, DirContext.REPLACE_ATTRIBUTE, mods );
@@ -286,8 +286,8 @@
     // ----------------------------------------------------------------------
     private void addDependeeObjectClass() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( "objectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "objectClass", "top" );
         oc.add( "metaTop" );
         oc.add( "metaObjectClass" );
         attrs.put( oc );
@@ -468,8 +468,8 @@
     
     private void addObjectClassToDisabledSchema() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( "objectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "objectClass", "top" );
         oc.add( "metaTop" );
         oc.add( "metaObjectClass" );
         attrs.put( oc );
@@ -547,8 +547,8 @@
     @Test
     public void testAddAbstractOCinheritingFromAbstractOC() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( "objectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "objectClass", "top" );
         oc.add( "metaTop" );
         oc.add( "metaObjectClass" );
         attrs.put( oc );
@@ -576,8 +576,8 @@
     @Test
     public void testAddAbstractOCinheritingFromAuxiliaryOC() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( "objectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "objectClass", "top" );
         oc.add( "metaTop" );
         oc.add( "metaObjectClass" );
         attrs.put( oc );
@@ -589,7 +589,7 @@
         attrs.put( "m-must", "cn" );
         attrs.put( "m-may", "ou" );
         
-        Attribute sup = new AttributeImpl( "m-supObjectClass" );
+        Attribute sup = new BasicAttribute( "m-supObjectClass" );
         sup.add( "top" );
         sup.add( "javaSerializedObject");
         attrs.put( sup );
@@ -615,8 +615,8 @@
     @Test
     public void testAddAbstractOCinheritingFromStructuralOC() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( "objectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "objectClass", "top" );
         oc.add( "metaTop" );
         oc.add( "metaObjectClass" );
         attrs.put( oc );
@@ -628,7 +628,7 @@
         attrs.put( "m-must", "cn" );
         attrs.put( "m-may", "ou" );
         
-        Attribute sup = new AttributeImpl( "m-supObjectClass" );
+        Attribute sup = new BasicAttribute( "m-supObjectClass" );
         sup.add( "top" );
         sup.add( "person");
         attrs.put( sup );
@@ -654,8 +654,8 @@
     @Test
     public void testAddAuxiliaryOCinheritingFromAbstractOC() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( "objectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "objectClass", "top" );
         oc.add( "metaTop" );
         oc.add( "metaObjectClass" );
         attrs.put( oc );
@@ -683,8 +683,8 @@
     @Test
     public void testAddAuxiliaryOCinheritingFromAuxiliaryOC() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( "objectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "objectClass", "top" );
         oc.add( "metaTop" );
         oc.add( "metaObjectClass" );
         attrs.put( oc );
@@ -697,7 +697,7 @@
         attrs.put( "m-must", "cn" );
         attrs.put( "m-may", "ou" );
         
-        Attribute sup = new AttributeImpl( "m-supObjectClass" );
+        Attribute sup = new BasicAttribute( "m-supObjectClass" );
         sup.add( "top" );
         sup.add( "javaNamingReference");
         attrs.put( sup );
@@ -717,8 +717,8 @@
     @Test
     public void testAddAuxiliaryOCinheritingFromStructuralOC() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( "objectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "objectClass", "top" );
         oc.add( "metaTop" );
         oc.add( "metaObjectClass" );
         attrs.put( oc );
@@ -730,7 +730,7 @@
         attrs.put( "m-must", "cn" );
         attrs.put( "m-may", "ou" );
         
-        Attribute sup = new AttributeImpl( "m-supObjectClass" );
+        Attribute sup = new BasicAttribute( "m-supObjectClass" );
         sup.add( "top" );
         sup.add( "person");
         attrs.put( sup );
@@ -756,8 +756,8 @@
     @Test
     public void testAddStructuralOCinheritingFromAbstractOC() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( "objectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "objectClass", "top" );
         oc.add( "metaTop" );
         oc.add( "metaObjectClass" );
         attrs.put( oc );
@@ -785,8 +785,8 @@
     @Test
     public void testAddStructuralOCinheritingFromAuxiliaryOC() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( "objectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "objectClass", "top" );
         oc.add( "metaTop" );
         oc.add( "metaObjectClass" );
         attrs.put( oc );
@@ -798,7 +798,7 @@
         attrs.put( "m-must", "cn" );
         attrs.put( "m-may", "ou" );
         
-        Attribute sup = new AttributeImpl( "m-supObjectClass" );
+        Attribute sup = new BasicAttribute( "m-supObjectClass" );
         sup.add( "top" );
         sup.add( "javaNamingReference");
         attrs.put( sup );
@@ -818,8 +818,8 @@
     @Test
     public void testAddStructuralOCinheritingFromStructuralOC() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( "objectClass", "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( "objectClass", "top" );
         oc.add( "metaTop" );
         oc.add( "metaObjectClass" );
         attrs.put( oc );
@@ -831,7 +831,7 @@
         attrs.put( "m-must", "cn" );
         attrs.put( "m-may", "ou" );
         
-        Attribute sup = new AttributeImpl( "m-supObjectClass" );
+        Attribute sup = new BasicAttribute( "m-supObjectClass" );
         sup.add( "top" );
         sup.add( "person");
         attrs.put( sup );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java Mon Sep  1 15:33:11 2008
@@ -28,8 +28,6 @@
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
-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.constants.SchemaConstants;
@@ -46,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.ldap.LdapContext;
 import java.util.Map;
@@ -114,7 +114,7 @@
     public void testAddDisabledSchemaNoDeps() throws Exception
     {
         LdapContext schemaRoot = getSchemaContext( service );
-        Attributes dummySchema = new AttributesImpl( "objectClass", "top" );
+        Attributes dummySchema = new BasicAttributes( "objectClass", "top", true );
         dummySchema.get( "objectClass" ).add( MetaSchemaConstants.META_SCHEMA_OC );
         dummySchema.put( "cn", DUMMY_SCHEMA );
         dummySchema.put( MetaSchemaConstants.M_DISABLED_AT, "TRUE" );
@@ -135,7 +135,7 @@
     public void testAddDisabledSchemaWithDeps() throws Exception
     {
         LdapContext schemaRoot = getSchemaContext( service );
-        Attributes dummySchema = new AttributesImpl( "objectClass", "top" );
+        Attributes dummySchema = new BasicAttributes( "objectClass", "top", true );
         dummySchema.get( "objectClass" ).add( MetaSchemaConstants.META_SCHEMA_OC );
         dummySchema.put( "cn", DUMMY_SCHEMA );
         dummySchema.put( MetaSchemaConstants.M_DISABLED_AT, "TRUE" );
@@ -158,7 +158,7 @@
     public void testRejectDisabledSchemaAddWithMissingDeps() throws Exception
     {
         LdapContext schemaRoot = getSchemaContext( service );
-        Attributes dummySchema = new AttributesImpl( "objectClass", "top" );
+        Attributes dummySchema = new BasicAttributes( "objectClass", "top", true );
         dummySchema.get( "objectClass" ).add( MetaSchemaConstants.META_SCHEMA_OC );
         dummySchema.put( "cn", DUMMY_SCHEMA );
         dummySchema.put( MetaSchemaConstants.M_DISABLED_AT, "TRUE" );
@@ -198,7 +198,7 @@
     public void testAddEnabledSchemaNoDeps() throws Exception
     {
         LdapContext schemaRoot = getSchemaContext( service );
-        Attributes dummySchema = new AttributesImpl( "objectClass", "top" );
+        Attributes dummySchema = new BasicAttributes( "objectClass", "top", true );
         dummySchema.get( "objectClass" ).add( MetaSchemaConstants.META_SCHEMA_OC );
         dummySchema.put( "cn", DUMMY_SCHEMA );
         schemaRoot.createSubcontext( "cn=" + DUMMY_SCHEMA, dummySchema );
@@ -218,7 +218,7 @@
     public void testRejectEnabledSchemaAddWithDisabledDeps() throws Exception
     {
         LdapContext schemaRoot = getSchemaContext( service );
-        Attributes dummySchema = new AttributesImpl( "objectClass", "top" );
+        Attributes dummySchema = new BasicAttributes( "objectClass", "top", true );
         dummySchema.get( "objectClass" ).add( MetaSchemaConstants.META_SCHEMA_OC );
         dummySchema.put( "cn", DUMMY_SCHEMA );
         dummySchema.put( MetaSchemaConstants.M_DEPENDENCIES_AT, TEST_SCHEMA );
@@ -289,7 +289,7 @@
         // make the nis schema depend on the dummy schema
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
         mods[0] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE,
-                new AttributeImpl( MetaSchemaConstants.M_DEPENDENCIES_AT, DUMMY_SCHEMA ) );
+                new BasicAttribute( MetaSchemaConstants.M_DEPENDENCIES_AT, DUMMY_SCHEMA ) );
         schemaRoot.modifyAttributes( "cn=" + TEST_SCHEMA, mods );
         
         // attempt to delete it now & it should fail
@@ -318,7 +318,7 @@
     {
         LdapContext schemaRoot = getSchemaContext( service );
 
-        Attributes dummySchema = new AttributesImpl( "objectClass", "top" );
+        Attributes dummySchema = new BasicAttributes( "objectClass", "top", true );
         dummySchema.get( "objectClass" ).add( MetaSchemaConstants.META_SCHEMA_OC );
         dummySchema.put( "cn", DUMMY_SCHEMA );
         dummySchema.put( MetaSchemaConstants.M_DEPENDENCIES_AT, "missing" );
@@ -358,7 +358,7 @@
 
         // now enable the test schema
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
-        Attribute attr = new AttributeImpl( "m-disabled", "FALSE" );
+        Attribute attr = new BasicAttribute( "m-disabled", "FALSE" );
         mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
         schemaRoot.modifyAttributes( "cn=" + schemaName, mods );
     }
@@ -370,7 +370,7 @@
 
         // now enable the test schema
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
-        Attribute attr = new AttributeImpl( "m-disabled", "TRUE" );
+        Attribute attr = new BasicAttribute( "m-disabled", "TRUE" );
         mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
         schemaRoot.modifyAttributes( "cn=" + schemaName, mods );
     }
@@ -460,7 +460,7 @@
         testEnableSchema(); 
         
         // adds enabled dummy schema that depends on the test schema  
-        Attributes dummySchema = new AttributesImpl( "objectClass", "top" );
+        Attributes dummySchema = new BasicAttributes( "objectClass", "top", true );
         dummySchema.get( "objectClass" ).add( MetaSchemaConstants.META_SCHEMA_OC );
         dummySchema.put( "cn", DUMMY_SCHEMA );
         dummySchema.put( MetaSchemaConstants.M_DEPENDENCIES_AT, TEST_SCHEMA );
@@ -479,7 +479,7 @@
         // now try to disable the test schema which should fail 
         // since it's dependent, the dummy schema, is enabled
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
-        Attribute attr = new AttributeImpl( "m-disabled", "TRUE" );
+        Attribute attr = new BasicAttribute( "m-disabled", "TRUE" );
         mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
         
         try
@@ -626,7 +626,7 @@
         LdapContext schemaRoot = getSchemaContext( service );
 
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
-        Attribute attr = new AttributeImpl( "m-dependencies", "bogus" );
+        Attribute attr = new BasicAttribute( "m-dependencies", "bogus" );
         mods[0] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr );
         
         try
@@ -655,7 +655,7 @@
         LdapContext schemaRoot = getSchemaContext( service );
         enableSchema( TEST_SCHEMA );
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
-        Attribute attr = new AttributeImpl( "m-dependencies", "mozilla" );
+        Attribute attr = new BasicAttribute( "m-dependencies", "mozilla" );
         mods[0] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr );
         
         try
@@ -681,7 +681,7 @@
     {
         LdapContext schemaRoot = getSchemaContext( service );
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
-        Attribute attr = new AttributeImpl( "m-dependencies", "mozilla" );
+        Attribute attr = new BasicAttribute( "m-dependencies", "mozilla" );
         mods[0] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr );
         schemaRoot.modifyAttributes( "cn=" + TEST_SCHEMA, mods );
         Attributes attrs = schemaRoot.getAttributes( "cn=" + TEST_SCHEMA );
@@ -701,7 +701,7 @@
     {
         LdapContext schemaRoot = getSchemaContext( service );
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
-        Attribute attr = new AttributeImpl( "m-dependencies", "java" );
+        Attribute attr = new BasicAttribute( "m-dependencies", "java" );
         mods[0] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr );
         schemaRoot.modifyAttributes( "cn=" + TEST_SCHEMA, mods );
         Attributes attrs = schemaRoot.getAttributes( "cn=" + TEST_SCHEMA );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java Mon Sep  1 15:33:11 2008
@@ -30,8 +30,6 @@
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
-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;
@@ -48,6 +46,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 java.io.ByteArrayOutputStream;
 import java.io.InputStream;
@@ -109,8 +109,8 @@
     @Test
     public void testAddSyntaxChecker() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT, "top" );
         oc.add( MetaSchemaConstants.META_TOP_OC );
         oc.add( MetaSchemaConstants.META_SYNTAX_CHECKER_OC );
         attrs.put( oc );
@@ -139,8 +139,8 @@
             out.write( in.read() );
         }
         
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT, "top" );
         oc.add( MetaSchemaConstants.META_TOP_OC );
         oc.add( MetaSchemaConstants.META_SYNTAX_CHECKER_OC );
         attrs.put( oc );
@@ -274,7 +274,7 @@
         dn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
         
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
-        Attribute attr = new AttributeImpl( MetaSchemaConstants.M_FQCN_AT, BogusSyntaxChecker.class.getName() );
+        Attribute attr = new BasicAttribute( MetaSchemaConstants.M_FQCN_AT, BogusSyntaxChecker.class.getName() );
         mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
         getSchemaContext( service ).modifyAttributes( dn, mods );
 
@@ -297,7 +297,7 @@
         LdapDN dn = getSyntaxCheckerContainer( "apachemeta" );
         dn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
         
-        Attributes mods = new AttributesImpl();
+        Attributes mods = new BasicAttributes( true );
         mods.put( MetaSchemaConstants.M_FQCN_AT, BogusSyntaxChecker.class.getName() );
         getSchemaContext( service ).modifyAttributes( dn, DirContext.REPLACE_ATTRIBUTE, mods );
 
@@ -488,8 +488,8 @@
     @Test
     public void testAddSyntaxCheckerToDisabledSchema() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT, "top" );
         oc.add( MetaSchemaConstants.META_TOP_OC );
         oc.add( MetaSchemaConstants.META_SYNTAX_CHECKER_OC );
         attrs.put( oc );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java Mon Sep  1 15:33:11 2008
@@ -30,8 +30,6 @@
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
-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;
@@ -48,6 +46,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;
@@ -114,8 +114,8 @@
     @Test
     public void testAddSyntax() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT, "top" );
         oc.add( MetaSchemaConstants.META_TOP_OC );
         oc.add( MetaSchemaConstants.META_SYNTAX_OC );
         attrs.put( oc );
@@ -241,7 +241,7 @@
         dn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
         
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
-        Attribute attr = new AttributeImpl( MetaSchemaConstants.M_DESCRIPTION_AT, DESCRIPTION1 );
+        Attribute attr = new BasicAttribute( MetaSchemaConstants.M_DESCRIPTION_AT, DESCRIPTION1 );
         mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
         getSchemaContext( service ).modifyAttributes( dn, mods );
 
@@ -267,7 +267,7 @@
         LdapDN dn = getSyntaxContainer( "apachemeta" );
         dn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
         
-        Attributes mods = new AttributesImpl();
+        Attributes mods = new BasicAttributes( true );
         mods.put( MetaSchemaConstants.M_DESCRIPTION_AT, DESCRIPTION1 );
         getSchemaContext( service ).modifyAttributes( dn, DirContext.REPLACE_ATTRIBUTE, mods );
 
@@ -379,8 +379,8 @@
     
     private void addDependeeMatchingRule( String oid ) throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT, "top" );
         oc.add( MetaSchemaConstants.META_TOP_OC );
         oc.add( MetaSchemaConstants.META_MATCHING_RULE_OC );
         attrs.put( oc );
@@ -483,8 +483,8 @@
     @Test
     public void testAddSyntaxToDisabledSchema() throws Exception
     {
-        Attributes attrs = new AttributesImpl();
-        Attribute oc = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT, "top" );
+        Attributes attrs = new BasicAttributes( true );
+        Attribute oc = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT, "top" );
         oc.add( MetaSchemaConstants.META_TOP_OC );
         oc.add( MetaSchemaConstants.META_SYNTAX_OC );
         attrs.put( oc );
@@ -558,13 +558,13 @@
     private void modify( int op, List<String> descriptions, String opAttr ) throws Exception
     {
         LdapDN dn = new LdapDN( getSubschemaSubentryDN() );
-        Attribute attr = new AttributeImpl( opAttr );
+        Attribute attr = new BasicAttribute( opAttr );
         for ( String description : descriptions )
         {
             attr.add( description );
         }
         
-        Attributes mods = new AttributesImpl();
+        Attributes mods = new BasicAttributes( true );
         mods.put( attr );
         
         getRootContext( service ).modifyAttributes( dn, op, mods );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java Mon Sep  1 15:33:11 2008
@@ -24,8 +24,6 @@
 import org.apache.directory.server.core.integ.CiRunner;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getRootContext;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
-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.shared.ldap.schema.syntax.AttributeTypeDescription;
@@ -43,6 +41,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;
@@ -104,7 +104,7 @@
             service.shutdown();
             service.startup();
 
-            AttributesImpl attrs = new AttributesImpl( "objectClass", "metaSchema" );
+            Attributes attrs = new BasicAttributes( "objectClass", "metaSchema", true );
             attrs.put( "cn", "blah" );
             getSchemaContext( service ).createSubcontext( "cn=blah", attrs );
 
@@ -126,14 +126,14 @@
     private void modify( int op, List<String> descriptions, String opAttr ) throws Exception
     {
         LdapDN dn = new LdapDN( getSubschemaSubentryDN() );
-        Attribute attr = new AttributeImpl( opAttr );
+        Attribute attr = new BasicAttribute( opAttr );
         
         for ( String description : descriptions )
         {
             attr.add( description );
         }
 
-        Attributes mods = new AttributesImpl();
+        Attributes mods = new BasicAttributes( true );
         mods.put( attr );
 
         getRootContext( service ).modifyAttributes( dn, op, mods );
@@ -144,7 +144,7 @@
     {
         // now enable the test schema
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
-        Attribute attr = new AttributeImpl( "m-disabled", "FALSE" );
+        Attribute attr = new BasicAttribute( "m-disabled", "FALSE" );
         mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
         getSchemaContext( service ).modifyAttributes( "cn=" + schemaName, mods );
     }

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java Mon Sep  1 15:33:11 2008
@@ -27,6 +27,7 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
@@ -38,11 +39,9 @@
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
 
-import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -96,9 +95,9 @@
     @Test
     public void testNoStructuralObjectClass() throws Exception
     {
-        Attributes attrs = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC );
-        attrs.get( SchemaConstants.OBJECT_CLASS_AT ).add( "uidObject" );
-        attrs.put( SchemaConstants.UID_AT, "invalid" );
+        Attributes attrs = new BasicAttributes( "objectClass", "top", true );
+        attrs.get( "objectClass" ).add( "uidObject" );
+        attrs.put( "uid", "invalid" );
         
         try
         {
@@ -119,12 +118,12 @@
     @Test
     public void testMultipleStructuralObjectClasses() throws Exception
     {
-        Attributes attrs = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC );
-        attrs.get( SchemaConstants.OBJECT_CLASS_AT ).add( SchemaConstants.ORGANIZATIONAL_UNIT_OC );
-        attrs.get( SchemaConstants.OBJECT_CLASS_AT ).add( SchemaConstants.PERSON_OC );
-        attrs.put( SchemaConstants.OU_AT, "comedy" );
-        attrs.put( SchemaConstants.CN_AT, "Jack Black" );
-        attrs.put( SchemaConstants.SN_AT, "Black" );
+        Attributes attrs = new BasicAttributes( "objectClass", "top", true );
+        attrs.get( "objectClass" ).add( "organizationalUnit" );
+        attrs.get( "objectClass" ).add( "person" );
+        attrs.put( "ou", "comedy" );
+        attrs.put( "cn", "Jack Black" );
+        attrs.put( "sn", "Black" );
         
         try
         {

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java Mon Sep  1 15:33:11 2008
@@ -30,8 +30,6 @@
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 import org.apache.directory.shared.ldap.exception.LdapNameAlreadyBoundException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
-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;
@@ -70,6 +68,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;
@@ -1395,7 +1395,7 @@
             "DESC 'bogus description' SUP name SINGLE-VALUE X-SCHEMA 'nis' )";
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
         mods[0] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, 
-            new AttributeImpl( "attributeTypes", substrate ) );
+            new BasicAttribute( "attributeTypes", substrate ) );
         
         getRootContext( service ).modifyAttributes( dn, mods );
         
@@ -1449,7 +1449,7 @@
             "DESC 'bogus description' SUP name SINGLE-VALUE X-SCHEMA 'nis' )";
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
         mods[0] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, 
-            new AttributeImpl( "attributeTypes", substrate ) );
+            new BasicAttribute( "attributeTypes", substrate ) );
         
         getRootContext( service ).modifyAttributes( dn, mods );
         
@@ -1885,7 +1885,7 @@
             "DESC 'bogus description' SUP name SINGLE-VALUE X-SCHEMA 'nis' )";
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
         mods[0] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, 
-            new AttributeImpl( "attributeTypes", substrate ) );
+            new BasicAttribute( "attributeTypes", substrate ) );
         
         getRootContext( service ).modifyAttributes( dn, mods );
 
@@ -1918,7 +1918,7 @@
         // now let's test the modifiersName update with another user besides
         // the administrator - we'll create a dummy user for that ...
         
-        AttributesImpl user = new AttributesImpl( "objectClass", "person", true );
+        Attributes user = new BasicAttributes( "objectClass", "person", true );
         user.put( "sn", "bogus" );
         user.put( "cn", "bogus user" );
         user.put( "userPassword", "secret" );
@@ -1941,7 +1941,7 @@
         substrate = "( 1.3.6.1.4.1.18060.0.4.0.2.10001 NAME ( 'bogus2' 'bogusName2' ) " +
             "DESC 'bogus description' SUP name SINGLE-VALUE X-SCHEMA 'nis' )";
         mods[0] = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, 
-            new AttributeImpl( "attributeTypes", substrate ) );
+            new BasicAttribute( "attributeTypes", substrate ) );
         ctx.modifyAttributes( dn, mods );
         
         // now let's verify the new values for the modification attributes
@@ -1977,13 +1977,13 @@
     private void modify( int op, List<String> descriptions, String opAttr ) throws Exception
     {
         LdapDN dn = new LdapDN( getSubschemaSubentryDN() );
-        Attribute attr = new AttributeImpl( opAttr );
+        Attribute attr = new BasicAttribute( opAttr );
         for ( String description : descriptions )
         {
             attr.add( description );
         }
         
-        Attributes mods = new AttributesImpl();
+        Attributes mods = new BasicAttributes( true );
         mods.put( attr );
         
         getRootContext( service ).modifyAttributes( dn, op, mods );
@@ -1994,7 +1994,7 @@
     {
         // now enable the test schema
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
-        Attribute attr = new AttributeImpl( "m-disabled", "FALSE" );
+        Attribute attr = new BasicAttribute( "m-disabled", "FALSE" );
         mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
         getSchemaContext( service ).modifyAttributes( "cn=" + schemaName, mods );
     }
@@ -2004,7 +2004,7 @@
     {
         // now enable the test schema
         ModificationItemImpl[] mods = new ModificationItemImpl[1];
-        Attribute attr = new AttributeImpl( "m-disabled", "TRUE" );
+        Attribute attr = new BasicAttribute( "m-disabled", "TRUE" );
         mods[0] = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
         getSchemaContext( service ).modifyAttributes( "cn=" + schemaName, mods );
     }

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java Mon Sep  1 15:33:11 2008
@@ -28,8 +28,6 @@
 
 import static org.apache.directory.server.core.integ.IntegrationUtils.getRootContext;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.util.Base64;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
@@ -38,6 +36,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;
 
 
@@ -75,7 +75,7 @@
         ServerLdapContext defaultContext = ( ServerLdapContext ) root.lookup( "ou=system" );
 
         // set up
-        Attributes attributes = new AttributesImpl( "objectClass", "top", true );
+        Attributes attributes = new BasicAttributes( "objectClass", "top", true );
         attributes.get( "objectClass" ).add( "javaClass" );
         attributes.put( "fullyQualifiedJavaClassName", "HelloWorld" );
         attributes.put( "javaClassByteCode", HELLOWORLD_CLASS_BYTES );
@@ -102,8 +102,8 @@
         ServerLdapContext defaultContext = ( ServerLdapContext ) root.lookup( "ou=system" );
 
         // create an extensible object for holding custom config data
-        Attributes classLoaderDefaultSearchContextConfig = new AttributesImpl();
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes classLoaderDefaultSearchContextConfig = new BasicAttributes( true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( "javaContainer" );
         
@@ -114,17 +114,17 @@
 
         // create custom config entry
         classLoaderDefaultSearchContextConfig.put( objectClass );
-        classLoaderDefaultSearchContextConfig.put( new AttributeImpl( "cn", "classLoaderDefaultSearchContext" ) );
+        classLoaderDefaultSearchContextConfig.put( new BasicAttribute( "cn", "classLoaderDefaultSearchContext" ) );
 
         // add a default search context to the configuration
-        classLoaderDefaultSearchContextConfig.put( new AttributeImpl( "classLoaderDefaultSearchContext", "ou=system" ) );
+        classLoaderDefaultSearchContextConfig.put( new BasicAttribute( "classLoaderDefaultSearchContext", "ou=system" ) );
 
         // add the configuration entry to the DIT
         ServerLdapContext configContext = ( ServerLdapContext ) defaultContext.lookup( "ou=configuration" );
         configContext.createSubcontext( "cn=classLoaderDefaultSearchContext", classLoaderDefaultSearchContextConfig );
 
         // create a class holder entry and add it to the DIT
-        Attributes attributes = new AttributesImpl( "objectClass", "top", true );
+        Attributes attributes = new BasicAttributes( "objectClass", "top", true );
         attributes.get( "objectClass" ).add( "javaClass" );
         attributes.put( "fullyQualifiedJavaClassName", "HelloWorld" );
         attributes.put( "javaClassByteCode", HELLOWORLD_CLASS_BYTES );
@@ -135,7 +135,7 @@
 
         // load the class
         LdapClassLoader loader = new LdapClassLoader( service );
-        Class clazz = loader.loadClass( "HelloWorld" );
+        Class<?> clazz = loader.loadClass( "HelloWorld" );
 
         // assert class loaded successfully
         assertEquals( clazz.getName(), "HelloWorld" );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/BadSubentryServiceIT.java Mon Sep  1 15:33:11 2008
@@ -25,8 +25,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.constants.SchemaConstants;
-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.assertEquals;
 import static org.junit.Assert.assertTrue;
@@ -37,6 +35,8 @@
 import javax.naming.NamingEnumeration;
 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;
@@ -59,8 +59,8 @@
 
     public Attributes getTestEntry( String cn )
     {
-        Attributes entry = new AttributesImpl();
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes entry = new BasicAttributes( true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( "person" );
         entry.put( objectClass );
@@ -72,8 +72,8 @@
 
     public Attributes getCollectiveAttributeTestSubentry( 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( SchemaConstants.SUBENTRY_OC );
         objectClass.add( "collectiveAttributeSubentry" );
@@ -87,8 +87,8 @@
     
     public Attributes getAccessControlTestSubentry( 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( SchemaConstants.SUBENTRY_OC );
         objectClass.add( "accessControlSubentry" );
@@ -132,7 +132,7 @@
     public void addAdministrativeRoles() throws Exception
     {
         LdapContext sysRoot = getSystemContext( service );
-        Attribute attribute = new AttributeImpl( "administrativeRole" );
+        Attribute attribute = new BasicAttribute( "administrativeRole" );
         attribute.add( "autonomousArea" );
         attribute.add( "collectiveAttributeSpecificArea" );
         attribute.add( "accessControlSpecificArea" );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceEntryModificationHandlingIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceEntryModificationHandlingIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceEntryModificationHandlingIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceEntryModificationHandlingIT.java Mon Sep  1 15:33:11 2008
@@ -25,8 +25,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.constants.SchemaConstants;
-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.assertNotNull;
 import static org.junit.Assert.assertNull;
@@ -36,6 +34,8 @@
 import javax.naming.NamingEnumeration;
 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;
@@ -61,8 +61,8 @@
 
     public Attributes getTestEntry( String cn )
     {
-        Attributes entry = new AttributesImpl();
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes entry = new BasicAttributes( true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( "person" );
         entry.put( objectClass );
@@ -74,8 +74,8 @@
 
     public Attributes getCollectiveAttributeTestSubentryWithLDAPFilter( String cn, String sn )
     {
-        Attributes subentry = new AttributesImpl();
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes subentry = new BasicAttributes( true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( SchemaConstants.SUBENTRY_OC );
         objectClass.add( "collectiveAttributeSubentry" );
@@ -90,7 +90,7 @@
     public void addAdministrativeRoles() throws Exception
     {
         LdapContext sysRoot = getSystemContext( service );
-        Attribute attribute = new AttributeImpl( "administrativeRole" );
+        Attribute attribute = new BasicAttribute( "administrativeRole" );
         attribute.add( "autonomousArea" );
         attribute.add( "collectiveAttributeSpecificArea" );
         ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attribute );
@@ -139,7 +139,7 @@
 
         //----------------------------------------------------------------------
 
-        AttributeImpl attr = new AttributeImpl( "sn", "changedSn");
+        Attribute attr = new BasicAttribute( "sn", "changedSn");
         ModificationItemImpl mod = new ModificationItemImpl(DirContext.REPLACE_ATTRIBUTE, attr);
         ModificationItemImpl[] mods = new ModificationItemImpl[] { mod };
         

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java Mon Sep  1 15:33:11 2008
@@ -24,8 +24,6 @@
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
-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.SubentriesControl;
 import static org.junit.Assert.assertEquals;
@@ -41,6 +39,8 @@
 import javax.naming.NamingEnumeration;
 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;
@@ -65,8 +65,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 );
@@ -78,8 +78,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( SchemaConstants.SUBENTRY_OC );
         objectClass.add( "collectiveAttributeSubentry" );
@@ -93,8 +93,8 @@
 
     public Attributes getTestSubentryWithExclusion()
     {
-        Attributes subentry = new AttributesImpl();
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes subentry = new BasicAttributes( true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( SchemaConstants.SUBENTRY_OC );
         objectClass.add( "collectiveAttributeSubentry" );
@@ -110,7 +110,7 @@
     public void addAdministrativeRole( String role ) throws Exception
     {
         LdapContext sysRoot = getSystemContext( service );
-        Attribute attribute = new AttributeImpl( "administrativeRole" );
+        Attribute attribute = new BasicAttribute( "administrativeRole" );
         attribute.add( role );
         ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attribute );
         sysRoot.modifyAttributes( "", new ModificationItemImpl[]
@@ -296,7 +296,7 @@
         // Now modify the subentry by introducing an exclusion
         // --------------------------------------------------------------------
 
-        Attribute subtreeSpecification = new AttributeImpl( "subtreeSpecification" );
+        Attribute subtreeSpecification = new BasicAttribute( "subtreeSpecification" );
         subtreeSpecification.add( "{ base \"ou=configuration\", specificExclusions { chopBefore:\"ou=services\" } }" );
         ModificationItemImpl item = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, subtreeSpecification );
         sysRoot.modifyAttributes( "cn=testsubentry", new ModificationItemImpl[]
@@ -414,7 +414,7 @@
         // Now modify the subentry by introducing an exclusion
         // --------------------------------------------------------------------
 
-        Attributes changes = new AttributesImpl();
+        Attributes changes = new BasicAttributes( true );
         changes.put( "subtreeSpecification",
             "{ base \"ou=configuration\", specificExclusions { chopBefore:\"ou=services\" } }" );
         sysRoot.modifyAttributes( "cn=testsubentry", DirContext.REPLACE_ATTRIBUTE, changes );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceObjectClassChangeHandlingIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceObjectClassChangeHandlingIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceObjectClassChangeHandlingIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceObjectClassChangeHandlingIT.java Mon Sep  1 15:33:11 2008
@@ -25,8 +25,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.constants.SchemaConstants;
-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.assertNotNull;
 import static org.junit.Assert.assertNull;
@@ -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.directory.SearchResult;
@@ -60,8 +60,8 @@
 
     public Attributes getTestEntry( String cn )
     {
-        Attributes entry = new AttributesImpl();
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes entry = new BasicAttributes( true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( "person" );
         entry.put( objectClass );
@@ -73,8 +73,8 @@
 
     public Attributes getModsForIntroducingNewOC() throws NamingException
     {
-        Attributes changes = new AttributesImpl();
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes changes = new BasicAttributes( true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         objectClass.add( "organizationalPerson" );
         changes.put( objectClass );
         changes.put( "ou", "Test Organizational Unit" );
@@ -84,8 +84,8 @@
 
     public Attributes getCollectiveAttributeTestSubentry( 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( SchemaConstants.SUBENTRY_OC );
         objectClass.add( "collectiveAttributeSubentry" );
@@ -100,7 +100,7 @@
     public void addAdministrativeRoles() throws Exception
     {
         LdapContext sysRoot = getSystemContext( service );
-        Attribute attribute = new AttributeImpl( "administrativeRole" );
+        Attribute attribute = new BasicAttribute( "administrativeRole" );
         attribute.add( "autonomousArea" );
         attribute.add( "collectiveAttributeSpecificArea" );
         ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attribute );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersIT.java?rev=691077&r1=691076&r2=691077&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/trigger/SubentryServiceForTriggersIT.java Mon Sep  1 15:33:11 2008
@@ -26,8 +26,6 @@
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
-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.assertEquals;
 import static org.junit.Assert.assertNull;
@@ -40,6 +38,8 @@
 import javax.naming.NamingEnumeration;
 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;
@@ -64,8 +64,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 );
@@ -77,8 +77,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( SchemaConstants.SUBENTRY_OC );
         objectClass.add( "triggerExecutionSubentry" );
@@ -91,8 +91,8 @@
     
     public Attributes getTestSubentryWithExclusion()
     {
-        Attributes subentry = new AttributesImpl();
-        Attribute objectClass = new AttributeImpl( "objectClass" );
+        Attributes subentry = new BasicAttributes( true );
+        Attribute objectClass = new BasicAttribute( "objectClass" );
         objectClass.add( "top" );
         objectClass.add( SchemaConstants.SUBENTRY_OC );
         objectClass.add( "triggerExecutionSubentry" );
@@ -108,7 +108,7 @@
     public void addTheAdministrativeRole() throws Exception
     {
         LdapContext sysRoot = getSystemContext( service );
-        Attribute attribute = new AttributeImpl( "administrativeRole" );
+        Attribute attribute = new BasicAttribute( "administrativeRole" );
         attribute.add( "autonomousArea" );
         attribute.add( "triggerSpecificArea" );
         ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attribute );
@@ -253,7 +253,7 @@
         // Now modify the subentry by introducing an exclusion
         // --------------------------------------------------------------------
 
-        Attribute subtreeSpecification = new AttributeImpl( "subtreeSpecification" );
+        Attribute subtreeSpecification = new BasicAttribute( "subtreeSpecification" );
         subtreeSpecification.add( "{ base \"ou=configuration\", specificExclusions { chopBefore:\"ou=interceptors\" } }" );
         ModificationItemImpl item = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, subtreeSpecification );
         sysRoot.modifyAttributes( "cn=testsubentry", new ModificationItemImpl[] { item } );



Mime
View raw message