directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1024257 - in /directory/studio/branches/studio-connection-refactoring/plugins: connection.core/src/main/java/org/apache/directory/studio/connection/core/ connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ connect...
Date Tue, 19 Oct 2010 15:00:07 GMT
Author: pamarcelot
Date: Tue Oct 19 15:00:06 2010
New Revision: 1024257

URL: http://svn.apache.org/viewvc?rev=1024257&view=rev
Log:
Used the 'Referral' object of Shared instead of our own.
The DirectoryApiConnectionWrapper now asks the user for the connection to use when referral handling is set to automatic.

Modified:
    directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java
    directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IJndiLogger.java
    directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IReferralHandler.java
    directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/CursorNamingEnumeration.java
    directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/DirectoryApiConnectionWrapper.java
    directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
    directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifModificationLogger.java
    directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifSearchLogger.java
    directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ReferralsInfo.java
    directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioNamingEnumeration.java
    directory/studio/branches/studio-connection-refactoring/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIReferralHandler.java
    directory/studio/branches/studio-connection-refactoring/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/SelectReferralConnectionDialog.java
    directory/studio/branches/studio-connection-refactoring/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ContinuedSearchResultEntry.java
    directory/studio/branches/studio-connection-refactoring/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchContinuation.java

Modified: directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java?rev=1024257&r1=1024256&r2=1024257&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java (original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java Tue Oct 19 15:00:06 2010
@@ -26,7 +26,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.PropertyResourceBundle;
 
-import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.event.CoreEventRunner;
 import org.apache.directory.studio.connection.core.event.EventRunner;
 import org.apache.directory.studio.connection.core.io.jndi.LdifModificationLogger;
@@ -309,7 +308,7 @@ public class ConnectionCorePlugin extend
             // that just cancels referral chasing
             referralHandler = new IReferralHandler()
             {
-                public Connection getReferralConnection( List<LdapURL> referralUrls )
+                public Connection getReferralConnection( List<String> referralUrls )
                 {
                     // null cancels referral chasing
                     return null;

Modified: directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IJndiLogger.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IJndiLogger.java?rev=1024257&r1=1024256&r2=1024257&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IJndiLogger.java (original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IJndiLogger.java Tue Oct 19 15:00:06 2010
@@ -26,6 +26,7 @@ import javax.naming.directory.Modificati
 import javax.naming.directory.SearchControls;
 import javax.naming.ldap.Control;
 
+import org.apache.directory.shared.ldap.message.Referral;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.io.jndi.ReferralsInfo;
 import org.apache.directory.studio.connection.core.io.jndi.StudioSearchResult;
@@ -178,7 +179,7 @@ public interface IJndiLogger
      * @param requestNum the request number
      * @param the naming exception if an error occurred, null otherwise
      */
-    public void logSearchResultReference( Connection connection, ReferralsInfo.Referral referral,
+    public void logSearchResultReference( Connection connection, Referral referral,
         ReferralsInfo referralsInfo, long requestNum, NamingException namingException );
 
 

Modified: directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IReferralHandler.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IReferralHandler.java?rev=1024257&r1=1024256&r2=1024257&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IReferralHandler.java (original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/IReferralHandler.java Tue Oct 19 15:00:06 2010
@@ -23,8 +23,6 @@ package org.apache.directory.studio.conn
 
 import java.util.List;
 
-import org.apache.directory.shared.ldap.util.LdapURL;
-
 
 /**
  * Callback interface to request the target connection 
@@ -44,6 +42,6 @@ public interface IReferralHandler
      * @param referralURLs the referral URLs
      * @return the target connection, null to cancel referral chasing
      */
-    public Connection getReferralConnection( List<LdapURL> referralUrls );
+    public Connection getReferralConnection( List<String> referralUrls );
 
 }

Modified: directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/CursorNamingEnumeration.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/CursorNamingEnumeration.java?rev=1024257&r1=1024256&r2=1024257&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/CursorNamingEnumeration.java (original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/CursorNamingEnumeration.java Tue Oct 19 15:00:06 2010
@@ -31,12 +31,10 @@ import javax.naming.ldap.Control;
 
 import org.apache.directory.shared.ldap.cursor.Cursor;
 import org.apache.directory.shared.ldap.message.Referral;
-import org.apache.directory.shared.ldap.message.ReferralImpl;
 import org.apache.directory.shared.ldap.message.Response;
 import org.apache.directory.shared.ldap.message.SearchResultDone;
 import org.apache.directory.shared.ldap.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.message.SearchResultReference;
-import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
@@ -205,26 +203,35 @@ public class CursorNamingEnumeration ext
                     List<String> referralUrls = new ArrayList<String>( referral.getLdapUrls() );
                     LdapURL url = new LdapURL( referralUrls.get( 0 ) );
 
-                    String referralSearchBase = url.getDn() != null && !url.getDn().isEmpty() ? url.getDn().getName()
-                        : searchBase;
-                    String referralFilter = url.getFilter() != null && url.getFilter().length() == 0 ? url.getFilter()
-                        : filter;
-                    SearchControls referralSearchControls = new SearchControls();
-                    referralSearchControls.setSearchScope( url.getScope().getScope() > -1 ? url.getScope().getScope()
-                        : searchControls.getSearchScope() );
-                    referralSearchControls.setReturningAttributes( url.getAttributes() != null
-                        && url.getAttributes().size() > 0 ? url.getAttributes().toArray(
-                        new String[url.getAttributes().size()] ) : searchControls.getReturningAttributes() );
-                    referralSearchControls.setCountLimit( searchControls.getCountLimit() );
-                    referralSearchControls.setTimeLimit( searchControls.getTimeLimit() );
-                    referralSearchControls.setDerefLinkFlag( searchControls.getDerefLinkFlag() );
-                    referralSearchControls.setReturningObjFlag( searchControls.getReturningObjFlag() );
-
-                    cursorNamingEnumeration = ( CursorNamingEnumeration ) connection.getConnectionWrapper().search(
-                        referralSearchBase, referralFilter, referralSearchControls, aliasesDereferencingMethod,
-                        referralsHandlingMethod, controls, monitor, referralsInfo );
+                    Connection referralConnection = JNDIConnectionWrapper.getReferralConnection( referral, monitor,
+                        this );
+                    if ( referralConnection != null )
+                    {
+                        String referralSearchBase = url.getDn() != null && !url.getDn().isEmpty() ? url.getDn()
+                            .getName()
+                            : searchBase;
+                        String referralFilter = url.getFilter() != null && url.getFilter().length() == 0 ? url
+                            .getFilter()
+                            : filter;
+                        SearchControls referralSearchControls = new SearchControls();
+                        referralSearchControls.setSearchScope( url.getScope().getScope() > -1 ? url.getScope()
+                            .getScope()
+                            : searchControls.getSearchScope() );
+                        referralSearchControls.setReturningAttributes( url.getAttributes() != null
+                            && url.getAttributes().size() > 0 ? url.getAttributes().toArray(
+                            new String[url.getAttributes().size()] ) : searchControls.getReturningAttributes() );
+                        referralSearchControls.setCountLimit( searchControls.getCountLimit() );
+                        referralSearchControls.setTimeLimit( searchControls.getTimeLimit() );
+                        referralSearchControls.setDerefLinkFlag( searchControls.getDerefLinkFlag() );
+                        referralSearchControls.setReturningObjFlag( searchControls.getReturningObjFlag() );
+
+                        cursorNamingEnumeration = ( CursorNamingEnumeration ) referralConnection.getConnectionWrapper()
+                            .search(
+                                referralSearchBase, referralFilter, referralSearchControls, aliasesDereferencingMethod,
+                                referralsHandlingMethod, controls, monitor, referralsInfo );
 
-                    return cursorNamingEnumeration.hasMore();
+                        return cursorNamingEnumeration.hasMore();
+                    }
                 }
             }
 

Modified: directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/DirectoryApiConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/DirectoryApiConnectionWrapper.java?rev=1024257&r1=1024256&r2=1024257&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/DirectoryApiConnectionWrapper.java (original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/DirectoryApiConnectionWrapper.java Tue Oct 19 15:00:06 2010
@@ -24,12 +24,10 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
-import javax.naming.NamingEnumeration;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.ModificationItem;
 import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
 import javax.naming.ldap.Control;
 
 import org.apache.directory.ldap.client.api.LdapConnectionConfig;
@@ -44,7 +42,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.AddRequest;
 import org.apache.directory.shared.ldap.message.AddRequestImpl;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.message.ArrayNamingEnumeration;
 import org.apache.directory.shared.ldap.message.DeleteRequest;
 import org.apache.directory.shared.ldap.message.DeleteRequestImpl;
 import org.apache.directory.shared.ldap.message.ModifyDnRequest;
@@ -54,19 +51,14 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.Response;
 import org.apache.directory.shared.ldap.message.SearchRequest;
 import org.apache.directory.shared.ldap.message.SearchRequestImpl;
-import org.apache.directory.shared.ldap.message.SearchResultEntry;
-import org.apache.directory.shared.ldap.message.SearchResultReference;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
-import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
 import org.apache.directory.studio.connection.core.io.jndi.ReferralsInfo;
-import org.apache.directory.studio.connection.core.io.jndi.StudioSearchResult;
-import org.apache.directory.studio.connection.core.io.jndi.ReferralsInfo.Referral;
 import org.apache.directory.studio.connection.core.io.jndi.StudioNamingEnumeration;
 
 

Modified: directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java?rev=1024257&r1=1024256&r2=1024257&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java (original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java Tue Oct 19 15:00:06 2010
@@ -23,6 +23,7 @@ package org.apache.directory.studio.conn
 import java.io.File;
 import java.io.IOException;
 import java.security.PrivilegedAction;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Hashtable;
@@ -66,8 +67,8 @@ import javax.security.auth.login.LoginEx
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
-import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.message.Referral;
+import org.apache.directory.shared.ldap.message.ReferralImpl;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection;
@@ -86,7 +87,6 @@ import org.apache.directory.studio.conne
 import org.apache.directory.studio.connection.core.Utils;
 import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
 import org.apache.directory.studio.connection.core.io.ConnectionWrapper;
-import org.apache.directory.studio.connection.core.io.jndi.ReferralsInfo.Referral;
 import org.eclipse.core.runtime.Preferences;
 import org.eclipse.osgi.util.NLS;
 
@@ -465,7 +465,9 @@ public class JNDIConnectionWrapper imple
                             Connection referralConnection = getReferralConnection( referral, monitor, this );
                             if ( referralConnection != null )
                             {
-                                String referralDn = referral.getLdapURLs().get( 0 ).getDn().getName();
+                                List<String> urls = new ArrayList<String>( referral.getLdapUrls() );
+
+                                String referralDn = new LdapURL( urls.get( 0 ) ).getDn().getName();
                                 referralConnection.getConnectionWrapper().modifyEntry( referralDn,
                                     modificationItems, controls, monitor, newReferralsInfo );
                             }
@@ -481,6 +483,10 @@ public class JNDIConnectionWrapper imple
                     {
                         namingException = ne;
                     }
+                    catch ( LdapURLEncodingException e )
+                    {
+                        namingException = new NamingException( e.getMessage() );
+                    }
                 }
                 catch ( NamingException ne )
                 {
@@ -669,7 +675,9 @@ public class JNDIConnectionWrapper imple
                             Connection referralConnection = getReferralConnection( referral, monitor, this );
                             if ( referralConnection != null )
                             {
-                                String referralDn = referral.getLdapURLs().get( 0 ).getDn().getName();
+                                List<String> urls = new ArrayList<String>( referral.getLdapUrls() );
+
+                                String referralDn = new LdapURL( urls.get( 0 ) ).getDn().getName();
                                 referralConnection.getConnectionWrapper().createEntry( referralDn, attributes,
                                     controls, monitor, newReferralsInfo );
                             }
@@ -683,6 +691,10 @@ public class JNDIConnectionWrapper imple
                     {
                         namingException = ne;
                     }
+                    catch ( LdapURLEncodingException e )
+                    {
+                        namingException = new NamingException( e.getMessage() );
+                    }
                 }
                 catch ( NamingException ne )
                 {
@@ -764,7 +776,9 @@ public class JNDIConnectionWrapper imple
                             Connection referralConnection = getReferralConnection( referral, monitor, this );
                             if ( referralConnection != null )
                             {
-                                String referralDn = referral.getLdapURLs().get( 0 ).getDn().getName();
+                                List<String> urls = new ArrayList<String>( referral.getLdapUrls() );
+
+                                String referralDn = new LdapURL( urls.get( 0 ) ).getDn().getName();
                                 referralConnection.getConnectionWrapper().deleteEntry( referralDn, controls,
                                     monitor, newReferralsInfo );
                             }
@@ -778,6 +792,10 @@ public class JNDIConnectionWrapper imple
                     {
                         namingException = ne;
                     }
+                    catch ( LdapURLEncodingException e )
+                    {
+                        namingException = new NamingException( e.getMessage() );
+                    }
                 }
                 catch ( NamingException ne )
                 {
@@ -1506,7 +1524,8 @@ public class JNDIConnectionWrapper imple
         IReferralHandler referralHandler = ConnectionCorePlugin.getDefault().getReferralHandler();
         if ( referralHandler != null )
         {
-            referralConnection = referralHandler.getReferralConnection( referral.getLdapURLs() );
+            referralConnection = referralHandler
+                .getReferralConnection( new ArrayList<String>( referral.getLdapUrls() ) );
 
             // open connection if not yet open
             if ( referralConnection != null && !referralConnection.getConnectionWrapper().isConnected() )
@@ -1582,27 +1601,16 @@ public class JNDIConnectionWrapper imple
     private static Referral handleReferralException( ReferralException referralException,
         ReferralsInfo initialReferralsInfo, Referral referral ) throws NamingException
     {
-        try
-        {
-            String info = ( String ) referralException.getReferralInfo();
-            String name = referralException.getRemainingName().toString();
-            LdapURL url = new LdapURL( info );
-            DN dn = new DN( name );
+        String info = ( String ) referralException.getReferralInfo();
 
-            if ( referral == null )
-            {
-                referral = initialReferralsInfo.new Referral( dn );
-                initialReferralsInfo.addReferral( referral );
-            }
-            referral.addUrl( url );
-        }
-        catch ( LdapURLEncodingException e )
-        {
-        }
-        catch ( LdapInvalidDnException e )
+        if ( referral == null )
         {
+            referral = new ReferralImpl();
+            initialReferralsInfo.addReferral( referral );
         }
 
+        referral.addLdapUrl( info );
+
         return referral;
     }
 

Modified: directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifModificationLogger.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifModificationLogger.java?rev=1024257&r1=1024256&r2=1024257&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifModificationLogger.java (original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifModificationLogger.java Tue Oct 19 15:00:06 2010
@@ -48,6 +48,7 @@ import javax.naming.directory.SearchCont
 import javax.naming.ldap.Control;
 
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
+import org.apache.directory.shared.ldap.message.Referral;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.name.RDN;
 import org.apache.directory.studio.connection.core.Connection;
@@ -465,7 +466,7 @@ public class LdifModificationLogger impl
     /**
      * {@inheritDoc}
      */
-    public void logSearchResultReference( Connection connection, ReferralsInfo.Referral referral,
+    public void logSearchResultReference( Connection connection, Referral referral,
         ReferralsInfo referralsInfo, long requestNum, NamingException ex )
     {
         // don't log searches 

Modified: directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifSearchLogger.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifSearchLogger.java?rev=1024257&r1=1024256&r2=1024257&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifSearchLogger.java (original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/LdifSearchLogger.java Tue Oct 19 15:00:06 2010
@@ -47,14 +47,15 @@ import javax.naming.directory.SearchCont
 import javax.naming.ldap.Control;
 
 import org.apache.commons.lang.StringUtils;
+import org.apache.directory.shared.ldap.message.Referral;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.ConnectionCoreConstants;
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.ConnectionManager;
 import org.apache.directory.studio.connection.core.IJndiLogger;
 import org.apache.directory.studio.connection.core.Utils;
-import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.ldifparser.LdifFormatParameters;
 import org.apache.directory.studio.ldifparser.model.container.LdifContentRecord;
 import org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine;
@@ -410,7 +411,7 @@ public class LdifSearchLogger implements
     /**
      * {@inheritDoc}
      */
-    public void logSearchResultReference( Connection connection, ReferralsInfo.Referral referral,
+    public void logSearchResultReference( Connection connection, Referral referral,
         ReferralsInfo referralsInfo, long requestNum, NamingException ex )
     {
         if ( !isSearchResultEntryLogEnabled() )
@@ -419,7 +420,7 @@ public class LdifSearchLogger implements
         }
 
         Collection<LdifLineBase> lines = new ArrayList<LdifLineBase>();
-        lines.add( LdifCommentLine.create( "# reference : " + ( referral != null ? referral.getLdapURLs() : "null" ) ) ); //$NON-NLS-1$ //$NON-NLS-2$
+        lines.add( LdifCommentLine.create( "# reference : " + ( referral != null ? referral.getLdapUrls() : "null" ) ) ); //$NON-NLS-1$ //$NON-NLS-2$
         lines.add( LdifSepLine.create() );
 
         String formattedString = ""; //$NON-NLS-1$

Modified: directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ReferralsInfo.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ReferralsInfo.java?rev=1024257&r1=1024256&r2=1024257&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ReferralsInfo.java (original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ReferralsInfo.java Tue Oct 19 15:00:06 2010
@@ -20,18 +20,13 @@
 package org.apache.directory.studio.connection.core.io.jndi;
 
 
-import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.LinkedList;
-import java.util.List;
 import java.util.Set;
 
 import javax.naming.LinkLoopException;
 
-import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.util.LdapURL;
-import org.apache.directory.studio.connection.core.Messages;
-import org.eclipse.osgi.util.NLS;
+import org.apache.directory.shared.ldap.message.Referral;
 
 
 /**
@@ -44,7 +39,7 @@ public class ReferralsInfo
 {
     private LinkedList<Referral> referralsToProcess = new LinkedList<Referral>();
 
-    private Set<LdapURL> processedUrls = new HashSet<LdapURL>();
+    private Set<String> processedUrls = new HashSet<String>();
 
 
     /**
@@ -73,7 +68,7 @@ public class ReferralsInfo
         if ( !referralsToProcess.isEmpty() )
         {
             Referral referral = referralsToProcess.removeFirst();
-            for ( LdapURL url : referral.urls )
+            for ( String url : referral.getLdapUrls() )
             {
                 processedUrls.add( url );
             }
@@ -95,58 +90,4 @@ public class ReferralsInfo
     {
         return !referralsToProcess.isEmpty();
     }
-
-    public class Referral
-    {
-        private List<LdapURL> urls = new ArrayList<LdapURL>();
-        private DN dn;
-
-
-        public Referral( DN dn )
-        {
-            this.dn = dn;
-        }
-
-
-        /**
-         * Gets the list of {@link LdapURL}.
-         * 
-         * @return the list of {@link LdapURL}
-         */
-        public List<LdapURL> getLdapURLs()
-        {
-            return urls;
-        }
-
-
-        /**
-         * Gets the DN.
-         * 
-         * @return the DN
-         */
-        public DN getDn()
-        {
-            return dn;
-        }
-
-
-        /**
-         * Adds the URL.
-         * 
-         * @param url the URL
-         * 
-         * @throws LinkLoopException if a loop was encountered.
-         */
-        public void addUrl( LdapURL url ) throws LinkLoopException
-        {
-            if ( processedUrls.contains( url ) )
-            {
-                throw new LinkLoopException( NLS.bind( Messages.error__loop_detected, url ) );
-            }
-
-            urls.add( url );
-        }
-
-    }
-
 }

Modified: directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioNamingEnumeration.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioNamingEnumeration.java?rev=1024257&r1=1024256&r2=1024257&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioNamingEnumeration.java (original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioNamingEnumeration.java Tue Oct 19 15:00:06 2010
@@ -33,6 +33,8 @@ import javax.naming.directory.SearchResu
 import javax.naming.ldap.Control;
 import javax.naming.ldap.LdapContext;
 
+import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
+import org.apache.directory.shared.ldap.message.Referral;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection;
@@ -40,7 +42,6 @@ import org.apache.directory.studio.conne
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.IJndiLogger;
-import org.apache.directory.studio.connection.core.io.jndi.ReferralsInfo.Referral;
 
 
 /**
@@ -283,111 +284,126 @@ public class StudioNamingEnumeration imp
 
     private boolean checkReferral()
     {
-        boolean done = false;
-
-        // ignore exception if referrals handling method is IGNORE
-        // follow referral if referrals handling method is FOLLOW
-        // follow manually if referrals handling method is FOLLOW_MANUALLY
-        if ( referralsHandlingMethod == ReferralHandlingMethod.IGNORE )
-        {
-            done = true;
-            delegate = null;
-        }
-        else if ( referralsHandlingMethod == ReferralHandlingMethod.FOLLOW_MANUALLY )
+        try
         {
-            delegate = new NamingEnumeration<SearchResult>()
-            {
+            boolean done = false;
 
-                List<LdapURL> urls = new ArrayList<LdapURL>();
+            // ignore exception if referrals handling method is IGNORE
+            // follow referral if referrals handling method is FOLLOW
+            // follow manually if referrals handling method is FOLLOW_MANUALLY
+            if ( referralsHandlingMethod == ReferralHandlingMethod.IGNORE )
+            {
+                done = true;
+                delegate = null;
+            }
+            else if ( referralsHandlingMethod == ReferralHandlingMethod.FOLLOW_MANUALLY )
+            {
+                delegate = new NamingEnumeration<SearchResult>()
                 {
-                    while ( referralsInfo.hasMoreReferrals() )
+
+                    List<String> urls = new ArrayList<String>();
+                    {
+                        while ( referralsInfo.hasMoreReferrals() )
                     {
                         Referral referral = referralsInfo.getNextReferral();
                         for ( IJndiLogger logger : ConnectionCorePlugin.getDefault().getJndiLoggers() )
                         {
                             logger.logSearchResultReference( connection, referral, referralsInfo, requestNum, null );
                         }
-                        urls.addAll( referral.getLdapURLs() );
+                        urls.addAll( referral.getLdapUrls() );
                     }
                 }
 
 
-                public SearchResult nextElement()
+                    public SearchResult nextElement()
                 {
                     throw new UnsupportedOperationException( "Call next() instead of nextElement() !" );
                 }
 
 
-                public boolean hasMoreElements()
+                    public boolean hasMoreElements()
                 {
                     throw new UnsupportedOperationException( "Call hasMore() instead of hasMoreElements() !" );
                 }
 
 
-                public SearchResult next() throws NamingException
+                    public SearchResult next() throws NamingException
                 {
-                    LdapURL url = urls.remove( 0 );
-                    SearchResult searchResult = new SearchResult( url.getDn().getName(), null, new BasicAttributes(),
-                        false );
-                    searchResult.setNameInNamespace( url.getDn().getName() );
-                    StudioSearchResult ssr = new StudioSearchResult( searchResult, null, false, url );
-                    return ssr;
+                    try
+                    {
+                        LdapURL url = new LdapURL( urls.remove( 0 ) );
+                        SearchResult searchResult = new SearchResult( url.getDn().getName(), null,
+                            new BasicAttributes(),
+                            false );
+                        searchResult.setNameInNamespace( url.getDn().getName() );
+                        StudioSearchResult ssr = new StudioSearchResult( searchResult, null, false, url );
+                        return ssr;
+                    }
+                    catch ( LdapURLEncodingException e )
+                    {
+                        throw new NamingException( e.getMessage() );
+                    }
                 }
 
 
-                public boolean hasMore() throws NamingException
+                    public boolean hasMore() throws NamingException
                 {
                     return !urls.isEmpty();
                 }
 
 
-                public void close() throws NamingException
+                    public void close() throws NamingException
                 {
                     urls.clear();
                     referralsInfo = null;
                 }
-            };
-        }
-        else if ( referralsHandlingMethod == ReferralHandlingMethod.FOLLOW )
-        {
-            Referral referral = referralsInfo.getNextReferral();
-            for ( IJndiLogger logger : ConnectionCorePlugin.getDefault().getJndiLoggers() )
-            {
-                logger.logSearchResultReference( connection, referral, referralsInfo, requestNum, null );
-            }
-
-            LdapURL url = referral.getLdapURLs().get( 0 );
-            Connection referralConnection = JNDIConnectionWrapper.getReferralConnection( referral, monitor, this );
-            if ( referralConnection != null )
-            {
-                done = false;
-                String referralSearchBase = url.getDn() != null && !url.getDn().isEmpty() ? url.getDn().getName()
-                    : searchBase;
-                String referralFilter = url.getFilter() != null && url.getFilter().length() == 0 ? url.getFilter()
-                    : filter;
-                SearchControls referralSearchControls = new SearchControls();
-                referralSearchControls.setSearchScope( url.getScope().getScope() > -1 ? url.getScope().getScope()
-                    : searchControls
-                        .getSearchScope() );
-                referralSearchControls.setReturningAttributes( url.getAttributes() != null
-                    && url.getAttributes().size() > 0 ? url.getAttributes().toArray(
-                    new String[url.getAttributes().size()] ) : searchControls.getReturningAttributes() );
-                referralSearchControls.setCountLimit( searchControls.getCountLimit() );
-                referralSearchControls.setTimeLimit( searchControls.getTimeLimit() );
-                referralSearchControls.setDerefLinkFlag( searchControls.getDerefLinkFlag() );
-                referralSearchControls.setReturningObjFlag( searchControls.getReturningObjFlag() );
-
-                delegate = referralConnection.getConnectionWrapper().search( referralSearchBase, referralFilter,
-                    referralSearchControls, aliasesDereferencingMethod, referralsHandlingMethod, controls, monitor,
-                    referralsInfo );
+                };
             }
-            else
+            else if ( referralsHandlingMethod == ReferralHandlingMethod.FOLLOW )
             {
-                done = true;
-                delegate = null;
+                Referral referral = referralsInfo.getNextReferral();
+                for ( IJndiLogger logger : ConnectionCorePlugin.getDefault().getJndiLoggers() )
+                {
+                    logger.logSearchResultReference( connection, referral, referralsInfo, requestNum, null );
+                }
+                List<String> urls = new ArrayList<String>( referral.getLdapUrls() );
+                LdapURL url = new LdapURL( urls.get( 0 ) );
+                Connection referralConnection = JNDIConnectionWrapper.getReferralConnection( referral, monitor, this );
+                if ( referralConnection != null )
+                {
+                    done = false;
+                    String referralSearchBase = url.getDn() != null && !url.getDn().isEmpty() ? url.getDn().getName()
+                        : searchBase;
+                    String referralFilter = url.getFilter() != null && url.getFilter().length() == 0 ? url.getFilter()
+                        : filter;
+                    SearchControls referralSearchControls = new SearchControls();
+                    referralSearchControls.setSearchScope( url.getScope().getScope() > -1 ? url.getScope().getScope()
+                        : searchControls
+                            .getSearchScope() );
+                    referralSearchControls.setReturningAttributes( url.getAttributes() != null
+                        && url.getAttributes().size() > 0 ? url.getAttributes().toArray(
+                        new String[url.getAttributes().size()] ) : searchControls.getReturningAttributes() );
+                    referralSearchControls.setCountLimit( searchControls.getCountLimit() );
+                    referralSearchControls.setTimeLimit( searchControls.getTimeLimit() );
+                    referralSearchControls.setDerefLinkFlag( searchControls.getDerefLinkFlag() );
+                    referralSearchControls.setReturningObjFlag( searchControls.getReturningObjFlag() );
+
+                    delegate = referralConnection.getConnectionWrapper().search( referralSearchBase, referralFilter,
+                        referralSearchControls, aliasesDereferencingMethod, referralsHandlingMethod, controls, monitor,
+                        referralsInfo );
+                }
+                else
+                {
+                    done = true;
+                    delegate = null;
+                }
             }
+            return done;
+        }
+        catch ( LdapURLEncodingException e )
+        {
+            return false;
         }
-        return done;
     }
 
 }

Modified: directory/studio/branches/studio-connection-refactoring/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIReferralHandler.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIReferralHandler.java?rev=1024257&r1=1024256&r2=1024257&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIReferralHandler.java (original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIReferralHandler.java Tue Oct 19 15:00:06 2010
@@ -25,6 +25,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
@@ -64,37 +65,40 @@ public class ConnectionUIReferralHandler
     /**
      * {@inheritDoc}
      */
-    public Connection getReferralConnection( final List<LdapURL> referralUrls )
+    public Connection getReferralConnection( final List<String> referralUrls )
     {
-        // check cache
-        for ( LdapURL url : referralUrls )
+        final Connection[] referralConnections = new Connection[1];
+        try
         {
-            String normalizedUrl = Utils.getSimpleNormalizedUrl( url );
-
-            if ( referralUrlToReferralConnectionCache.containsKey( normalizedUrl ) )
+            // check cache
+            for ( String url : referralUrls )
             {
-                // check if referral connection exists in connection manager
-                Connection referralConnection = referralUrlToReferralConnectionCache.get( normalizedUrl );
-                Connection[] connections = ConnectionCorePlugin.getDefault().getConnectionManager().getConnections();
-                for ( int i = 0; i < connections.length; i++ )
+                String normalizedUrl = Utils.getSimpleNormalizedUrl( new LdapURL( url ) );
+
+                if ( referralUrlToReferralConnectionCache.containsKey( normalizedUrl ) )
                 {
-                    Connection connection = connections[i];
-                    if ( referralConnection == connection )
+                    // check if referral connection exists in connection manager
+                    Connection referralConnection = referralUrlToReferralConnectionCache.get( normalizedUrl );
+                    Connection[] connections = ConnectionCorePlugin.getDefault().getConnectionManager()
+                        .getConnections();
+                    for ( int i = 0; i < connections.length; i++ )
                     {
-                        return referralConnection;
+                        Connection connection = connections[i];
+                        if ( referralConnection == connection )
+                        {
+                            return referralConnection;
+                        }
                     }
-                }
 
-                // referral connection doesn't exist in connection manager, remove it from cache
-                referralUrlToReferralConnectionCache.remove( normalizedUrl );
+                    // referral connection doesn't exist in connection manager, remove it from cache
+                    referralUrlToReferralConnectionCache.remove( normalizedUrl );
+                }
             }
-        }
 
-        // open dialog
-        final Connection[] referralConnections = new Connection[1];
-        PlatformUI.getWorkbench().getDisplay().syncExec( new Runnable()
-        {
-            public void run()
+            // open dialog
+            PlatformUI.getWorkbench().getDisplay().syncExec( new Runnable()
+            {
+                public void run()
             {
                 SelectReferralConnectionDialog dialog = new SelectReferralConnectionDialog( PlatformUI.getWorkbench()
                     .getDisplay().getActiveShell(), referralUrls );
@@ -104,17 +108,22 @@ public class ConnectionUIReferralHandler
                     referralConnections[0] = connection;
                 }
             }
-        } );
+            } );
 
-        // put to cache
-        if ( referralConnections[0] != null )
-        {
-            for ( LdapURL url : referralUrls )
+            // put to cache
+            if ( referralConnections[0] != null )
             {
-                String normalizedUrl = Utils.getSimpleNormalizedUrl( url );
-                referralUrlToReferralConnectionCache.put( normalizedUrl, referralConnections[0] );
+                for ( String url : referralUrls )
+                {
+                    String normalizedUrl = Utils.getSimpleNormalizedUrl( new LdapURL( url ) );
+                    referralUrlToReferralConnectionCache.put( normalizedUrl, referralConnections[0] );
+                }
             }
         }
+        catch ( LdapURLEncodingException e )
+        {
+            // Will never occur
+        }
 
         return referralConnections[0];
     }

Modified: directory/studio/branches/studio-connection-refactoring/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/SelectReferralConnectionDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/SelectReferralConnectionDialog.java?rev=1024257&r1=1024256&r2=1024257&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/SelectReferralConnectionDialog.java (original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/connection.ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/SelectReferralConnectionDialog.java Tue Oct 19 15:00:06 2010
@@ -23,6 +23,7 @@ package org.apache.directory.studio.conn
 
 import java.util.List;
 
+import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.connection.core.Connection;
@@ -59,7 +60,7 @@ public class SelectReferralConnectionDia
 
     private String title;
 
-    private List<LdapURL> referralUrls;
+    private List<String> referralUrls;
 
     private Connection selectedConnection;
 
@@ -78,7 +79,7 @@ public class SelectReferralConnectionDia
      * @param parentShell the parent shell
      * @param referralUrl the referral URL
      */
-    public SelectReferralConnectionDialog( Shell parentShell, List<LdapURL> referralUrls )
+    public SelectReferralConnectionDialog( Shell parentShell, List<String> referralUrls )
     {
         super( parentShell );
         super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
@@ -166,9 +167,9 @@ public class SelectReferralConnectionDia
 
         BaseWidgetUtils.createWrappedLabeledText( composite, Messages
             .getString( "SelectReferralConnectionDialog.SelectConnectionToHandleReferral" ), 1 ); //$NON-NLS-1$
-        for ( LdapURL url : referralUrls )
+        for ( String url : referralUrls )
         {
-            BaseWidgetUtils.createWrappedLabeledText( composite, " - " + url.toString(), 1 ); //$NON-NLS-1$
+            BaseWidgetUtils.createWrappedLabeledText( composite, " - " + url, 1 ); //$NON-NLS-1$
         }
 
         // create configuration
@@ -231,13 +232,21 @@ public class SelectReferralConnectionDia
                 Connection connection = connections[i];
                 LdapURL connectionUrl = connection.getUrl();
                 String normalizedConnectionUrl = Utils.getSimpleNormalizedUrl( connectionUrl );
-                for ( LdapURL url : referralUrls )
+                for ( String url : referralUrls )
                 {
-                    if ( url != null && Utils.getSimpleNormalizedUrl( url ).equals( normalizedConnectionUrl ) )
+                    try
                     {
-                        mainWidget.getViewer().reveal( connection );
-                        mainWidget.getViewer().setSelection( new StructuredSelection( connection ), true );
-                        break;
+                        if ( url != null
+                            && Utils.getSimpleNormalizedUrl( new LdapURL( url ) ).equals( normalizedConnectionUrl ) )
+                        {
+                            mainWidget.getViewer().reveal( connection );
+                            mainWidget.getViewer().setSelection( new StructuredSelection( connection ), true );
+                            break;
+                        }
+                    }
+                    catch ( LdapURLEncodingException e )
+                    {
+                        // Will never occur
                     }
                 }
             }

Modified: directory/studio/branches/studio-connection-refactoring/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ContinuedSearchResultEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ContinuedSearchResultEntry.java?rev=1024257&r1=1024256&r2=1024257&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ContinuedSearchResultEntry.java (original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ContinuedSearchResultEntry.java Tue Oct 19 15:00:06 2010
@@ -147,8 +147,8 @@ public class ContinuedSearchResultEntry 
     public void resolve()
     {
         // get referral connection, exit if canceled
-        List<LdapURL> urls = new ArrayList<LdapURL>();
-        urls.add( url );
+        List<String> urls = new ArrayList<String>();
+        urls.add( url.toString() );
         Connection referralConnection = ConnectionCorePlugin.getDefault().getReferralHandler().getReferralConnection(
             urls );
         if ( referralConnection == null )

Modified: directory/studio/branches/studio-connection-refactoring/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchContinuation.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchContinuation.java?rev=1024257&r1=1024256&r2=1024257&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchContinuation.java (original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchContinuation.java Tue Oct 19 15:00:06 2010
@@ -151,8 +151,8 @@ public class SearchContinuation extends 
     public void resolve()
     {
         // get referral connection, exit if canceled
-        List<LdapURL> urls = new ArrayList<LdapURL>();
-        urls.add( searchContinuationURL );
+        List<String> urls = new ArrayList<String>();
+        urls.add( searchContinuationURL.toString() );
         Connection referralConnection = ConnectionCorePlugin.getDefault().getReferralHandler().getReferralConnection(
             urls );
         if ( referralConnection == null )



Mime
View raw message