directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r827920 [2/4] - in /directory/studio/trunk: connection-core/src/main/java/org/apache/directory/studio/connection/core/ connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ connection-ui/src/main/java/org/apache...
Date Wed, 21 Oct 2009 08:35:58 GMT
Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/SelectReferralConnectionDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/SelectReferralConnectionDialog.java?rev=827920&r1=827919&r2=827920&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/SelectReferralConnectionDialog.java (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/dialogs/SelectReferralConnectionDialog.java Wed Oct 21 08:35:55 2009
@@ -21,9 +21,12 @@
 package org.apache.directory.studio.connection.ui.dialogs;
 
 
+import java.util.List;
+
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.core.Utils;
 import org.apache.directory.studio.connection.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.connection.ui.widgets.ConnectionActionGroup;
 import org.apache.directory.studio.connection.ui.widgets.ConnectionConfiguration;
@@ -40,6 +43,7 @@
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
@@ -56,7 +60,7 @@
 
     private String title;
 
-    private LdapURL referralUrl;
+    private List<LdapURL> referralUrls;
 
     private Connection selectedConnection;
 
@@ -75,12 +79,12 @@
      * @param parentShell the parent shell
      * @param referralUrl the referral URL
      */
-    public SelectReferralConnectionDialog( Shell parentShell, LdapURL referralUrl )
+    public SelectReferralConnectionDialog( Shell parentShell, List<LdapURL> referralUrls )
     {
         super( parentShell );
         super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
-        this.title = Messages.getString("SelectReferralConnectionDialog.SelectReferralConenction"); //$NON-NLS-1$
-        this.referralUrl = referralUrl;
+        this.title = Messages.getString( "SelectReferralConnectionDialog.SelectReferralConenction" ); //$NON-NLS-1$
+        this.referralUrls = referralUrls;
         this.selectedConnection = null;
     }
 
@@ -131,8 +135,20 @@
      */
     protected void createButtonsForButtonBar( Composite parent )
     {
-        createButton( parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false );
+        Button okButton = createButton( parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true );
+        okButton.setFocus();
         createButton( parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false );
+        
+        validate();
+    }
+
+
+    private void validate()
+    {
+        if ( getButton( IDialogConstants.OK_ID ) != null )
+        {
+            getButton( IDialogConstants.OK_ID ).setEnabled( selectedConnection != null );
+        }
     }
 
 
@@ -149,8 +165,12 @@
         gd.heightHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH / 2 );
         composite.setLayoutData( gd );
 
-        BaseWidgetUtils.createWrappedLabeledText( composite, Messages.getString("SelectReferralConnectionDialog.SelectConnectionToHandleReferral") //$NON-NLS-1$
-            + referralUrl, 1 );
+        BaseWidgetUtils.createWrappedLabeledText( composite, Messages
+            .getString( "SelectReferralConnectionDialog.SelectConnectionToHandleReferral" ), 1 ); //$NON-NLS-1$
+        for ( LdapURL url : referralUrls )
+        {
+            BaseWidgetUtils.createWrappedLabeledText( composite, " - " + url.toString(), 1 ); //$NON-NLS-1$
+        }
 
         // create configuration
         configuration = new ConnectionConfiguration();
@@ -174,6 +194,7 @@
         {
             public void selectionChanged( SelectionChangedEvent event )
             {
+                selectedConnection = null;
                 if ( !event.getSelection().isEmpty() )
                 {
                     Object o = ( ( IStructuredSelection ) event.getSelection() ).getFirstElement();
@@ -182,6 +203,7 @@
                         selectedConnection = ( Connection ) o;
                     }
                 }
+                validate();
             }
         } );
 
@@ -189,6 +211,7 @@
         {
             public void doubleClick( DoubleClickEvent event )
             {
+                selectedConnection = null;
                 if ( !event.getSelection().isEmpty() )
                 {
                     Object o = ( ( IStructuredSelection ) event.getSelection() ).getFirstElement();
@@ -197,27 +220,33 @@
                         selectedConnection = ( Connection ) o;
                     }
                 }
+                validate();
             }
         } );
 
-        if ( referralUrl != null )
+        if ( referralUrls != null )
         {
             Connection[] connections = ConnectionCorePlugin.getDefault().getConnectionManager().getConnections();
             for ( int i = 0; i < connections.length; i++ )
             {
                 Connection connection = connections[i];
                 LdapURL connectionUrl = connection.getUrl();
-                if ( connectionUrl != null && referralUrl.toString().startsWith( connectionUrl.toString() ) )
+                String normalizedConnectionUrl = Utils.getSimpleNormalizedUrl( connectionUrl );
+                for ( LdapURL url : referralUrls )
                 {
-                    mainWidget.getViewer().reveal( connection );
-                    mainWidget.getViewer().setSelection( new StructuredSelection( connection ), true );
+                    if ( url != null && Utils.getSimpleNormalizedUrl( url ).equals( normalizedConnectionUrl ) )
+                    {
+                        mainWidget.getViewer().reveal( connection );
+                        mainWidget.getViewer().setSelection( new StructuredSelection( connection ), true );
+                        break;
+                    }
                 }
             }
         }
 
         applyDialogFont( composite );
 
-        mainWidget.setFocus();
+        validate();
 
         return composite;
     }

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java?rev=827920&r1=827919&r2=827920&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java Wed Oct 21 08:35:55 2009
@@ -32,6 +32,7 @@
 
 import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
 import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
+import org.apache.directory.studio.connection.core.StudioControl;
 import org.apache.directory.studio.ldapbrowser.common.dialogs.DeleteDialog;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.jobs.DeleteEntriesJob;
@@ -43,7 +44,6 @@
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
-import org.apache.directory.studio.ldapbrowser.core.model.StudioControl;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.apache.directory.studio.ldapbrowser.core.utils.CompoundModification;

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FetchReferralsAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FetchReferralsAction.java?rev=827920&r1=827919&r2=827920&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FetchReferralsAction.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FetchReferralsAction.java Wed Oct 21 08:35:55 2009
@@ -25,7 +25,6 @@
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeChildrenRunnable;
 import org.apache.directory.studio.ldapbrowser.core.jobs.StudioBrowserJob;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
@@ -81,8 +80,7 @@
     public boolean isEnabled()
     {
         List<IEntry> entries = getEntries();
-        return !entries.isEmpty()
-            && entries.iterator().next().getBrowserConnection().getReferralsHandlingMethod() != ReferralHandlingMethod.MANAGE;
+        return !entries.isEmpty() && !entries.iterator().next().getBrowserConnection().isManageDsaIT();
     }
 
 

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java?rev=827920&r1=827919&r2=827920&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java Wed Oct 21 08:35:55 2009
@@ -32,9 +32,11 @@
 import org.apache.directory.studio.ldapbrowser.core.jobs.SearchRunnable;
 import org.apache.directory.studio.ldapbrowser.core.jobs.StudioBrowserJob;
 import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
+import org.apache.directory.studio.ldapbrowser.core.model.IContinuation;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
+import org.apache.directory.studio.ldapbrowser.core.model.IContinuation.State;
 import org.eclipse.jface.resource.ImageDescriptor;
 
 
@@ -134,6 +136,17 @@
 
         if ( entries.size() > 0 )
         {
+            for ( IEntry entry : entries )
+            {
+                if ( entry instanceof IContinuation )
+                {
+                    IContinuation continuation = ( IContinuation ) entry;
+                    if ( continuation.getState() != State.RESOLVED )
+                    {
+                        continuation.resolve();
+                    }
+                }
+            }
             InitializeChildrenRunnable initializeChildrenRunnable = new InitializeChildrenRunnable( true, entries
                 .toArray( new IEntry[0] ) );
             new StudioBrowserJob( initializeChildrenRunnable ).execute();
@@ -143,6 +156,14 @@
             for ( ISearch search : searches )
             {
                 search.setSearchResults( null );
+                if ( search instanceof IContinuation )
+                {
+                    IContinuation continuation = ( IContinuation ) search;
+                    if ( continuation.getState() != State.RESOLVED )
+                    {
+                        continuation.resolve();
+                    }
+                }
             }
             new StudioBrowserJob( new SearchRunnable( searches ) ).execute();
         }

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserContentProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserContentProvider.java?rev=827920&r1=827919&r2=827920&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserContentProvider.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserContentProvider.java Wed Oct 21 08:35:55 2009
@@ -36,12 +36,15 @@
 import org.apache.directory.studio.ldapbrowser.core.jobs.StudioBrowserJob;
 import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IContinuation;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.IQuickSearch;
 import org.apache.directory.studio.ldapbrowser.core.model.IRootDSE;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
+import org.apache.directory.studio.ldapbrowser.core.model.IContinuation.State;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DirectoryMetadataEntry;
+import org.apache.directory.studio.ldapbrowser.core.model.impl.SearchContinuation;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.ITreeContentProvider;
@@ -246,7 +249,14 @@
         else if ( child instanceof ISearch )
         {
             ISearch search = ( ( ISearch ) child );
-            return connectionToCategoriesMap.get( search.getBrowserConnection() )[1];
+            if ( connectionToCategoriesMap.get( search.getBrowserConnection() ) != null )
+            {
+                return connectionToCategoriesMap.get( search.getBrowserConnection() )[1];
+            }
+            else
+            {
+                return null;
+            }
         }
         else if ( child instanceof ISearchResult )
         {
@@ -271,7 +281,14 @@
         else if ( child instanceof IBookmark )
         {
             IBookmark bookmark = ( ( IBookmark ) child );
-            return connectionToCategoriesMap.get( bookmark.getBrowserConnection() )[2];
+            if ( connectionToCategoriesMap.get( bookmark.getBrowserConnection() ) != null )
+            {
+                return connectionToCategoriesMap.get( bookmark.getBrowserConnection() )[2];
+            }
+            else
+            {
+                return null;
+            }
         }
         else
         {
@@ -334,6 +351,19 @@
         else if ( parent instanceof IEntry )
         {
             final IEntry parentEntry = ( IEntry ) parent;
+            
+            if ( parentEntry instanceof IContinuation )
+            {
+                IContinuation continuation = ( IContinuation ) parentEntry;
+                if ( continuation.getState() == State.UNRESOLVED )
+                {
+                    continuation.resolve();
+                }
+                if ( continuation.getState() == State.CANCELED )
+                {
+                    return new Object[0];
+                }
+            }
 
             if ( !parentEntry.isChildrenInitialized() )
             {
@@ -341,23 +371,21 @@
                 return new String[]
                     { Messages.getString( "BrowserContentProvider.FetchingEntries" ) }; //$NON-NLS-1$
             }
-
-            if ( parentEntry.getChildrenCount() <= preferences.getFoldingSize() || !preferences.isUseFolding() )
+            else if ( parentEntry.getChildrenCount() <= preferences.getFoldingSize() || !preferences.isUseFolding() )
             {
                 if ( entryToEntryPagesMap.containsKey( parentEntry ) )
                 {
                     entryToEntryPagesMap.remove( parentEntry );
                 }
 
-                Object[] results = parentEntry.getChildren();
+                IEntry[] results = parentEntry.getChildren();
 
                 List<Object> objects = new ArrayList<Object>();
 
                 SearchManager sm = parentEntry.getBrowserConnection().getSearchManager();
-                IQuickSearch quickSearch = sm.getQuickSearch();
-                if ( quickSearch != null && parentEntry.getDn().equals( quickSearch.getSearchBase() ) )
+                if ( sm != null && sm.getQuickSearch() != null && parentEntry.getDn().equals( sm.getQuickSearch().getSearchBase() ) )
                 {
-                    objects.add( quickSearch );
+                    objects.add( sm.getQuickSearch() );
                 }
 
                 if ( parentEntry.getTopPageChildrenRunnable() != null )
@@ -366,23 +394,13 @@
                 }
 
                 objects.addAll( Arrays.asList( results ) );
-
+                
                 if ( parentEntry.getNextPageChildrenRunnable() != null )
                 {
                     objects.add( parentEntry.getNextPageChildrenRunnable() );
                 }
 
-                results = objects.toArray();
-
-                if ( results == null )
-                {
-                    return new String[]
-                        { Messages.getString( "BrowserContentProvider.FetchingEntries" ) }; //$NON-NLS-1$
-                }
-                else
-                {
-                    return results;
-                }
+                return objects.toArray();
             }
             else
             {
@@ -412,14 +430,27 @@
         else if ( parent instanceof ISearch )
         {
             ISearch search = ( ISearch ) parent;
-            if ( search.getSearchResults() == null )
+            if ( search instanceof IContinuation )
+            {
+                IContinuation continuation = ( IContinuation ) search;
+                if ( continuation.getState() == State.UNRESOLVED )
+                {
+                    continuation.resolve();
+                }
+                if ( continuation.getState() == State.CANCELED )
+                {
+                    return new Object[0];
+                }
+            }
+            
+            if ( search.getSearchResults() == null || search.getSearchContinuations() == null )
             {
                 new StudioBrowserJob( new SearchRunnable( new ISearch[]
                     { search } ) ).execute();
                 return new String[]
                     { Messages.getString( "BrowserContentProvider.PerformingSearch" ) }; //$NON-NLS-1$
             }
-            else if ( search.getSearchResults().length == 0 )
+            else if ( search.getSearchResults().length + search.getSearchContinuations().length == 0 )
             {
                 return new String[]
                     { Messages.getString( "BrowserContentProvider.NoResults" ) }; //$NON-NLS-1$
@@ -431,7 +462,8 @@
                     searchToSearchResultPagesMap.remove( search );
                 }
 
-                Object[] results = search.getSearchResults();
+                ISearchResult[] results = search.getSearchResults();
+                SearchContinuation[] scs = search.getSearchContinuations();
                 List<Object> objects = new ArrayList<Object>();
 
                 if ( search.getTopSearchRunnable() != null )
@@ -440,15 +472,18 @@
                 }
 
                 objects.addAll( Arrays.asList( results ) );
+                
+                if(scs != null)
+                {
+                    objects.addAll( Arrays.asList( scs ) );
+                }
 
                 if ( search.getNextSearchRunnable() != null )
                 {
                     objects.add( search.getNextSearchRunnable() );
                 }
 
-                results = objects.toArray();
-
-                return results;
+                return objects.toArray();
             }
             else
             {
@@ -509,6 +544,10 @@
             IEntry parentEntry = ( IEntry ) parent;
             return parentEntry.hasChildren();
         }
+        else if ( parent instanceof SearchContinuation )
+        {
+            return true;
+        }
         else if ( parent instanceof BrowserEntryPage )
         {
             return true;

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserLabelProvider.java?rev=827920&r1=827919&r2=827920&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserLabelProvider.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserLabelProvider.java Wed Oct 21 08:35:55 2009
@@ -22,10 +22,7 @@
 
 
 import java.util.Collection;
-import java.util.Iterator;
 
-import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
-import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.ObjectClassTypeEnum;
 import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
 import org.apache.directory.studio.connection.core.Utils;
@@ -34,15 +31,16 @@
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
+import org.apache.directory.studio.ldapbrowser.core.model.IContinuation;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.IQuickSearch;
 import org.apache.directory.studio.ldapbrowser.core.model.IRootDSE;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
-import org.apache.directory.studio.ldapbrowser.core.model.impl.AliasBaseEntry;
+import org.apache.directory.studio.ldapbrowser.core.model.IContinuation.State;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.BaseDNEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DirectoryMetadataEntry;
-import org.apache.directory.studio.ldapbrowser.core.model.impl.ReferralBaseEntry;
+import org.apache.directory.studio.ldapbrowser.core.model.impl.SearchContinuation;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.ObjectClassIconPair;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
@@ -110,14 +108,10 @@
             {
                 return "Root DSE" + append.toString(); //$NON-NLS-1$
             }
-            else if ( entry instanceof ReferralBaseEntry )
+            else if ( entry instanceof IContinuation )
             {
                 return entry.getUrl().toString() + append.toString();
             }
-            else if ( entry instanceof AliasBaseEntry )
-            {
-                return entry.getDn().getUpName() + append.toString();
-            }
             else if ( entry instanceof BaseDNEntry )
             {
                 return entry.getDn().getUpName() + append.toString();
@@ -152,6 +146,11 @@
                 return entry.getDn().getUpName() + append.toString();
             }
         }
+        else if ( obj instanceof SearchContinuation )
+        {
+            SearchContinuation sc = ( SearchContinuation ) obj;
+            return sc.getUrl().toString();
+        }
         else if ( obj instanceof BrowserEntryPage )
         {
             BrowserEntryPage container = ( BrowserEntryPage ) obj;
@@ -166,10 +165,11 @@
         {
             ISearch search = ( ISearch ) obj;
             ISearchResult[] results = search.getSearchResults();
+            SearchContinuation[] scs = search.getSearchContinuations();
             StringBuffer append = new StringBuffer( search.getName() );
-            if ( results != null )
+            if ( results != null && scs != null )
             {
-                append.append( " (" ).append( results.length ); //$NON-NLS-1$
+                append.append( " (" ).append( results.length + scs.length ); //$NON-NLS-1$
                 if ( search.isCountLimitExceeded() )
                 {
                     append.append( "+" ); //$NON-NLS-1$
@@ -187,7 +187,7 @@
         {
             ISearchResult sr = ( ISearchResult ) obj;
 
-            if ( !sr.getSearch().getBrowserConnection().equals( sr.getEntry().getBrowserConnection() ) )
+            if ( sr.getEntry() instanceof IContinuation )
             {
                 return sr.getEntry().getUrl().toString();
             }
@@ -235,11 +235,11 @@
                     ISearch search = ( ISearch ) lockedObject;
                     if ( obj == search.getTopSearchRunnable() )
                     {
-                        return Messages.getString("BrowserLabelProvider.TopPage"); //$NON-NLS-1$
+                        return Messages.getString( "BrowserLabelProvider.TopPage" ); //$NON-NLS-1$
                     }
                     else if ( obj == search.getNextSearchRunnable() )
                     {
-                        return Messages.getString("BrowserLabelProvider.NextPage"); //$NON-NLS-1$
+                        return Messages.getString( "BrowserLabelProvider.NextPage" ); //$NON-NLS-1$
                     }
                 }
                 else if ( lockedObject instanceof IEntry )
@@ -247,11 +247,11 @@
                     IEntry entry = ( IEntry ) lockedObject;
                     if ( obj == entry.getTopPageChildrenRunnable() )
                     {
-                        return Messages.getString("BrowserLabelProvider.TopPage"); //$NON-NLS-1$
+                        return Messages.getString( "BrowserLabelProvider.TopPage" ); //$NON-NLS-1$
                     }
                     else if ( obj == entry.getNextPageChildrenRunnable() )
                     {
-                        return Messages.getString("BrowserLabelProvider.NextPage"); //$NON-NLS-1$
+                        return Messages.getString( "BrowserLabelProvider.NextPage" ); //$NON-NLS-1$
                     }
                 }
             }
@@ -281,7 +281,24 @@
         if ( obj instanceof IEntry )
         {
             IEntry entry = ( IEntry ) obj;
-            return getImageByObjectClass( entry );
+            if ( entry instanceof IRootDSE )
+            {
+                return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_ENTRY_ROOT );
+            }
+            else if ( entry instanceof DirectoryMetadataEntry && ( ( DirectoryMetadataEntry ) entry ).isSchemaEntry() )
+            {
+                return BrowserCommonActivator.getDefault().getImage(
+                    BrowserCommonConstants.IMG_BROWSER_SCHEMABROWSEREDITOR );
+            }
+            else if ( entry.getDn().equals( entry.getBrowserConnection().getSchema().getDn() ) )
+            {
+                return BrowserCommonActivator.getDefault().getImage(
+                    BrowserCommonConstants.IMG_BROWSER_SCHEMABROWSEREDITOR );
+            }
+            else
+            {
+                return getImageByObjectClass( entry );
+            }
         }
         else if ( obj instanceof BrowserEntryPage )
         {
@@ -298,7 +315,11 @@
         else if ( obj instanceof ISearch )
         {
             ISearch search = ( ISearch ) obj;
-            if ( search.getSearchResults() != null )
+            if ( search instanceof IContinuation && ( ( IContinuation ) search ).getState() != State.RESOLVED )
+            {
+                return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_SEARCH_UNPERFORMED );
+            }
+            else if ( search.getSearchResults() != null )
             {
                 return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_SEARCH );
             }
@@ -378,91 +399,15 @@
     }
 
 
-    /**
-     * Gets the image depending on the RDN attribute
-     *
-     * @param entry the entry
-     * @return the image
-     */
-    private Image getImageByRdn( IEntry entry )
+    private Image getImageByObjectClass( IEntry entry )
     {
-        if ( entry instanceof IRootDSE )
-        {
-            return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_ENTRY_ROOT );
-        }
-        else if ( entry instanceof DirectoryMetadataEntry && ( ( DirectoryMetadataEntry ) entry ).isSchemaEntry() )
-        {
-            return BrowserCommonActivator.getDefault()
-                .getImage( BrowserCommonConstants.IMG_BROWSER_SCHEMABROWSEREDITOR );
-        }
-        else if ( entry.getDn().equals( entry.getBrowserConnection().getSchema().getDn() ) )
-        {
-            return BrowserCommonActivator.getDefault()
-                .getImage( BrowserCommonConstants.IMG_BROWSER_SCHEMABROWSEREDITOR );
-        }
-        else if ( entry.isAlias() )
-        {
-            return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_ENTRY_ALIAS );
-        }
-        else if ( entry.isReferral() )
-        {
-            return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_ENTRY_REF );
-        }
-        else if ( entry.isSubentry() )
-        {
-            return BrowserCommonActivator.getDefault()
-                .getImage( BrowserCommonConstants.IMG_BROWSER_SCHEMABROWSEREDITOR );
-        }
-        else
-        {
-            Rdn rdn = entry.getRdn();
-            Iterator<AttributeTypeAndValue> atavIterator = rdn.iterator();
-            while ( atavIterator.hasNext() )
-            {
-                AttributeTypeAndValue atav = atavIterator.next();
-                if ( "cn".equalsIgnoreCase( atav.getUpType() ) || "sn".equalsIgnoreCase( atav.getUpType() ) //$NON-NLS-1$ //$NON-NLS-2$
-                    || "uid".equalsIgnoreCase( atav.getUpType() ) || "userid".equalsIgnoreCase( atav.getUpType() ) ) //$NON-NLS-1$ //$NON-NLS-2$
-                {
-                    return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_ENTRY_PERSON );
-                }
-                else if ( "ou".equalsIgnoreCase( atav.getUpType() ) || "o".equalsIgnoreCase( atav.getUpType() ) ) //$NON-NLS-1$ //$NON-NLS-2$
-                {
-                    return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_ENTRY_ORG );
-                }
-                else if ( "dc".equalsIgnoreCase( atav.getUpType() ) || "c".equalsIgnoreCase( atav.getUpType() ) //$NON-NLS-1$ //$NON-NLS-2$
-                    || "l".equalsIgnoreCase( atav.getUpType() ) ) //$NON-NLS-1$
-                {
-                    return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_ENTRY_DC );
-                }
-            }
-        }
-
-        return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_ENTRY );
-    }
-
-
-    private Image getImageByObjectClass(IEntry entry) {
-        
-        if(entry instanceof IRootDSE) {
-            return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_ENTRY_ROOT );
-        }
-        else if ( entry instanceof DirectoryMetadataEntry && ( ( DirectoryMetadataEntry ) entry ).isSchemaEntry() )
-        {
-            return BrowserCommonActivator.getDefault()
-                .getImage( BrowserCommonConstants.IMG_BROWSER_SCHEMABROWSEREDITOR );
-        }
-        else if ( entry.getDn().equals( entry.getBrowserConnection().getSchema().getDn() ) )
-        {
-            return BrowserCommonActivator.getDefault()
-                .getImage( BrowserCommonConstants.IMG_BROWSER_SCHEMABROWSEREDITOR );
-        }
-        
         Schema schema = entry.getBrowserConnection().getSchema();
         Collection<ObjectClassDescription> ocds = entry.getObjectClassDescriptions();
         if ( ocds != null )
         {
             Collection<String> numericOids = SchemaUtils.getNumericOids( ocds );
-            ObjectClassIconPair[] objectClassIcons = BrowserCorePlugin.getDefault().getCorePreferences().getObjectClassIcons();
+            ObjectClassIconPair[] objectClassIcons = BrowserCorePlugin.getDefault().getCorePreferences()
+                .getObjectClassIcons();
             int maxWeight = 0;
             ObjectClassIconPair maxObjectClassIconPair = null;
             for ( ObjectClassIconPair objectClassIconPair : objectClassIcons )
@@ -471,34 +416,35 @@
                 String[] ocNumericOids = objectClassIconPair.getOcNumericOids();
                 for ( String ocNumericOid : ocNumericOids )
                 {
-                    if(numericOids.contains( ocNumericOid ))
+                    if ( numericOids.contains( ocNumericOid ) )
                     {
                         ObjectClassDescription ocd = schema.getObjectClassDescription( ocNumericOid );
-                        if(ocd.getKind() == ObjectClassTypeEnum.STRUCTURAL)
+                        if ( ocd.getKind() == ObjectClassTypeEnum.STRUCTURAL )
                         {
                             weight += 3;
                         }
-                        else if(ocd.getKind() == ObjectClassTypeEnum.AUXILIARY)
+                        else if ( ocd.getKind() == ObjectClassTypeEnum.AUXILIARY )
                         {
                             weight += 2;
                         }
                     }
                 }
-                if(weight > maxWeight)
+                if ( weight > maxWeight )
                 {
                     maxObjectClassIconPair = objectClassIconPair;
                 }
             }
-            
-            if(maxObjectClassIconPair != null)
+
+            if ( maxObjectClassIconPair != null )
             {
-                return BrowserCommonActivator.getDefault().getImage( maxObjectClassIconPair.getIconPath() );   
+                return BrowserCommonActivator.getDefault().getImage( maxObjectClassIconPair.getIconPath() );
             }
         }
 
         return BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_ENTRY );
     }
 
+
     /**
      * {@inheritDoc}
      */

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java?rev=827920&r1=827919&r2=827920&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java Wed Oct 21 08:35:55 2009
@@ -85,7 +85,9 @@
 
     private static final String X_REFERRAL_HANDLING_IGNORE = "IGNORE"; //$NON-NLS-1$
 
-    private static final String X_REFERRAL_HANDLING_MANAGE = "MANAGE"; //$NON-NLS-1$
+    private static final String X_REFERRAL_HANDLING_FOLLOW = "FOLLOW"; //$NON-NLS-1$
+
+    private static final String X_MANAGE_DSA_IT = "X-MANAGE-DSA-IT"; //$NON-NLS-1$
 
     private static final String X_FETCH_SUBENTRIES = "X-FETCH-SUBENTRIES"; //$NON-NLS-1$
 
@@ -115,20 +117,23 @@
     /** The widget to select the referrals handling method */
     private ReferralsHandlingWidget referralsHandlingWidget;
 
+    /** The ManageDsaIT control button. */
+    private Button manageDsaItButton;
+
     /** The fetch subentries button. */
     private Button fetchSubentriesButton;
 
     /** The paged search button. */
-    protected Button pagedSearchButton;
+    private Button pagedSearchButton;
 
     /** The paged search size label. */
-    protected Label pagedSearchSizeLabel;
+    private Label pagedSearchSizeLabel;
 
     /** The paged search size text. */
-    protected Text pagedSearchSizeText;
+    private Text pagedSearchSizeText;
 
     /** The paged search scroll mode button. */
-    protected Button pagedSearchScrollModeButton;
+    private Button pagedSearchScrollModeButton;
 
     /** The fetch operational attributes button. */
     private Button fetchOperationalAttributesButton;
@@ -210,6 +215,18 @@
 
 
     /**
+     * Returns true if ManageDsaIT control should be used
+     * while browsing.
+     * 
+     * @return true, if ManageDsaIT control should be used
+     */
+    private boolean manageDsaIT()
+    {
+        return manageDsaItButton.getSelection();
+    }
+
+
+    /**
      * Returns true if subentries should be fetched
      * while browsing.
      * 
@@ -345,6 +362,12 @@
         Group group = BaseWidgetUtils.createGroup( composite, Messages.getString( "BrowserParameterPage.Controls" ), 1 ); //$NON-NLS-1$
         Composite groupComposite = BaseWidgetUtils.createColumnContainer( group, 1, 1 );
 
+        // ManageDsaIT control
+        manageDsaItButton = BaseWidgetUtils.createCheckbox( groupComposite, Messages
+            .getString( "BrowserParameterPage.ManageDsaItWhileBrowsing" ), 1 ); //$NON-NLS-1$
+        manageDsaItButton.setToolTipText( Messages.getString( "BrowserParameterPage.ManageDsaItWhileBrowsingTooltip" ) ); //$NON-NLS-1$
+        manageDsaItButton.setSelection( false );
+
         // fetch subentries control
         fetchSubentriesButton = BaseWidgetUtils.createCheckbox( groupComposite, Messages
             .getString( "BrowserParameterPage.FetchSubentriesWhileBrowsing" ), 1 ); //$NON-NLS-1$
@@ -404,8 +427,8 @@
         aliasesDereferencingWidget = new AliasesDereferencingWidget( Connection.AliasDereferencingMethod.ALWAYS );
         aliasesDereferencingWidget.createWidget( composite );
 
-        referralsHandlingWidget = new ReferralsHandlingWidget( Connection.ReferralHandlingMethod.FOLLOW );
-        referralsHandlingWidget.createWidget( composite );
+        referralsHandlingWidget = new ReferralsHandlingWidget( Connection.ReferralHandlingMethod.FOLLOW_MANUALLY );
+        referralsHandlingWidget.createWidget( composite, true );
     }
 
 
@@ -463,6 +486,10 @@
         Connection.AliasDereferencingMethod aliasesDereferencingMethod = Connection.AliasDereferencingMethod
             .getByOrdinal( aliasesDereferencingMethodOrdinal );
         aliasesDereferencingWidget.setAliasesDereferencingMethod( aliasesDereferencingMethod );
+
+        boolean manageDsaIT = parameter.getExtendedBoolProperty( IBrowserConnection.CONNECTION_PARAMETER_MANAGE_DSA_IT );
+        manageDsaItButton.setSelection( manageDsaIT );
+
         boolean fetchSubentries = parameter
             .getExtendedBoolProperty( IBrowserConnection.CONNECTION_PARAMETER_FETCH_SUBENTRIES );
         fetchSubentriesButton.setSelection( fetchSubentries );
@@ -539,6 +566,14 @@
             }
         } );
 
+        manageDsaItButton.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent arg0 )
+            {
+                connectionPageModified();
+            }
+        } );
+
         fetchSubentriesButton.addSelectionListener( new SelectionAdapter()
         {
             public void widgetSelected( SelectionEvent arg0 )
@@ -596,6 +631,9 @@
             getReferralsHandlingMethod().getOrdinal() );
         parameter.setExtendedIntProperty( IBrowserConnection.CONNECTION_PARAMETER_ALIASES_DEREFERENCING_METHOD,
             getAliasesDereferencingMethod().getOrdinal() );
+
+        parameter.setExtendedBoolProperty( IBrowserConnection.CONNECTION_PARAMETER_MANAGE_DSA_IT,
+            manageDsaIT() );
         parameter.setExtendedBoolProperty( IBrowserConnection.CONNECTION_PARAMETER_FETCH_SUBENTRIES,
             isFetchSubentries() );
         parameter.setExtendedBoolProperty( IBrowserConnection.CONNECTION_PARAMETER_PAGED_SEARCH, isPagedSearch() );
@@ -634,7 +672,21 @@
             .getExtendedIntProperty( IBrowserConnection.CONNECTION_PARAMETER_COUNT_LIMIT );
         int timeLimit = connectionParameter.getExtendedIntProperty( IBrowserConnection.CONNECTION_PARAMETER_TIME_LIMIT );
 
-        return isReconnectionRequired() || countLimit != getCountLimit() || timeLimit != getTimeLimit();
+        boolean manageDsaIT = connectionParameter
+            .getExtendedBoolProperty( IBrowserConnection.CONNECTION_PARAMETER_MANAGE_DSA_IT );
+        boolean fetchSubentries = connectionParameter
+            .getExtendedBoolProperty( IBrowserConnection.CONNECTION_PARAMETER_FETCH_SUBENTRIES );
+        boolean pagedSearch = connectionParameter
+            .getExtendedBoolProperty( IBrowserConnection.CONNECTION_PARAMETER_PAGED_SEARCH );
+        int pagedSearchSize = connectionParameter
+            .getExtendedIntProperty( IBrowserConnection.CONNECTION_PARAMETER_PAGED_SEARCH_SIZE );
+        boolean pagedSearchScrollMode = connectionParameter
+            .getExtendedBoolProperty( IBrowserConnection.CONNECTION_PARAMETER_PAGED_SEARCH_SCROLL_MODE );
+
+        return isReconnectionRequired() || countLimit != getCountLimit() || timeLimit != getTimeLimit()
+            || manageDsaIT != manageDsaIT() || fetchSubentries != isFetchSubentries()
+            || pagedSearch != isPagedSearch() || pagedSearchSize != getPagedSearchSize()
+            || pagedSearchScrollMode != isPagedSearchScrollMode();
     }
 
 
@@ -659,22 +711,12 @@
             .getExtendedIntProperty( IBrowserConnection.CONNECTION_PARAMETER_ALIASES_DEREFERENCING_METHOD );
         Connection.AliasDereferencingMethod aliasesDereferencingMethod = Connection.AliasDereferencingMethod
             .getByOrdinal( aliasesDereferencingMethodOrdinal );
-        boolean fetchSubentries = connectionParameter
-            .getExtendedBoolProperty( IBrowserConnection.CONNECTION_PARAMETER_FETCH_SUBENTRIES );
-        boolean pagedSearch = connectionParameter
-            .getExtendedBoolProperty( IBrowserConnection.CONNECTION_PARAMETER_PAGED_SEARCH );
-        int pagedSearchSize = connectionParameter
-            .getExtendedIntProperty( IBrowserConnection.CONNECTION_PARAMETER_PAGED_SEARCH_SIZE );
-        boolean pagedSearchScrollMode = connectionParameter
-            .getExtendedBoolProperty( IBrowserConnection.CONNECTION_PARAMETER_PAGED_SEARCH_SCROLL_MODE );
         boolean fetchOperationalAttributes = connectionParameter
             .getExtendedBoolProperty( IBrowserConnection.CONNECTION_PARAMETER_FETCH_OPERATIONAL_ATTRIBUTES );
 
         return fetchBaseDns != isAutoFetchBaseDns() || !StringUtils.equals( baseDn, getBaseDN() )
             || referralsHandlingMethod != getReferralsHandlingMethod()
-            || aliasesDereferencingMethod != getAliasesDereferencingMethod() || fetchSubentries != isFetchSubentries()
-            || pagedSearch != isPagedSearch() || pagedSearchSize != getPagedSearchSize()
-            || pagedSearchScrollMode != isPagedSearchScrollMode()
+            || aliasesDereferencingMethod != getAliasesDereferencingMethod()
             || fetchOperationalAttributes != isFetchOperationalAttributes();
     }
 
@@ -734,17 +776,24 @@
             .getByOrdinal( referralsHandlingMethodOrdinal );
         switch ( referralsHandlingMethod )
         {
-            case FOLLOW:
+            case FOLLOW_MANUALLY:
                 // default
                 break;
             case IGNORE:
                 ldapUrl.getExtensions().add( new Extension( false, X_REFERRAL_HANDLING, X_REFERRAL_HANDLING_IGNORE ) );
                 break;
-            case MANAGE:
-                ldapUrl.getExtensions().add( new Extension( false, X_REFERRAL_HANDLING, X_REFERRAL_HANDLING_MANAGE ) );
+            case FOLLOW:
+                ldapUrl.getExtensions().add( new Extension( false, X_REFERRAL_HANDLING, X_REFERRAL_HANDLING_FOLLOW ) );
                 break;
         }
 
+        // ManageDsaIT control
+        boolean manageDsaIt = parameter.getExtendedBoolProperty( IBrowserConnection.CONNECTION_PARAMETER_MANAGE_DSA_IT );
+        if ( manageDsaIt )
+        {
+            ldapUrl.getExtensions().add( new Extension( false, X_MANAGE_DSA_IT, null ) );
+        }
+
         // fetch subentries
         boolean fetchSubentries = parameter
             .getExtendedBoolProperty( IBrowserConnection.CONNECTION_PARAMETER_FETCH_SUBENTRIES );
@@ -844,24 +893,29 @@
                 Connection.AliasDereferencingMethod.ALWAYS.getOrdinal() );
         }
 
-        // referral handling, FOLLOW if unknown or absent
+        // referral handling, FOLLOW_MANUALLY if unknown or absent
         String referral = ldapUrl.getExtensionValue( X_REFERRAL_HANDLING );
         if ( StringUtils.isNotEmpty( referral ) && X_REFERRAL_HANDLING_IGNORE.equalsIgnoreCase( referral ) )
         {
             parameter.setExtendedIntProperty( IBrowserConnection.CONNECTION_PARAMETER_REFERRALS_HANDLING_METHOD,
                 Connection.ReferralHandlingMethod.IGNORE.getOrdinal() );
         }
-        else if ( StringUtils.isNotEmpty( referral ) && X_REFERRAL_HANDLING_MANAGE.equalsIgnoreCase( referral ) )
+        else if ( StringUtils.isNotEmpty( referral ) && X_REFERRAL_HANDLING_FOLLOW.equalsIgnoreCase( referral ) )
         {
             parameter.setExtendedIntProperty( IBrowserConnection.CONNECTION_PARAMETER_REFERRALS_HANDLING_METHOD,
-                Connection.ReferralHandlingMethod.MANAGE.getOrdinal() );
+                Connection.ReferralHandlingMethod.FOLLOW.getOrdinal() );
         }
         else
         {
             parameter.setExtendedIntProperty( IBrowserConnection.CONNECTION_PARAMETER_REFERRALS_HANDLING_METHOD,
-                Connection.ReferralHandlingMethod.FOLLOW.getOrdinal() );
+                Connection.ReferralHandlingMethod.FOLLOW_MANUALLY.getOrdinal() );
         }
 
+        // ManageDsaIT control
+        Extension manageDsaIT = ldapUrl.getExtension( X_MANAGE_DSA_IT );
+        parameter.setExtendedBoolProperty( IBrowserConnection.CONNECTION_PARAMETER_MANAGE_DSA_IT,
+            manageDsaIT != null );
+
         // fetch subentries
         Extension fetchSubentries = ldapUrl.getExtension( X_FETCH_SUBENTRIES );
         parameter.setExtendedBoolProperty( IBrowserConnection.CONNECTION_PARAMETER_FETCH_SUBENTRIES,

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages.properties?rev=827920&r1=827919&r2=827920&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages.properties (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages.properties Wed Oct 21 08:35:55 2009
@@ -33,6 +33,8 @@
 BrowserParameterPage.Features=Features
 BrowserParameterPage.FetchOperationalAttributesWhileBrowsing=Fetch operational attributes while browsing
 BrowserParameterPage.FetchOperationalAttributesWhileBrowsingTooltip=If enabled normal and operational attributes are retrieved.
+BrowserParameterPage.ManageDsaItWhileBrowsing=Use ManageDsaIT control while browsing
+BrowserParameterPage.ManageDsaItWhileBrowsingTooltip=If enabled the ManageDsaIT control is sent to the server in each request. This signals the directory server to not send referrals and search continuations, but return the special referral objects. This only works if the directory server supports the ManageDsaIT control.
 EditorParameterPage.ModifyGroup=Entry Modifcation
 EditorParameterPage.ModifyMode=Modify Mode:
 EditorParameterPage.ModifyModeAddDel=Always use ADD and/or DELETE

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages_de.properties?rev=827920&r1=827919&r2=827920&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages_de.properties (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages_de.properties Wed Oct 21 08:35:55 2009
@@ -33,6 +33,8 @@
 BrowserParameterPage.Features=Features
 BrowserParameterPage.FetchOperationalAttributesWhileBrowsing=Operationale Attribute w\u00E4hrend des Browsens abrufen
 BrowserParameterPage.FetchOperationalAttributesWhileBrowsingTooltip=Wenn aktiviert, werden normale und operationale Attribute abgerufen.
+BrowserParameterPage.ManageDsaItWhileBrowsing=ManageDsaIT Control w\u00E4hrend des Browsens verwenden
+BrowserParameterPage.ManageDsaItWhileBrowsingTooltip=Wenn aktiviert, wird das ManageDsaIT Control bei jedem Request zum Server gesendet. Dies signalisiert dem Verzeichnisdiest keine Verweise zu senden, sondern die speziellen Referral Objekte zurückzuliefern. Der LDAP Server muss das ManageDsaIT control unterst\u00FCtzen.
 EditorParameterPage.ModifyGroup=Eintrag \u00c4nderung
 EditorParameterPage.ModifyMode=\u00c4nderungsmodus:
 EditorParameterPage.ModifyModeAddDel=Immer ADD und/oder DELETE verwenden

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages_fr.properties?rev=827920&r1=827919&r2=827920&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages_fr.properties (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/messages_fr.properties Wed Oct 21 08:35:55 2009
@@ -33,6 +33,8 @@
 BrowserParameterPage.Features=Fonctionnalit\u00E9s
 BrowserParameterPage.FetchOperationalAttributesWhileBrowsing=R\u00E9cup\u00E9rer les attributs op\u00E9rationnels au cours de la navigation
 BrowserParameterPage.FetchOperationalAttributesWhileBrowsingTooltip=Si activ\u00E9, les attributs normaux et op\u00E9rationnels sont r\u00E9cup\u00E9r\u00E9s.
+BrowserParameterPage.ManageDsaItWhileBrowsing=TODO: Use ManageDsaIT control while browsing
+BrowserParameterPage.ManageDsaItWhileBrowsingTooltip=TODO:If enabled the ManageDsaIT control is sent to the server in each request. This signals the directory server to not send referrals and search continuations, but return the special referral objects. This only works if the directory server supports the ManageDsaIT control.
 EditorParameterPage.ModifyGroup=Modification d'entr\u00E9e
 EditorParameterPage.ModifyMode=Mode de modification:
 EditorParameterPage.ModifyModeAddDel=Toujours utiliser ADD et/ou DELETE

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/ReferralsHandlingWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/ReferralsHandlingWidget.java?rev=827920&r1=827919&r2=827920&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/ReferralsHandlingWidget.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/ReferralsHandlingWidget.java Wed Oct 21 08:35:55 2009
@@ -22,6 +22,7 @@
 
 
 import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.connection.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BrowserWidget;
 import org.eclipse.swt.events.SelectionAdapter;
@@ -47,16 +48,16 @@
 
     /** The group. */
     private Group group;
-    
-    /** The follow button. */
-    private Button followButton;
+
+    /** The follow manually button. */
+    private Button followManuallyButton;
+
+    /** The follow automatically button. */
+    private Button followAutomaticallyButton;
 
     /** The ignore button. */
     private Button ignoreButton;
 
-    /** The manage button. */
-    private Button manageButton;
-    
 
     /**
      * Creates a new instance of ReferralsHandlingWidget with the given
@@ -85,31 +86,42 @@
      * 
      * @param parent the parent
      */
-    public void createWidget( Composite parent )
+    public void createWidget( Composite parent, boolean followManuallyVisible )
     {
-        group = BaseWidgetUtils.createGroup( parent, Messages.getString("ReferralsHandlingWidget.ReferralsHandling"), 1 ); //$NON-NLS-1$
+        group = BaseWidgetUtils.createGroup( parent,
+            Messages.getString( "ReferralsHandlingWidget.ReferralsHandling" ), 1 ); //$NON-NLS-1$
         Composite groupComposite = BaseWidgetUtils.createColumnContainer( group, 1, 1 );
-        
-        followButton = BaseWidgetUtils.createRadiobutton( groupComposite, Messages.getString("ReferralsHandlingWidget.Follow"), 1 ); //$NON-NLS-1$
-        followButton.addSelectionListener( new SelectionAdapter()
+
+        if ( followManuallyVisible )
         {
-            public void widgetSelected( SelectionEvent e )
+            followManuallyButton = BaseWidgetUtils.createRadiobutton( groupComposite, Messages
+                .getString( "ReferralsHandlingWidget.FollowManually" ), 1 ); //$NON-NLS-1$
+            followManuallyButton.setToolTipText( Messages.getString( "ReferralsHandlingWidget.FollowManuallyTooltip" ) ); //$NON-NLS-1$
+            followManuallyButton.addSelectionListener( new SelectionAdapter()
             {
-                notifyListeners();
-            }
-        } );
+                public void widgetSelected( SelectionEvent e )
+                {
+                    notifyListeners();
+                }
+            } );
+        }
 
-        ignoreButton = BaseWidgetUtils.createRadiobutton( groupComposite, Messages.getString("ReferralsHandlingWidget.Ignore"), 1 ); //$NON-NLS-1$
-        ignoreButton.addSelectionListener( new SelectionAdapter()
+        followAutomaticallyButton = BaseWidgetUtils.createRadiobutton( groupComposite, Messages
+            .getString( "ReferralsHandlingWidget.FollowAutomatically" ), 1 ); //$NON-NLS-1$
+        followAutomaticallyButton.setToolTipText( Messages
+            .getString( "ReferralsHandlingWidget.FollowAutomaticallyTooltip" ) ); //$NON-NLS-1$
+        followAutomaticallyButton.addSelectionListener( new SelectionAdapter()
         {
             public void widgetSelected( SelectionEvent e )
             {
                 notifyListeners();
             }
         } );
-        
-        manageButton = BaseWidgetUtils.createRadiobutton( groupComposite, Messages.getString("ReferralsHandlingWidget.Manage"), 1 ); //$NON-NLS-1$
-        manageButton.addSelectionListener( new SelectionAdapter()
+
+        ignoreButton = BaseWidgetUtils.createRadiobutton( groupComposite, Messages
+            .getString( "ReferralsHandlingWidget.Ignore" ), 1 ); //$NON-NLS-1$
+        ignoreButton.setToolTipText( Messages.getString( "ReferralsHandlingWidget.IgnoreTooltip" ) ); //$NON-NLS-1$
+        ignoreButton.addSelectionListener( new SelectionAdapter()
         {
             public void widgetSelected( SelectionEvent e )
             {
@@ -129,9 +141,20 @@
     public void setReferralsHandlingMethod( Connection.ReferralHandlingMethod referralsHandlingMethod )
     {
         initialReferralsHandlingMethod = referralsHandlingMethod;
-        followButton.setSelection( initialReferralsHandlingMethod == Connection.ReferralHandlingMethod.FOLLOW );
+        if ( followManuallyButton == null && referralsHandlingMethod == ReferralHandlingMethod.FOLLOW_MANUALLY )
+        {
+            // fall-back to FOLLOW if manually button is invisible
+            initialReferralsHandlingMethod = ReferralHandlingMethod.FOLLOW;
+        }
+
+        if ( followManuallyButton != null )
+        {
+            followManuallyButton
+                .setSelection( initialReferralsHandlingMethod == Connection.ReferralHandlingMethod.FOLLOW_MANUALLY );
+        }
+        followAutomaticallyButton
+            .setSelection( initialReferralsHandlingMethod == Connection.ReferralHandlingMethod.FOLLOW );
         ignoreButton.setSelection( initialReferralsHandlingMethod == Connection.ReferralHandlingMethod.IGNORE );
-        manageButton.setSelection( initialReferralsHandlingMethod == Connection.ReferralHandlingMethod.MANAGE );
     }
 
 
@@ -146,13 +169,13 @@
         {
             return Connection.ReferralHandlingMethod.IGNORE;
         }
-        else if ( manageButton.getSelection() )
+        else if ( followAutomaticallyButton.getSelection() )
         {
-            return Connection.ReferralHandlingMethod.MANAGE;
+            return Connection.ReferralHandlingMethod.FOLLOW;
         }
         else
         {
-            return Connection.ReferralHandlingMethod.FOLLOW;
+            return Connection.ReferralHandlingMethod.FOLLOW_MANUALLY;
         }
     }
 
@@ -165,9 +188,12 @@
     public void setEnabled( boolean b )
     {
         group.setEnabled( b );
-        followButton.setEnabled( b );
+        if ( followManuallyButton != null )
+        {
+            followManuallyButton.setEnabled( b );
+        }
+        followAutomaticallyButton.setEnabled( b );
         ignoreButton.setEnabled( b );
-        manageButton.setEnabled( b );
     }
 
 }

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java?rev=827920&r1=827919&r2=827920&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java Wed Oct 21 08:35:55 2009
@@ -32,6 +32,8 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
 import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.StudioControl;
+import org.apache.directory.studio.connection.core.StudioPagedResultsControl;
 import org.apache.directory.studio.connection.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BrowserWidget;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
@@ -40,8 +42,6 @@
 import org.apache.directory.studio.ldapbrowser.core.jobs.StudioBrowserJob;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
-import org.apache.directory.studio.ldapbrowser.core.model.StudioControl;
-import org.apache.directory.studio.ldapbrowser.core.model.StudioPagedResultsControl;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch.SearchScope;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.swt.events.ModifyEvent;
@@ -135,6 +135,9 @@
 
     /** Style for read-only referrals options */
     public static final int REFERRALOPTIONS_READONLY = 1 << 25;
+    
+    /** Style for invisible follow referrals manually*/
+    public static final int REFERRALOPTIONS_FOLLOW_MANUAL_INVISIBLE = 1 << 26;
 
     /** Style for invisible controls fields */
     public static final int CONTROLS_INVISIBLE = 1 << 30;
@@ -193,8 +196,11 @@
     /** The referrals handling widget. */
     protected ReferralsHandlingWidget referralsHandlingWidget;
 
-    /** The control label. */
-    protected Label controlLabel;
+    /** The control group. */
+    protected Group controlGroup;
+
+    /** The ManageDsaIT control button. */
+    protected Button manageDsaItControlButton;
 
     /** The subentries control button. */
     protected Button subentriesControlButton;
@@ -278,7 +284,8 @@
             return;
         }
 
-        searchNameLabel = BaseWidgetUtils.createLabel( composite, Messages.getString("SearchPageWrapper.SearchName"), 1 ); //$NON-NLS-1$
+        searchNameLabel = BaseWidgetUtils.createLabel( composite,
+            Messages.getString( "SearchPageWrapper.SearchName" ), 1 ); //$NON-NLS-1$
         if ( isActive( NAME_READONLY ) )
         {
             searchNameText = BaseWidgetUtils.createReadonlyText( composite, "", 2 ); //$NON-NLS-1$
@@ -311,7 +318,8 @@
             return;
         }
 
-        connectionLabel = BaseWidgetUtils.createLabel( composite, Messages.getString("SearchPageWrapper.Connection"), 1 ); //$NON-NLS-1$
+        connectionLabel = BaseWidgetUtils.createLabel( composite,
+            Messages.getString( "SearchPageWrapper.Connection" ), 1 ); //$NON-NLS-1$
         browserConnectionWidget = new BrowserConnectionWidget();
         browserConnectionWidget.createWidget( composite );
         browserConnectionWidget.setEnabled( !isActive( CONNECTION_READONLY ) );
@@ -338,7 +346,8 @@
             return;
         }
 
-        searchBaseLabel = BaseWidgetUtils.createLabel( composite, Messages.getString("SearchPageWrapper.SearchBase"), 1 ); //$NON-NLS-1$
+        searchBaseLabel = BaseWidgetUtils.createLabel( composite,
+            Messages.getString( "SearchPageWrapper.SearchBase" ), 1 ); //$NON-NLS-1$
         searchBaseWidget = new EntryWidget();
         searchBaseWidget.createWidget( composite );
         searchBaseWidget.setEnabled( !isActive( SEARCHBASE_READONLY ) );
@@ -365,7 +374,7 @@
             return;
         }
 
-        filterLabel = BaseWidgetUtils.createLabel( composite, Messages.getString("SearchPageWrapper.Filter"), 1 ); //$NON-NLS-1$
+        filterLabel = BaseWidgetUtils.createLabel( composite, Messages.getString( "SearchPageWrapper.Filter" ), 1 ); //$NON-NLS-1$
         filterWidget = new FilterWidget();
         filterWidget.createWidget( composite );
         filterWidget.setEnabled( !isActive( FILTER_READONLY ) );
@@ -392,7 +401,7 @@
             return;
         }
 
-        BaseWidgetUtils.createLabel( composite, Messages.getString("SearchPageWrapper.ReturningAttributes"), 1 ); //$NON-NLS-1$
+        BaseWidgetUtils.createLabel( composite, Messages.getString( "SearchPageWrapper.ReturningAttributes" ), 1 ); //$NON-NLS-1$
         Composite retComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 2 );
         returningAttributesWidget = new ReturningAttributesWidget();
         returningAttributesWidget.createWidget( retComposite );
@@ -413,7 +422,8 @@
             Composite buttonComposite = BaseWidgetUtils.createColumnContainer( composite, 3, 1 );
             if ( isActive( RETURN_DN_VISIBLE ) )
             {
-                returnDnButton = BaseWidgetUtils.createCheckbox( buttonComposite, Messages.getString("SearchPageWrapper.ExportDN"), 1 ); //$NON-NLS-1$
+                returnDnButton = BaseWidgetUtils.createCheckbox( buttonComposite, Messages
+                    .getString( "SearchPageWrapper.ExportDN" ), 1 ); //$NON-NLS-1$
                 returnDnButton.addSelectionListener( new SelectionAdapter()
                 {
                     public void widgetSelected( SelectionEvent e )
@@ -425,7 +435,8 @@
             }
             if ( isActive( RETURN_ALLATTRIBUTES_VISIBLE ) )
             {
-                returnAllAttributesButton = BaseWidgetUtils.createCheckbox( buttonComposite, Messages.getString("SearchPageWrapper.AllUserAttributes"), 1 ); //$NON-NLS-1$
+                returnAllAttributesButton = BaseWidgetUtils.createCheckbox( buttonComposite, Messages
+                    .getString( "SearchPageWrapper.AllUserAttributes" ), 1 ); //$NON-NLS-1$
                 returnAllAttributesButton.addSelectionListener( new SelectionAdapter()
                 {
                     public void widgetSelected( SelectionEvent e )
@@ -437,8 +448,8 @@
             }
             if ( isActive( RETURN_OPERATIONALATTRIBUTES_VISIBLE ) )
             {
-                returnOperationalAttributesButton = BaseWidgetUtils.createCheckbox( buttonComposite,
-                    Messages.getString("SearchPageWrapper.OperationalAttributes"), 1 ); //$NON-NLS-1$
+                returnOperationalAttributesButton = BaseWidgetUtils.createCheckbox( buttonComposite, Messages
+                    .getString( "SearchPageWrapper.OperationalAttributes" ), 1 ); //$NON-NLS-1$
                 returnOperationalAttributesButton.addSelectionListener( new SelectionAdapter()
                 {
                     public void widgetSelected( SelectionEvent e )
@@ -503,7 +514,7 @@
         } );
 
         referralsHandlingWidget = new ReferralsHandlingWidget();
-        referralsHandlingWidget.createWidget( optionsComposite );
+        referralsHandlingWidget.createWidget( optionsComposite, !isActive( REFERRALOPTIONS_FOLLOW_MANUAL_INVISIBLE ) );
         referralsHandlingWidget.setEnabled( !isActive( REFERRALOPTIONS_READONLY ) );
         referralsHandlingWidget.addWidgetModifyListener( new WidgetModifyListener()
         {
@@ -528,12 +539,25 @@
         }
 
         Composite controlComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 3 );
-        Group controlGroup = BaseWidgetUtils.createGroup( controlComposite, Messages.getString("SearchPageWrapper.Controls"), 1 ); //$NON-NLS-1$
+        controlGroup = BaseWidgetUtils.createGroup( controlComposite, Messages
+            .getString( "SearchPageWrapper.Controls" ), 1 ); //$NON-NLS-1$
+
+        // ManageDsaIT control
+        manageDsaItControlButton = BaseWidgetUtils.createCheckbox( controlGroup, Messages
+            .getString( "SearchPageWrapper.ManageDsaIt" ), 1 ); //$NON-NLS-1$
+        manageDsaItControlButton.setToolTipText( Messages.getString( "SearchPageWrapper.ManageDsaItTooltip" ) ); //$NON-NLS-1$
+        manageDsaItControlButton.addSelectionListener( new SelectionAdapter()
+        {
+            public void widgetSelected( SelectionEvent e )
+            {
+                validate();
+            }
+        } );
 
         // subentries control
-        subentriesControlButton = BaseWidgetUtils.createCheckbox( controlGroup, Messages.getString("SearchPageWrapper.Subentries"), 1 ); //$NON-NLS-1$
-        subentriesControlButton
-            .setToolTipText( Messages.getString("SearchPageWrapper.SubentriesTooltip") ); //$NON-NLS-1$
+        subentriesControlButton = BaseWidgetUtils.createCheckbox( controlGroup, Messages
+            .getString( "SearchPageWrapper.Subentries" ), 1 ); //$NON-NLS-1$
+        subentriesControlButton.setToolTipText( Messages.getString( "SearchPageWrapper.SubentriesTooltip" ) ); //$NON-NLS-1$
         subentriesControlButton.addSelectionListener( new SelectionAdapter()
         {
             public void widgetSelected( SelectionEvent e )
@@ -544,8 +568,9 @@
 
         // simple paged results control
         Composite sprcComposite = BaseWidgetUtils.createColumnContainer( controlGroup, 4, 1 );
-        pagedSearchControlButton = BaseWidgetUtils.createCheckbox( sprcComposite, Messages.getString("SearchPageWrapper.PagedSearch"), 1 ); //$NON-NLS-1$
-        pagedSearchControlButton.setToolTipText( Messages.getString("SearchPageWrapper.PagedSearchToolTip") ); //$NON-NLS-1$
+        pagedSearchControlButton = BaseWidgetUtils.createCheckbox( sprcComposite, Messages
+            .getString( "SearchPageWrapper.PagedSearch" ), 1 ); //$NON-NLS-1$
+        pagedSearchControlButton.setToolTipText( Messages.getString( "SearchPageWrapper.PagedSearchToolTip" ) ); //$NON-NLS-1$
         pagedSearchControlButton.addSelectionListener( new SelectionAdapter()
         {
             public void widgetSelected( SelectionEvent e )
@@ -553,7 +578,8 @@
                 validate();
             }
         } );
-        pagedSearchControlSizeLabel = BaseWidgetUtils.createLabel( sprcComposite, Messages.getString("SearchPageWrapper.PageSize"), 1 ); //$NON-NLS-1$
+        pagedSearchControlSizeLabel = BaseWidgetUtils.createLabel( sprcComposite, Messages
+            .getString( "SearchPageWrapper.PageSize" ), 1 ); //$NON-NLS-1$
         pagedSearchControlSizeText = BaseWidgetUtils.createText( sprcComposite, "100", 5, 1 ); //$NON-NLS-1$
         pagedSearchControlSizeText.addVerifyListener( new VerifyListener()
         {
@@ -572,8 +598,9 @@
                 validate();
             }
         } );
-        pagedSearchControlScrollButton = BaseWidgetUtils.createCheckbox( sprcComposite, Messages.getString("SearchPageWrapper.ScrollMode"), 1 ); //$NON-NLS-1$
-        pagedSearchControlScrollButton.setToolTipText( Messages.getString("SearchPageWrapper.ScrollModeToolTip") ); //$NON-NLS-1$
+        pagedSearchControlScrollButton = BaseWidgetUtils.createCheckbox( sprcComposite, Messages
+            .getString( "SearchPageWrapper.ScrollMode" ), 1 ); //$NON-NLS-1$
+        pagedSearchControlScrollButton.setToolTipText( Messages.getString( "SearchPageWrapper.ScrollModeToolTip" ) ); //$NON-NLS-1$
         pagedSearchControlScrollButton.setSelection( true );
         pagedSearchControlScrollButton.addSelectionListener( new SelectionAdapter()
         {
@@ -683,7 +710,11 @@
                 {
                     for ( StudioControl c : searchControls )
                     {
-                        if ( StudioControl.SUBENTRIES_CONTROL.equals( c ) )
+                        if ( StudioControl.MANAGEDSAIT_CONTROL.equals( c ) )
+                        {
+                            manageDsaItControlButton.setSelection( true );
+                        }
+                        else if ( StudioControl.SUBENTRIES_CONTROL.equals( c ) )
                         {
                             subentriesControlButton.setSelection( true );
                         }
@@ -836,6 +867,10 @@
 
             search.getSearchParameter().getControls().clear();
 
+            if ( manageDsaItControlButton.getSelection() )
+            {
+                search.getSearchParameter().getControls().add( StudioControl.MANAGEDSAIT_CONTROL );
+            }
             if ( subentriesControlButton.getSelection() )
             {
                 search.getSearchParameter().getControls().add( StudioControl.SUBENTRIES_CONTROL );
@@ -934,19 +969,19 @@
     {
         if ( browserConnectionWidget != null && browserConnectionWidget.getBrowserConnection() == null )
         {
-            return Messages.getString("SearchPageWrapper.SelectConnection"); //$NON-NLS-1$
+            return Messages.getString( "SearchPageWrapper.SelectConnection" ); //$NON-NLS-1$
         }
         if ( searchBaseWidget != null && searchBaseWidget.getDn() == null )
         {
-            return Messages.getString("SearchPageWrapper.EnterValidSearchBase"); //$NON-NLS-1$
+            return Messages.getString( "SearchPageWrapper.EnterValidSearchBase" ); //$NON-NLS-1$
         }
         if ( searchNameText != null && "".equals( searchNameText.getText() ) ) //$NON-NLS-1$
         {
-            return Messages.getString("SearchPageWrapper.EnterSearchName"); //$NON-NLS-1$
+            return Messages.getString( "SearchPageWrapper.EnterSearchName" ); //$NON-NLS-1$
         }
         if ( filterWidget != null && filterWidget.getFilter() == null )
         {
-            return Messages.getString("SearchPageWrapper.EnterValidFilter"); //$NON-NLS-1$
+            return Messages.getString( "SearchPageWrapper.EnterValidFilter" ); //$NON-NLS-1$
         }
 
         return null;
@@ -1013,9 +1048,10 @@
         {
             referralsHandlingWidget.setEnabled( b && !isActive( REFERRALOPTIONS_READONLY ) );
         }
-        if ( controlLabel != null )
+        if ( controlGroup != null )
         {
-            controlLabel.setEnabled( b );
+            controlGroup.setEnabled( b );
+            manageDsaItControlButton.setEnabled( b );
             subentriesControlButton.setEnabled( b );
         }
     }

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/messages.properties?rev=827920&r1=827919&r2=827920&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/messages.properties (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/messages.properties Wed Oct 21 08:35:55 2009
@@ -29,9 +29,12 @@
 LimitWidget.Limits=Limits
 LimitWidget.TimeLimit=&Time Limit (s):
 LimitWidget.TimeLimitToolTip=A time limit that restricts the maximum time (in seconds) allowed for a search.  A value of zero in this field indicates that no client-requested time limit restrictions are in effect for the search. Note: Servers may also enforce a maximum time limit for the search.
-ReferralsHandlingWidget.Follow=Follow Referrals
+ReferralsHandlingWidget.FollowAutomatically=Follow Referrals automatically
+ReferralsHandlingWidget.FollowAutomaticallyTooltip=Follows referrals and search continuations immediately if they are received from the directory server. You are asked which connection you want to use to follow a specific referral URL, this way you have full control regarding encryption and authentication options when following referrals.
+ReferralsHandlingWidget.FollowManually=Follow Referrals manually
+ReferralsHandlingWidget.FollowManuallyTooltip=Received referrals and search continuations are just displayed in the Browser. As soon as you open or expand such an search continuation the search is continued. You are asked which connection you want to use to follow a specific referral URL, this way you have full control regarding encryption and authentication options when following referrals. 
 ReferralsHandlingWidget.Ignore=Ignore Referrals
-ReferralsHandlingWidget.Manage=Show and Edit Referral Entries
+ReferralsHandlingWidget.IgnoreTooltip=Any referral or search continuation received from the directory server is silently ignored. No error is logged, no dialog appears, no special entry is displayed in the DIT, no ManageDsaIT control is sent to the server.
 ReferralsHandlingWidget.ReferralsHandling=Referrals Handling
 ScopeWidget.Object=&Object
 ScopeWidget.OneLevel=One &Level
@@ -57,3 +60,5 @@
 SearchPageWrapper.SelectConnection=Please select a connection.
 SearchPageWrapper.Subentries=Subentries
 SearchPageWrapper.SubentriesTooltip=If enabled only subentries according to RFC 3672 are retrieved, no normal entries.
+SearchPageWrapper.ManageDsaIt=ManageDsaIT
+SearchPageWrapper.ManageDsaItTooltip=...
\ No newline at end of file

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/messages_de.properties?rev=827920&r1=827919&r2=827920&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/messages_de.properties (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/messages_de.properties Wed Oct 21 08:35:55 2009
@@ -29,9 +29,12 @@
 LimitWidget.Limits=Limits
 LimitWidget.TimeLimit=&Max. Suchzeit (s):
 LimitWidget.TimeLimitToolTip=Die maximale Zeit (in Sekunden) die f\u00FCr die Suche verwendet werden soll. Der Wert '0' bedeuted keine Beschr\u00E4nkung.
-ReferralsHandlingWidget.Follow=Verweisen folgen
+ReferralsHandlingWidget.FollowAutomatically=Verweisen automatisch folgen
+ReferralsHandlingWidget.FollowAutomaticallyTooltip=Folgt Verweisen sofort wenn diese vom LDAP Server empfangen wurden. Sie werden gefragt, welche Verbindung genutzt werden soll umd einer Verweis-URL zu folgen, somit haben Sie volle Kontrolle welche Verschlüsselungs- und Authentifizierungsoptionen verwendet werden.
+ReferralsHandlingWidget.FollowManually=Verweisen manuell folgen
+ReferralsHandlingWidget.FollowManuallyTooltip=Empfangene Verweise werden lediglich im Browser angezeigt. Sobald Sie einen solchen Verweis öffnen, wird die Suche fortgesetzt. Sie werden gefragt, welche Verbindung genutzt werden soll umd einer Verweis-URL zu folgen, somit haben Sie volle Kontrolle welche Verschlüsselungs- und Authentifizierungsoptionen verwendet werden.
 ReferralsHandlingWidget.Ignore=Verweise ignorieren
-ReferralsHandlingWidget.Manage=Verweis-Eintr\u00E4ge bearbeiten
+ReferralsHandlingWidget.IgnoreTooltip=Jeder empfange Verweis vom LDAP Server wird ignoriert. Es wir kein Fehler protokolliert, keine Dialog erscheint, keine speziellen Einträge werden angezeigt.
 ReferralsHandlingWidget.ReferralsHandling=Verweisbehandlung
 ScopeWidget.Object=&Objekt
 ScopeWidget.OneLevel=One &Level

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/messages_fr.properties?rev=827920&r1=827919&r2=827920&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/messages_fr.properties (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/messages_fr.properties Wed Oct 21 08:35:55 2009
@@ -29,9 +29,12 @@
 LimitWidget.Limits=Limites
 LimitWidget.TimeLimit=Limite temporelle (s):
 LimitWidget.TimeLimitToolTip=Une limite te temps qui restreint le temps maximum (en secondes) permis pour une recherche. Une valeur de z\u00E9ro dans ce champ indique qu'aucune limite cliente n'affecte la recherche. Note: Certains serveurs peuvent \u00E9galement forcer un temps maximum pour la recherche.
-ReferralsHandlingWidget.Follow=Suivre les r\u00E9f\u00E9rences
+ReferralsHandlingWidget.FollowAutomatically=TODO:Follow Referrals automatically
+ReferralsHandlingWidget.FollowAutomaticallyTooltip=TODO:...
+ReferralsHandlingWidget.FollowManually=TODO:Follow Referrals manually
+ReferralsHandlingWidget.FollowManuallyTooltip=TODO:...
 ReferralsHandlingWidget.Ignore=Ignorer les r\u00E9f\u00E9rences
-ReferralsHandlingWidget.Manage=Afficher et \u00E9diter les entr\u00E9es r\u00E9f\u00E9rences
+ReferralsHandlingWidget.IgnoreTooltip=TODO:...
 ReferralsHandlingWidget.ReferralsHandling=Gestion des r\u00E9f\u00E9rences
 ScopeWidget.Object=Objet
 ScopeWidget.OneLevel=Un niveau

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionIO.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionIO.java?rev=827920&r1=827919&r2=827920&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionIO.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionIO.java Wed Oct 21 08:35:55 2009
@@ -37,13 +37,13 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.Base64;
 import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.StudioControl;
 import org.apache.directory.studio.connection.core.io.ConnectionIOException;
 import org.apache.directory.studio.ldapbrowser.core.model.BookmarkParameter;
 import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.SearchParameter;
-import org.apache.directory.studio.ldapbrowser.core.model.StudioControl;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch.SearchScope;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.Bookmark;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.Search;

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java?rev=827920&r1=827919&r2=827920&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java Wed Oct 21 08:35:55 2009
@@ -37,6 +37,7 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.Control;
+import javax.naming.ldap.ManageReferralControl;
 
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
@@ -44,6 +45,7 @@
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.DnUtils;
+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.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
@@ -212,11 +214,18 @@
         searchControls.setReturningAttributes( new String[]
             { SchemaConstants.ALL_USER_ATTRIBUTES, SchemaConstants.REF_AT } );
         searchControls.setSearchScope( SearchControls.OBJECT_SCOPE );
+
+        // ManageDsaIT control
         Control[] controls = null;
+        if ( entryToCopy.isReferral() )
+        {
+            controls = new Control[]
+                { new ManageReferralControl( false ) };
+        }
+
         NamingEnumeration<SearchResult> result = entryToCopy.getBrowserConnection().getConnection()
             .getJNDIConnectionWrapper().search( entryToCopy.getDn().getUpName(), ISearch.FILTER_TRUE, searchControls,
-                entryToCopy.getBrowserConnection().getAliasesDereferencingMethod(),
-                entryToCopy.getBrowserConnection().getReferralsHandlingMethod(), controls, monitor, null );
+                AliasDereferencingMethod.NEVER, ReferralHandlingMethod.IGNORE, controls, monitor, null );
 
         // In case the parent is the RootDSE: use the parent DN of the old entry
         LdapDN parentDn = parent.getDn();
@@ -278,13 +287,18 @@
                 // apply new RDN to the attributes
                 applyNewRdn( newAttributes, oldRdn, newRdn );
 
-                // determine referrals handling method
-                ReferralHandlingMethod referralsHandlingMethod = newAttributes.get( "ref" ) != null ? ReferralHandlingMethod.MANAGE
-                    : ReferralHandlingMethod.FOLLOW;
+                // ManageDsaIT control
+                Control[] controls = null;
+                if ( newAttributes.get( SchemaConstants.OBJECT_CLASS_AT ) != null
+                    && newAttributes.get( SchemaConstants.OBJECT_CLASS_AT ).contains( SchemaConstants.REFERRAL_OC ) )
+                {
+                    controls = new Control[]
+                        { new ManageReferralControl( false ) };
+                }
 
                 // create entry
                 targetBrowserConnection.getConnection().getJNDIConnectionWrapper().createEntry( newLdapDn.getUpName(),
-                    newAttributes, referralsHandlingMethod, null, dummyMonitor, null );
+                    newAttributes, controls, dummyMonitor, null );
 
                 while ( dummyMonitor.errorsReported() )
                 {
@@ -322,16 +336,16 @@
 
                                     // modify entry
                                     targetBrowserConnection.getConnection().getJNDIConnectionWrapper().modifyEntry(
-                                        newLdapDn.getUpName(), mis.toArray( new ModificationItem[mis.size()] ),
-                                        referralsHandlingMethod, null, dummyMonitor, null );
+                                        newLdapDn.getUpName(), mis.toArray( new ModificationItem[mis.size()] ), null,
+                                        dummyMonitor, null );
 
-                                    // forece reloading of attributes
+                                    // force reloading of attributes
                                     IEntry newEntry = targetBrowserConnection.getEntryFromCache( newLdapDn );
                                     if ( newEntry != null )
                                     {
                                         newEntry.setAttributesInitialized( false );
                                     }
-                                    
+
                                     break;
 
                                 case RENAME_AND_CONTINUE:
@@ -345,8 +359,7 @@
 
                                     // create entry
                                     targetBrowserConnection.getConnection().getJNDIConnectionWrapper().createEntry(
-                                        newLdapDn.getUpName(), newAttributes, referralsHandlingMethod, null,
-                                        dummyMonitor, null );
+                                        newLdapDn.getUpName(), newAttributes, null, dummyMonitor, null );
 
                                     break;
                             }
@@ -382,8 +395,8 @@
                         searchControls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
                         NamingEnumeration<SearchResult> childEntries = sourceBrowserConnection.getConnection()
                             .getJNDIConnectionWrapper().search( oldLdapDn.getUpName(), ISearch.FILTER_TRUE,
-                                searchControls, sourceBrowserConnection.getAliasesDereferencingMethod(),
-                                sourceBrowserConnection.getReferralsHandlingMethod(), null, monitor, null );
+                                searchControls, AliasDereferencingMethod.NEVER, ReferralHandlingMethod.IGNORE, null,
+                                monitor, null );
 
                         if ( scope == SearchControls.ONELEVEL_SCOPE )
                         {



Mime
View raw message