directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r531290 - in /directory/ldapstudio/trunk/ldapstudio-browser-core/src/main: java/org/apache/directory/ldapstudio/browser/core/internal/model/ resources/org/apache/directory/ldapstudio/browser/core/
Date Sun, 22 Apr 2007 22:13:46 GMT
Author: seelmann
Date: Sun Apr 22 15:13:45 2007
New Revision: 531290

URL: http://svn.apache.org/viewvc?view=rev&rev=531290
Log:
Fix for DIRSTUDIO-84. Added check if base DN exists.

Modified:
    directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/Connection.java
    directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/ConnectionSearchHandler.java
    directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/JNDIConnectionContext.java
    directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/JNDIConnectionProvider.java
    directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/resources/org/apache/directory/ldapstudio/browser/core/browsercoremessages.properties

Modified: directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/Connection.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/Connection.java?view=diff&rev=531290&r1=531289&r2=531290
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/Connection.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/Connection.java
Sun Apr 22 15:13:45 2007
@@ -187,7 +187,6 @@
 
         try
         {
-
             this.entryToChildrenFilterMap = new HashMap();
             this.dnToEntryCache = new HashMap();
             this.entryToAttributeInfoMap = new HashMap();
@@ -244,7 +243,7 @@
 
     public void fetchRootDSE( ExtendedProgressMonitor monitor )
     {
-        if ( this.connectionProvider != null )
+        if ( this.connectionProvider != null && !monitor.errorsReported() )
         {
             try
             {
@@ -257,6 +256,11 @@
                 monitor.reportError( BrowserCoreMessages.model__error_loading_rootdse );
                 this.rootDSE = null;
             }
+
+            if ( monitor.errorsReported() )
+            {
+                close();
+            }
         }
     }
 
@@ -424,9 +428,15 @@
         if( !isFetchBaseDNs() && getBaseDN() != null && !"".equals( getBaseDN().toString()
))
         {
             // only add the specified base DN
-            IEntry entry = new BaseDNEntry( new DN( getBaseDN() ), this );
-            rootDSE.addChild( entry );
+            DN dn = getBaseDN();
+            IEntry entry = new BaseDNEntry( new DN( dn ), this );
             cacheEntry( entry );
+            rootDSE.addChild( entry );
+            
+            // check if entry exists
+            search = new Search( null, this, dn, ISearch.FILTER_TRUE, ISearch.NO_ATTRIBUTES,
ISearch.SCOPE_OBJECT, 1, 0,
+                IConnection.DEREFERENCE_ALIASES_NEVER, IConnection.HANDLE_REFERRALS_IGNORE,
true, true, null );
+            search( search, monitor );
         }
         else
         {

Modified: directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/ConnectionSearchHandler.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/ConnectionSearchHandler.java?view=diff&rev=531290&r1=531289&r2=531290
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/ConnectionSearchHandler.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/ConnectionSearchHandler.java
Sun Apr 22 15:13:45 2007
@@ -115,7 +115,7 @@
             }
             else
             {
-                monitor.reportError( BrowserCoreMessages.model__no_such_entry );
+                monitor.reportError( BrowserCoreMessages.bind( BrowserCoreMessages.model__no_such_entry,
dn ) );
                 return null;
             }
         }

Modified: directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/JNDIConnectionContext.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/JNDIConnectionContext.java?view=diff&rev=531290&r1=531289&r2=531290
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/JNDIConnectionContext.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/JNDIConnectionContext.java
Sun Apr 22 15:13:45 2007
@@ -223,10 +223,6 @@
                     {
                         this.namingEnumeration = searchCtx.search( searchBase, filter, controls
);
                     }
-                    catch ( NameNotFoundException nffe )
-                    {
-
-                    }
                     catch ( NamingException ne )
                     {
                         this.namingException = ne;

Modified: directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/JNDIConnectionProvider.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/JNDIConnectionProvider.java?view=diff&rev=531290&r1=531289&r2=531290
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/JNDIConnectionProvider.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/java/org/apache/directory/ldapstudio/browser/core/internal/model/JNDIConnectionProvider.java
Sun Apr 22 15:13:45 2007
@@ -28,6 +28,7 @@
 import java.util.ArrayList;
 
 import javax.naming.Context;
+import javax.naming.NameNotFoundException;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.ReferralException;

Modified: directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/resources/org/apache/directory/ldapstudio/browser/core/browsercoremessages.properties
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/resources/org/apache/directory/ldapstudio/browser/core/browsercoremessages.properties?view=diff&rev=531290&r1=531289&r2=531290
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/resources/org/apache/directory/ldapstudio/browser/core/browsercoremessages.properties
(original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-core/src/main/resources/org/apache/directory/ldapstudio/browser/core/browsercoremessages.properties
Sun Apr 22 15:13:45 2007
@@ -36,7 +36,7 @@
 model__invalid_url=Invalid URL
 model__loading_rootdse=Loading Root DSE...
 model__setting_base_dn=Setting Base DN...
-model__no_such_entry=Entry doesn't exist or wasn't returned from server
+model__no_such_entry=Entry {0} doesn't exist or wasn't returned from server
 model__binding=Binding...
 model__connecting=Connecting...
 



Mime
View raw message