directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1080066 - in /directory: apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/entry/ apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/entry/ apacheds/trunk/core/src/main/java/org/apache/directory/ser...
Date Thu, 10 Mar 2011 00:20:42 GMT
Author: elecharny
Date: Thu Mar 10 00:20:41 2011
New Revision: 1080066

URL: http://svn.apache.org/viewvc?rev=1080066&view=rev
Log:
o Modified the EntryAttribute class, removing the setId() method
p Modified the EntryAttribute.getId/getUpId methods semantic
o Removed the serialize/deserialize methods from the DefaultEntryAttribute class
o Added a applyAttributeType method in the Modification interface
o Eliminated duplicated code in the EntryAttributeSerializer class
o Fixed the places where the EntryAttribute.getId() method was used
o Normalizing the Modify Context 

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java
    directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/entry/SchemaAwareEntryAttributeTest.java
    directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/entry/SchemaAwareEntryTest.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyRequestDecorator.java
    directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchResultEntryDecorator.java
    directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
    directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java
    directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttribute.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultModification.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryAttribute.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryAttributeSerializer.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/Modification.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java?rev=1080066&r1=1080065&r2=1080066&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java Thu Mar 10 00:20:41 2011
@@ -31,19 +31,20 @@ import javax.naming.directory.Attributes
 import javax.naming.directory.BasicAttribute;
 import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
+import javax.naming.directory.InvalidAttributeIdentifierException;
 import javax.naming.directory.ModificationItem;
 import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.entry.DefaultModification;
-import org.apache.directory.shared.ldap.model.entry.DefaultEntryAttribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
+import org.apache.directory.shared.ldap.model.entry.DefaultEntryAttribute;
+import org.apache.directory.shared.ldap.model.entry.DefaultModification;
 import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.entry.Value;
-import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidAttributeTypeException;
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -455,7 +456,7 @@ public class ServerEntryUtils
             {
                 String attributeId = modification.getAttribute().getId();
                 String id = stripOptions( attributeId );
-                modification.getAttribute().setId( id );
+                modification.getAttribute().setUpId( id );
                 Set<String> options = getOptions( attributeId );
 
                 // -------------------------------------------------------------------

Modified: directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/entry/SchemaAwareEntryAttributeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/entry/SchemaAwareEntryAttributeTest.java?rev=1080066&r1=1080065&r2=1080066&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/entry/SchemaAwareEntryAttributeTest.java (original)
+++ directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/entry/SchemaAwareEntryAttributeTest.java Thu Mar 10 00:20:41 2011
@@ -412,15 +412,17 @@ public class SchemaAwareEntryAttributeTe
     {
         EntryAttribute attr = new DefaultEntryAttribute( atCN );
 
-        assertEquals( "cn", attr.getId() );
+        assertEquals( "2.5.4.3", attr.getId() );
 
-        attr.setId( "  CN  " );
-        assertEquals( "cn", attr.getId() );
+        attr.setUpId( "  CN  " );
+        assertEquals( "2.5.4.3", attr.getId() );
+        assertEquals( "  CN  ", attr.getUpId() );
 
-        attr.setId( "  CommonName  " );
-        assertEquals( "commonname", attr.getId() );
+        attr.setUpId( "  CommonName  " );
+        assertEquals( "2.5.4.3", attr.getId() );
+        assertEquals( "  CommonName  ", attr.getUpId() );
 
-        attr.setId( "  2.5.4.3  " );
+        attr.setUpId( "  2.5.4.3  " );
         assertEquals( "2.5.4.3", attr.getId() );
     }
 
@@ -555,51 +557,37 @@ public class SchemaAwareEntryAttributeTe
     {
         EntryAttribute attr = new DefaultEntryAttribute( atCN );
 
-        attr.setId( "Cn" );
-        assertEquals( "cn", attr.getId() );
+        attr.setUpId( "Cn" );
+        assertEquals( "2.5.4.3", attr.getId() );
+        assertEquals( "Cn", attr.getUpId() );
 
-        attr.setId( " CN " );
-        assertEquals( "cn", attr.getId() );
+        attr.setUpId( " CN " );
+        assertEquals( "2.5.4.3", attr.getId() );
+        assertEquals( " CN ", attr.getUpId() );
 
-        attr.setId( " 2.5.4.3 " );
+        attr.setUpId( " 2.5.4.3 " );
+        assertEquals( " 2.5.4.3 ", attr.getUpId() );
         assertEquals( "2.5.4.3", attr.getId() );
 
-        attr.setId( " commonName " );
-        assertEquals( "commonname", attr.getId() );
+        attr.setUpId( " commonName " );
+        assertEquals( "2.5.4.3", attr.getId() );
+        assertEquals( " commonName ", attr.getUpId() );
 
-        try
-        {
-            attr.setId( null );
-            fail();
-        }
-        catch ( IllegalArgumentException iae )
-        {
-            assertTrue( true );
-        }
+        attr.setUpId( null );
+        assertEquals( "2.5.4.3", attr.getId() );
+        assertEquals( "cn", attr.getUpId() );
 
-        try
-        {
-            attr.setId( "" );
-            fail();
-        }
-        catch ( IllegalArgumentException iae )
-        {
-            assertTrue( true );
-        }
+        attr.setUpId( "" );
+        assertEquals( "2.5.4.3", attr.getId() );
+        assertEquals( "cn", attr.getUpId() );
 
-        try
-        {
-            attr.setId( "  " );
-            fail();
-        }
-        catch ( IllegalArgumentException iae )
-        {
-            assertTrue( true );
-        }
+        attr.setUpId( "  " );
+        assertEquals( "2.5.4.3", attr.getId() );
+        assertEquals( "cn", attr.getUpId() );
 
         try
         {
-            attr.setId( " SN " );
+            attr.setUpId( " SN " );
             fail();
         }
         catch ( IllegalArgumentException iae )
@@ -1002,10 +990,10 @@ public class SchemaAwareEntryAttributeTe
 
         assertTrue( attr1.equals( attr2 ) );
 
-        attr2.setId( "CN" );
+        attr2.setUpId( "CN" );
         assertTrue( attr1.equals( attr2 ) );
 
-        attr1.setId( "CommonName" );
+        attr1.setUpId( "CommonName" );
         assertTrue( attr1.equals( attr2 ) );
 
         attr1.setUpId( "CN" );
@@ -1568,22 +1556,22 @@ public class SchemaAwareEntryAttributeTe
         EntryAttribute attr = new DefaultEntryAttribute( atSN );
 
         attr.setUpId( null, atCN );
-        assertEquals( "cn", attr.getId() );
+        assertEquals( "2.5.4.3", attr.getId() );
         assertEquals( "cn", attr.getUpId() );
         assertEquals( atCN, attr.getAttributeType() );
 
         attr.setUpId( "  ", atCN );
-        assertEquals( "cn", attr.getId() );
+        assertEquals( "2.5.4.3", attr.getId() );
         assertEquals( "cn", attr.getUpId() );
         assertEquals( atCN, attr.getAttributeType() );
 
         attr.setUpId( "  CN  ", atCN );
-        assertEquals( "cn", attr.getId() );
+        assertEquals( "2.5.4.3", attr.getId() );
         assertEquals( "  CN  ", attr.getUpId() );
         assertEquals( atCN, attr.getAttributeType() );
 
         attr.setUpId( "  CommonName  ", atCN );
-        assertEquals( "commonname", attr.getId() );
+        assertEquals( "2.5.4.3", attr.getId() );
         assertEquals( "  CommonName  ", attr.getUpId() );
         assertEquals( atCN, attr.getAttributeType() );
 
@@ -1624,17 +1612,17 @@ public class SchemaAwareEntryAttributeTe
         EntryAttribute attr = new DefaultEntryAttribute( atCN );
 
         attr.setUpId( "cn" );
-        assertEquals( "cn", attr.getId() );
+        assertEquals( "2.5.4.3", attr.getId() );
         assertEquals( "cn", attr.getUpId() );
         assertEquals( atCN, attr.getAttributeType() );
 
         attr.setUpId( "  CN  " );
-        assertEquals( "cn", attr.getId() );
+        assertEquals( "2.5.4.3", attr.getId() );
         assertEquals( "  CN  ", attr.getUpId() );
         assertEquals( atCN, attr.getAttributeType() );
 
         attr.setUpId( "  CommonName  " );
-        assertEquals( "commonname", attr.getId() );
+        assertEquals( "2.5.4.3", attr.getId() );
         assertEquals( "  CommonName  ", attr.getUpId() );
         assertEquals( atCN, attr.getAttributeType() );
 
@@ -1645,23 +1633,60 @@ public class SchemaAwareEntryAttributeTe
 
         // Now check wrong IDs
         attr = new DefaultEntryAttribute( atCN );
-        attr.setUpId( "sn" );
-        assertEquals( "cn", attr.getId() );
+        
+        try
+        {
+            attr.setUpId( "sn" );
+            fail();
+        }
+        catch ( IllegalArgumentException iae )
+        {
+            // Expected
+        }
+        
+        assertEquals( "2.5.4.3", attr.getId() );
         assertEquals( "cn", attr.getUpId() );
         assertEquals( atCN, attr.getAttributeType() );
 
-        attr.setUpId( "  SN  " );
-        assertEquals( "cn", attr.getId() );
+        try
+        {
+            attr.setUpId( "  SN  " );
+            fail();
+        }
+        catch ( IllegalArgumentException iae )
+        {
+            // Expected
+        }
+    
+        assertEquals( "2.5.4.3", attr.getId() );
         assertEquals( "cn", attr.getUpId() );
         assertEquals( atCN, attr.getAttributeType() );
 
-        attr.setUpId( "  surname  " );
-        assertEquals( "cn", attr.getId() );
+        try
+        {
+            attr.setUpId( "  surname  " );
+            fail();
+        }
+        catch ( IllegalArgumentException iae )
+        {
+            // Expected
+        }
+        
+        assertEquals( "2.5.4.3", attr.getId() );
         assertEquals( "cn", attr.getUpId() );
         assertEquals( atCN, attr.getAttributeType() );
 
-        attr.setUpId( "  2.5.4.4  " );
-        assertEquals( "cn", attr.getId() );
+        try
+        {
+            attr.setUpId( "  2.5.4.4  " );
+            fail();
+        }
+        catch ( IllegalArgumentException iae )
+        {
+            // Expected
+        }
+
+        assertEquals( "2.5.4.3", attr.getId() );
         assertEquals( "cn", attr.getUpId() );
         assertEquals( atCN, attr.getAttributeType() );
     }
@@ -1688,7 +1713,7 @@ public class SchemaAwareEntryAttributeTe
         attr.setAttributeType( atSN );
 
         assertTrue( attr.instanceOf( "Surname" ) );
-        assertEquals( "sn", attr.getId() );
+        assertEquals( "2.5.4.4", attr.getId() );
         assertEquals( "sn", attr.getUpId() );
     }
 
@@ -1714,7 +1739,7 @@ public class SchemaAwareEntryAttributeTe
 
         assertTrue( attr.isHR() );
         assertEquals( 0, attr.size() );
-        assertEquals( "cn", attr.getId() );
+        assertEquals( "2.5.4.3", attr.getId() );
         assertEquals( "cn", attr.getUpId() );
         assertEquals( atCN, attr.getAttributeType() );
     }
@@ -1730,7 +1755,7 @@ public class SchemaAwareEntryAttributeTe
 
         assertTrue( attr1.isHR() );
         assertEquals( 0, attr1.size() );
-        assertEquals( "cn", attr1.getId() );
+        assertEquals( "2.5.4.3", attr1.getId() );
         assertEquals( "cn", attr1.getUpId() );
         assertEquals( atCN, attr1.getAttributeType() );
 
@@ -1738,7 +1763,7 @@ public class SchemaAwareEntryAttributeTe
 
         assertTrue( attr2.isHR() );
         assertEquals( 0, attr2.size() );
-        assertEquals( "commonname", attr2.getId() );
+        assertEquals( "2.5.4.3", attr2.getId() );
         assertEquals( "  CommonName  ", attr2.getUpId() );
         assertEquals( atCN, attr2.getAttributeType() );
 
@@ -1746,7 +1771,7 @@ public class SchemaAwareEntryAttributeTe
 
         assertTrue( attr3.isHR() );
         assertEquals( 0, attr3.size() );
-        assertEquals( "cn", attr3.getId() );
+        assertEquals( "2.5.4.3", attr3.getId() );
         assertEquals( "cn", attr3.getUpId() );
         assertEquals( atCN, attr3.getAttributeType() );
     }
@@ -1762,7 +1787,7 @@ public class SchemaAwareEntryAttributeTe
 
         assertTrue( attr1.isHR() );
         assertEquals( 3, attr1.size() );
-        assertEquals( "dc", attr1.getId() );
+        assertEquals( "0.9.2342.19200300.100.1.25", attr1.getId() );
         assertEquals( "dc", attr1.getUpId() );
         assertEquals( atDC, attr1.getAttributeType() );
         assertTrue( attr1.contains( "a", "b" ) );
@@ -1772,7 +1797,7 @@ public class SchemaAwareEntryAttributeTe
 
         assertTrue( attr2.isHR() );
         assertEquals( 2, attr2.size() );
-        assertEquals( "dc", attr2.getId() );
+        assertEquals( "0.9.2342.19200300.100.1.25", attr2.getId() );
         assertEquals( "dc", attr2.getUpId() );
         assertEquals( atDC, attr2.getAttributeType() );
         assertTrue( attr2.contains( "a" ) );
@@ -1790,7 +1815,7 @@ public class SchemaAwareEntryAttributeTe
 
         assertTrue( attr1.isHR() );
         assertEquals( 3, attr1.size() );
-        assertEquals( "dc", attr1.getId() );
+        assertEquals( "0.9.2342.19200300.100.1.25", attr1.getId() );
         assertEquals( "dc", attr1.getUpId() );
         assertEquals( atDC, attr1.getAttributeType() );
         assertTrue( attr1.contains( "a", "b" ) );
@@ -1800,7 +1825,7 @@ public class SchemaAwareEntryAttributeTe
 
         assertTrue( attr2.isHR() );
         assertEquals( 2, attr2.size() );
-        assertEquals( "dc", attr2.getId() );
+        assertEquals( "0.9.2342.19200300.100.1.25", attr2.getId() );
         assertEquals( "dc", attr2.getUpId() );
         assertEquals( atDC, attr2.getAttributeType() );
         assertTrue( attr2.contains( "a" ) );
@@ -1811,7 +1836,7 @@ public class SchemaAwareEntryAttributeTe
 
         assertTrue( attr3.isHR() );
         assertEquals( 3, attr3.size() );
-        assertEquals( "domaincomponent", attr3.getId() );
+        assertEquals( "0.9.2342.19200300.100.1.25", attr3.getId() );
         assertEquals( "DomainComponent", attr3.getUpId() );
         assertEquals( atDC, attr3.getAttributeType() );
         assertTrue( attr3.contains( "a", "b" ) );
@@ -1840,7 +1865,7 @@ public class SchemaAwareEntryAttributeTe
 
         assertTrue( attr1.isHR() );
         assertEquals( 3, attr1.size() );
-        assertEquals( "dc", attr1.getId() );
+        assertEquals( "0.9.2342.19200300.100.1.25", attr1.getId() );
         assertEquals( "dc", attr1.getUpId() );
         assertEquals( atDC, attr1.getAttributeType() );
         assertTrue( attr1.contains( "a", "b" ) );
@@ -1850,7 +1875,7 @@ public class SchemaAwareEntryAttributeTe
 
         assertTrue( attr2.isHR() );
         assertEquals( 2, attr2.size() );
-        assertEquals( "dc", attr2.getId() );
+        assertEquals( "0.9.2342.19200300.100.1.25", attr2.getId() );
         assertEquals( "dc", attr2.getUpId() );
         assertEquals( atDC, attr2.getAttributeType() );
         assertTrue( attr2.contains( "a" ) );
@@ -1868,7 +1893,7 @@ public class SchemaAwareEntryAttributeTe
 
         assertTrue( attr1.isHR() );
         assertEquals( 3, attr1.size() );
-        assertEquals( "dc", attr1.getId() );
+        assertEquals( "0.9.2342.19200300.100.1.25", attr1.getId() );
         assertEquals( "dc", attr1.getUpId() );
         assertEquals( atDC, attr1.getAttributeType() );
         assertTrue( attr1.contains( "a", "b" ) );
@@ -1878,7 +1903,7 @@ public class SchemaAwareEntryAttributeTe
 
         assertTrue( attr2.isHR() );
         assertEquals( 3, attr2.size() );
-        assertEquals( "domaincomponent", attr2.getId() );
+        assertEquals( "0.9.2342.19200300.100.1.25", attr2.getId() );
         assertEquals( "DomainComponent", attr2.getUpId() );
         assertEquals( atDC, attr2.getAttributeType() );
         assertTrue( attr2.contains( "a", "b" ) );
@@ -1907,7 +1932,7 @@ public class SchemaAwareEntryAttributeTe
 
         assertFalse( attr1.isHR() );
         assertEquals( 3, attr1.size() );
-        assertEquals( "userPassword", attr1.getId() );
+        assertEquals( "2.5.4.35", attr1.getId() );
         assertEquals( "userPassword", attr1.getUpId() );
         assertEquals( atPwd, attr1.getAttributeType() );
         assertTrue( attr1.contains( BYTES1, BYTES2 ) );
@@ -1917,7 +1942,7 @@ public class SchemaAwareEntryAttributeTe
 
         assertFalse( attr2.isHR() );
         assertEquals( 2, attr2.size() );
-        assertEquals( "userPassword", attr2.getId() );
+        assertEquals( "2.5.4.35", attr2.getId() );
         assertEquals( "userPassword", attr2.getUpId() );
         assertEquals( atPwd, attr2.getAttributeType() );
         assertTrue( attr2.contains( BYTES2 ) );
@@ -1935,7 +1960,7 @@ public class SchemaAwareEntryAttributeTe
 
         assertFalse( attr1.isHR() );
         assertEquals( 3, attr1.size() );
-        assertEquals( "userpassword", attr1.getId() );
+        assertEquals( "2.5.4.35", attr1.getId() );
         assertEquals( "userPassword", attr1.getUpId() );
         assertEquals( atPwd, attr1.getAttributeType() );
         assertTrue( attr1.contains( BYTES1, BYTES2 ) );
@@ -1965,7 +1990,7 @@ public class SchemaAwareEntryAttributeTe
 
         assertEquals( attr, clone );
         attr.setUpId( "CommonName" );
-        assertEquals( "cn", clone.getId() );
+        assertEquals( "2.5.4.3", clone.getId() );
 
         attr.add( "a", ( String ) null, "b" );
         clone = attr.clone();
@@ -2035,7 +2060,7 @@ public class SchemaAwareEntryAttributeTe
         assertTrue( clientAttribute instanceof EntryAttribute );
 
         assertTrue( clientAttribute.contains( "test", "test2" ) );
-        assertEquals( "cn", clientAttribute.getId() );
+        assertEquals( "2.5.4.3", clientAttribute.getId() );
 
         attribute.remove( "test", "test2" );
         assertTrue( clientAttribute.contains( "test", "test2" ) );
@@ -2055,7 +2080,7 @@ public class SchemaAwareEntryAttributeTe
 
         DefaultEntryAttribute dsaSer = deserializeValue( serializeValue( dsa ), atCN );
         assertEquals( dsa.toString(), dsaSer.toString() );
-        assertEquals( "commonname", dsaSer.getId() );
+        assertEquals( "2.5.4.3", dsaSer.getId() );
         assertEquals( "CommonName", dsaSer.getUpId() );
         assertEquals( "test1", dsaSer.getString() );
         assertTrue( dsaSer.contains( "test2", "test1" ) );
@@ -2072,11 +2097,11 @@ public class SchemaAwareEntryAttributeTe
     {
         DefaultEntryAttribute dsa = new DefaultEntryAttribute( atCN );
         dsa.setHR( true );
-        dsa.setId( "cn" );
+        dsa.setUpId( "cn" );
 
         DefaultEntryAttribute dsaSer = deserializeValue( serializeValue( dsa ), atCN );
         assertEquals( dsa.toString(), dsaSer.toString() );
-        assertEquals( "cn", dsaSer.getId() );
+        assertEquals( "2.5.4.3", dsaSer.getId() );
         assertEquals( "cn", dsaSer.getUpId() );
         assertEquals( 0, dsaSer.size() );
         assertTrue( dsaSer.isHR() );
@@ -2097,7 +2122,7 @@ public class SchemaAwareEntryAttributeTe
 
         DefaultEntryAttribute dsaSer = deserializeValue( serializeValue( dsa ), atDC );
         assertEquals( dsa.toString(), dsaSer.toString() );
-        assertEquals( "domaincomponent", dsaSer.getId() );
+        assertEquals( "0.9.2342.19200300.100.1.25", dsaSer.getId() );
         assertEquals( "DomainComponent", dsaSer.getUpId() );
         assertEquals( "", dsaSer.getString() );
         assertEquals( 1, dsaSer.size() );
@@ -2120,7 +2145,7 @@ public class SchemaAwareEntryAttributeTe
 
         DefaultEntryAttribute dsaSer = deserializeValue( serializeValue( dsa ), atPwd );
         assertEquals( dsa.toString(), dsaSer.toString() );
-        assertEquals( "userpassword", dsaSer.getId() );
+        assertEquals( "2.5.4.35", dsaSer.getId() );
         assertEquals( "userPassword", dsaSer.getUpId() );
         assertTrue( Arrays.equals( dsa.getBytes(), dsaSer.getBytes() ) );
         assertEquals( 1, dsaSer.size() );

Modified: directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/entry/SchemaAwareEntryTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/entry/SchemaAwareEntryTest.java?rev=1080066&r1=1080065&r2=1080066&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/entry/SchemaAwareEntryTest.java (original)
+++ directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/entry/SchemaAwareEntryTest.java Thu Mar 10 00:20:41 2011
@@ -213,7 +213,7 @@ public class SchemaAwareEntryTest
         assertEquals( EXAMPLE_DN, entry.getDn() );
         assertEquals( 1, entry.size() );
         assertTrue( entry.containsAttribute( atOC ) );
-        assertEquals( "objectclass", entry.get( atOC ).getId() );
+        assertEquals( "2.5.4.0", entry.get( atOC ).getId() );
         assertEquals( "  OBJECTCLASS  ", entry.get( atOC ).getUpId() );
     }
 
@@ -229,10 +229,10 @@ public class SchemaAwareEntryTest
         assertEquals( EXAMPLE_DN, entry.getDn() );
         assertEquals( 2, entry.size() );
         assertTrue( entry.containsAttribute( "objectClass" ) );
-        assertEquals( "objectclass", entry.get( atOC ).getId() );
+        assertEquals( "2.5.4.0", entry.get( atOC ).getId() );
         assertEquals( "  OBJECTCLASS  ", entry.get( atOC ).getUpId() );
         assertTrue( entry.containsAttribute( "2.5.4.3" ) );
-        assertEquals( "cn", entry.get( atCN ).getId() );
+        assertEquals( "2.5.4.3", entry.get( atCN ).getId() );
         assertEquals( " Cn ", entry.get( atCN ).getUpId() );
     }
 
@@ -527,7 +527,7 @@ public class SchemaAwareEntryTest
         assertEquals( 1, entry.size() );
         assertTrue( entry.contains( atPwd, BYTES1, BYTES2 ) );
         assertEquals( "UserPassword", entry.get( atPwd ).getUpId() );
-        assertEquals( "userpassword", entry.get( atPwd ).getId() );
+        assertEquals( "2.5.4.35", entry.get( atPwd ).getId() );
 
         entry.add( "  UserPassword  ", atPwd, ( byte[] ) null, BYTES1 );
         assertEquals( 1, entry.size() );
@@ -538,7 +538,7 @@ public class SchemaAwareEntryTest
         assertTrue( attribute.contains( BYTES2 ) );
         assertTrue( attribute.contains( ( byte[] ) null ) );
         assertEquals( "  UserPassword  ", attribute.getUpId() );
-        assertEquals( "userpassword", attribute.getId() );
+        assertEquals( "2.5.4.35", attribute.getId() );
 
         try
         {
@@ -564,7 +564,7 @@ public class SchemaAwareEntryTest
         assertEquals( 1, entry.size() );
         assertTrue( entry.contains( atDC, "test1", "test2" ) );
         assertEquals( "DomainComponent", entry.get( atDC ).getUpId() );
-        assertEquals( "domaincomponent", entry.get( atDC ).getId() );
+        assertEquals( "0.9.2342.19200300.100.1.25", entry.get( atDC ).getId() );
 
         entry.add( "  DC  ", atDC, ( String ) null, "test1" );
         assertEquals( 1, entry.size() );
@@ -575,7 +575,7 @@ public class SchemaAwareEntryTest
         assertTrue( attribute.contains( ( String ) null ) );
         assertTrue( attribute.contains( "test2" ) );
         assertEquals( "  DC  ", attribute.getUpId() );
-        assertEquals( "dc", attribute.getId() );
+        assertEquals( "0.9.2342.19200300.100.1.25", attribute.getId() );
 
         entry.clear();
 
@@ -621,9 +621,9 @@ public class SchemaAwareEntryTest
         assertTrue( entry.contains( atCN, "test1", "test2" ) );
         assertTrue( entry.contains( atPwd, BYTES1, BYTES2 ) );
         assertEquals( "CN", entry.get( atCN ).getUpId() );
-        assertEquals( "cn", entry.get( atCN ).getId() );
+        assertEquals( "2.5.4.3", entry.get( atCN ).getId() );
         assertEquals( "UserPassword", entry.get( atPwd ).getUpId() );
-        assertEquals( "userpassword", entry.get( atPwd ).getId() );
+        assertEquals( "2.5.4.35", entry.get( atPwd ).getId() );
 
         entry.add( "CN", atCN, strValue3, strNullValue );
 
@@ -917,7 +917,7 @@ public class SchemaAwareEntryTest
         entry.add( "DC", "test1" );
         assertNotNull( entry.get( atDC ) );
         assertTrue( entry.containsAttribute( atDC ) );
-        assertEquals( "dc", entry.get( atDC ).getId() );
+        assertEquals( "0.9.2342.19200300.100.1.25", entry.get( atDC ).getId() );
         assertEquals( "DC", entry.get( atDC ).getUpId() );
         assertEquals( 1, entry.get( atDC ).size() );
         assertEquals( "test1", entry.get( atDC ).get().getString() );
@@ -2443,7 +2443,7 @@ public class SchemaAwareEntryTest
         EntryAttribute attribute = entry.get( "userPassword" );
         assertTrue( attribute.contains( BYTES1 ) );
         assertTrue( attribute.contains( BYTES2 ) );
-        assertEquals( "userpassword", attribute.getId() );
+        assertEquals( "2.5.4.35", attribute.getId() );
         assertEquals( "userPassword", attribute.getUpId() );
     }
 
@@ -2512,7 +2512,7 @@ public class SchemaAwareEntryTest
         EntryAttribute attribute = entry.get( "cn" );
         assertTrue( attribute.contains( "test1" ) );
         assertTrue( attribute.contains( "test2" ) );
-        assertEquals( "cn", attribute.getId() );
+        assertEquals( "2.5.4.3", attribute.getId() );
         assertEquals( "cN", attribute.getUpId() );
     }
 
@@ -2589,7 +2589,7 @@ public class SchemaAwareEntryTest
         EntryAttribute attribute = entry.get( "cn" );
         assertTrue( attribute.contains( strValue1 ) );
         assertTrue( attribute.contains( strValue2 ) );
-        assertEquals( "cn", attribute.getId() );
+        assertEquals( "2.5.4.3", attribute.getId() );
         assertEquals( "cN", attribute.getUpId() );
 
         // Bin values are not allowed, so the new CN will be empty
@@ -3105,7 +3105,7 @@ public class SchemaAwareEntryTest
             assertTrue( true );
         }
 
-        assertEquals( "userpassword", entry.get( atPassword ).getId() );
+        assertEquals( "2.5.4.35", entry.get( atPassword ).getId() );
 
         // Test that we can add some new attributes with values
         byte[] test1 = Strings.getBytesUtf8("test1");
@@ -3707,7 +3707,7 @@ public class SchemaAwareEntryTest
 
         EntryAttribute sa = entry.get( "sn" );
         assertNotNull( sa );
-        assertEquals( "sn", sa.getId() );
+        assertEquals( "2.5.4.4", sa.getId() );
 
         // Add different upIds now
         AttributeType atGN = schemaManager.lookupAttributeTypeRegistry( "givenname" );
@@ -3721,13 +3721,13 @@ public class SchemaAwareEntryTest
         sa = entry.get( "l" );
         assertNotNull( sa );
         assertEquals( atL, sa.getAttributeType() );
-        assertEquals( "l", sa.getId() );
+        assertEquals( "2.5.4.7", sa.getId() );
         assertEquals( "L", sa.getUpId() );
 
         sa = entry.get( "c" );
         assertNotNull( sa );
         assertEquals( atC, sa.getAttributeType() );
-        assertEquals( "countryname", sa.getId() );
+        assertEquals( "2.5.4.6", sa.getId() );
         assertEquals( "CountryName", sa.getUpId() );
 
         sa = entry.get( "2.5.4.9" );
@@ -3739,7 +3739,7 @@ public class SchemaAwareEntryTest
         sa = entry.get( "givenName" );
         assertNotNull( sa );
         assertEquals( atGN, sa.getAttributeType() );
-        assertEquals( "gn", sa.getId() );
+        assertEquals( "2.5.4.42", sa.getId() );
         assertEquals( "gn", sa.getUpId() );
 
         // Now try to add existing ATs

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java?rev=1080066&r1=1080065&r2=1080066&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java Thu Mar 10 00:20:41 2011
@@ -31,8 +31,8 @@ import net.sf.ehcache.Element;
 
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.DnFactory;
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.DnFactory;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
@@ -385,19 +385,19 @@ public class GroupCache
         throws LdapException
     {
         EntryAttribute members = null;
-        String memberAttrId = null;
+        AttributeType memberAttr = null;
         EntryAttribute oc = entry.get( OBJECT_CLASS_AT );
 
         if ( oc.contains( SchemaConstants.GROUP_OF_NAMES_OC ) )
         {
             members = entry.get( MEMBER_AT );
-            memberAttrId = SchemaConstants.MEMBER_AT;
+            memberAttr = schemaManager.getAttributeType( SchemaConstants.MEMBER_AT );
         }
 
         if ( oc.contains( SchemaConstants.GROUP_OF_UNIQUE_NAMES_OC ) )
         {
             members = entry.get( UNIQUE_MEMBER_AT );
-            memberAttrId = SchemaConstants.UNIQUE_MEMBER_AT;
+            memberAttr = schemaManager.getAttributeType( SchemaConstants.UNIQUE_MEMBER_AT );
         }
 
         if ( members == null )
@@ -407,7 +407,7 @@ public class GroupCache
 
         for ( Modification modification : mods )
         {
-            if ( memberAttrId.equalsIgnoreCase( modification.getAttribute().getId() ) )
+            if ( memberAttr.getOid() == modification.getAttribute().getId() )
             {
                 Element memSetElement = ehCache.get( name.getNormName() );
                 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java?rev=1080066&r1=1080065&r2=1080066&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java Thu Mar 10 00:20:41 2011
@@ -43,6 +43,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.model.cursor.EmptyCursor;
 import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.StringValue;
 import org.apache.directory.shared.ldap.model.entry.Value;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
@@ -141,6 +142,15 @@ public class NormalizationInterceptor ex
             modifyContext.getDn().normalize( schemaManager );
         }
 
+        if ( modifyContext.getModItems() != null )
+        {
+            for ( Modification modification : modifyContext.getModItems() )
+            {
+                AttributeType attributeType = schemaManager.getAttributeType( modification.getAttribute().getId() );
+                modification.applyAttributeType( attributeType );
+            }
+        }
+        
         nextInterceptor.modify( modifyContext );
     }
 

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java?rev=1080066&r1=1080065&r2=1080066&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/AddRequestDecorator.java Thu Mar 10 00:20:41 2011
@@ -217,7 +217,7 @@ public final class AddRequestDecorator e
      */
     public String getCurrentAttributeType()
     {
-        return currentAttribute.getId();
+        return currentAttribute.getUpId();
     }
 
 
@@ -324,7 +324,7 @@ public final class AddRequestDecorator e
                 int localValuesLength = 0;
 
                 // Get the type length
-                int idLength = attribute.getId().getBytes().length;
+                int idLength = attribute.getUpId().getBytes().length;
                 localAttributeLength = 1 + TLV.getNbBytes( idLength ) + idLength;
 
                 // The values
@@ -416,7 +416,7 @@ public final class AddRequestDecorator e
                     buffer.put( TLV.getBytes( localAttributeLength ) );
 
                     // The attribute type
-                    org.apache.directory.shared.asn1.ber.tlv.Value.encode( buffer, attribute.getId() );
+                    org.apache.directory.shared.asn1.ber.tlv.Value.encode( buffer, attribute.getUpId() );
 
                     // The values
                     buffer.put( UniversalTag.SET.getValue() );

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyRequestDecorator.java?rev=1080066&r1=1080065&r2=1080066&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyRequestDecorator.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ModifyRequestDecorator.java Thu Mar 10 00:20:41 2011
@@ -205,7 +205,7 @@ public class ModifyRequestDecorator exte
      */
     public String getCurrentAttributeType()
     {
-        return currentAttribute.getId();
+        return currentAttribute.getUpId();
     }
 
 
@@ -449,7 +449,7 @@ public class ModifyRequestDecorator exte
                 int localValuesLength = 0;
 
                 // Modification length initialized with the type
-                int typeLength = modification.getAttribute().getId().length();
+                int typeLength = modification.getAttribute().getUpId().length();
                 int localModificationLength = 1 + TLV.getNbBytes( typeLength ) + typeLength;
 
                 // Get all the values
@@ -563,7 +563,7 @@ public class ModifyRequestDecorator exte
                     buffer.put( TLV.getBytes( localModificationLength ) );
 
                     // The modification type
-                    Value.encode( buffer, modification.getAttribute().getId() );
+                    Value.encode( buffer, modification.getAttribute().getUpId() );
 
                     // The values
                     buffer.put( UniversalTag.SET.getValue() );

Modified: directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchResultEntryDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchResultEntryDecorator.java?rev=1080066&r1=1080065&r2=1080066&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchResultEntryDecorator.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/decorators/SearchResultEntryDecorator.java Thu Mar 10 00:20:41 2011
@@ -331,7 +331,7 @@ public class SearchResultEntryDecorator 
                 int localValuesLength = 0;
 
                 // Get the type length
-                int idLength = attribute.getId().getBytes().length;
+                int idLength = attribute.getUpId().getBytes().length;
                 localAttributeLength = 1 + TLV.getNbBytes( idLength ) + idLength;
 
                 if ( attribute.size() != 0 )

Modified: directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java?rev=1080066&r1=1080065&r2=1080066&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java Thu Mar 10 00:20:41 2011
@@ -28,8 +28,6 @@ import java.nio.ByteBuffer;
 import java.util.Collection;
 import java.util.Map;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
@@ -50,6 +48,9 @@ import org.apache.directory.shared.util.
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test the ModifyRequest codec
@@ -135,12 +136,12 @@ public class ModifyRequestTest extends A
         {
             EntryAttribute attribute = modification.getAttribute();
 
-            if ( "l".equalsIgnoreCase( attribute.getId() ) )
+            if ( "l".equalsIgnoreCase( attribute.getUpId() ) )
             {
                 String attrValue = attribute.getString();
                 assertEquals( "Paris", attrValue );
             }
-            else if ( "attrs".equalsIgnoreCase( attribute.getId() ) )
+            else if ( "attrs".equalsIgnoreCase( attribute.getUpId() ) )
             {
                 String attrValue = attribute.getString();
                 assertEquals( "test", attrValue );
@@ -313,7 +314,7 @@ public class ModifyRequestTest extends A
         modification = ( Modification ) modifications[1];
         attributeValue = modification.getAttribute();
 
-        assertEquals( "cn", attributeValue.getId().toLowerCase() );
+        assertEquals( "cn", attributeValue.getUpId().toLowerCase() );
 
         attrValue = attributeValue.getString();
         assertEquals( "XXX", attrValue );
@@ -439,7 +440,7 @@ public class ModifyRequestTest extends A
         Modification modification = ( Modification ) modifications[0];
         EntryAttribute attributeValue = modification.getAttribute();
 
-        assertEquals( "description", attributeValue.getId().toLowerCase() );
+        assertEquals( "description", attributeValue.getUpId().toLowerCase() );
         assertEquals( 0, attributeValue.size() );
 
         modification = ( Modification ) modifications[1];
@@ -447,7 +448,7 @@ public class ModifyRequestTest extends A
 
         String attrValue = attributeValue.getString();
 
-        assertEquals( "telephonenumber", attributeValue.getId().toLowerCase() );
+        assertEquals( "telephonenumber", attributeValue.getUpId().toLowerCase() );
 
         assertEquals( "01234567890", attrValue );
 
@@ -456,7 +457,7 @@ public class ModifyRequestTest extends A
 
         attrValue = attributeValue.getString();
 
-        assertEquals( "telephonenumber", attributeValue.getId().toLowerCase() );
+        assertEquals( "telephonenumber", attributeValue.getUpId().toLowerCase() );
 
         attrValue = attributeValue.getString();
         assertEquals( "01234567890", attrValue );
@@ -567,7 +568,7 @@ public class ModifyRequestTest extends A
         Modification modification = ( Modification ) modifications[0];
         EntryAttribute attributeValue = modification.getAttribute();
 
-        assertEquals( "l", attributeValue.getId().toLowerCase() );
+        assertEquals( "l", attributeValue.getUpId().toLowerCase() );
 
         String attrValue = attributeValue.getString();
         assertEquals( "Paris", attrValue );
@@ -578,7 +579,7 @@ public class ModifyRequestTest extends A
         modification = ( Modification ) modifications[1];
         attributeValue = modification.getAttribute();
 
-        assertEquals( "attrs", attributeValue.getId().toLowerCase() );
+        assertEquals( "attrs", attributeValue.getUpId().toLowerCase() );
 
         attrValue = attributeValue.getString();
         assertEquals( "test", attrValue );
@@ -1108,7 +1109,7 @@ public class ModifyRequestTest extends A
         Modification modification = ( Modification ) modifications[0];
         EntryAttribute attributeValue = modification.getAttribute();
 
-        assertEquals( "l", attributeValue.getId().toLowerCase() );
+        assertEquals( "l", attributeValue.getUpId().toLowerCase() );
         assertEquals( 0, attributeValue.size() );
 
         // Check the encoding
@@ -1189,7 +1190,7 @@ public class ModifyRequestTest extends A
         Modification modification = ( Modification ) modifications[0];
         EntryAttribute attributeValue = modification.getAttribute();
 
-        assertEquals( "l", attributeValue.getId().toLowerCase() );
+        assertEquals( "l", attributeValue.getUpId().toLowerCase() );
         assertEquals( 0, attributeValue.size() );
 
         // Check the Control
@@ -1277,7 +1278,7 @@ public class ModifyRequestTest extends A
         Modification modification = ( Modification ) modifications[0];
         EntryAttribute attributeValue = modification.getAttribute();
 
-        assertEquals( "l", attributeValue.getId().toLowerCase() );
+        assertEquals( "l", attributeValue.getUpId().toLowerCase() );
         assertEquals( 2, attributeValue.size() );
 
         String attrValue = attributeValue.getString();

Modified: directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java?rev=1080066&r1=1080065&r2=1080066&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java (original)
+++ directory/shared/trunk/ldap/codec/core/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java Thu Mar 10 00:20:41 2011
@@ -29,8 +29,6 @@ import java.util.Map;
 
 import javax.naming.NamingException;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
@@ -46,6 +44,9 @@ import org.apache.directory.shared.util.
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test the SearchResultEntry codec
@@ -123,7 +124,7 @@ public class SearchResultEntryTest exten
         {
             EntryAttribute attribute = entry.get( "objectclass" );
 
-            assertEquals( "objectClass".toLowerCase(), attribute.getId().toLowerCase() );
+            assertEquals( "objectClass".toLowerCase(), attribute.getUpId().toLowerCase() );
 
             assertTrue( attribute.contains( "top" ) );
             assertTrue( attribute.contains( "organizationalUnit" ) );
@@ -227,7 +228,7 @@ public class SearchResultEntryTest exten
         {
             EntryAttribute attribute = entry.get( expectedAttributes[i] );
 
-            assertEquals( expectedAttributes[i].toLowerCase(), attribute.getId().toLowerCase() );
+            assertEquals( expectedAttributes[i].toLowerCase(), attribute.getUpId().toLowerCase() );
 
             assertTrue( attribute.contains( "top" ) );
             assertTrue( attribute.contains( "organizationalUnit" ) );
@@ -335,7 +336,7 @@ public class SearchResultEntryTest exten
         {
             EntryAttribute attribute = entry.get( "objectclass" );
 
-            assertEquals( "objectClass".toLowerCase(), attribute.getId().toLowerCase() );
+            assertEquals( "objectClass".toLowerCase(), attribute.getUpId().toLowerCase() );
 
             assertTrue( attribute.contains( "top" ) );
             assertTrue( attribute.contains( "person" ) );
@@ -836,7 +837,7 @@ public class SearchResultEntryTest exten
         {
             EntryAttribute attribute = entry.get( "objectclass" );
 
-            assertEquals( "objectClass".toLowerCase(), attribute.getId().toLowerCase() );
+            assertEquals( "objectClass".toLowerCase(), attribute.getUpId().toLowerCase() );
             assertEquals( 0, attribute.size() );
         }
 
@@ -920,11 +921,11 @@ public class SearchResultEntryTest exten
         assertEquals( 2, entry.size() );
 
         EntryAttribute attribute = entry.get( "objectclass" );
-        assertEquals( "objectClass".toLowerCase(), attribute.getId().toLowerCase() );
+        assertEquals( "objectClass".toLowerCase(), attribute.getUpId().toLowerCase() );
         assertEquals( 0, attribute.size() );
 
         attribute = entry.get( "objectclazz" );
-        assertEquals( "objectClazz".toLowerCase(), attribute.getId().toLowerCase() );
+        assertEquals( "objectClazz".toLowerCase(), attribute.getUpId().toLowerCase() );
         assertEquals( 0, attribute.size() );
 
         // Check the encoding
@@ -1013,7 +1014,7 @@ public class SearchResultEntryTest exten
         {
             EntryAttribute attribute = entry.get( "objectclass" );
 
-            assertEquals( "objectClass".toLowerCase(), attribute.getId().toLowerCase() );
+            assertEquals( "objectClass".toLowerCase(), attribute.getUpId().toLowerCase() );
 
             assertEquals( 0, attribute.size() );
         }
@@ -1111,7 +1112,7 @@ public class SearchResultEntryTest exten
         {
             EntryAttribute attribute = entry.get( "objectclass" );
 
-            assertEquals( "objectClass".toLowerCase(), attribute.getId().toLowerCase() );
+            assertEquals( "objectClass".toLowerCase(), attribute.getUpId().toLowerCase() );
 
             assertTrue( attribute.contains( "" ) );
         }
@@ -1205,7 +1206,7 @@ public class SearchResultEntryTest exten
         {
             EntryAttribute attribute = entry.get( "objectclass" );
 
-            assertEquals( "objectClass".toLowerCase(), attribute.getId().toLowerCase() );
+            assertEquals( "objectClass".toLowerCase(), attribute.getUpId().toLowerCase() );
 
             assertTrue( attribute.contains( "" ) );
         }

Modified: directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java?rev=1080066&r1=1080065&r2=1080066&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java (original)
+++ directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java Thu Mar 10 00:20:41 2011
@@ -28,8 +28,6 @@ import java.nio.ByteBuffer;
 import java.util.Collection;
 import java.util.Map;
 
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
@@ -50,6 +48,9 @@ import org.apache.directory.shared.util.
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
 
 /**
  * Test the ModifyRequest codec
@@ -135,12 +136,12 @@ public class ModifyRequestTest extends A
         {
             EntryAttribute attribute = modification.getAttribute();
 
-            if ( "l".equalsIgnoreCase( attribute.getId() ) )
+            if ( "l".equalsIgnoreCase( attribute.getUpId() ) )
             {
                 String attrValue = attribute.getString();
                 assertEquals( "Paris", attrValue );
             }
-            else if ( "attrs".equalsIgnoreCase( attribute.getId() ) )
+            else if ( "attrs".equalsIgnoreCase( attribute.getUpId() ) )
             {
                 String attrValue = attribute.getString();
                 assertEquals( "test", attrValue );
@@ -305,7 +306,7 @@ public class ModifyRequestTest extends A
         Modification modification = ( Modification ) modifications[0];
         EntryAttribute attributeValue = modification.getAttribute();
 
-        assertEquals( "telephonenumber", attributeValue.getId().toLowerCase() );
+        assertEquals( "telephonenumber", attributeValue.getUpId().toLowerCase() );
 
         String attrValue = attributeValue.getString();
         assertEquals( "1234567890", attrValue );
@@ -313,7 +314,7 @@ public class ModifyRequestTest extends A
         modification = ( Modification ) modifications[1];
         attributeValue = modification.getAttribute();
 
-        assertEquals( "cn", attributeValue.getId().toLowerCase() );
+        assertEquals( "cn", attributeValue.getUpId().toLowerCase() );
 
         attrValue = attributeValue.getString();
         assertEquals( "XXX", attrValue );
@@ -439,7 +440,7 @@ public class ModifyRequestTest extends A
         Modification modification = ( Modification ) modifications[0];
         EntryAttribute attributeValue = modification.getAttribute();
 
-        assertEquals( "description", attributeValue.getId().toLowerCase() );
+        assertEquals( "description", attributeValue.getUpId().toLowerCase() );
         assertEquals( 0, attributeValue.size() );
 
         modification = ( Modification ) modifications[1];
@@ -447,7 +448,7 @@ public class ModifyRequestTest extends A
 
         String attrValue = attributeValue.getString();
 
-        assertEquals( "telephonenumber", attributeValue.getId().toLowerCase() );
+        assertEquals( "telephonenumber", attributeValue.getUpId().toLowerCase() );
 
         assertEquals( "01234567890", attrValue );
 
@@ -456,7 +457,7 @@ public class ModifyRequestTest extends A
 
         attrValue = attributeValue.getString();
 
-        assertEquals( "telephonenumber", attributeValue.getId().toLowerCase() );
+        assertEquals( "telephonenumber", attributeValue.getUpId().toLowerCase() );
 
         attrValue = attributeValue.getString();
         assertEquals( "01234567890", attrValue );
@@ -567,7 +568,7 @@ public class ModifyRequestTest extends A
         Modification modification = ( Modification ) modifications[0];
         EntryAttribute attributeValue = modification.getAttribute();
 
-        assertEquals( "l", attributeValue.getId().toLowerCase() );
+        assertEquals( "l", attributeValue.getUpId().toLowerCase() );
 
         String attrValue = attributeValue.getString();
         assertEquals( "Paris", attrValue );
@@ -578,7 +579,7 @@ public class ModifyRequestTest extends A
         modification = ( Modification ) modifications[1];
         attributeValue = modification.getAttribute();
 
-        assertEquals( "attrs", attributeValue.getId().toLowerCase() );
+        assertEquals( "attrs", attributeValue.getUpId().toLowerCase() );
 
         attrValue = attributeValue.getString();
         assertEquals( "test", attrValue );
@@ -1108,7 +1109,7 @@ public class ModifyRequestTest extends A
         Modification modification = ( Modification ) modifications[0];
         EntryAttribute attributeValue = modification.getAttribute();
 
-        assertEquals( "l", attributeValue.getId().toLowerCase() );
+        assertEquals( "l", attributeValue.getUpId().toLowerCase() );
         assertEquals( 0, attributeValue.size() );
 
         // Check the encoding
@@ -1189,7 +1190,7 @@ public class ModifyRequestTest extends A
         Modification modification = ( Modification ) modifications[0];
         EntryAttribute attributeValue = modification.getAttribute();
 
-        assertEquals( "l", attributeValue.getId().toLowerCase() );
+        assertEquals( "l", attributeValue.getUpId().toLowerCase() );
         assertEquals( 0, attributeValue.size() );
 
         // Check the Control
@@ -1277,7 +1278,7 @@ public class ModifyRequestTest extends A
         Modification modification = ( Modification ) modifications[0];
         EntryAttribute attributeValue = modification.getAttribute();
 
-        assertEquals( "l", attributeValue.getId().toLowerCase() );
+        assertEquals( "l", attributeValue.getUpId().toLowerCase() );
         assertEquals( 2, attributeValue.size() );
 
         String attrValue = attributeValue.getString();

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttribute.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttribute.java?rev=1080066&r1=1080065&r2=1080066&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttribute.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttribute.java Thu Mar 10 00:20:41 2011
@@ -567,10 +567,10 @@ public class DefaultEntryAttribute imple
      * @param id The attribute ID
      * @throws IllegalArgumentException If the ID is empty or null or
      * resolve to an empty value after being trimmed
-     */
-    public void setId( String id )
+     *
+    public void setId( String upId )
     {
-        String newId = Strings.trim(Strings.lowerCaseAscii(id));
+        String newId = Strings.trim( Strings.lowerCaseAscii( upId ) );
 
         if ( newId.length() == 0 )
         {
@@ -598,8 +598,8 @@ public class DefaultEntryAttribute imple
                     if ( atName.equalsIgnoreCase( newId ) )
                     {
                         // Found ! We can store the upId and get out
-                        this.id = newId;
-                        this.upId = id;
+                        this.id = attributeType.getOid();
+                        this.upId = upId;
                         
                         // Compute the hashCode
                         rehash();
@@ -609,7 +609,7 @@ public class DefaultEntryAttribute imple
                 }
                 
                 // Last case, the UpId is an OID
-                if ( !OID.isOID(newId) || !attributeType.getOid().equals( newId ) )
+                if ( !OID.isOID( newId ) || !attributeType.getOid().equals( newId ) )
                 {
                     // The id is incorrect : this is not allowed 
                     throw new IllegalArgumentException( I18n.err( I18n.ERR_04455, id, attributeType.getName() ) );
@@ -618,7 +618,7 @@ public class DefaultEntryAttribute imple
         }
 
         this.id = newId;
-        this.upId = id;
+        this.upId = upId;
         
         // Compute the hashCode
         rehash();
@@ -655,7 +655,7 @@ public class DefaultEntryAttribute imple
      */
     public void setUpId( String upId )
     {
-        setUpId( upId, null );
+        setUpId( upId, attributeType );
     }
 
     
@@ -709,21 +709,21 @@ public class DefaultEntryAttribute imple
      */
     public void setUpId( String upId, AttributeType attributeType )
     {
-        String trimmed = Strings.trim(upId);
+        String trimmed = Strings.trim( upId );
 
-        if ( Strings.isEmpty(trimmed) && ( attributeType == null ) )
+        if ( Strings.isEmpty( trimmed ) && ( attributeType == null ) )
         {
             throw new IllegalArgumentException( "Cannot set a null ID with a null AttributeType" );
         }
         
-        String id = Strings.toLowerCase(trimmed);
+        String newId = Strings.toLowerCase( trimmed );
         
         if ( attributeType == null )
         {
             if ( this.attributeType == null )
             {
                 this.upId = upId;
-                this.id = id;
+                this.id = newId;
                 
                 // Compute the hashCode
                 rehash();
@@ -732,10 +732,10 @@ public class DefaultEntryAttribute imple
             }    
             else
             {
-                if ( areCompatible( id, this.attributeType ) )
+                if ( areCompatible( newId, this.attributeType ) )
                 {
                     this.upId = upId;
-                    this.id = id;
+                    this.id = this.attributeType.getOid();
                     
                     // Compute the hashCode
                     rehash();
@@ -749,11 +749,11 @@ public class DefaultEntryAttribute imple
             }
         }
         
-        if ( Strings.isEmpty(id) )
+        if ( Strings.isEmpty( newId ) )
         {
             this.attributeType = attributeType;
             this.upId = attributeType.getName();
-            this.id = Strings.trim(this.upId);
+            this.id = attributeType.getOid();
             
             // Compute the hashCode
             rehash();
@@ -761,10 +761,10 @@ public class DefaultEntryAttribute imple
             return;
         }
 
-        if ( areCompatible( id, attributeType ) )
+        if ( areCompatible( newId, attributeType ) )
         {
             this.upId = upId;
-            this.id = id;
+            this.id = attributeType.getOid();
             this.attributeType = attributeType;
             
             // Compute the hashCode
@@ -2147,7 +2147,27 @@ public class DefaultEntryAttribute imple
         }
 
         this.attributeType = attributeType;
-        setUpId( null, attributeType );
+        this.id = attributeType.getOid();
+        
+        if ( Strings.isEmpty( this.upId ) )
+        {
+            this.upId = attributeType.getName();
+        }
+        else
+        {
+            if ( !areCompatible( this.upId, attributeType ) )
+            {
+                this.upId = attributeType.getName();
+            }
+        }
+        
+        if ( values != null )
+        {
+            for ( Value<?> value : values )
+            {
+                value.apply( attributeType );
+            }
+        }
         
         isHR = attributeType.getSyntax().isHumanReadable();
         
@@ -2407,98 +2427,6 @@ public class DefaultEntryAttribute imple
      * This is the place where we serialize attributes, and all theirs
      * elements. 
      * 
-     * The inner structure is the same as the client attribute, but we can't call
-     * it as we won't be able to serialize the serverValues
-     *
-    public void serialize( ObjectOutput out ) throws IOException
-    {
-        // Write the UPId (the id will be deduced from the upID)
-        Unicode.writeUTF(out, upId);
-        
-        // Write the HR flag, if not null
-        if ( isHR != null )
-        {
-            out.writeBoolean( true );
-            out.writeBoolean( isHR );
-        }
-        else
-        {
-            out.writeBoolean( false );
-        }
-        
-        // Write the number of values
-        out.writeInt( size() );
-        
-        if ( size() > 0 ) 
-        {
-            // Write each value
-            for ( Value<?> value:values )
-            {
-                // Write the value
-                value.writeExternal( out );
-            }
-        }
-    }
-
-    
-    /**
-     * {@inheritDoc}
-     *
-    // This will suppress PMD.EmptyCatchBlock warnings in this method
-    @SuppressWarnings("PMD.EmptyCatchBlock")
-    public void deserialize( ObjectInput in ) throws IOException, ClassNotFoundException
-    {
-        // Read the ID and the UPId
-        upId = Unicode.readUTF(in);
-        
-        // Compute the id
-        setUpId( upId );
-        
-        // Read the HR flag, if not null
-        if ( in.readBoolean() )
-        {
-            isHR = in.readBoolean();
-        }
-
-        // Read the number of values
-        int nbValues = in.readInt();
-
-        if ( nbValues > 0 )
-        {
-            for ( int i = 0; i < nbValues; i++ )
-            {
-                Value<?> value = null;
-                
-                if ( isHR )
-                {
-                    value = new StringValue( (AttributeType)null );
-                }
-                else
-                {
-                    value = new BinaryValue( (AttributeType)null );
-                }
-                
-                value.readExternal( in );
-
-                try
-                {
-                    value.normalize();
-                }
-                catch ( LdapException ne )
-                {
-                    // Do nothing...
-                }
-                    
-                values.add( value );
-            }
-        }
-    }
-    
-    
-    /**
-     * This is the place where we serialize attributes, and all theirs
-     * elements. 
-     * 
      * The inner structure is :
      * 
      * {@inheritDoc}

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultModification.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultModification.java?rev=1080066&r1=1080065&r2=1080066&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultModification.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultModification.java Thu Mar 10 00:20:41 2011
@@ -175,6 +175,16 @@ public class DefaultModification impleme
     
     
     /**
+     * {@inheritDoc}
+     */
+    public void applyAttributeType( AttributeType attributeType )
+    {
+        this.attributeType = attributeType;
+        this.attribute.setAttributeType( attributeType );
+    }
+    
+    
+    /**
      * @see Object#equals(Object)
      * @return <code>true</code> if both values are equal
      */

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryAttribute.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryAttribute.java?rev=1080066&r1=1080065&r2=1080066&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryAttribute.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryAttribute.java Thu Mar 10 00:20:41 2011
@@ -440,7 +440,7 @@ public interface EntryAttribute extends 
      * @param id The attribute ID
      * @throws IllegalArgumentException If the ID is empty or null or
      * resolve to an empty value after being trimmed
-     */
+     *
     void setId( String id ) throws IllegalArgumentException;
 
     

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryAttributeSerializer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryAttributeSerializer.java?rev=1080066&r1=1080065&r2=1080066&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryAttributeSerializer.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryAttributeSerializer.java Thu Mar 10 00:20:41 2011
@@ -56,30 +56,7 @@ public class EntryAttributeSerializer
      */
     public static void serialize( EntryAttribute attribute, ObjectOutput out ) throws IOException
     {
-        // The UP id
-        out.writeUTF( attribute.getUpId() );
-        
-        // The Norm id
-        out.writeUTF( attribute.getId() );
-
-        // The isHR flag
-        out.writeBoolean( attribute.isHR() );
-        
-        // The computed hashCode
-        out.writeInt( attribute.hashCode() );
-        
-        // The number of values
-        int nbValues = attribute.size(); 
-        out.writeInt( nbValues );
-        
-        if ( nbValues > 0 )
-        {
-            for ( Value<?> value : attribute )
-            {
-                value.writeExternal( out );
-            }
-        }
-        
+        attribute.writeExternal( out );
         out.flush();
     }
     
@@ -87,79 +64,36 @@ public class EntryAttributeSerializer
     /**
      * Deserializes a EntryAttribute instance.
      * 
-     * @param schemaManager The schemaManager instance
+     * @param attributeType The attributeType instance
      * @param in The input stream from which the EntryAttribute is read
      * @return a deserialized EntryAttribute
      * @throws IOException If the stream can't be read
      */
     public static EntryAttribute deserialize( SchemaManager schemaManager, ObjectInput in ) throws IOException
     {
-        // The UP id
-        String upId = in.readUTF();
-        
-        // The Norm id
-        String normId = in.readUTF();
-        
-        // The isHR flag
-        boolean isHR = in.readBoolean();
-
-        // The computed hashCode
-        int hashCode = in.readInt();
+        EntryAttribute entryAttribute = new DefaultEntryAttribute();
         
-        // The number of values
-        int nbValues = in.readInt();
-        Value<?>[] values = new Value<?>[ nbValues ];
-        
-        if ( nbValues > 0 )
+        try
         {
-            AttributeType attributeType = null;
-            
-            if ( schemaManager != null )
-            {
-                if ( !Strings.isEmpty( upId ) )
-                { 
-                    attributeType = schemaManager.getAttributeType( upId );
-                }
-                else
-                {
-                    attributeType = schemaManager.getAttributeType( normId );
-                }
-            }
-            for ( int i = 0; i < nbValues; i++ )
-            {
-                Value<?> value = null;
-                
-                if ( isHR )
-                {
-                    value = new StringValue( attributeType );
-                }
-                else
-                {
-                    value = new BinaryValue( attributeType );
-                }
-                
-                try
-                {
-                    value.readExternal( in );
-                }
-                catch ( ClassNotFoundException cfne )
-                {
-                    throw new IOException( cfne.getMessage() );
-                }
-                values[i] = value;
-            }
+            entryAttribute.readExternal( in );
+        }
+        catch ( ClassNotFoundException cnfe )
+        {
+            throw new IOException( cnfe.getMessage() );
         }
         
         AttributeType attributeType = null;
         
         if ( schemaManager != null )
         {
-            attributeType = schemaManager.getAttributeType( upId );
+            if ( !Strings.isEmpty( entryAttribute.getId() ) )
+            { 
+                attributeType = schemaManager.getAttributeType( entryAttribute.getId() );
+            }
+            
+            entryAttribute.setAttributeType( attributeType );
         }
-
-        // The EntryAttribute
-        EntryAttribute attribute = new DefaultEntryAttribute( attributeType, upId, normId, isHR, hashCode, values );
-
-        return attribute;
+        
+        return entryAttribute;
     }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/Modification.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/Modification.java?rev=1080066&r1=1080065&r2=1080066&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/Modification.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/Modification.java Thu Mar 10 00:20:41 2011
@@ -21,6 +21,8 @@ package org.apache.directory.shared.ldap
 
 import java.io.Externalizable;
 
+import org.apache.directory.shared.ldap.model.schema.AttributeType;
+
 /**
  * An internal interface for a ModificationItem. The name has been
  * chosen so that it does not conflict with @see ModificationItem
@@ -71,4 +73,12 @@ public interface Modification extends Cl
      * @return a clone of the current modification
      */
     Modification clone();
+
+    
+    /**
+     * Apply the AttributeType to the Modification
+     * 
+     * @param AttributeType the injected AttributeType
+     */
+    void applyAttributeType( AttributeType attributeType );
 }
\ No newline at end of file



Mime
View raw message