directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1245604 - /directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
Date Fri, 17 Feb 2012 15:22:58 GMT
Author: pamarcelot
Date: Fri Feb 17 15:22:57 2012
New Revision: 1245604

URL: http://svn.apache.org/viewvc?rev=1245604&view=rev
Log:
Fix for DIRSTUDIO-772 (Entry UUID Editor can't display eDirectory GUID) and DIRSTUDIO-764
(Image Editor does not work correctly).

Removed the load of the remote schema (using the DefaultConfigurableBinaryAttributeDetector
instead).
Configured binary attributes in the LDAP Connection Configuration.

Modified:
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java?rev=1245604&r1=1245603&r2=1245604&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
(original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
Fri Feb 17 15:22:57 2012
@@ -47,6 +47,8 @@ import org.apache.directory.ldap.client.
 import org.apache.directory.ldap.client.api.LdapConnectionConfig;
 import org.apache.directory.ldap.client.api.LdapNetworkConnection;
 import org.apache.directory.ldap.client.api.exception.InvalidConnectionException;
+import org.apache.directory.shared.ldap.codec.api.BinaryAttributeDetector;
+import org.apache.directory.shared.ldap.codec.api.ConfigurableBinaryAttributeDetector;
 import org.apache.directory.shared.ldap.codec.protocol.mina.LdapProtocolCodecActivator;
 import org.apache.directory.shared.ldap.model.cursor.SearchCursor;
 import org.apache.directory.shared.ldap.model.entry.AttributeUtils;
@@ -440,8 +442,6 @@ public class DirectoryApiConnectionWrapp
                         }
 
                         checkResponse( bindResponse );
-
-                        ldapConnection.loadSchema();
                     }
                     catch ( Exception e )
                     {
@@ -487,6 +487,23 @@ public class DirectoryApiConnectionWrapp
      */
     public void setBinaryAttributes( Collection<String> binaryAttributes )
     {
+        if ( ldapConnection != null )
+        {
+            BinaryAttributeDetector bad = ldapConnection.getConfig().getBinaryAttributeDetector();
+            if ( bad instanceof ConfigurableBinaryAttributeDetector )
+            {
+                ConfigurableBinaryAttributeDetector configBad = ( ConfigurableBinaryAttributeDetector
) bad;
+
+                // Clear the initial list
+                configBad.setBinaryAttributes( new String[0] );
+
+                // Add each binary attribute
+                for ( String binaryAttribute : binaryAttributes )
+                {
+                    configBad.addBinaryAttribute( binaryAttribute );
+                }
+            }
+        }
     }
 
 



Mime
View raw message