You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2008/09/02 02:37:24 UTC
svn commit: r691087 - in /directory:
apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/
apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/
apacheds/trunk/mitosis/src/test/java/org/apache/directo...
Author: elecharny
Date: Mon Sep 1 17:37:23 2008
New Revision: 691087
URL: http://svn.apache.org/viewvc?rev=691087&view=rev
Log:
Some more references to Attribute(s)Impl removals
Modified:
directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryPropertyEditor.java
directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java
directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/DIRSERVER1013ITest.java
directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/ReplicationServiceITest.java
directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/CapacityTestCommand.java
directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/sp/JavaStoredProcUtils.java
directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java
directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifUtilsTest.java
Modified: directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryPropertyEditor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryPropertyEditor.java?rev=691087&r1=691086&r2=691087&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryPropertyEditor.java (original)
+++ directory/apacheds/trunk/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryPropertyEditor.java Mon Sep 1 17:37:23 2008
@@ -30,12 +30,12 @@
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttributes;
import org.apache.commons.collections.map.MultiValueMap;
import org.apache.directory.shared.ldap.ldif.LdifComposer;
import org.apache.directory.shared.ldap.ldif.LdifComposerImpl;
import org.apache.directory.shared.ldap.ldif.LdifReader;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
import org.apache.directory.shared.ldap.util.StringTools;
@@ -114,7 +114,7 @@
BufferedReader in = new BufferedReader( strIn );
String line = null;
- Attributes attributes = new AttributesImpl( true );
+ Attributes attributes = new BasicAttributes( true );
try
{
Modified: directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java?rev=691087&r1=691086&r2=691087&view=diff
==============================================================================
--- directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java (original)
+++ directory/apacheds/trunk/core-entry/src/test/java/org/apache/directory/server/core/entry/DefaultServerEntryTest.java Mon Sep 1 17:37:23 2008
@@ -3790,15 +3790,6 @@
assertEquals( 0, entry.size() );
}
-
-
-
-
-
-
-
-
-
/**
* Test a conversion from a ServerEntry to an AttributesImpl
Modified: directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/DIRSERVER1013ITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/DIRSERVER1013ITest.java?rev=691087&r1=691086&r2=691087&view=diff
==============================================================================
--- directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/DIRSERVER1013ITest.java (original)
+++ directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/DIRSERVER1013ITest.java Mon Sep 1 17:37:23 2008
@@ -20,10 +20,10 @@
package org.apache.directory.mitosis.service;
import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttributes;
import javax.naming.ldap.LdapContext;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
import org.junit.Before;
import org.junit.Test;
@@ -54,11 +54,12 @@
{
LdapContext ctxA = getReplicaContext( "A" );
- Attributes entry = new AttributesImpl( true );
+ Attributes entry = new BasicAttributes( true );
entry.put( "cn", "test" );
// We add the 'room' OC to have at least a STRUCTURAL OC
- entry.put( "objectClass", "top" ).add( "room" );
+ entry.put( "objectClass", "top" );
+ entry.get( "objectClass" ).add( "room" );
ctxA.createSubcontext( "cn=test,ou=system", entry );
Attributes attributes = ctxA.getAttributes( "cn=test,ou=system" );
Modified: directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/ReplicationServiceITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/ReplicationServiceITest.java?rev=691087&r1=691086&r2=691087&view=diff
==============================================================================
--- directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/ReplicationServiceITest.java (original)
+++ directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/ReplicationServiceITest.java Mon Sep 1 17:37:23 2008
@@ -26,6 +26,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.ModificationItem;
import javax.naming.ldap.LdapContext;
@@ -33,8 +35,6 @@
import junit.framework.Assert;
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;
import org.apache.directory.shared.ldap.schema.DeepTrimToLowerNormalizer;
@@ -95,12 +95,12 @@
LdapContext ctxB = getReplicaContext( "B" );
LdapContext ctxC = getReplicaContext( "C" );
- Attributes entryA = new AttributesImpl( true );
+ Attributes entryA = new BasicAttributes( true );
entryA.put( "cn", "test" );
entryA.put( "sn", "test" );
entryA.put( "ou", "A" );
- Attribute oc = new AttributeImpl( "objectClass" );
+ Attribute oc = new BasicAttribute( "objectClass" );
oc.add( "top" );
oc.add( "person" );
oc.add( "organizationalPerson" );
@@ -112,7 +112,7 @@
// Ensure the second bind is undebatebly the second.
Thread.sleep( 100 );
- Attributes entryB = new AttributesImpl( true );
+ Attributes entryB = new BasicAttributes( true );
entryB.put( "cn", "test" );
entryB.put( "sn", "test" );
entryB.put( "ou", "B" );
@@ -140,11 +140,11 @@
LdapContext ctxB = getReplicaContext( "B" );
LdapContext ctxC = getReplicaContext( "C" );
- Attributes entry = new AttributesImpl( true );
+ Attributes entry = new BasicAttributes( true );
entry.put( "cn", "test" );
entry.put( "sn", "test" );
- Attribute oc = new AttributeImpl( "objectClass" );
+ Attribute oc = new BasicAttribute( "objectClass" );
oc.add( "top" );
oc.add( "person" );
oc.add( "organizationalPerson" );
@@ -171,7 +171,7 @@
String newValue = "anything";
ctxA.modifyAttributes( dn, new ModificationItem[] {
- new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, new AttributeImpl( "ou", newValue ))} );
+ new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, new BasicAttribute( "ou", newValue ))} );
replicationServices.get( "A" ).replicate();
Modified: directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/CapacityTestCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/CapacityTestCommand.java?rev=691087&r1=691086&r2=691087&view=diff
==============================================================================
--- directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/CapacityTestCommand.java (original)
+++ directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/CapacityTestCommand.java Mon Sep 1 17:37:23 2008
@@ -28,6 +28,7 @@
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttributes;
import javax.naming.ldap.InitialLdapContext;
import javax.naming.ldap.LdapContext;
@@ -36,7 +37,6 @@
import org.apache.commons.cli.Options;
import org.apache.commons.lang.RandomStringUtils;
import org.apache.directory.daemon.AvailablePortFinder;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
/**
@@ -134,7 +134,7 @@
private boolean createBase( LdapContext ctx ) throws NamingException
{
- Attributes attrs = new AttributesImpl( "objectClass", "organizationalUnit", true );
+ Attributes attrs = new BasicAttributes( "objectClass", "organizationalUnit", true );
attrs.put( "ou", "users" );
try
@@ -151,7 +151,7 @@
private Attributes generateLdif( int counter )
{
- Attributes attrs = new AttributesImpl( "objectClass", "top", true );
+ Attributes attrs = new BasicAttributes( "objectClass", "top", true );
Attribute oc = attrs.get( "objectClass" );
oc.add( "person" );
oc.add( "organizationalPerson" );
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/sp/JavaStoredProcUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/sp/JavaStoredProcUtils.java?rev=691087&r1=691086&r2=691087&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/sp/JavaStoredProcUtils.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/sp/JavaStoredProcUtils.java Mon Sep 1 17:37:23 2008
@@ -29,11 +29,11 @@
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttributes;
import javax.naming.ldap.LdapContext;
import org.apache.commons.lang.SerializationUtils;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
import org.apache.directory.shared.ldap.message.extended.StoredProcedureRequest;
import org.apache.directory.shared.ldap.message.extended.StoredProcedureResponse;
@@ -98,7 +98,7 @@
byte[] buf = getClassFileAsStream( clazz );
String fullClassName = clazz.getName();
- Attributes attributes = new AttributesImpl( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, true );
+ Attributes attributes = new BasicAttributes( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, true );
attributes.get( SchemaConstants.OBJECT_CLASS_AT ).add( "storedProcUnit" );
attributes.get( SchemaConstants.OBJECT_CLASS_AT ).add( "javaStoredProcUnit" );
attributes.put( "storedProcLangId", "Java" );
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java?rev=691087&r1=691086&r2=691087&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerUtils.java Mon Sep 1 17:37:23 2008
@@ -24,12 +24,12 @@
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
import javax.naming.directory.DirContext;
import javax.naming.ldap.LdapContext;
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.util.AttributeUtils;
/**
@@ -55,7 +55,7 @@
if ( administrativeRole == null ||
!AttributeUtils.containsValueCaseIgnore( administrativeRole, TRIGGER_EXECUTION_SPECIFIC_AREA_ATTR_VALUE ) )
{
- Attributes changes = new AttributesImpl( ADMINISTRATIVE_ROLE_ATTR, TRIGGER_EXECUTION_SPECIFIC_AREA_ATTR_VALUE, true );
+ Attributes changes = new BasicAttributes( ADMINISTRATIVE_ROLE_ATTR, TRIGGER_EXECUTION_SPECIFIC_AREA_ATTR_VALUE, true );
apCtx.modifyAttributes( "", DirContext.ADD_ATTRIBUTE, changes );
}
}
@@ -67,8 +67,8 @@
String subtreeSpec,
String prescriptiveTriggerSpec ) throws NamingException
{
- Attributes subentry = new AttributesImpl( SchemaConstants.CN_AT, subentryCN, true );
- Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
+ Attributes subentry = new BasicAttributes( SchemaConstants.CN_AT, subentryCN, true );
+ Attribute objectClass = new BasicAttribute( SchemaConstants.OBJECT_CLASS_AT );
subentry.put( objectClass );
objectClass.add( SchemaConstants.TOP_OC );
objectClass.add( SchemaConstants.SUBENTRY_OC );
@@ -84,7 +84,7 @@
String subentryCN,
String triggerSpec ) throws NamingException
{
- Attributes changes = new AttributesImpl( PRESCRIPTIVE_TRIGGER_SPECIFICATION_ATTR, triggerSpec, true );
+ Attributes changes = new BasicAttributes( PRESCRIPTIVE_TRIGGER_SPECIFICATION_ATTR, triggerSpec, true );
apCtx.modifyAttributes( "cn=" + subentryCN, DirContext.ADD_ATTRIBUTE, changes );
}
@@ -93,7 +93,7 @@
LdapContext ctx,
String triggerSpec ) throws NamingException
{
- Attributes changes = new AttributesImpl( ENTRY_TRIGGER_SPECIFICATION_ATTR, triggerSpec, true );
+ Attributes changes = new BasicAttributes( ENTRY_TRIGGER_SPECIFICATION_ATTR, triggerSpec, true );
ctx.modifyAttributes( "", DirContext.ADD_ATTRIBUTE, changes );
}
}
Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifUtilsTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifUtilsTest.java?rev=691087&r1=691086&r2=691087&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifUtilsTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifUtilsTest.java Mon Sep 1 17:37:23 2008
@@ -26,8 +26,6 @@
import org.apache.directory.shared.ldap.entry.client.ClientModification;
import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
-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.apache.directory.shared.ldap.name.Rdn;
import org.apache.directory.shared.ldap.util.StringTools;
@@ -475,7 +473,7 @@
{
LdapDN dn = new LdapDN( "cn=john doe, dc=example, dc=com" );
- AttributesImpl attrs = new AttributesImpl( "objectClass", "person", true );
+ Attributes attrs = new BasicAttributes( "objectClass", "person", true );
attrs.get( "objectClass" ).add( "uidObject" );
attrs.put( "cn", "john doe" );
attrs.put( "sn", "doe" );
@@ -508,7 +506,7 @@
{
LdapDN dn = new LdapDN( "cn=john doe, dc=example, dc=com" );
- AttributesImpl attrs = new AttributesImpl( "objectClass", "person", true );
+ Attributes attrs = new BasicAttributes( "objectClass", "person", true );
attrs.get( "objectClass" ).add( "uidObject" );
attrs.put( "cn", "john doe" );
attrs.put( "cn", "jack doe" );
@@ -543,10 +541,10 @@
LdapDN dn = new LdapDN( "cn=john doe, dc=example, dc=com" );
LdapDN newSuperior = new LdapDN( "ou=system" );
- AttributesImpl attrs = new AttributesImpl( "objectClass", "person", true );
+ Attributes attrs = new BasicAttributes( "objectClass", "person", true );
attrs.get( "objectClass" ).add( "uidObject" );
- AttributeImpl attr = new AttributeImpl( "cn" );
+ Attribute attr = new BasicAttribute( "cn" );
attr.add( "john doe" );
attr.add( "jack doe" );
@@ -582,7 +580,7 @@
LdapDN dn = new LdapDN( "cn=john doe, dc=example, dc=com" );
LdapDN newSuperior = new LdapDN( "ou=system" );
- AttributesImpl attrs = new AttributesImpl( "objectClass", "person", true );
+ Attributes attrs = new BasicAttributes( "objectClass", "person", true );
attrs.get( "objectClass" ).add( "uidObject" );
attrs.put( "cn", "john doe" );
attrs.put( "cn", "jack doe" );
@@ -615,7 +613,7 @@
LdapDN dn = new LdapDN( "cn=john doe, dc=example, dc=com" );
LdapDN newSuperior = new LdapDN( "ou=system" );
- AttributesImpl attrs = new AttributesImpl( "objectClass", "person", true );
+ Attributes attrs = new BasicAttributes( "objectClass", "person", true );
attrs.get( "objectClass" ).add( "uidObject" );
attrs.put( "cn", "john doe" );
attrs.put( "sn", "doe" );