directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r627498 - in /directory: apacheds/branches/bigbang/ apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ apacheds/bran...
Date Wed, 13 Feb 2008 15:59:03 GMT
Author: elecharny
Date: Wed Feb 13 07:58:58 2008
New Revision: 627498

URL: http://svn.apache.org/viewvc?rev=627498&view=rev
Log:
Removed some references to Attributes in ServerContext and other classes. Bumped up to MINA
1.1.6. Fixed some wrong Manifest

Modified:
    directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
    directory/apacheds/branches/bigbang/mina-xbean-spring/pom.xml
    directory/apacheds/branches/bigbang/pom.xml
    directory/apacheds/branches/bigbang/protocol-dns/pom.xml
    directory/apacheds/branches/bigbang/server-tools/src/main/manifest/MANIFEST.MF
    directory/installers/branches/bigbang/pom.xml
    directory/shared/branches/bigbang/pom.xml

Modified: directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java?rev=627498&r1=627497&r2=627498&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java
(original)
+++ directory/apacheds/branches/bigbang/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerEntryUtils.java
Wed Feb 13 07:58:58 2008
@@ -29,6 +29,7 @@
 import javax.naming.directory.BasicAttribute;
 import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.InvalidAttributeIdentifierException;
+import javax.naming.directory.ModificationItem;
 
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.Registries;
@@ -437,6 +438,28 @@
     }
     
     
+    public static List<Modification> toServerModification( ModificationItem[] modifications,
AttributeTypeRegistry atRegistry )
+    throws NamingException
+    {
+	    if ( modifications != null )
+	    {
+	        List<Modification> modificationsList = new ArrayList<Modification>();
+	
+	        for ( ModificationItem modification: modifications )
+	        {
+	            AttributeType attributeType = atRegistry.lookup( modification.getAttribute().getID()
);
+	            modificationsList.add( toModification( (ModificationItemImpl)modification, attributeType
) );
+	        }
+	    
+	        return modificationsList;
+	    }
+	    else
+	    {
+	        return null;
+	    }
+	}
+
+
     /**
      * Utility method to extract a modification item from an array of modifications.
      * 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java?rev=627498&r1=627497&r2=627498&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java
Wed Feb 13 07:58:58 2008
@@ -20,8 +20,12 @@
 package org.apache.directory.server.core.jndi;
 
 
+import org.apache.directory.server.core.entry.DefaultServerAttribute;
+import org.apache.directory.server.core.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.schema.AttributeType;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -31,7 +35,6 @@
 
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
-import javax.naming.directory.Attribute;
 
 
 /**
@@ -77,14 +80,14 @@
      * @return the deserialized object
      * @throws NamingException if the object cannot be serialized
      */
-    static Object deserialize( Attributes attributes ) throws NamingException
+    static Object deserialize( ServerEntry serverEntry ) throws NamingException
     {
         ObjectInputStream in = null;
-        String className = ( String ) attributes.get( JCLASSNAME_ATTR ).get();
+        String className = ( String ) serverEntry.get( JCLASSNAME_ATTR ).getString();
 
         try
         {
-            byte[] data = ( byte[] ) attributes.get( JSERIALDATA_ATTR ).get();
+            byte[] data = ( byte[] ) serverEntry.get( JSERIALDATA_ATTR ).getBytes();
             in = new ObjectInputStream( new ByteArrayInputStream( data ) );
             return in.readObject();
         }
@@ -162,7 +165,7 @@
      * @param obj the object to serialize
      * @throws NamingException if the object cannot be serialized
      */
-    static void serialize( Attributes entry, Object obj ) throws NamingException
+    static void serialize( ServerEntry entry, Object obj, Registries registries ) throws
NamingException
     {
         /* Let's add the object classes first:
          * objectClass: top
@@ -170,12 +173,11 @@
          * objectClass: javaContainer
          * objectClass: javaSerializedObject
          */
-        Attribute objectClass = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
-        objectClass.add( SchemaConstants.TOP_OC );
-        objectClass.add( JOBJECT_ATTR );
-        objectClass.add( JCONTAINER_ATTR );
-        objectClass.add( JSERIALIZEDOBJ_ATTR );
-        entry.put( objectClass );
+        entry.put( SchemaConstants.OBJECT_CLASS_AT,
+        		SchemaConstants.TOP_OC,
+        		JOBJECT_ATTR,
+        		JCONTAINER_ATTR,
+        		JSERIALIZEDOBJ_ATTR );
 
         // Add the javaClassName and javaSerializedData attributes
         entry.put( JCLASSNAME_ATTR, obj.getClass().getName() );
@@ -183,7 +185,8 @@
 
         // Add all the class names this object can be cast to:
         Class<?>[] classes = obj.getClass().getClasses();
-        Attribute javaClassNames = new AttributeImpl( JCLASSNAMES_ATTR );
+        AttributeType attributeType = registries.getAttributeTypeRegistry().lookup( JCLASSNAMES_ATTR
);
+        ServerAttribute javaClassNames = new DefaultServerAttribute( attributeType, JCLASSNAMES_ATTR
);
 
         for ( int ii = 0; ii < classes.length; ii++ )
         {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?rev=627498&r1=627497&r2=627498&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
Wed Feb 13 07:58:58 2008
@@ -23,6 +23,8 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.authn.AuthenticationInterceptor;
 import org.apache.directory.server.core.authn.LdapPrincipal;
+import org.apache.directory.server.core.entry.DefaultServerEntry;
+import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.entry.ServerEntryUtils;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
@@ -48,9 +50,6 @@
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.PresenceNode;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
-import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -67,7 +66,6 @@
 import javax.naming.NamingException;
 import javax.naming.Reference;
 import javax.naming.Referenceable;
-import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.SearchControls;
@@ -80,7 +78,6 @@
 import java.io.Serializable;
 import java.util.HashSet;
 import java.util.Hashtable;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
@@ -210,7 +207,7 @@
     
     /**
      * Used to encapsulate [de]marshalling of controls before and after add operations.
-     * @param attributes
+     * @param entry
      * @param target
      */
     protected void doAddOperation( LdapDN target, ServerEntry entry ) throws NamingException
@@ -312,7 +309,7 @@
     /**
      * Used to encapsulate [de]marshalling of controls before and after lookup operations.
      */
-    protected Attributes doLookupOperation( LdapDN target ) throws NamingException
+    protected ServerEntry doLookupOperation( LdapDN target ) throws NamingException
     {
         // setup the op context and populate with request controls
         LookupOperationContext opCtx;
@@ -325,14 +322,14 @@
         // clear the request controls and set the response controls 
         requestControls = EMPTY_CONTROLS;
         responseControls = opCtx.getResponseControls();
-        return ServerEntryUtils.toAttributesImpl( serverEntry );
+        return serverEntry;
     }
     
     
     /**
      * Used to encapsulate [de]marshalling of controls before and after lookup operations.
      */
-    protected Attributes doLookupOperation( LdapDN target, String[] attrIds ) throws NamingException
+    protected ServerEntry doLookupOperation( LdapDN target, String[] attrIds ) throws NamingException
     {
         // setup the op context and populate with request controls
         LookupOperationContext opCtx;
@@ -346,20 +343,17 @@
         requestControls = EMPTY_CONTROLS;
         responseControls = opCtx.getResponseControls();
         
-        
-        Attributes result = ServerEntryUtils.toAttributesImpl( serverEntry );
-
         // Now remove the ObjectClass attribute if it has not been requested
         if ( ( opCtx.getAttrsId() != null ) && ( opCtx.getAttrsId().size() != 0 )
)
         {
             if ( ( serverEntry.get( SchemaConstants.OBJECT_CLASS_AT ) != null ) &&

                  (serverEntry.get( SchemaConstants.OBJECT_CLASS_AT ).size() == 0 ) )
             {
-                result.remove( SchemaConstants.OBJECT_CLASS_AT );
+            	serverEntry.remove( SchemaConstants.OBJECT_CLASS_AT );
             }
         }
         
-        return result;
+        return serverEntry;
     }
     
     
@@ -409,11 +403,10 @@
     /**
      * Used to encapsulate [de]marshalling of controls before and after modify operations.
      */
-    protected void doModifyOperation( LdapDN dn, List<ModificationItemImpl> modItems
) throws NamingException
+    protected void doModifyOperation( LdapDN dn, List<Modification> modifications )
throws NamingException
     {
         // setup the op context and populate with request controls
-        List<Modification> newMods = ServerEntryUtils.toServerModification( modItems,
registries.getAttributeTypeRegistry() );
-        ModifyOperationContext opCtx = new ModifyOperationContext( registries, dn, newMods
);
+        ModifyOperationContext opCtx = new ModifyOperationContext( registries, dn, modifications
);
         opCtx.addRequestControls( requestControls );
         
         // execute modify operation
@@ -606,13 +599,9 @@
      */
     public Context createSubcontext( Name name ) throws NamingException
     {
-        Attributes attributes = new AttributesImpl();
         LdapDN target = buildTarget( name );
-        
-        Attribute attribute = new AttributeImpl( SchemaConstants.OBJECT_CLASS_AT );
-        attribute.add( SchemaConstants.TOP_OC );
-        attribute.add( JavaLdapSupport.JCONTAINER_ATTR );
-        attributes.put( attribute );
+        ServerEntry serverEntry = new DefaultServerEntry( registries, target );
+        serverEntry.add( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC, JavaLdapSupport.JCONTAINER_ATTR
);
         
         // Now add the CN attribute, which is mandatory
         Rdn rdn = target.getRdn();
@@ -621,7 +610,7 @@
         {
             if ( SchemaConstants.CN_AT.equals( rdn.getNormType() )  )
             {
-                attributes.put( rdn.getUpType(), rdn.getUpValue() );
+                serverEntry.put( rdn.getUpType(), (String)rdn.getUpValue() );
             }
             else
             {
@@ -639,12 +628,12 @@
 
         /*
          * Add the new context to the server which as a side effect adds 
-         * operational attributes to the attributes refering instance which
+         * operational attributes to the serverEntry refering instance which
          * can them be used to initialize a new ServerLdapContext.  Remember
          * we need to copy over the controls as well to propagate the complete 
-         * environment besides whats in the hashtable for env.
+         * environment besides what's in the hashtable for env.
          */
-        doAddOperation( target, ServerEntryUtils.toServerEntry( attributes, target, registries
) );
+        doAddOperation( target, serverEntry );
         return new ServerLdapContext( service, principal, target );
     }
 
@@ -683,20 +672,20 @@
     }
 
     
-    private void injectRdnAttributeValues( LdapDN target, Attributes attributes )
+    private void injectRdnAttributeValues( LdapDN target, ServerEntry serverEntry ) throws
NamingException
     {
         // Add all the RDN attributes and their values to this entry
         Rdn rdn = target.getRdn( target.size() - 1 );
+        
         if ( rdn.size() == 1 )
         {
-            attributes.put( rdn.getUpType(), rdn.getValue() );
+            serverEntry.put( rdn.getUpType(), (String)rdn.getValue() );
         }
         else
         {
-            for ( Iterator<AttributeTypeAndValue> ii = rdn.iterator(); ii.hasNext();
/**/ )
-            {
-                AttributeTypeAndValue atav = ( AttributeTypeAndValue ) ii.next();
-                attributes.put( atav.getUpType(), atav.getNormValue() );
+        	for ( AttributeTypeAndValue atav:rdn )
+        	{
+                serverEntry.put( atav.getUpType(), (String)atav.getNormValue() );
             }
         }
     }
@@ -710,13 +699,14 @@
         // First, use state factories to do a transformation
         DirStateFactory.Result res = DirectoryManager.getStateToBind( obj, name, this, env,
null );
 
+        LdapDN target = buildTarget( name );
+        
         // let's be sure that the Attributes is case insensitive
-        Attributes outAttrs = AttributeUtils.toCaseInsensitive( res.getAttributes() );
+        ServerEntry outServerEntry = ServerEntryUtils.toServerEntry( AttributeUtils.toCaseInsensitive(
res.getAttributes() ), dn, registries );
 
-        if ( outAttrs != null )
+        if ( outServerEntry != null )
         {
-            LdapDN target = buildTarget( name );
-            doAddOperation( target, ServerEntryUtils.toServerEntry( outAttrs, target, registries
) );
+            doAddOperation( target, outServerEntry );
             return;
         }
 
@@ -724,9 +714,12 @@
         {
 			Attributes attributes = (Attributes)obj;
 			
-			LdapDN target = buildTarget( name );
             doAddOperation( target, ServerEntryUtils.toServerEntry( attributes, target, registries
) );
 		}
+        else if ( obj instanceof ServerEntry ) 
+        {
+            doAddOperation( target, (ServerEntry)obj );
+		}
         // Check for Referenceable
         else if ( obj instanceof Referenceable )
         {
@@ -741,43 +734,38 @@
         else if ( obj instanceof Serializable )
         {
             // Serialize and add outAttrs
-            Attributes attributes = new AttributesImpl();
+            ServerEntry serverEntry = new DefaultServerEntry( registries, target );
             
-            if ( outAttrs != null && outAttrs.size() > 0 )
+            if ( ( outServerEntry != null ) && ( outServerEntry.size() > 0 ) )
             {
-                NamingEnumeration<? extends Attribute> list = outAttrs.getAll();
-                
-                while ( list.hasMore() )
-                {
-                    attributes.put( list.next() );
-                }
+            	for ( ServerAttribute serverAttribute:outServerEntry )
+            	{
+            		serverEntry.put( serverAttribute );
+            	}
             }
 
             // Get target and inject all rdn attributes into entry
-            LdapDN target = buildTarget( name );
-            injectRdnAttributeValues( target, attributes );
+            injectRdnAttributeValues( target, serverEntry );
 
             // Serialize object into entry attributes and add it.
-            JavaLdapSupport.serialize( attributes, obj );
-            doAddOperation( target, ServerEntryUtils.toServerEntry( attributes, target, registries
) );
+            JavaLdapSupport.serialize( serverEntry, obj, registries );
+            doAddOperation( target, serverEntry );
         }
         else if ( obj instanceof DirContext )
         {
             // Grab attributes and merge with outAttrs
-            Attributes attributes = ( ( DirContext ) obj ).getAttributes( "" );
-            if ( outAttrs != null && outAttrs.size() > 0 )
+            ServerEntry serverEntry = ServerEntryUtils.toServerEntry( ((DirContext)obj).getAttributes(
"" ), target, registries );
+            
+            if ( ( outServerEntry != null ) && ( outServerEntry.size() > 0 ) )
             {
-                NamingEnumeration<? extends Attribute> list = outAttrs.getAll();
-                
-                while ( list.hasMore() )
-                {
-                    attributes.put( list.next() );
-                }
+            	for ( ServerAttribute serverAttribute:outServerEntry )
+            	{
+            		serverEntry.put( serverAttribute );
+            	}
             }
 
-            LdapDN target = buildTarget( name );
-            injectRdnAttributeValues( target, attributes );
-            doAddOperation( target, ServerEntryUtils.toServerEntry( attributes, target, registries
) );
+            injectRdnAttributeValues( target, serverEntry );
+            doAddOperation( target, serverEntry );
         }
         else
         {
@@ -926,20 +914,20 @@
         Object obj;
         LdapDN target = buildTarget( name );
         
-        Attributes attributes;
+        ServerEntry serverEntry;
         
         if ( name.size() == 0 )
         {
-            attributes = ServerEntryUtils.toAttributesImpl( doGetRootDSEOperation( target
) );
+            serverEntry = doGetRootDSEOperation( target );
         }
         else
         {
-            attributes = doLookupOperation( target );
+            serverEntry = doLookupOperation( target );
         }
 
         try
         {
-            obj = DirectoryManager.getObjectInstance( null, name, this, env, attributes );
+            obj = DirectoryManager.getObjectInstance( null, name, this, env, ServerEntryUtils.toAttributesImpl(
serverEntry ) );
         }
         catch ( Exception e )
         {
@@ -956,10 +944,10 @@
         }
 
         // First lets test and see if the entry is a serialized java object
-        if ( attributes.get( JavaLdapSupport.JCLASSNAME_ATTR ) != null )
+        if ( serverEntry.get( JavaLdapSupport.JCLASSNAME_ATTR ) != null )
         {
             // Give back serialized object and not a context
-            return JavaLdapSupport.deserialize( attributes );
+            return JavaLdapSupport.deserialize( serverEntry );
         }
 
         // Initialize and return a context since the entry is not a java object

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java?rev=627498&r1=627497&r2=627498&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
Wed Feb 13 07:58:58 2008
@@ -22,10 +22,13 @@
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.authn.LdapPrincipal;
+import org.apache.directory.server.core.entry.ServerAttribute;
+import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.entry.ServerEntryUtils;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.filter.AndNode;
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.EqualityNode;
@@ -122,7 +125,7 @@
      */
     public Attributes getAttributes( Name name ) throws NamingException
     {
-        return doLookupOperation( buildTarget( name ) );
+        return ServerEntryUtils.toAttributesImpl( doLookupOperation( buildTarget( name )
) );
     }
 
 
@@ -142,7 +145,7 @@
      */
     public Attributes getAttributes( Name name, String[] attrIds ) throws NamingException
     {
-        return doLookupOperation( buildTarget( name ), attrIds );
+        return ServerEntryUtils.toAttributesImpl( doLookupOperation( buildTarget( name ),
attrIds ) );
     }
 
 
@@ -174,13 +177,15 @@
             }
         }
 
+        List<Modification> newMods = ServerEntryUtils.toServerModification( modItems,
registries.getAttributeTypeRegistry() );
+
     	if ( name instanceof LdapDN )
     	{
-            doModifyOperation( buildTarget( name ), modItems );
+            doModifyOperation( buildTarget( name ), newMods );
     	}
     	else
     	{
-            doModifyOperation( buildTarget( new LdapDN( name ) ), modItems );
+            doModifyOperation( buildTarget( new LdapDN( name ) ), newMods );
     	}
     }
 
@@ -217,13 +222,7 @@
      */
     public void modifyAttributes( Name name, ModificationItem[] mods ) throws NamingException
     {
-        List<ModificationItemImpl> newMods = new ArrayList<ModificationItemImpl>(
mods.length );
-        
-        for ( ModificationItem mod:mods )
-        {
-            newMods.add( new ModificationItemImpl( mod ) );
-        }
-        
+        List<Modification> newMods = ServerEntryUtils.toServerModification( mods, registries.getAttributeTypeRegistry()
);
         doModifyOperation( buildTarget( new LdapDN( name ) ), newMods );
     }
 
@@ -234,7 +233,8 @@
      */
     public void modifyAttributes( Name name, List<ModificationItemImpl> mods ) throws
NamingException
     {
-        doModifyOperation( buildTarget( new LdapDN( name ) ), mods );
+        List<Modification> newMods = ServerEntryUtils.toServerModification( mods, registries.getAttributeTypeRegistry()
);
+        doModifyOperation( buildTarget( new LdapDN( name ) ), newMods );
     }
 
 
@@ -267,35 +267,35 @@
             return;
         }
 
-        attrs = AttributeUtils.toCaseInsensitive( attrs );
+        LdapDN target = buildTarget( name );
+
+        ServerEntry serverEntry = ServerEntryUtils.toServerEntry( AttributeUtils.toCaseInsensitive(
attrs ), target, registries );
         
         // No object binding so we just add the attributes
         if ( null == obj )
         {
-            Attributes clone = ( Attributes ) attrs.clone();
-            LdapDN target = buildTarget( name );
-            doAddOperation( target, ServerEntryUtils.toServerEntry( clone, target, registries
) );
+        	ServerEntry clone = ( ServerEntry ) serverEntry.clone();
+            doAddOperation( target, clone );
             return;
         }
 
         // First, use state factories to do a transformation
         DirStateFactory.Result res = DirectoryManager.getStateToBind( obj, name, this, getEnvironment(),
attrs );
-        Attributes outAttrs = res.getAttributes();
+        ServerEntry outServerEntry = ServerEntryUtils.toServerEntry( res.getAttributes(),
target, registries );
 
-        if ( outAttrs != attrs )
+        if ( outServerEntry != serverEntry )
         {
-            LdapDN target = buildTarget( name );
-            Attributes attributes = ( Attributes ) attrs.clone();
-            if ( outAttrs != null && outAttrs.size() > 0 )
+        	ServerEntry clone = ( ServerEntry ) serverEntry.clone();
+
+        	if ( ( outServerEntry != null ) && ( outServerEntry.size() > 0 ) )
             {
-                NamingEnumeration<? extends Attribute> list = outAttrs.getAll();
-                while ( list.hasMore() )
-                {
-                    attributes.put( ( Attribute ) list.next() );
-                }
+        		for ( ServerAttribute attribute:outServerEntry )
+        		{
+        			clone.put( attribute );
+        		}
             }
 
-            doAddOperation( target, ServerEntryUtils.toServerEntry( attributes, target, registries
) );
+            doAddOperation( target, clone );
             return;
         }
 
@@ -314,38 +314,34 @@
         else if ( obj instanceof Serializable )
         {
             // Serialize and add outAttrs
-            Attributes attributes = ( Attributes ) attrs.clone();
-            if ( outAttrs != null && outAttrs.size() > 0 )
+            ServerEntry clone = ( ServerEntry ) serverEntry.clone();
+            
+            if ( outServerEntry != null && outServerEntry.size() > 0 )
             {
-                NamingEnumeration<? extends Attribute> list = outAttrs.getAll();
-                
-                while ( list.hasMore() )
-                {
-                    attributes.put( ( Attribute ) list.next() );
-                }
+        		for ( ServerAttribute attribute:outServerEntry )
+        		{
+        			clone.put( attribute );
+        		}
             }
-            LdapDN target = buildTarget( name );
-
+            
             // Serialize object into entry attributes and add it.
-            JavaLdapSupport.serialize( attributes, obj );
-            doAddOperation( target, ServerEntryUtils.toServerEntry( attributes, target, registries
) );
+            JavaLdapSupport.serialize( serverEntry, obj, registries );
+            doAddOperation( target, clone );
         }
         else if ( obj instanceof DirContext )
         {
             // Grab attributes and merge with outAttrs
-            Attributes attributes = ( ( DirContext ) obj ).getAttributes( "" );
-            if ( outAttrs != null && outAttrs.size() > 0 )
+            ServerEntry entry = ServerEntryUtils.toServerEntry( ( ( DirContext ) obj ).getAttributes(
"" ), target, registries );
+            
+            if ( ( outServerEntry != null ) && ( outServerEntry.size() > 0 ) )
             {
-                NamingEnumeration<? extends Attribute> list = outAttrs.getAll();
-                
-                while ( list.hasMore() )
-                {
-                    attributes.put( ( Attribute ) list.next() );
-                }
+        		for ( ServerAttribute attribute:outServerEntry )
+        		{
+        			entry.put( attribute );
+        		}
             }
             
-            LdapDN target = buildTarget( name );
-            doAddOperation( target, ServerEntryUtils.toServerEntry( attributes, target, registries
) );
+            doAddOperation( target, entry );
         }
         else
         {

Modified: directory/apacheds/branches/bigbang/mina-xbean-spring/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mina-xbean-spring/pom.xml?rev=627498&r1=627497&r2=627498&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mina-xbean-spring/pom.xml (original)
+++ directory/apacheds/branches/bigbang/mina-xbean-spring/pom.xml Wed Feb 13 07:58:58 2008
@@ -14,14 +14,14 @@
       <dependency>
         <groupId>org.apache.mina</groupId>
         <artifactId>mina-core</artifactId>
-        <version>1.1.4-SNAPSHOT</version>
+        <version>1.1.6</version>
         <classifier>sources</classifier>
       </dependency>
 
       <dependency>
         <groupId>org.apache.mina</groupId>
         <artifactId>mina-filter-ssl</artifactId>
-        <version>1.1.4-SNAPSHOT</version>
+        <version>1.1.6</version>
         <classifier>sources</classifier>
       </dependency>
   </dependencies>
@@ -72,4 +72,4 @@
       </plugin>
     </plugins>
   </build>
-</project>
\ No newline at end of file
+</project>

Modified: directory/apacheds/branches/bigbang/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/pom.xml?rev=627498&r1=627497&r2=627498&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/pom.xml (original)
+++ directory/apacheds/branches/bigbang/pom.xml Wed Feb 13 07:58:58 2008
@@ -63,13 +63,13 @@
       <dependency>
         <groupId>org.apache.mina</groupId>
         <artifactId>mina-core</artifactId>
-        <version>1.1.4-SNAPSHOT</version>
+        <version>1.1.6</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.mina</groupId>
         <artifactId>mina-filter-ssl</artifactId>
-        <version>1.1.4-SNAPSHOT</version>
+        <version>1.1.6</version>
       </dependency>
 
       <dependency>

Modified: directory/apacheds/branches/bigbang/protocol-dns/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-dns/pom.xml?rev=627498&r1=627497&r2=627498&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-dns/pom.xml (original)
+++ directory/apacheds/branches/bigbang/protocol-dns/pom.xml Wed Feb 13 07:58:58 2008
@@ -34,14 +34,6 @@
 
   <dependencies>
 
-<!-- should be transitive now
-    <dependency>
-      <groupId>org.apache.mina</groupId>
-      <artifactId>mina-core</artifactId>
-    </dependency>
--->
-
-
     <dependency>
       <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-core</artifactId>

Modified: directory/apacheds/branches/bigbang/server-tools/src/main/manifest/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-tools/src/main/manifest/MANIFEST.MF?rev=627498&r1=627497&r2=627498&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-tools/src/main/manifest/MANIFEST.MF (original)
+++ directory/apacheds/branches/bigbang/server-tools/src/main/manifest/MANIFEST.MF Wed Feb
13 07:58:58 2008
@@ -2,38 +2,38 @@
 Main-Class: org.apache.directory.server.tools.ApachedsTools
 Class-Path: ../lib/logger.jar ../lib/daemon.jar ../lib/bootstrapper.jar 
  ../lib/antlr-2.7.6.jar 
- ../lib/apacheds-kerberos-shared-1.5.1-SNAPSHOT.jar 
- ../lib/apacheds-protocol-changepw-1.5.1-SNAPSHOT.jar 
- ../lib/apacheds-protocol-shared-1.5.1-SNAPSHOT.jar 
- ../lib/apacheds-protocol-kerberos-1.5.1-SNAPSHOT.jar 
- ../lib/apacheds-protocol-ldap-1.5.1-SNAPSHOT.jar 
- ../lib/apacheds-protocol-ntp-1.5.1-SNAPSHOT.jar 
- ../lib/apacheds-protocol-dns-1.5.1-SNAPSHOT.jar 
- ../lib/apacheds-core-1.5.1-SNAPSHOT.jar 
- ../lib/apacheds-core-shared-1.5.1-SNAPSHOT.jar 
- ../lib/apacheds-jdbm-store-1.5.1-SNAPSHOT.jar 
- ../lib/apacheds-btree-base-1.5.1-SNAPSHOT.jar 
- ../lib/apacheds-server-jndi-1.5.1-SNAPSHOT.jar 
- ../lib/apacheds-server-main-1.5.1-SNAPSHOT.jar 
- ../lib/apacheds-schema-registries-1.5.1-SNAPSHOT.jar 
- ../lib/apacheds-schema-bootstrap-1.5.1-SNAPSHOT.jar 
- ../lib/apacheds-bootstrap-partition-1.5.1-SNAPSHOT.jar 
- ../lib/apacheds-bootstrap-extract-1.5.1-SNAPSHOT.jar 
+ ../lib/apacheds-kerberos-shared-1.5.2-SNAPSHOT.jar 
+ ../lib/apacheds-protocol-changepw-1.5.2-SNAPSHOT.jar 
+ ../lib/apacheds-protocol-shared-1.5.2-SNAPSHOT.jar 
+ ../lib/apacheds-protocol-kerberos-1.5.2-SNAPSHOT.jar 
+ ../lib/apacheds-protocol-ldap-1.5.2-SNAPSHOT.jar 
+ ../lib/apacheds-protocol-ntp-1.5.2-SNAPSHOT.jar 
+ ../lib/apacheds-protocol-dns-1.5.2-SNAPSHOT.jar 
+ ../lib/apacheds-core-1.5.2-SNAPSHOT.jar 
+ ../lib/apacheds-core-shared-1.5.2-SNAPSHOT.jar 
+ ../lib/apacheds-jdbm-store-1.5.2-SNAPSHOT.jar 
+ ../lib/apacheds-btree-base-1.5.2-SNAPSHOT.jar 
+ ../lib/apacheds-server-jndi-1.5.2-SNAPSHOT.jar 
+ ../lib/apacheds-server-main-1.5.2-SNAPSHOT.jar 
+ ../lib/apacheds-schema-registries-1.5.2-SNAPSHOT.jar 
+ ../lib/apacheds-schema-bootstrap-1.5.2-SNAPSHOT.jar 
+ ../lib/apacheds-bootstrap-partition-1.5.2-SNAPSHOT.jar 
+ ../lib/apacheds-bootstrap-extract-1.5.2-SNAPSHOT.jar 
  ../lib/commons-collections-3.2.jar 
  ../lib/commons-lang-2.3.jar 
- ../lib/jcl104-over-slf4j-1.4.0.jar
+ ../lib/jcl104-over-slf4j-1.4.3.jar
   ../lib/nlog4j-1.2.25.jar
-  ../lib/slf4j-api-1.4.0.jar 
- ../lib/commons-cli-1.0.jar 
+  ../lib/slf4j-api-1.4.3.jar 
+ ../lib/commons-cli-1.1.jar 
  ../lib/jdbm-1.0.jar 
- ../lib/mina-core-1.0.3.jar 
- ../lib/shared-asn1-codec-0.9.8-SNAPSHOT.jar 
- ../lib/mina-filter-ssl-1.0.3.jar 
- ../lib/shared-asn1-0.9.8-SNAPSHOT.jar 
- ../lib/shared-ldap-0.9.8-SNAPSHOT.jar 
+ ../lib/mina-core-1.1.6.jar 
+ ../lib/shared-asn1-codec-0.9.9-SNAPSHOT.jar 
+ ../lib/mina-filter-ssl-1.1.6.jar 
+ ../lib/shared-asn1-0.9.9-SNAPSHOT.jar 
+ ../lib/shared-ldap-0.9.9-SNAPSHOT.jar 
  ../lib/antlr-2.7.7.jar 
- ../lib/spring-beans-1.2.9.jar 
- ../lib/spring-context-1.2.9.jar 
- ../lib/spring-core-1.2.9.jar 
+ ../lib/spring-beans-2.0.6.jar 
+ ../lib/spring-context-2.0.6.jar 
+ ../lib/spring-core-2.0.6.jar 
 Specification-Title: apacheds-tools
 Specification-Version: 1.0

Modified: directory/installers/branches/bigbang/pom.xml
URL: http://svn.apache.org/viewvc/directory/installers/branches/bigbang/pom.xml?rev=627498&r1=627497&r2=627498&view=diff
==============================================================================
--- directory/installers/branches/bigbang/pom.xml (original)
+++ directory/installers/branches/bigbang/pom.xml Wed Feb 13 07:58:58 2008
@@ -134,13 +134,13 @@
       <dependency>
         <groupId>org.apache.mina</groupId>
         <artifactId>mina-core</artifactId>
-        <version>1.1.2</version>
+        <version>1.1.6</version>
       </dependency>
 
       <dependency>
         <groupId>org.apache.mina</groupId>
         <artifactId>mina-filter-ssl</artifactId>
-        <version>1.1.2</version>
+        <version>1.1.6</version>
       </dependency>
 
       <dependency>

Modified: directory/shared/branches/bigbang/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/pom.xml?rev=627498&r1=627497&r2=627498&view=diff
==============================================================================
--- directory/shared/branches/bigbang/pom.xml (original)
+++ directory/shared/branches/bigbang/pom.xml Wed Feb 13 07:58:58 2008
@@ -79,7 +79,7 @@
       <dependency>
         <groupId>org.apache.mina</groupId>
         <artifactId>mina-core</artifactId>
-        <version>1.1.2</version>
+        <version>1.1.6</version>
       </dependency>
     </dependencies>
   </dependencyManagement>



Mime
View raw message