directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r691070 [3/3] - in /directory/studio/trunk: connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ ldapbrowser-common/resources/icons/ ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/comm...
Date Mon, 01 Sep 2008 21:48:26 GMT
Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Search.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Search.java?rev=691070&r1=691069&r2=691070&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Search.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Search.java
Mon Sep  1 14:48:25 2008
@@ -23,16 +23,18 @@
 
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.List;
 
-import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
+import org.apache.directory.studio.connection.core.jobs.StudioBulkRunnableWithProgress;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.events.SearchUpdateEvent;
 import org.apache.directory.studio.ldapbrowser.core.internal.search.LdapSearchPageScoreComputer;
-import org.apache.directory.studio.ldapbrowser.core.model.Control;
+import org.apache.directory.studio.ldapbrowser.core.model.StudioControl;
 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.ISearchResult;
@@ -65,6 +67,12 @@
     /** The count limit exceeded flag. */
     private boolean countLimitExceeded;
 
+    /** The next search runnable. */
+    private StudioBulkRunnableWithProgress nextSearchRunnable;
+
+    /** The top search runnable. */
+    private StudioBulkRunnableWithProgress topSearchRunnable;
+
 
     /**
      * Creates a new search with the following parameters:
@@ -81,7 +89,7 @@
      * <li>follow referrals
      * <li>no initialization of hasChildren flag
      * <li>no controls
-     * <li>
+     * <li>no response controls
      * </ul>
      */
     public Search()
@@ -105,6 +113,7 @@
         this.searchResults = null;
         this.searchParameter = searchParameter;
         this.countLimitExceeded = false;
+        this.nextSearchRunnable = null;
     }
 
 
@@ -141,12 +150,13 @@
      */
     public Search( String searchName, IBrowserConnection conn, LdapDN searchBase, String
filter,
         String[] returningAttributes, SearchScope scope, int countLimit, int timeLimit,
-        AliasDereferencingMethod aliasesDereferencingMethod,
-        ReferralHandlingMethod referralsHandlingMethod, boolean initHasChildrenFlag, Control[]
controls )
+        AliasDereferencingMethod aliasesDereferencingMethod, ReferralHandlingMethod referralsHandlingMethod,
+        boolean initHasChildrenFlag, List<StudioControl> controls )
     {
         this.connection = conn;
         this.searchResults = null;
         this.countLimitExceeded = false;
+        this.nextSearchRunnable = null;
 
         this.searchParameter = new SearchParameter();
         this.searchParameter.setName( searchName );
@@ -159,7 +169,10 @@
         this.searchParameter.setAliasesDereferencingMethod( aliasesDereferencingMethod );
         this.searchParameter.setReferralsHandlingMethod( referralsHandlingMethod );
         this.searchParameter.setInitHasChildrenFlag( initHasChildrenFlag );
-        this.searchParameter.setControls( controls );
+        if ( controls != null )
+        {
+            this.searchParameter.getControls().addAll( controls );
+        }
     }
 
 
@@ -197,7 +210,7 @@
     /**
      * {@inheritDoc}
      */
-    public Control[] getControls()
+    public List<StudioControl> getControls()
     {
         return searchParameter.getControls();
     }
@@ -206,6 +219,15 @@
     /**
      * {@inheritDoc}
      */
+    public List<StudioControl> getResponseControls()
+    {
+        return searchParameter.getResponseControls();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
     public int getCountLimit()
     {
         return searchParameter.getCountLimit();
@@ -441,6 +463,42 @@
     /**
      * {@inheritDoc}
      */
+    public StudioBulkRunnableWithProgress getNextSearchRunnable()
+    {
+        return nextSearchRunnable;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setNextPageSearchRunnable( StudioBulkRunnableWithProgress nextSearchRunnable
)
+    {
+        this.nextSearchRunnable = nextSearchRunnable;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public StudioBulkRunnableWithProgress getTopSearchRunnable()
+    {
+        return topSearchRunnable;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setTopPageSearchRunnable( StudioBulkRunnableWithProgress topSearchRunnable
)
+    {
+        this.topSearchRunnable = topSearchRunnable;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
     public String toString()
     {
         return getName() + " (" + getBrowserConnection() + ")"; //$NON-NLS-1$ //$NON-NLS-2$

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/JNDIUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/JNDIUtils.java?rev=691070&r1=691069&r2=691070&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/JNDIUtils.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/JNDIUtils.java
Mon Sep  1 14:48:25 2008
@@ -27,8 +27,6 @@
 import java.net.UnknownHostException;
 
 import javax.naming.NamingException;
-import javax.naming.ldap.BasicControl;
-import javax.naming.ldap.Control;
 
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
@@ -95,9 +93,9 @@
      */
     public static ConnectionException createConnectionException( SearchParameter searchParameter,
Throwable e )
     {
-    	// TODO: remove when improving error handling
+        // TODO: remove when improving error handling
         e.printStackTrace();
-        
+
         ConnectionException connectionException = null;
         ConnectionException lastException = null;
 
@@ -166,14 +164,4 @@
 
     }
 
-    public static Control[] getManageDsaItControl()
-    {
-        Control[] controls = new Control[]
-            { new BasicControl(
-                org.apache.directory.studio.ldapbrowser.core.model.Control.MANAGEDSAIT_CONTROL.getOid(),
-                org.apache.directory.studio.ldapbrowser.core.model.Control.MANAGEDSAIT_CONTROL.isCritical(),
-                org.apache.directory.studio.ldapbrowser.core.model.Control.MANAGEDSAIT_CONTROL.getControlValue()
) };
-        return controls;
-    }
-    
 }

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java?rev=691070&r1=691069&r2=691070&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java
Mon Sep  1 14:48:25 2008
@@ -302,6 +302,7 @@
                     ISearch search = applyOnPage.getApplyOnSearch();
                     if ( search.getBrowserConnection() != null )
                     {
+                        search.setSearchResults( null );
                         SearchRunnable runnable = new SearchRunnable( new ISearch[]
                             { search } );
                         IStatus status = RunnableContextRunner.execute( runnable, getContainer(),
true );



Mime
View raw message