directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1087504 [2/4] - in /directory/shared/trunk: dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ dsml/parser/src/test/java/org/apache/directory/shared/d...
Date Thu, 31 Mar 2011 23:21:52 GMT
Modified: directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java (original)
+++ directory/shared/trunk/ldap/codec/standalone/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryTest.java Thu Mar 31 23:21:50 2011
@@ -39,7 +39,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.decorators.SearchResultEntryDecorator;
 import org.apache.directory.shared.ldap.codec.osgi.AbstractCodecServiceTest;
 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.Attribute;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
 import org.apache.directory.shared.util.Strings;
@@ -121,7 +121,7 @@ public class SearchResultEntryTest exten
 
         for ( int i = 0; i < entry.size(); i++ )
         {
-            EntryAttribute attribute = entry.get( "objectclass" );
+            Attribute attribute = entry.get( "objectclass" );
 
             assertEquals( "objectClass".toLowerCase(), attribute.getId().toLowerCase() );
 
@@ -225,7 +225,7 @@ public class SearchResultEntryTest exten
 
         for ( int i = 0; i < expectedAttributes.length; i++ )
         {
-            EntryAttribute attribute = entry.get( expectedAttributes[i] );
+            Attribute attribute = entry.get( expectedAttributes[i] );
 
             assertEquals( expectedAttributes[i].toLowerCase(), attribute.getId().toLowerCase() );
 
@@ -333,7 +333,7 @@ public class SearchResultEntryTest exten
 
         for ( int i = 0; i < entry.size(); i++ )
         {
-            EntryAttribute attribute = entry.get( "objectclass" );
+            Attribute attribute = entry.get( "objectclass" );
 
             assertEquals( "objectClass".toLowerCase(), attribute.getId().toLowerCase() );
 
@@ -834,7 +834,7 @@ public class SearchResultEntryTest exten
 
         for ( int i = 0; i < entry.size(); i++ )
         {
-            EntryAttribute attribute = entry.get( "objectclass" );
+            Attribute attribute = entry.get( "objectclass" );
 
             assertEquals( "objectClass".toLowerCase(), attribute.getId().toLowerCase() );
             assertEquals( 0, attribute.size() );
@@ -919,7 +919,7 @@ public class SearchResultEntryTest exten
 
         assertEquals( 2, entry.size() );
 
-        EntryAttribute attribute = entry.get( "objectclass" );
+        Attribute attribute = entry.get( "objectclass" );
         assertEquals( "objectClass".toLowerCase(), attribute.getId().toLowerCase() );
         assertEquals( 0, attribute.size() );
 
@@ -1011,7 +1011,7 @@ public class SearchResultEntryTest exten
 
         for ( int i = 0; i < entry.size(); i++ )
         {
-            EntryAttribute attribute = entry.get( "objectclass" );
+            Attribute attribute = entry.get( "objectclass" );
 
             assertEquals( "objectClass".toLowerCase(), attribute.getId().toLowerCase() );
 
@@ -1109,7 +1109,7 @@ public class SearchResultEntryTest exten
 
         for ( int i = 0; i < entry.size(); i++ )
         {
-            EntryAttribute attribute = entry.get( "objectclass" );
+            Attribute attribute = entry.get( "objectclass" );
 
             assertEquals( "objectClass".toLowerCase(), attribute.getId().toLowerCase() );
 
@@ -1203,7 +1203,7 @@ public class SearchResultEntryTest exten
 
         for ( int i = 0; i < entry.size(); i++ )
         {
-            EntryAttribute attribute = entry.get( "objectclass" );
+            Attribute attribute = entry.get( "objectclass" );
 
             assertEquals( "objectClass".toLowerCase(), attribute.getId().toLowerCase() );
 

Modified: directory/shared/trunk/ldap/extras/aci/src/main/antlr/ACIItem.g
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/aci/src/main/antlr/ACIItem.g?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/aci/src/main/antlr/ACIItem.g (original)
+++ directory/shared/trunk/ldap/extras/aci/src/main/antlr/ACIItem.g Thu Mar 31 23:21:50 2011
@@ -55,7 +55,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.model.entry.StringValue;
-import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntryAttribute;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.aci.protectedItem.AllAttributeValuesItem;
@@ -488,7 +488,7 @@ attributeValue
     String attributeTypeAndValue = null;
     String attributeType = null;
     String attributeValue = null;
-    Set<EntryAttribute> attributeSet = new HashSet<EntryAttribute>();
+    Set<Attribute> attributeSet = new HashSet<Attribute>();
 }
     :
     token:ATTRIBUTE_VALUE_CANDIDATE // ate the identifier for subordinate dn parser workaround

Modified: directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/protectedItem/AttributeValueItem.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/protectedItem/AttributeValueItem.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/protectedItem/AttributeValueItem.java (original)
+++ directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/protectedItem/AttributeValueItem.java Thu Mar 31 23:21:50 2011
@@ -25,7 +25,7 @@ import java.util.Iterator;
 import java.util.Set;
 
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
-import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 
 
 /**
@@ -34,26 +34,26 @@ import org.apache.directory.shared.ldap.
 public class AttributeValueItem extends ProtectedItem
 {
     /** The protected Attributes */
-    private final Set<EntryAttribute> attributes;
+    private final Set<Attribute> attributes;
 
 
     /**
      * Creates a new instance.
      * 
-     * @param attributes the collection of {@link EntryAttribute}s.
+     * @param attributes the collection of {@link Attribute}s.
      */
-    public AttributeValueItem( Set<EntryAttribute> attributes )
+    public AttributeValueItem( Set<Attribute> attributes )
     {
         this.attributes = Collections.unmodifiableSet( attributes );
     }
 
 
     /**
-     * Returns an iterator of all {@link org.apache.directory.shared.ldap.model.entry.EntryAttribute}s.
+     * Returns an iterator of all {@link org.apache.directory.shared.ldap.model.entry.Attribute}s.
      *
      * @return the iterator
      */
-    public Iterator<EntryAttribute> iterator()
+    public Iterator<Attribute> iterator()
     {
         return attributes.iterator();
     }
@@ -109,7 +109,7 @@ public class AttributeValueItem extends 
 
         boolean isFirst = true;
 
-        for ( EntryAttribute attribute : attributes )
+        for ( Attribute attribute : attributes )
         {
             if ( isFirst )
             {

Modified: directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/ProtectedItem_AttributeValueTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/ProtectedItem_AttributeValueTest.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/ProtectedItem_AttributeValueTest.java (original)
+++ directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/ProtectedItem_AttributeValueTest.java Thu Mar 31 23:21:50 2011
@@ -30,7 +30,7 @@ import com.mycila.junit.concurrent.Concu
 import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.ldap.aci.protectedItem.AttributeValueItem;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntryAttribute;
-import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -58,24 +58,24 @@ public class ProtectedItem_AttributeValu
     public void initNames() throws Exception
     {
 
-        EntryAttribute attrA = new DefaultEntryAttribute( "aa" );
+        Attribute attrA = new DefaultEntryAttribute( "aa" );
         attrA.add( "aa" );
-        EntryAttribute attrB = new DefaultEntryAttribute( "bb" );
+        Attribute attrB = new DefaultEntryAttribute( "bb" );
         attrB.add( "bb" );
-        EntryAttribute attrC = new DefaultEntryAttribute( "cc" );
+        Attribute attrC = new DefaultEntryAttribute( "cc" );
         attrC.add( "cc" );
-        EntryAttribute attrD = new DefaultEntryAttribute( "dd" );
+        Attribute attrD = new DefaultEntryAttribute( "dd" );
         attrD.add( "dd" );
 
-        Set<EntryAttribute> colA = new HashSet<EntryAttribute>();
+        Set<Attribute> colA = new HashSet<Attribute>();
         colA.add( attrA );
         colA.add( attrB );
         colA.add( attrC );
-        Set<EntryAttribute> colB = new HashSet<EntryAttribute>();
+        Set<Attribute> colB = new HashSet<Attribute>();
         colB.add( attrA );
         colB.add( attrB );
         colB.add( attrC );
-        Set<EntryAttribute> colC = new HashSet<EntryAttribute>();
+        Set<Attribute> colC = new HashSet<Attribute>();
         colC.add( attrB );
         colC.add( attrC );
         colC.add( attrD );

Modified: directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/protectedItem/AttributeValueItemTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/protectedItem/AttributeValueItemTest.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/protectedItem/AttributeValueItemTest.java (original)
+++ directory/shared/trunk/ldap/extras/aci/src/test/java/org/apache/directory/shared/ldap/aci/protectedItem/AttributeValueItemTest.java Thu Mar 31 23:21:50 2011
@@ -29,7 +29,7 @@ import java.util.Set;
 import com.mycila.junit.concurrent.Concurrency;
 import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntryAttribute;
-import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.filter.UndefinedNode;
 import org.junit.Before;
 import org.junit.Test;
@@ -50,10 +50,10 @@ public class AttributeValueItemTest
     AttributeValueItem attributeValueItemB;
     AttributeValueItem attributeValueItemC;
     AttributeValueItem attributeValueItemD;
-    Set<EntryAttribute> attributeA;
-    Set<EntryAttribute> attributeB;
-    Set<EntryAttribute> attributeC;
-    Set<EntryAttribute> attributeD;
+    Set<Attribute> attributeA;
+    Set<Attribute> attributeB;
+    Set<Attribute> attributeC;
+    Set<Attribute> attributeD;
 
 
     /**
@@ -62,20 +62,20 @@ public class AttributeValueItemTest
     @Before
     public void initNames() throws Exception
     {
-        attributeA = new HashSet<EntryAttribute>();
+        attributeA = new HashSet<Attribute>();
         attributeA.add( new DefaultEntryAttribute( "aa", "aa" ) );
         attributeA.add( new DefaultEntryAttribute( "aa", "bb" ) );
         attributeA.add( new DefaultEntryAttribute( "aa", "cc" ) );
         // Sets aren't ordered, so adding order must not matter
-        attributeB = new HashSet<EntryAttribute>();
+        attributeB = new HashSet<Attribute>();
         attributeB.add( new DefaultEntryAttribute( "aa", "bb" ) );
         attributeB.add( new DefaultEntryAttribute( "aa", "cc" ) );
         attributeB.add( new DefaultEntryAttribute( "aa", "aa" ) );
-        attributeC = new HashSet<EntryAttribute>();
+        attributeC = new HashSet<Attribute>();
         attributeC.add( new DefaultEntryAttribute( "aa", "aa" ) );
         attributeC.add( new DefaultEntryAttribute( "bb", "bb" ) );
         attributeC.add( new DefaultEntryAttribute( "aa", "cc" ) );
-        attributeD = new HashSet<EntryAttribute>();
+        attributeD = new HashSet<Attribute>();
         attributeD.add( new DefaultEntryAttribute( "aa", "aa" ) );
         attributeD.add( new DefaultEntryAttribute( "aa", "bb" ) );
         attributeD.add( new DefaultEntryAttribute( "aa", "dd" ) );

Copied: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/Attribute.java (from r1087352, 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/Attribute.java?p2=directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/Attribute.java&p1=directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/EntryAttribute.java&r1=1087352&r2=1087504&rev=1087504&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/Attribute.java Thu Mar 31 23:21:50 2011
@@ -33,7 +33,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public interface EntryAttribute extends Iterable<Value<?>>, Cloneable, Externalizable
+public interface Attribute extends Iterable<Value<?>>, Cloneable, Externalizable
 {
     /**
      * Adds some values to this attribute. If the new values are already present in
@@ -153,7 +153,7 @@ public interface EntryAttribute extends 
     /**
      * @return A clone of the current object
      */
-    EntryAttribute clone();
+    Attribute clone();
 
 
     /**

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AttributeUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AttributeUtils.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AttributeUtils.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/AttributeUtils.java Thu Mar 31 23:21:50 2011
@@ -27,7 +27,6 @@ import java.util.List;
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.BasicAttribute;
 import javax.naming.directory.BasicAttributes;
@@ -71,9 +70,9 @@ public final class AttributeUtils
      * @param entry the entry to remove the attribute from 
      * @return the Attribute that is removed
      */
-    public static Attribute removeAttribute( AttributeType type, Attributes entry )
+    public static javax.naming.directory.Attribute removeAttribute( AttributeType type, Attributes entry )
     {
-        Attribute attr = entry.get( type.getOid() );
+        javax.naming.directory.Attribute attr = entry.get( type.getOid() );
 
         if ( attr == null )
         {
@@ -170,7 +169,7 @@ public final class AttributeUtils
      * @param attribute The attribute to transform
      * @return A instance of AttributeImpl
      */
-    public static Attribute toBasicAttribute( Attribute attribute )
+    public static javax.naming.directory.Attribute toBasicAttribute( javax.naming.directory.Attribute attribute )
     {
         if ( attribute instanceof BasicAttribute )
         {
@@ -180,7 +179,7 @@ public final class AttributeUtils
         else
         {
             // Create a new AttributeImpl from the original attribute
-            Attribute newAttribute = new BasicAttribute( attribute.getID() );
+            javax.naming.directory.Attribute newAttribute = new BasicAttribute( attribute.getID() );
 
             try
             {
@@ -209,10 +208,10 @@ public final class AttributeUtils
      * @param type the attribute type specification
      * @return an Attribute with matching the attributeType spec or null
      */
-    public static Attribute getAttribute( Attributes attrs, AttributeType type )
+    public static javax.naming.directory.Attribute getAttribute( Attributes attrs, AttributeType type )
     {
         // check if the attribute's OID is used
-        Attribute attr = attrs.get( type.getOid() );
+        javax.naming.directory.Attribute attr = attrs.get( type.getOid() );
 
         if ( attr != null )
         {
@@ -254,7 +253,7 @@ public final class AttributeUtils
      * @return <code>true</code> if the value exists in the attribute
      * @throws LdapException If something went wrong while accessing the data
      */
-    public static boolean containsValue( Attribute attr, Value<?> compared, AttributeType type ) throws LdapException
+    public static boolean containsValue( javax.naming.directory.Attribute attr, Value<?> compared, AttributeType type ) throws LdapException
     {
         // quick bypass test
         if ( attr.contains( compared ) )
@@ -391,7 +390,7 @@ public final class AttributeUtils
      * @param value The value to look for
      * @return true if the value is present in the attribute
      */
-    public static boolean containsValueCaseIgnore( Attribute attr, Object value )
+    public static boolean containsValueCaseIgnore( javax.naming.directory.Attribute attr, Object value )
     {
         // quick bypass test
         if ( attr.contains( value ) )
@@ -458,7 +457,7 @@ public final class AttributeUtils
      * @throws NamingException
      *             if there are problems accessing attribute values
      */
-    public static Attribute getDifference( Attribute attr0, Attribute attr1 ) throws NamingException
+    public static javax.naming.directory.Attribute getDifference( javax.naming.directory.Attribute attr0, javax.naming.directory.Attribute attr1 ) throws NamingException
     {
         String id;
 
@@ -472,7 +471,7 @@ public final class AttributeUtils
         }
         else if ( attr1 == null )
         {
-            return ( Attribute ) attr0.clone();
+            return ( javax.naming.directory.Attribute ) attr0.clone();
         }
         else if ( !attr0.getID().equalsIgnoreCase( attr1.getID() ) )
         {
@@ -483,7 +482,7 @@ public final class AttributeUtils
             id = attr0.getID();
         }
 
-        Attribute attr = new BasicAttribute( id );
+        javax.naming.directory.Attribute attr = new BasicAttribute( id );
 
         for ( int ii = 0; ii < attr0.size(); ii++ )
         {
@@ -515,7 +514,7 @@ public final class AttributeUtils
      * @throws NamingException
      *             if there are problems accessing attribute values
      */
-    public static Attribute getUnion( Attribute attr0, Attribute attr1 ) throws NamingException
+    public static javax.naming.directory.Attribute getUnion( javax.naming.directory.Attribute attr0, javax.naming.directory.Attribute attr1 ) throws NamingException
     {
         String id;
 
@@ -540,7 +539,7 @@ public final class AttributeUtils
             id = attr0.getID();
         }
 
-        Attribute attr = new BasicAttribute( id );
+        javax.naming.directory.Attribute attr = new BasicAttribute( id );
 
         if ( attr0 != null )
         {
@@ -596,7 +595,7 @@ public final class AttributeUtils
                     // Iterate through the attributes now
                     while ( attrs.hasMoreElements() )
                     {
-                        newAttrs.put( ( Attribute ) attrs.nextElement() );
+                        newAttrs.put( ( javax.naming.directory.Attribute ) attrs.nextElement() );
                     }
                 }
 
@@ -621,7 +620,7 @@ public final class AttributeUtils
      *            The attribute to print
      * @return A string
      */
-    public static String toString( String tabs, Attribute attribute )
+    public static String toString( String tabs, javax.naming.directory.Attribute attribute )
     {
         StringBuffer sb = new StringBuffer();
 
@@ -679,7 +678,7 @@ public final class AttributeUtils
      *            The attribute to print
      * @return A string
      */
-    public static String toString( Attribute attribute )
+    public static String toString( javax.naming.directory.Attribute attribute )
     {
         return toString( "", attribute );
     }
@@ -706,7 +705,7 @@ public final class AttributeUtils
 
             while ( attributesIterator.hasMoreElements() )
             {
-                Attribute attribute = ( Attribute ) attributesIterator.nextElement();
+                javax.naming.directory.Attribute attribute = ( javax.naming.directory.Attribute ) attributesIterator.nextElement();
                 sb.append( tabs ).append( attribute.toString() );
             }
         }
@@ -930,13 +929,13 @@ public final class AttributeUtils
      */
     public static void applyModification( Entry entry, Modification modification ) throws LdapException
     {
-        EntryAttribute modAttr = modification.getAttribute();
+        Attribute modAttr = modification.getAttribute();
         String modificationId = modAttr.getId();
 
         switch ( modification.getOperation() )
         {
             case ADD_ATTRIBUTE:
-                EntryAttribute modifiedAttr = entry.get( modificationId );
+                Attribute modifiedAttr = entry.get( modificationId );
 
                 if ( modifiedAttr == null )
                 {
@@ -1031,11 +1030,11 @@ public final class AttributeUtils
             {
                 Entry entry = new DefaultEntry( dn );
 
-                for ( NamingEnumeration<? extends Attribute> attrs = attributes.getAll(); attrs.hasMoreElements(); )
+                for ( NamingEnumeration<? extends javax.naming.directory.Attribute> attrs = attributes.getAll(); attrs.hasMoreElements(); )
                 {
-                    Attribute attr = attrs.nextElement();
+                    javax.naming.directory.Attribute attr = attrs.nextElement();
 
-                    EntryAttribute entryAttribute = toClientAttribute( attr );
+                    Attribute entryAttribute = toClientAttribute( attr );
 
                     if ( entryAttribute != null )
                     {
@@ -1072,9 +1071,9 @@ public final class AttributeUtils
             Attributes attributes = new BasicAttributes( true );
 
             // Looping on attributes
-            for ( Iterator<EntryAttribute> attributeIterator = entry.iterator(); attributeIterator.hasNext(); )
+            for ( Iterator<Attribute> attributeIterator = entry.iterator(); attributeIterator.hasNext(); )
             {
-                EntryAttribute entryAttribute = ( EntryAttribute ) attributeIterator.next();
+                Attribute entryAttribute = ( Attribute ) attributeIterator.next();
 
                 attributes.put( toAttribute( entryAttribute ) );
             }
@@ -1087,18 +1086,18 @@ public final class AttributeUtils
 
 
     /**
-     * Converts an {@link EntryAttribute} to an {@link Attribute}.
+     * Converts an {@link Attribute} to an {@link Attribute}.
      *
      * @param entryAttribute
-     *      the {@link EntryAttribute} to convert
+     *      the {@link Attribute} to convert
      * @return
      *      the equivalent {@link Attribute}
      */
-    public static Attribute toAttribute( EntryAttribute entryAttribute )
+    public static javax.naming.directory.Attribute toAttribute( Attribute entryAttribute )
     {
         if ( entryAttribute != null )
         {
-            Attribute attribute = new BasicAttribute( entryAttribute.getId() );
+            javax.naming.directory.Attribute attribute = new BasicAttribute( entryAttribute.getId() );
 
             // Looping on values
             for ( Iterator<Value<?>> valueIterator = entryAttribute.iterator(); valueIterator.hasNext(); )
@@ -1120,7 +1119,7 @@ public final class AttributeUtils
      * @param attribute the BasicAttributes or AttributesImpl instance to convert
      * @return An instance of a ClientEntry object
      */
-    public static EntryAttribute toClientAttribute( Attribute attribute ) throws LdapInvalidAttributeValueException
+    public static Attribute toClientAttribute( javax.naming.directory.Attribute attribute ) throws LdapInvalidAttributeValueException
     {
         if ( attribute == null )
         {
@@ -1129,7 +1128,7 @@ public final class AttributeUtils
 
         try
         {
-            EntryAttribute clientAttribute = new DefaultEntryAttribute( attribute.getID() );
+            Attribute clientAttribute = new DefaultEntryAttribute( attribute.getID() );
 
             for ( NamingEnumeration<?> values = attribute.getAll(); values.hasMoreElements(); )
             {

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntry.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntry.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntry.java Thu Mar 31 23:21:50 2011
@@ -64,7 +64,7 @@ public final class DefaultEntry implemen
     private Dn dn;
 
     /** A map containing all the attributes for this entry */
-    private Map<String, EntryAttribute> attributes = new HashMap<String, EntryAttribute>();
+    private Map<String, Attribute> attributes = new HashMap<String, Attribute>();
 
     /** A speedup to get the ObjectClass attribute */
     private static AttributeType objectClassAttributeType;
@@ -206,10 +206,10 @@ public final class DefaultEntry implemen
         }
 
         // Init the attributes map
-        attributes = new HashMap<String, EntryAttribute>( entry.size() );
+        attributes = new HashMap<String, Attribute>( entry.size() );
 
         // and copy all the attributes
-        for ( EntryAttribute attribute : entry )
+        for ( Attribute attribute : entry )
         {
             try
             {
@@ -222,7 +222,7 @@ public final class DefaultEntry implemen
                 }
 
                 // Create a new ServerAttribute.
-                EntryAttribute serverAttribute = new DefaultEntryAttribute( attributeType, attribute );
+                Attribute serverAttribute = new DefaultEntryAttribute( attributeType, attribute );
 
                 // And store it
                 add( serverAttribute );
@@ -279,11 +279,11 @@ public final class DefaultEntry implemen
      * @param dn The Dn for this serverEntry. Can be null
      * @param attributes The list of attributes to create
      */
-    public DefaultEntry( Dn dn, EntryAttribute... attributes )
+    public DefaultEntry( Dn dn, Attribute... attributes )
     {
         this.dn = dn;
 
-        for ( EntryAttribute attribute : attributes )
+        for ( Attribute attribute : attributes )
         {
             if ( attribute == null )
             {
@@ -309,7 +309,7 @@ public final class DefaultEntry implemen
      * @param dn The Dn for this serverEntry. Can be null
      * @param attributes The list of attributes to create
      */
-    public DefaultEntry( SchemaManager schemaManager, Dn dn, EntryAttribute... attributes )
+    public DefaultEntry( SchemaManager schemaManager, Dn dn, Attribute... attributes )
     {
         this.schemaManager = schemaManager;
         
@@ -327,7 +327,7 @@ public final class DefaultEntry implemen
         {
             if ( attributes != null )
             {
-                for ( EntryAttribute attribute : attributes )
+                for ( Attribute attribute : attributes )
                 {
                     if ( attribute == null )
                     {
@@ -345,7 +345,7 @@ public final class DefaultEntry implemen
     
             if ( attributes != null )
             {
-                for ( EntryAttribute attribute : attributes )
+                for ( Attribute attribute : attributes )
                 {
                     // Store a new ServerAttribute
                     try
@@ -587,7 +587,7 @@ public final class DefaultEntry implemen
      */
     protected void createAttribute( String upId, AttributeType attributeType, byte[]... values ) throws LdapInvalidAttributeValueException
     {
-        EntryAttribute attribute = new DefaultEntryAttribute( attributeType, values );
+        Attribute attribute = new DefaultEntryAttribute( attributeType, values );
         attribute.setUpId( upId, attributeType );
         attributes.put( attributeType.getOid(), attribute );
     }
@@ -601,7 +601,7 @@ public final class DefaultEntry implemen
      */
     protected void createAttribute( String upId, AttributeType attributeType, String... values ) throws LdapInvalidAttributeValueException
     {
-        EntryAttribute attribute = new DefaultEntryAttribute( attributeType, values );
+        Attribute attribute = new DefaultEntryAttribute( attributeType, values );
         attribute.setUpId( upId, attributeType );
         attributes.put( attributeType.getOid(), attribute );
     }
@@ -615,7 +615,7 @@ public final class DefaultEntry implemen
      */
     protected void createAttribute( String upId, AttributeType attributeType, Value<?>... values ) throws LdapInvalidAttributeValueException
     {
-        EntryAttribute attribute = new DefaultEntryAttribute( attributeType, values );
+        Attribute attribute = new DefaultEntryAttribute( attributeType, values );
         attribute.setUpId( upId, attributeType );
         attributes.put( attributeType.getOid(), attribute );
     }
@@ -667,7 +667,7 @@ public final class DefaultEntry implemen
             throw new UnsupportedOperationException( message );
         }
 
-        EntryAttribute attribute = attributes.get( attributeType.getOid() );
+        Attribute attribute = attributes.get( attributeType.getOid() );
 
         if ( attribute != null )
         {
@@ -697,7 +697,7 @@ public final class DefaultEntry implemen
             throw new IllegalArgumentException( message );
         }
 
-        EntryAttribute attribute = attributes.get( attributeType.getOid() );
+        Attribute attribute = attributes.get( attributeType.getOid() );
 
         if ( attribute != null )
         {
@@ -727,7 +727,7 @@ public final class DefaultEntry implemen
             throw new IllegalArgumentException( message );
         }
 
-        EntryAttribute attribute = attributes.get( attributeType.getOid() );
+        Attribute attribute = attributes.get( attributeType.getOid() );
 
         if ( attribute != null )
         {
@@ -758,7 +758,7 @@ public final class DefaultEntry implemen
             throw new UnsupportedOperationException( message );
         }
 
-        EntryAttribute attribute = attributes.get( attributeType.getOid() );
+        Attribute attribute = attributes.get( attributeType.getOid() );
 
         upId = getUpId( upId, attributeType );
 
@@ -792,7 +792,7 @@ public final class DefaultEntry implemen
 
         upId = getUpId( upId, attributeType );
 
-        EntryAttribute attribute = attributes.get( attributeType.getOid() );
+        Attribute attribute = attributes.get( attributeType.getOid() );
 
         if ( attribute != null )
         {
@@ -822,7 +822,7 @@ public final class DefaultEntry implemen
 
         upId = getUpId( upId, attributeType );
 
-        EntryAttribute attribute = attributes.get( attributeType.getOid() );
+        Attribute attribute = attributes.get( attributeType.getOid() );
 
         if ( attribute != null )
         {
@@ -843,10 +843,10 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public void add( EntryAttribute... attributes ) throws LdapException
+    public void add( Attribute... attributes ) throws LdapException
     {
         // Loop on all the added attributes
-        for ( EntryAttribute attribute : attributes )
+        for ( Attribute attribute : attributes )
         {
             AttributeType attributeType = attribute.getAttributeType();
 
@@ -858,7 +858,7 @@ public final class DefaultEntry implemen
                 {
                     // We already have an attribute with the same AttributeType
                     // Just add the new values into it.
-                    EntryAttribute existingAttribute = this.attributes.get( oid );
+                    Attribute existingAttribute = this.attributes.get( oid );
 
                     for ( Value<?> value : attribute )
                     {
@@ -879,7 +879,7 @@ public final class DefaultEntry implemen
                 // If the attribute already exist, we will add the new values.
                 if ( contains( attribute ) )
                 {
-                    EntryAttribute existingAttribute = get( attribute.getId() );
+                    Attribute existingAttribute = get( attribute.getId() );
 
                     // Loop on all the values, and add them to the existing attribute
                     for ( Value<?> value : attribute )
@@ -919,7 +919,7 @@ public final class DefaultEntry implemen
         else
         {
             // Now, check to see if we already have such an attribute
-            EntryAttribute attribute = attributes.get( id );
+            Attribute attribute = attributes.get( id );
 
             if ( attribute != null )
             {
@@ -961,7 +961,7 @@ public final class DefaultEntry implemen
         else
         {
             // Now, check to see if we already have such an attribute
-            EntryAttribute attribute = attributes.get( id );
+            Attribute attribute = attributes.get( id );
 
             if ( attribute != null )
             {
@@ -1003,7 +1003,7 @@ public final class DefaultEntry implemen
         else
         {
             // Now, check to see if we already have such an attribute
-            EntryAttribute attribute = attributes.get( id );
+            Attribute attribute = attributes.get( id );
 
             if ( attribute != null )
             {
@@ -1046,7 +1046,7 @@ public final class DefaultEntry implemen
             clone.dn = dn; // note that Dn is immutable now
 
             // then clone the ClientAttribute Map.
-            clone.attributes = ( Map<String, EntryAttribute> ) ( ( ( HashMap<String, EntryAttribute> ) attributes )
+            clone.attributes = ( Map<String, Attribute> ) ( ( ( HashMap<String, Attribute> ) attributes )
                 .clone() );
 
             // now clone all the attributes
@@ -1054,7 +1054,7 @@ public final class DefaultEntry implemen
 
             if ( schemaManager != null )
             {
-                for ( EntryAttribute attribute : attributes.values() )
+                for ( Attribute attribute : attributes.values() )
                 {
                     String oid = attribute.getAttributeType().getOid();
                     clone.attributes.put( oid, attribute.clone() );
@@ -1062,7 +1062,7 @@ public final class DefaultEntry implemen
             }
             else
             {
-                for ( EntryAttribute attribute : attributes.values() )
+                for ( Attribute attribute : attributes.values() )
                 {
                     clone.attributes.put( attribute.getId(), attribute.clone() );
                 }
@@ -1082,11 +1082,11 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public boolean contains( EntryAttribute... attributes ) throws LdapException
+    public boolean contains( Attribute... attributes ) throws LdapException
     {
         if ( schemaManager == null )
         {
-            for ( EntryAttribute attribute : attributes )
+            for ( Attribute attribute : attributes )
             {
                 if ( attribute == null )
                 {
@@ -1101,7 +1101,7 @@ public final class DefaultEntry implemen
         }
         else
         {
-            for ( EntryAttribute entryAttribute : attributes )
+            for ( Attribute entryAttribute : attributes )
             {
                 if ( entryAttribute == null )
                 {
@@ -1214,7 +1214,7 @@ public final class DefaultEntry implemen
             return false;
         }
 
-        EntryAttribute attribute = attributes.get( attributeType.getOid() );
+        Attribute attribute = attributes.get( attributeType.getOid() );
 
         if ( attribute != null )
         {
@@ -1237,7 +1237,7 @@ public final class DefaultEntry implemen
             return false;
         }
 
-        EntryAttribute attribute = attributes.get( attributeType.getOid() );
+        Attribute attribute = attributes.get( attributeType.getOid() );
 
         if ( attribute != null )
         {
@@ -1260,7 +1260,7 @@ public final class DefaultEntry implemen
             return false;
         }
 
-        EntryAttribute attribute = attributes.get( attributeType.getOid() );
+        Attribute attribute = attributes.get( attributeType.getOid() );
 
         if ( attribute != null )
         {
@@ -1297,7 +1297,7 @@ public final class DefaultEntry implemen
             }
         }
 
-        EntryAttribute attribute = attributes.get( id );
+        Attribute attribute = attributes.get( id );
 
         if ( attribute == null )
         {
@@ -1332,7 +1332,7 @@ public final class DefaultEntry implemen
             }
         }
 
-        EntryAttribute attribute = attributes.get( id );
+        Attribute attribute = attributes.get( id );
 
         if ( attribute == null )
         {
@@ -1367,7 +1367,7 @@ public final class DefaultEntry implemen
             }
         }
 
-        EntryAttribute attribute = attributes.get( id );
+        Attribute attribute = attributes.get( id );
 
         if ( attribute == null )
         {
@@ -1381,7 +1381,7 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute get( String alias )
+    public Attribute get( String alias )
     {
         try
         {
@@ -1418,7 +1418,7 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute get( AttributeType attributeType )
+    public Attribute get( AttributeType attributeType )
     {
         if ( attributeType != null )
         {
@@ -1438,7 +1438,7 @@ public final class DefaultEntry implemen
     {
         Set<AttributeType> attributeTypes = new HashSet<AttributeType>();
 
-        for ( EntryAttribute attribute : attributes.values() )
+        for ( Attribute attribute : attributes.values() )
         {
             if ( attribute.getAttributeType() != null )
             {
@@ -1453,7 +1453,7 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute put( String upId, byte[]... values )
+    public Attribute put( String upId, byte[]... values )
     {
         if ( Strings.isEmpty(upId) )
         {
@@ -1468,7 +1468,7 @@ public final class DefaultEntry implemen
             String id = getId( upId );
 
             // Create a new attribute
-            EntryAttribute clientAttribute = new DefaultEntryAttribute( upId, values );
+            Attribute clientAttribute = new DefaultEntryAttribute( upId, values );
 
             // Replace the previous one, and return it back
             return attributes.put( id, clientAttribute );
@@ -1492,7 +1492,7 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute put( String upId, String... values )
+    public Attribute put( String upId, String... values )
     {
         if ( Strings.isEmpty(upId) )
         {
@@ -1507,7 +1507,7 @@ public final class DefaultEntry implemen
             String id = getId( upId );
 
             // Create a new attribute
-            EntryAttribute clientAttribute = new DefaultEntryAttribute( upId, values );
+            Attribute clientAttribute = new DefaultEntryAttribute( upId, values );
 
             // Replace the previous one, and return it back
             return attributes.put( id, clientAttribute );
@@ -1531,7 +1531,7 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute put( String upId, Value<?>... values )
+    public Attribute put( String upId, Value<?>... values )
     {
         if ( Strings.isEmpty(upId) )
         {
@@ -1546,7 +1546,7 @@ public final class DefaultEntry implemen
             String id = getId( upId );
 
             // Create a new attribute
-            EntryAttribute clientAttribute = new DefaultEntryAttribute( upId, values );
+            Attribute clientAttribute = new DefaultEntryAttribute( upId, values );
 
             // Replace the previous one, and return it back
             return attributes.put( id, clientAttribute );
@@ -1570,7 +1570,7 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public List<EntryAttribute> set( String... upIds )
+    public List<Attribute> set( String... upIds )
     {
         if ( ( upIds == null ) || ( upIds.length == 0 ) )
         {
@@ -1579,7 +1579,7 @@ public final class DefaultEntry implemen
             throw new IllegalArgumentException( message );
         }
 
-        List<EntryAttribute> removed = new ArrayList<EntryAttribute>();
+        List<Attribute> removed = new ArrayList<Attribute>();
         boolean added = false;
 
         if ( schemaManager == null )
@@ -1602,7 +1602,7 @@ public final class DefaultEntry implemen
                     removed.add( attributes.remove( id ) );
                 }
 
-                EntryAttribute newAttribute = new DefaultEntryAttribute( upId );
+                Attribute newAttribute = new DefaultEntryAttribute( upId );
                 attributes.put( id, newAttribute );
                 added = true;
             }
@@ -1660,9 +1660,9 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      **/
-    public List<EntryAttribute> set( AttributeType... attributeTypes )
+    public List<Attribute> set( AttributeType... attributeTypes )
     {
-        List<EntryAttribute> removed = new ArrayList<EntryAttribute>();
+        List<Attribute> removed = new ArrayList<Attribute>();
 
         // Now, loop on all the attributeType to add
         for ( AttributeType attributeType : attributeTypes )
@@ -1674,7 +1674,7 @@ public final class DefaultEntry implemen
                 continue;
             }
 
-            EntryAttribute attribute = attributes.put( attributeType.getOid(),
+            Attribute attribute = attributes.put( attributeType.getOid(),
                 new DefaultEntryAttribute( attributeType ) );
 
             if ( attribute != null )
@@ -1697,14 +1697,14 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public List<EntryAttribute> put( EntryAttribute... attributes ) throws LdapException
+    public List<Attribute> put( Attribute... attributes ) throws LdapException
     {
         // First, get the existing attributes
-        List<EntryAttribute> previous = new ArrayList<EntryAttribute>();
+        List<Attribute> previous = new ArrayList<Attribute>();
 
         if ( schemaManager == null )
         {
-            for ( EntryAttribute attribute : attributes )
+            for ( Attribute attribute : attributes )
             {
                 String id = attribute.getId();
 
@@ -1721,7 +1721,7 @@ public final class DefaultEntry implemen
         }
         else
         {
-            for ( EntryAttribute attribute : attributes )
+            for ( Attribute attribute : attributes )
             {
                 if ( attribute == null )
                 {
@@ -1736,7 +1736,7 @@ public final class DefaultEntry implemen
                     attribute.apply( attributeType );
                 }
 
-                EntryAttribute removed = this.attributes.put( attribute.getAttributeType().getOid(), attribute );
+                Attribute removed = this.attributes.put( attribute.getAttributeType().getOid(), attribute );
 
                 if ( removed != null )
                 {
@@ -1753,7 +1753,7 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute put( AttributeType attributeType, byte[]... values ) throws LdapException
+    public Attribute put( AttributeType attributeType, byte[]... values ) throws LdapException
     {
         return put( null, attributeType, values );
     }
@@ -1762,7 +1762,7 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute put( AttributeType attributeType, String... values ) throws LdapException
+    public Attribute put( AttributeType attributeType, String... values ) throws LdapException
     {
         return put( null, attributeType, values );
     }
@@ -1771,7 +1771,7 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute put( AttributeType attributeType, Value<?>... values ) throws LdapException
+    public Attribute put( AttributeType attributeType, Value<?>... values ) throws LdapException
     {
         return put( null, attributeType, values );
     }
@@ -1780,7 +1780,7 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute put( String upId, AttributeType attributeType, byte[]... values ) throws LdapException
+    public Attribute put( String upId, AttributeType attributeType, byte[]... values ) throws LdapException
     {
         if ( attributeType == null )
         {
@@ -1821,7 +1821,7 @@ public final class DefaultEntry implemen
             throw new UnsupportedOperationException( message );
         }
 
-        EntryAttribute attribute = new DefaultEntryAttribute( upId, attributeType, values );
+        Attribute attribute = new DefaultEntryAttribute( upId, attributeType, values );
 
         return attributes.put( attributeType.getOid(), attribute );
     }
@@ -1830,7 +1830,7 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute put( String upId, AttributeType attributeType, String... values ) throws LdapException
+    public Attribute put( String upId, AttributeType attributeType, String... values ) throws LdapException
     {
         if ( attributeType == null )
         {
@@ -1864,7 +1864,7 @@ public final class DefaultEntry implemen
             }
         }
 
-        EntryAttribute attribute = new DefaultEntryAttribute( upId, attributeType, values );
+        Attribute attribute = new DefaultEntryAttribute( upId, attributeType, values );
 
         return attributes.put( attributeType.getOid(), attribute );
     }
@@ -1873,7 +1873,7 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute put( String upId, AttributeType attributeType, Value<?>... values ) throws LdapException
+    public Attribute put( String upId, AttributeType attributeType, Value<?>... values ) throws LdapException
     {
         if ( attributeType == null )
         {
@@ -1907,7 +1907,7 @@ public final class DefaultEntry implemen
             }
         }
 
-        EntryAttribute attribute = new DefaultEntryAttribute( upId, attributeType, values );
+        Attribute attribute = new DefaultEntryAttribute( upId, attributeType, values );
 
         return attributes.put( attributeType.getOid(), attribute );
     }
@@ -1916,13 +1916,13 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public List<EntryAttribute> remove( EntryAttribute... attributes ) throws LdapException
+    public List<Attribute> remove( Attribute... attributes ) throws LdapException
     {
-        List<EntryAttribute> removedAttributes = new ArrayList<EntryAttribute>();
+        List<Attribute> removedAttributes = new ArrayList<Attribute>();
 
         if ( schemaManager == null )
         {
-            for ( EntryAttribute attribute : attributes )
+            for ( Attribute attribute : attributes )
             {
                 if ( contains( attribute.getId() ) )
                 {
@@ -1933,7 +1933,7 @@ public final class DefaultEntry implemen
         }
         else
         {
-            for ( EntryAttribute attribute : attributes )
+            for ( Attribute attribute : attributes )
             {
                 AttributeType attributeType = attribute.getAttributeType();
 
@@ -1968,7 +1968,7 @@ public final class DefaultEntry implemen
 
         try
         {
-            EntryAttribute attribute = attributes.get( attributeType.getOid() );
+            Attribute attribute = attributes.get( attributeType.getOid() );
 
             if ( attribute == null )
             {
@@ -2011,7 +2011,7 @@ public final class DefaultEntry implemen
 
         try
         {
-            EntryAttribute attribute = attributes.get( attributeType.getOid() );
+            Attribute attribute = attributes.get( attributeType.getOid() );
 
             if ( attribute == null )
             {
@@ -2054,7 +2054,7 @@ public final class DefaultEntry implemen
 
         try
         {
-            EntryAttribute attribute = attributes.get( attributeType.getOid() );
+            Attribute attribute = attributes.get( attributeType.getOid() );
 
             if ( attribute == null )
             {
@@ -2100,14 +2100,14 @@ public final class DefaultEntry implemen
      * @param attributes the AttributeTypes to be removed
      * @return the removed attributes, if any, as a list; otherwise <code>null</code>
      */
-    public List<EntryAttribute> removeAttributes( AttributeType... attributes )
+    public List<Attribute> removeAttributes( AttributeType... attributes )
     {
         if ( ( attributes == null ) || ( attributes.length == 0 ) || ( schemaManager == null ) )
         {
             return null;
         }
 
-        List<EntryAttribute> removed = new ArrayList<EntryAttribute>( attributes.length );
+        List<Attribute> removed = new ArrayList<Attribute>( attributes.length );
 
         for ( AttributeType attributeType : attributes )
         {
@@ -2116,7 +2116,7 @@ public final class DefaultEntry implemen
                 continue;
             }
 
-            EntryAttribute attr = this.attributes.remove( attributeType.getOid() );
+            Attribute attr = this.attributes.remove( attributeType.getOid() );
 
             if ( attr != null )
             {
@@ -2138,20 +2138,20 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public List<EntryAttribute> removeAttributes( String... attributes )
+    public List<Attribute> removeAttributes( String... attributes )
     {
         if ( attributes.length == 0 )
         {
             return null;
         }
 
-        List<EntryAttribute> removed = new ArrayList<EntryAttribute>( attributes.length );
+        List<Attribute> removed = new ArrayList<Attribute>( attributes.length );
 
         if ( schemaManager == null )
         {
             for ( String attribute : attributes )
             {
-                EntryAttribute attr = get( attribute );
+                Attribute attr = get( attribute );
 
                 if ( attr != null )
                 {
@@ -2182,7 +2182,7 @@ public final class DefaultEntry implemen
                     continue;
                 }
 
-                EntryAttribute attr = this.attributes.remove( attributeType.getOid() );
+                Attribute attr = this.attributes.remove( attributeType.getOid() );
 
                 if ( attr != null )
                 {
@@ -2236,7 +2236,7 @@ public final class DefaultEntry implemen
         {
             String id = getId( upId );
 
-            EntryAttribute attribute = get( id );
+            Attribute attribute = get( id );
 
             if ( attribute == null )
             {
@@ -2316,7 +2316,7 @@ public final class DefaultEntry implemen
         {
             String id = getId( upId );
 
-            EntryAttribute attribute = get( id );
+            Attribute attribute = get( id );
 
             if ( attribute == null )
             {
@@ -2395,7 +2395,7 @@ public final class DefaultEntry implemen
         {
             String id = getId( upId );
 
-            EntryAttribute attribute = get( id );
+            Attribute attribute = get( id );
 
             if ( attribute == null )
             {
@@ -2481,7 +2481,7 @@ public final class DefaultEntry implemen
      *
      * @return an enumeration of all contained attributes
      */
-    public Iterator<EntryAttribute> iterator()
+    public Iterator<Attribute> iterator()
     {
         return Collections.unmodifiableMap( attributes ).values().iterator();
     }
@@ -2500,7 +2500,7 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public boolean isValid( EntryAttribute objectClass )
+    public boolean isValid( Attribute objectClass )
     {
         // @TODO Implement me !
         throw new NotImplementedException();
@@ -2566,7 +2566,7 @@ public final class DefaultEntry implemen
         out.writeInt( attributes.size() );
 
         // Iterate through the keys.
-        for ( EntryAttribute attribute : attributes.values() )
+        for ( Attribute attribute : attributes.values() )
         {
             // Store the attribute
             attribute.writeExternal( out );
@@ -2593,7 +2593,7 @@ public final class DefaultEntry implemen
         for ( int i = 0; i < nbAttributes; i++ )
         {
             // Read each attribute
-            EntryAttribute attribute = new DefaultEntryAttribute();
+            Attribute attribute = new DefaultEntryAttribute();
             attribute.readExternal( in );
 
             if ( schemaManager != null )
@@ -2662,7 +2662,7 @@ public final class DefaultEntry implemen
     /**
      * {@inheritDoc}
      */
-    public boolean hasObjectClass( EntryAttribute objectClass )
+    public boolean hasObjectClass( Attribute objectClass )
     {
         if ( objectClass == null )
         {
@@ -2675,7 +2675,7 @@ public final class DefaultEntry implemen
             return false;
         }
 
-        EntryAttribute attribute = attributes.get( objectClassAttributeType.getOid() );
+        Attribute attribute = attributes.get( objectClassAttributeType.getOid() );
 
         if ( attribute == null )
         {
@@ -2779,7 +2779,7 @@ public final class DefaultEntry implemen
             // First dump the ObjectClass attribute
             if ( containsAttribute( objectClassAttributeType.getOid() ) )
             {
-                EntryAttribute objectClass = get( objectClassAttributeType );
+                Attribute objectClass = get( objectClassAttributeType );
 
                 sb.append( objectClass );
             }
@@ -2788,7 +2788,7 @@ public final class DefaultEntry implemen
         {
             if ( containsAttribute( "objectClass" ) )
             {
-                EntryAttribute objectClass = get( "objectclass" );
+                Attribute objectClass = get( "objectclass" );
 
                 sb.append( objectClass );
             }
@@ -2796,7 +2796,7 @@ public final class DefaultEntry implemen
 
         if ( attributes.size() != 0 )
         {
-            for ( EntryAttribute attribute : attributes.values() )
+            for ( Attribute attribute : attributes.values() )
             {
                 String id = attribute.getId();
 

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=1087504&r1=1087503&r2=1087504&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 31 23:21:50 2011
@@ -46,7 +46,7 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DefaultEntryAttribute implements EntryAttribute
+public class DefaultEntryAttribute implements Attribute
 {
     /** logger for reporting errors that might not be handled properly upstream */
     private static final Logger LOG = LoggerFactory.getLogger( DefaultEntryAttribute.class );
@@ -122,8 +122,9 @@ public class DefaultEntryAttribute imple
     // an initial value as a string or a byte[]
     /**
      * Create a new instance of a EntryAttribute, without ID nor value.
+     * Used by the serializer
      */
-    public DefaultEntryAttribute()
+    /* No protection */ DefaultEntryAttribute()
     {
     }
 
@@ -400,7 +401,7 @@ public class DefaultEntryAttribute imple
      * @param attributeType The attribute's type 
      * @param attribute The attribute to be copied
      */
-    public DefaultEntryAttribute( AttributeType attributeType, EntryAttribute attribute ) throws LdapException
+    public DefaultEntryAttribute( AttributeType attributeType, Attribute attribute ) throws LdapException
     {
         // Copy the common values. isHR is only available on a ServerAttribute 
         this.attributeType = attributeType;
@@ -1798,12 +1799,12 @@ public class DefaultEntryAttribute imple
             return true;
         }
         
-        if ( ! (obj instanceof EntryAttribute ) )
+        if ( ! (obj instanceof Attribute ) )
         {
             return false;
         }
         
-        EntryAttribute other = (EntryAttribute)obj;
+        Attribute other = (Attribute)obj;
         
         if ( id == null )
         {
@@ -1864,7 +1865,7 @@ public class DefaultEntryAttribute imple
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute clone()
+    public Attribute clone()
     {
         try
         {

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=1087504&r1=1087503&r2=1087504&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 31 23:21:50 2011
@@ -43,7 +43,7 @@ public class DefaultModification impleme
     private ModificationOperation operation;
     
     /** The attribute which contains the modification */
-    private EntryAttribute attribute;
+    private Attribute attribute;
     
     /** The AtributeType */
     private AttributeType attributeType;
@@ -74,7 +74,7 @@ public class DefaultModification impleme
      * @param operation The modification operation
      * @param attribute The associated attribute 
      */
-    public DefaultModification( ModificationOperation operation, EntryAttribute attribute )
+    public DefaultModification( ModificationOperation operation, Attribute attribute )
     {
         this.operation = operation;
         this.attribute = attribute;
@@ -87,7 +87,7 @@ public class DefaultModification impleme
      * @param operation The modification operation
      * @param attribute The associated attribute 
      */
-    public DefaultModification( AttributeType attributeType, ModificationOperation operation, EntryAttribute attribute )
+    public DefaultModification( AttributeType attributeType, ModificationOperation operation, Attribute attribute )
     {
         this.attributeType = attributeType;
         this.operation = operation;
@@ -105,7 +105,7 @@ public class DefaultModification impleme
     {
         operation = modification.getOperation();
         
-        EntryAttribute modAttribute = modification.getAttribute();
+        Attribute modAttribute = modification.getAttribute();
         
         try
         {
@@ -158,7 +158,7 @@ public class DefaultModification impleme
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute getAttribute()
+    public Attribute getAttribute()
     {
         return attribute;
     }
@@ -169,7 +169,7 @@ public class DefaultModification impleme
      *
      * @param attribute The modified attribute 
      */
-    public void setAttribute( EntryAttribute attribute )
+    public void setAttribute( Attribute attribute )
     {
         this.attribute = attribute;
     }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/Entry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/Entry.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/Entry.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/Entry.java Thu Mar 31 23:21:50 2011
@@ -43,7 +43,7 @@ import org.apache.directory.shared.ldap.
  *</p>
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public interface Entry extends Cloneable, Iterable<EntryAttribute>, Externalizable
+public interface Entry extends Cloneable, Iterable<Attribute>, Externalizable
 {
     /**
      * Remove all the attributes for this entry. The Dn is not reset
@@ -82,7 +82,7 @@ public interface Entry extends Cloneable
      * @return <code>true</code> if the ObjectClass value is present 
      * in the ObjectClass attribute
      */
-    boolean hasObjectClass( EntryAttribute objectClass );
+    boolean hasObjectClass( Attribute objectClass );
 
     
     /**
@@ -98,7 +98,7 @@ public interface Entry extends Cloneable
      * @param alias an aliased name of the attribute identifier
      * @return the attribute associated with the alias
      */
-    EntryAttribute get( String alias );
+    Attribute get( String alias );
 
     
     /**
@@ -116,7 +116,7 @@ public interface Entry extends Cloneable
      * @param attributeType the AttributeType we are looking for
      * @return the associated attribute
      */
-    EntryAttribute get( AttributeType attributeType );
+    Attribute get( AttributeType attributeType );
 
 
     /**
@@ -140,7 +140,7 @@ public interface Entry extends Cloneable
      * @param upIds The user provided IDs of the AttributeTypes to add.
      * @return A list of replaced Attributes.
      */
-    List<EntryAttribute> set( String... upIds );
+    List<Attribute> set( String... upIds );
 
 
     /**
@@ -156,7 +156,7 @@ public interface Entry extends Cloneable
      * @param attributeTypes The AttributeTypes to add.
      * @return A list of replaced Attributes, of <code>null</code> if no attribute are removed.
      */
-    List<EntryAttribute> set( AttributeType... attributeTypes );
+    List<Attribute> set( AttributeType... attributeTypes );
 
 
     /**
@@ -200,7 +200,7 @@ public interface Entry extends Cloneable
      * @return true if the entry, it's attributes and their values are consistent
      * with the objectClass
      */
-    boolean isValid( EntryAttribute objectClass );
+    boolean isValid( Attribute objectClass );
 
 
     /**
@@ -210,7 +210,7 @@ public interface Entry extends Cloneable
      *
      * @return an enumeration of all contained attributes
      */
-    Iterator<EntryAttribute> iterator();
+    Iterator<Attribute> iterator();
 
 
     /**
@@ -219,7 +219,7 @@ public interface Entry extends Cloneable
      * @param attributes The attributes to add
      * @throws LdapException If we can't add any of the attributes
      */
-    void add( EntryAttribute... attributes ) throws LdapException;
+    void add( Attribute... attributes ) throws LdapException;
 
 
     /**
@@ -399,7 +399,7 @@ public interface Entry extends Cloneable
      *         <code>null</code>
      * @exception LdapException if the operation fails
      */
-    List<EntryAttribute> put( EntryAttribute... attributes ) throws LdapException;
+    List<Attribute> put( Attribute... attributes ) throws LdapException;
 
 
     /**
@@ -421,7 +421,7 @@ public interface Entry extends Cloneable
      * <code>null</code>
      * @throws org.apache.directory.shared.ldap.model.exception.LdapException if there are failures
      */
-    EntryAttribute put( AttributeType attributeType, byte[]... values ) throws LdapException;
+    Attribute put( AttributeType attributeType, byte[]... values ) throws LdapException;
 
 
     /**
@@ -443,7 +443,7 @@ public interface Entry extends Cloneable
      * <code>null</code>
      * @throws org.apache.directory.shared.ldap.model.exception.LdapException if there are failures
      */
-    EntryAttribute put( AttributeType attributeType, String... values ) throws LdapException;
+    Attribute put( AttributeType attributeType, String... values ) throws LdapException;
 
 
     /**
@@ -465,7 +465,7 @@ public interface Entry extends Cloneable
      * <code>null</code>
      * @throws LdapException if there are failures
      */
-    EntryAttribute put( AttributeType attributeType, Value<?>... values ) throws LdapException;
+    Attribute put( AttributeType attributeType, Value<?>... values ) throws LdapException;
 
 
     /**
@@ -490,7 +490,7 @@ public interface Entry extends Cloneable
      * <code>null</code>
      * @throws LdapException if there are failures.
      */
-    EntryAttribute put( String upId, AttributeType attributeType, byte[]... values ) throws LdapException;
+    Attribute put( String upId, AttributeType attributeType, byte[]... values ) throws LdapException;
 
 
     /**
@@ -516,7 +516,7 @@ public interface Entry extends Cloneable
      * <code>null</code>
      * @throws org.apache.directory.shared.ldap.model.exception.LdapException if there are failures.
      */
-    EntryAttribute put( String upId, AttributeType attributeType, String... values ) throws LdapException;
+    Attribute put( String upId, AttributeType attributeType, String... values ) throws LdapException;
 
 
     /**
@@ -542,7 +542,7 @@ public interface Entry extends Cloneable
      * <code>null</code>
      * @throws LdapException if there are failures.
      */
-    EntryAttribute put( String upId, AttributeType attributeType, Value<?>... values ) throws LdapException;
+    Attribute put( String upId, AttributeType attributeType, Value<?>... values ) throws LdapException;
 
 
     /**
@@ -558,7 +558,7 @@ public interface Entry extends Cloneable
      * @param values The list of binary values to put. It can be empty.
      * @return The replaced attribute
      */
-    EntryAttribute put( String upId, byte[]... values );
+    Attribute put( String upId, byte[]... values );
 
 
     /**
@@ -574,7 +574,7 @@ public interface Entry extends Cloneable
      * @param values The list of String values to put. It can be empty.
      * @return The replaced attribute
      */
-    EntryAttribute put( String upId, String... values );
+    Attribute put( String upId, String... values );
 
 
     /**
@@ -590,7 +590,7 @@ public interface Entry extends Cloneable
      * @param values The list of values to put. It can be empty.
      * @return The replaced attribute
      */
-    EntryAttribute put( String upId, Value<?>... values );
+    Attribute put( String upId, Value<?>... values );
 
 
     /**
@@ -673,7 +673,7 @@ public interface Entry extends Cloneable
      * @param attributes the attributes to be removed
      * @return the removed attribute, if exists; otherwise <code>null</code>
      */
-    List<EntryAttribute> remove( EntryAttribute... attributes ) throws LdapException;
+    List<Attribute> remove( Attribute... attributes ) throws LdapException;
     
 
     /**
@@ -691,7 +691,7 @@ public interface Entry extends Cloneable
      * @param attributes the AttributeTypes to be removed
      * @return the removed attributes, if any, as a list; otherwise <code>null</code>
      */
-    List<EntryAttribute> removeAttributes( AttributeType... attributes );
+    List<Attribute> removeAttributes( AttributeType... attributes );
 
 
     /**
@@ -782,7 +782,7 @@ public interface Entry extends Cloneable
       * @param attributes an aliased name of the attribute to be removed
       * @return the removed attributes, if any, as a list; otherwise <code>null</code>
       */
-    List<EntryAttribute> removeAttributes( String... attributes );
+    List<Attribute> removeAttributes( String... attributes );
 
 
     // -----------------------------------------------------------------------
@@ -854,7 +854,7 @@ public interface Entry extends Cloneable
      * the entry, <code>false</code> if at least one of them is not present.
      * @throws LdapException If the attribute does not exist
      */
-    boolean contains( EntryAttribute... attributes ) throws LdapException;
+    boolean contains( Attribute... attributes ) throws LdapException;
 
 
     /**

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/ImmutableEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/ImmutableEntry.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/ImmutableEntry.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/entry/ImmutableEntry.java Thu Mar 31 23:21:50 2011
@@ -128,7 +128,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public void add( EntryAttribute... attributes ) throws LdapException
+    public void add( Attribute... attributes ) throws LdapException
     { 
         new Exception().printStackTrace();
         throw new NotImplementedException( "Cannot add an attribute : the entry " + entry.getDn() + " is immutable." );
@@ -179,7 +179,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public boolean contains( EntryAttribute... attributes ) throws LdapException
+    public boolean contains( Attribute... attributes ) throws LdapException
     {
         return entry.contains( attributes );
     }
@@ -269,7 +269,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute get( String alias )
+    public Attribute get( String alias )
     {
         return entry.get( alias );
     }
@@ -278,7 +278,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute get( AttributeType attributeType )
+    public Attribute get( AttributeType attributeType )
     {
         return entry.get( attributeType );
     }
@@ -296,7 +296,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute put( String upId, byte[]... values )
+    public Attribute put( String upId, byte[]... values )
     {
         new Exception().printStackTrace();
         throw new NotImplementedException( "Cannot put a value : the entry " + entry.getDn() + " is immutable." );
@@ -306,7 +306,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute put( String upId, String... values )
+    public Attribute put( String upId, String... values )
     {
         new Exception().printStackTrace();
         throw new NotImplementedException( "Cannot put a value : the entry " + entry.getDn() + " is immutable." );
@@ -316,7 +316,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute put( String upId, Value<?>... values )
+    public Attribute put( String upId, Value<?>... values )
     {
         new Exception().printStackTrace();
         throw new NotImplementedException( "Cannot put a value : the entry " + entry.getDn() + " is immutable." );
@@ -326,7 +326,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public List<EntryAttribute> set( String... upIds )
+    public List<Attribute> set( String... upIds )
     {
         new Exception().printStackTrace();
         throw new NotImplementedException( "Cannot set a value : the entry " + entry.getDn() + " is immutable." );
@@ -336,7 +336,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}     
      **/
-    public List<EntryAttribute> set( AttributeType... attributeTypes )
+    public List<Attribute> set( AttributeType... attributeTypes )
     {
         new Exception().printStackTrace();
         throw new NotImplementedException( "Cannot set a value : the entry " + entry.getDn() + " is immutable." );
@@ -346,7 +346,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public List<EntryAttribute> put( EntryAttribute... attributes ) throws LdapException
+    public List<Attribute> put( Attribute... attributes ) throws LdapException
     {
         new Exception().printStackTrace();
         throw new NotImplementedException( "Cannot put a value : the entry " + entry.getDn() + " is immutable." );
@@ -356,7 +356,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute put( AttributeType attributeType, byte[]... values ) throws LdapException
+    public Attribute put( AttributeType attributeType, byte[]... values ) throws LdapException
     {
         new Exception().printStackTrace();
         throw new NotImplementedException( "Cannot put a value : the entry " + entry.getDn() + " is immutable." );
@@ -366,7 +366,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute put( AttributeType attributeType, String... values ) throws LdapException
+    public Attribute put( AttributeType attributeType, String... values ) throws LdapException
     {
         new Exception().printStackTrace();
         throw new NotImplementedException( "Cannot put a value : the entry " + entry.getDn() + " is immutable." );
@@ -376,7 +376,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute put( AttributeType attributeType, Value<?>... values ) throws LdapException
+    public Attribute put( AttributeType attributeType, Value<?>... values ) throws LdapException
     {
         new Exception().printStackTrace();
         throw new NotImplementedException( "Cannot put a value : the entry " + entry.getDn() + " is immutable." );
@@ -386,7 +386,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute put( String upId, AttributeType attributeType, byte[]... values ) throws LdapException
+    public Attribute put( String upId, AttributeType attributeType, byte[]... values ) throws LdapException
     {
         new Exception().printStackTrace();
         throw new NotImplementedException( "Cannot put a value : the entry " + entry.getDn() + " is immutable." );
@@ -396,7 +396,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute put( String upId, AttributeType attributeType, String... values ) throws LdapException
+    public Attribute put( String upId, AttributeType attributeType, String... values ) throws LdapException
     {
         new Exception().printStackTrace();
         throw new NotImplementedException( "Cannot put a value : the entry " + entry.getDn() + " is immutable." );
@@ -406,7 +406,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public EntryAttribute put( String upId, AttributeType attributeType, Value<?>... values ) throws LdapException
+    public Attribute put( String upId, AttributeType attributeType, Value<?>... values ) throws LdapException
     {
         new Exception().printStackTrace();
         throw new NotImplementedException( "Cannot put a value : the entry " + entry.getDn() + " is immutable." );
@@ -416,7 +416,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public List<EntryAttribute> remove( EntryAttribute... attributes ) throws LdapException
+    public List<Attribute> remove( Attribute... attributes ) throws LdapException
     {
         new Exception().printStackTrace();
         throw new NotImplementedException( "Cannot remove a value : the entry " + entry.getDn() + " is immutable." );
@@ -468,7 +468,7 @@ public class ImmutableEntry implements E
      * @param attributes the AttributeTypes to be removed
      * @return the removed attributes, if any, as a list; otherwise <code>null</code>
      */
-    public List<EntryAttribute> removeAttributes( AttributeType... attributes )
+    public List<Attribute> removeAttributes( AttributeType... attributes )
     {
         new Exception().printStackTrace();
         throw new NotImplementedException( "Cannot remove a value : the entry " + entry.getDn() + " is immutable." );
@@ -478,7 +478,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public List<EntryAttribute> removeAttributes( String... attributes )
+    public List<Attribute> removeAttributes( String... attributes )
     {
         new Exception().printStackTrace();
         throw new NotImplementedException( "Cannot remove a value : the entry " + entry.getDn() + " is immutable." );
@@ -609,7 +609,7 @@ public class ImmutableEntry implements E
      *
      * @return an enumeration of all contained attributes
      */
-    public Iterator<EntryAttribute> iterator()
+    public Iterator<Attribute> iterator()
     {
         return entry.iterator();
     }
@@ -628,7 +628,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public boolean isValid( EntryAttribute objectClass )
+    public boolean isValid( Attribute objectClass )
     {
         new Exception().printStackTrace();
         throw new NotImplementedException();
@@ -751,7 +751,7 @@ public class ImmutableEntry implements E
     /**
      * {@inheritDoc}
      */
-    public boolean hasObjectClass( EntryAttribute objectClass )
+    public boolean hasObjectClass( Attribute objectClass )
     {
         return entry.hasObjectClass( objectClass );
     }

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=1087504&r1=1087503&r2=1087504&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 31 23:21:50 2011
@@ -57,7 +57,7 @@ public interface Modification extends Cl
     /**
      * @return the attribute containing the modifications
      */
-    EntryAttribute getAttribute();
+    Attribute getAttribute();
 
 
     /**
@@ -65,7 +65,7 @@ public interface Modification extends Cl
      *
      * @param attribute The modified attribute
      */
-    void setAttribute( EntryAttribute attribute );
+    void setAttribute( Attribute attribute );
     
     
     /**

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifAttributesReader.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifAttributesReader.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifAttributesReader.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifAttributesReader.java Thu Mar 31 23:21:50 2011
@@ -25,14 +25,13 @@ import java.io.IOException;
 import java.io.StringReader;
 import java.util.ArrayList;
 
-import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.BasicAttributes;
 
 import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 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.exception.LdapException;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
@@ -189,7 +188,7 @@ public class LdifAttributesReader extend
         Object attributeValue = parseValue( line, colonIndex );
 
         // Update the entry
-        Attribute attribute = attributes.get( attributeType );
+        javax.naming.directory.Attribute attribute = attributes.get( attributeType );
 
         if ( attribute == null )
         {
@@ -240,7 +239,7 @@ public class LdifAttributesReader extend
         Object attributeValue = parseValue( line, colonIndex );
 
         // Update the entry
-        EntryAttribute attribute = null;
+        Attribute attribute = null;
 
         if ( schemaManager == null )
         {

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifEntry.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifEntry.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifEntry.java Thu Mar 31 23:21:50 2011
@@ -35,7 +35,7 @@ import org.apache.directory.shared.ldap.
 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.Attribute;
 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.StringValue;
@@ -359,7 +359,7 @@ public class LdifEntry implements Clonea
      * 
      * @param attr The attribute to be added
      */
-    public void addModificationItem( ModificationOperation modOp, EntryAttribute attr )
+    public void addModificationItem( ModificationOperation modOp, Attribute attr )
     {
         if ( changeType == ChangeType.Modify )
         {
@@ -387,7 +387,7 @@ public class LdifEntry implements Clonea
     {
         if ( changeType == ChangeType.Modify )
         {
-            EntryAttribute attr;
+            Attribute attr;
 
             if ( value == null )
             {
@@ -396,7 +396,7 @@ public class LdifEntry implements Clonea
             }
             else
             {
-                attr = ( EntryAttribute ) value;
+                attr = ( Attribute ) value;
             }
 
             Modification item = new DefaultModification( modOp, attr );
@@ -412,7 +412,7 @@ public class LdifEntry implements Clonea
      * @param attr The attribute to be added
      * @throws org.apache.directory.shared.ldap.model.exception.LdapException if something went wrong
      */
-    public void addAttribute( EntryAttribute attr ) throws LdapException
+    public void addAttribute( Attribute attr ) throws LdapException
     {
         entry.put( attr );
     }
@@ -455,7 +455,7 @@ public class LdifEntry implements Clonea
      * @param ids The Attributes to remove
      * @return The list of removed EntryAttributes
      */
-    public List<EntryAttribute> removeAttribute( String... ids )
+    public List<Attribute> removeAttribute( String... ids )
     {
         if ( entry.containsAttribute( ids ) )
         {
@@ -553,7 +553,7 @@ public class LdifEntry implements Clonea
      *            The attribute Id
      * @return The attribute if it exists
      */
-    public EntryAttribute get( String attributeId )
+    public Attribute get( String attributeId )
     {
         if ( "dn".equalsIgnoreCase( attributeId ) )
         {

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifReader.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifReader.java?rev=1087504&r1=1087503&r2=1087504&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifReader.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifReader.java Thu Mar 31 23:21:50 2011
@@ -44,7 +44,7 @@ import java.util.NoSuchElementException;
 import org.apache.directory.shared.asn1.util.Oid;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntryAttribute;
-import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidAttributeValueException;
@@ -857,7 +857,7 @@ public class LdifReader implements Itera
      * @param line The line to parse
      * @return the parsed Attribute
      */
-    public static EntryAttribute parseAttributeValue( String line )
+    public static Attribute parseAttributeValue( String line )
     {
         int colonIndex = line.indexOf( ':' );
 
@@ -1002,7 +1002,7 @@ public class LdifReader implements Itera
         int state = MOD_SPEC;
         String modified = null;
         ModificationOperation modificationType = ModificationOperation.ADD_ATTRIBUTE;
-        EntryAttribute attribute = null;
+        Attribute attribute = null;
 
         // The following flag is used to deal with empty modifications
         boolean isEmptyValue = true;



Mime
View raw message