directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r670449 [2/3] - 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/ connection-core/src/main/java/org/apache/di...
Date Mon, 23 Jun 2008 05:20:24 GMT
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=670449&r1=670448&r2=670449&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 Sun Jun 22 22:20:21 2008
@@ -28,9 +28,10 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.directory.studio.connection.core.jobs.OpenConnectionsJob;
-import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeChildrenJob;
-import org.apache.directory.studio.ldapbrowser.core.jobs.SearchJob;
+import org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable;
+import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeChildrenRunnable;
+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.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
@@ -272,8 +273,8 @@
 
             if ( !rootDSE.isChildrenInitialized() && rootDSE.isDirectoryEntry() )
             {
-                new InitializeChildrenJob( new IEntry[]
-                    { rootDSE } ).execute();
+                new StudioBrowserJob( new InitializeChildrenRunnable( new IEntry[]
+                    { rootDSE } ) ).execute();
                 return new String[]
                     { "Fetching Entries..." };
             }
@@ -300,8 +301,8 @@
 
             if ( !parentEntry.isChildrenInitialized() && parentEntry.isDirectoryEntry() )
             {
-                new InitializeChildrenJob( new IEntry[]
-                    { parentEntry } ).execute();
+                new StudioBrowserJob( new InitializeChildrenRunnable( new IEntry[]
+                    { parentEntry } ) ).execute();
                 return new String[]
                     { "Fetching Entries..." };
             }
@@ -369,8 +370,8 @@
             ISearch search = ( ISearch ) parent;
             if ( search.getSearchResults() == null )
             {
-                new SearchJob( new ISearch[]
-                    { search } ).execute();
+                new StudioBrowserJob( new SearchRunnable( new ISearch[]
+                    { search } ) ).execute();
                 return new String[]
                     { "Performing Search..." };
             }
@@ -416,7 +417,7 @@
                     // open connection when expanding DIT
                     if ( !connection.getConnection().getJNDIConnectionWrapper().isConnected() )
                     {
-                        new OpenConnectionsJob( connection.getConnection() ).execute();
+                        new StudioBrowserJob( new OpenConnectionsRunnable( connection.getConnection() ) ).execute();
                         return new String[]
                             { "Opening Connection..." };
                     }

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=670449&r1=670448&r2=670449&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 Sun Jun 22 22:20:21 2008
@@ -27,13 +27,14 @@
 import org.apache.directory.studio.connection.core.ConnectionParameter;
 import org.apache.directory.studio.connection.ui.AbstractConnectionParameterPage;
 import org.apache.directory.studio.connection.ui.widgets.BaseWidgetUtils;
-import org.apache.directory.studio.ldapbrowser.common.jobs.RunnableContextJobAdapter;
+import org.apache.directory.studio.connection.ui.RunnableContextRunner;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.AliasesDereferencingWidget;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.LimitWidget;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.ReferralsHandlingWidget;
-import org.apache.directory.studio.ldapbrowser.core.jobs.FetchBaseDNsJob;
+import org.apache.directory.studio.ldapbrowser.core.jobs.FetchBaseDNsRunnable;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.BrowserConnection;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
@@ -298,13 +299,13 @@
                 Connection connection = getTestConnection();
                 IBrowserConnection browserConnection = new BrowserConnection( connection );
 
-                FetchBaseDNsJob job = new FetchBaseDNsJob( browserConnection );
-                RunnableContextJobAdapter.execute( job, runnableContext );
-                if ( job.getExternalResult().isOK() )
+                FetchBaseDNsRunnable runnable = new FetchBaseDNsRunnable( browserConnection );
+                IStatus status = RunnableContextRunner.execute( runnable, runnableContext, true );
+                if ( status.isOK() )
                 {
-                    if ( job.getBaseDNs().length > 0 )
+                    if ( runnable.getBaseDNs().length > 0 )
                     {
-                        String[] baseDNs = job.getBaseDNs();
+                        String[] baseDNs = runnable.getBaseDNs();
                         baseDNCombo.setItems( baseDNs );
                         baseDNCombo.select( 0 );
 

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java Sun Jun 22 22:20:21 2008
@@ -26,7 +26,8 @@
 
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
-import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeAttributesJob;
+import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeAttributesRunnable;
+import org.apache.directory.studio.ldapbrowser.core.jobs.StudioBrowserJob;
 import org.apache.directory.studio.ldapbrowser.core.model.AttributeHierarchy;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
@@ -136,8 +137,9 @@
             boolean ai = entry.isAttributesInitialized(); 
             if ( ( !ai || ( !oai && soa ) ) && entry.isDirectoryEntry() )
             {
-                InitializeAttributesJob job = new InitializeAttributesJob( new IEntry[]
+                InitializeAttributesRunnable runnable = new InitializeAttributesRunnable( new IEntry[]
                     { entry }, soa );
+                StudioBrowserJob job = new StudioBrowserJob( runnable );
                 job.execute();
                 return new Object[0];
             }

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java Sun Jun 22 22:20:21 2008
@@ -25,14 +25,14 @@
 
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.DnUtils;
+import org.apache.directory.studio.connection.ui.RunnableContextRunner;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
 import org.apache.directory.studio.ldapbrowser.common.dialogs.SelectEntryDialog;
-import org.apache.directory.studio.ldapbrowser.common.jobs.RunnableContextJobAdapter;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BrowserWidget;
 import org.apache.directory.studio.ldapbrowser.common.widgets.HistoryUtils;
-import org.apache.directory.studio.ldapbrowser.core.jobs.ReadEntryJob;
+import org.apache.directory.studio.ldapbrowser.core.jobs.ReadEntryRunnable;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.eclipse.swt.SWT;
@@ -189,9 +189,9 @@
                         rootEntry = browserConnection.getEntryFromCache( suffix );
                         if ( rootEntry == null )
                         {
-                            ReadEntryJob job = new ReadEntryJob( browserConnection, suffix );
-                            RunnableContextJobAdapter.execute( job );
-                            rootEntry = job.getReadEntry();
+                            ReadEntryRunnable runnable = new ReadEntryRunnable( browserConnection, suffix );
+                            RunnableContextRunner.execute( runnable, null, true );
+                            rootEntry = runnable.getReadEntry();
                         }
                     }
 
@@ -212,13 +212,12 @@
                         entry = browserConnection.getEntryFromCache( initialDN );
                         if ( entry == null )
                         {
-                            ReadEntryJob job = new ReadEntryJob( browserConnection, initialDN );
-                            RunnableContextJobAdapter.execute( job );
-                            entry = job.getReadEntry();
+                            ReadEntryRunnable runnable = new ReadEntryRunnable( browserConnection, suffix );
+                            RunnableContextRunner.execute( runnable, null, true );
+                            entry = runnable.getReadEntry();
                         }
                     }
 
-
                     // open dialog
                     SelectEntryDialog dialog = new SelectEntryDialog( parent.getShell(), "Select DN", rootEntry, entry );
                     dialog.open();

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=670449&r1=670448&r2=670449&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 Sun Jun 22 22:20:21 2008
@@ -33,7 +33,8 @@
 import org.apache.directory.studio.ldapbrowser.common.widgets.BrowserWidget;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyListener;
-import org.apache.directory.studio.ldapbrowser.core.jobs.SearchJob;
+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.Control;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
@@ -807,8 +808,8 @@
     {
         if ( search.getBrowserConnection() != null )
         {
-            new SearchJob( new ISearch[]
-                { search } ).execute();
+            new StudioBrowserJob( new SearchRunnable( new ISearch[]
+                { search } ) ).execute();
             return true;
         }
         else

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionListener.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionListener.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionListener.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionListener.java Sun Jun 22 22:20:21 2008
@@ -28,11 +28,11 @@
 import org.apache.directory.shared.ldap.schema.syntax.AttributeTypeDescription;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.IConnectionListener;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.events.BrowserConnectionUpdateEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
-import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeAttributesJob;
-import org.apache.directory.studio.ldapbrowser.core.jobs.ReloadSchemasJob;
+import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeAttributesRunnable;
+import org.apache.directory.studio.ldapbrowser.core.jobs.ReloadSchemaRunnable;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IRootDSE;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
@@ -112,10 +112,10 @@
      */
     private static void openBrowserConnection( IBrowserConnection browserConnection, StudioProgressMonitor monitor )
     {
-        ReloadSchemasJob.reloadSchema( false, browserConnection, monitor );
+        ReloadSchemaRunnable.reloadSchema( false, browserConnection, monitor );
 
         IRootDSE rootDSE = browserConnection.getRootDSE();
-        InitializeAttributesJob.initializeAttributes( rootDSE, true, monitor );
+        InitializeAttributesRunnable.initializeAttributes( rootDSE, true, monitor );
     }
 
 

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractAttributeModificationJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractAttributeModificationJob.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractAttributeModificationJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractAttributeModificationJob.java Sun Jun 22 22:20:21 2008
@@ -22,7 +22,7 @@
 
 
 import org.apache.directory.studio.connection.core.Connection;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 
 
@@ -37,7 +37,7 @@
 {
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#executeNotificationJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#executeNotificationJob(org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor)
      */
     protected void executeNotificationJob( StudioProgressMonitor monitor )
     {
@@ -51,7 +51,7 @@
             {
                 // reload affected attributes
                 String[] attributeDescriptions = getAffectedAttributeDescriptions();
-                InitializeAttributesJob.initializeAttributes( getModifiedEntry(), attributeDescriptions, monitor );
+                InitializeAttributesRunnable.initializeAttributes( getModifiedEntry(), attributeDescriptions, monitor );
             }
         }
     }

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java Sun Jun 22 22:20:21 2008
@@ -25,7 +25,7 @@
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.IConnectionListener;
 import org.apache.directory.studio.connection.core.Messages;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractNotificationJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractNotificationJob.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractNotificationJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractNotificationJob.java Sun Jun 22 22:20:21 2008
@@ -21,7 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.core.jobs;
 
 
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 
 

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=670449&r1=670448&r2=670449&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 Sun Jun 22 22:20:21 2008
@@ -41,7 +41,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.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.ChildrenInitializedEvent;
@@ -123,7 +123,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#executeNotificationJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#executeNotificationJob(org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor)
      */
     protected void executeNotificationJob( StudioProgressMonitor monitor )
     {

Copied: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateEntryRunnable.java (from r670090, directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateEntryJob.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateEntryRunnable.java?p2=directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateEntryRunnable.java&p1=directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateEntryJob.java&r1=670090&r2=670449&rev=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateEntryJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateEntryRunnable.java Sun Jun 22 22:20:21 2008
@@ -25,7 +25,8 @@
 import javax.naming.directory.BasicAttributes;
 
 import org.apache.directory.studio.connection.core.Connection;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioBulkRunnableWithProgress;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryAddedEvent;
@@ -37,12 +38,12 @@
 
 
 /**
- * Job to create an entry asynchronously.
+ * Runnable to create an entry.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class CreateEntryJob extends AbstractNotificationJob
+public class CreateEntryRunnable implements StudioBulkRunnableWithProgress
 {
 
     /** The entry to create. */
@@ -56,25 +57,23 @@
 
 
     /**
-     * Creates a new instance of CreateEntryJob.
+     * Creates a new instance of CreateEntryRunnable.
      * 
      * @param entryToCreate the entry to create
      * @param browserConnection the browser connection
      */
-    public CreateEntryJob( IEntry entryToCreate, IBrowserConnection browserConnection )
+    public CreateEntryRunnable( IEntry entryToCreate, IBrowserConnection browserConnection )
     {
         this.entryToCreate = entryToCreate;
         this.browserConnection = browserConnection;
         this.createdEntry = null;
-
-        setName( BrowserCoreMessages.jobs__create_entry_name_1 );
     }
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getConnections()
+     * {@inheritDoc}
      */
-    protected Connection[] getConnections()
+    public Connection[] getConnections()
     {
         return new Connection[]
             { browserConnection.getConnection() };
@@ -82,9 +81,18 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getLockedObjects()
+     * {@inheritDoc}
+     */
+    public String getName()
+    {
+        return BrowserCoreMessages.jobs__create_entry_name_1;
+    }
+
+
+    /**
+     * {@inheritDoc}
      */
-    protected Object[] getLockedObjects()
+    public Object[] getLockedObjects()
     {
         return new Object[]
             { browserConnection };
@@ -92,9 +100,9 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#executeNotificationJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * {@inheritDoc}
      */
-    protected void executeNotificationJob( StudioProgressMonitor monitor )
+    public void run( StudioProgressMonitor monitor )
     {
         monitor.beginTask( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__create_entry_task_1, new String[]
             { entryToCreate.getDn().getUpName() } ), 2 + 1 );
@@ -105,7 +113,7 @@
 
         if ( !monitor.errorsReported() )
         {
-            createdEntry = ReadEntryJob.getEntry( browserConnection, entryToCreate.getDn(), monitor );
+            createdEntry = ReadEntryRunnable.getEntry( browserConnection, entryToCreate.getDn(), monitor );
             // createdEntries[i].getParententry().addChild(entry, this);
             createdEntry.setHasChildrenHint( false );
         }
@@ -116,9 +124,9 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#runNotification()
+     * {@inheritDoc}
      */
-    protected void runNotification()
+    public void runNotification()
     {
         if ( createdEntry != null )
         {
@@ -128,9 +136,9 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getErrorMessage()
+     * {@inheritDoc}
      */
-    protected String getErrorMessage()
+    public String getErrorMessage()
     {
         return BrowserCoreMessages.jobs__create_entry_error_1;
     }

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateValuesJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateValuesJob.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateValuesJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateValuesJob.java Sun Jun 22 22:20:21 2008
@@ -28,7 +28,7 @@
 import javax.naming.directory.DirContext;
 import javax.naming.directory.ModificationItem;
 
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributesInitializedEvent;
@@ -92,7 +92,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractAttributeModificationJob#executeAttributeModificationJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractAttributeModificationJob#executeAttributeModificationJob(org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor)
      */
     protected void executeAttributeModificationJob( StudioProgressMonitor monitor )
     {

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteAttributesValueJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteAttributesValueJob.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteAttributesValueJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteAttributesValueJob.java Sun Jun 22 22:20:21 2008
@@ -30,7 +30,7 @@
 import javax.naming.directory.DirContext;
 import javax.naming.directory.ModificationItem;
 
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributeDeletedEvent;
@@ -124,7 +124,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractAttributeModificationJob#executeAttributeModificationJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractAttributeModificationJob#executeAttributeModificationJob(org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor)
      */
     protected void executeAttributeModificationJob( StudioProgressMonitor monitor )
     {

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteEntriesJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteEntriesJob.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteEntriesJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteEntriesJob.java Sun Jun 22 22:20:21 2008
@@ -37,7 +37,7 @@
 
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.Connection;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExecuteLdifJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExecuteLdifJob.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExecuteLdifJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExecuteLdifJob.java Sun Jun 22 22:20:21 2008
@@ -29,7 +29,7 @@
 
 import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.directory.studio.connection.core.Connection;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.BulkModificationEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
@@ -96,7 +96,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#executeNotificationJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#executeNotificationJob(org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor)
      */
     protected void executeNotificationJob( StudioProgressMonitor monitor )
     {

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportCsvJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportCsvJob.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportCsvJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportCsvJob.java Sun Jun 22 22:20:21 2008
@@ -31,7 +31,7 @@
 
 import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.directory.studio.connection.core.Connection;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
@@ -110,7 +110,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#executeAsyncJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#executeAsyncJob(org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor)
      */
     protected void executeAsyncJob( StudioProgressMonitor monitor )
     {

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java Sun Jun 22 22:20:21 2008
@@ -57,7 +57,7 @@
 import org.apache.directory.shared.ldap.filter.SubstringNode;
 import org.apache.directory.shared.ldap.message.ScopeEnum;
 import org.apache.directory.studio.connection.core.Connection;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.dsmlv2.engine.Dsmlv2Engine;
 import org.apache.directory.studio.dsmlv2.request.SearchRequestDsml;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportLdifJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportLdifJob.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportLdifJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportLdifJob.java Sun Jun 22 22:20:21 2008
@@ -36,7 +36,7 @@
 import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.Connection;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.model.ConnectionException;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
@@ -110,7 +110,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#executeAsyncJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#executeAsyncJob(org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor)
      */
     protected void executeAsyncJob( StudioProgressMonitor monitor )
     {
@@ -205,7 +205,7 @@
     static JndiLdifEnumeration search( IBrowserConnection browserConnection, SearchParameter parameter, StudioProgressMonitor monitor )
         throws ConnectionException
     {
-        NamingEnumeration<SearchResult> result = SearchJob.search( browserConnection, parameter, monitor );
+        NamingEnumeration<SearchResult> result = SearchRunnable.search( browserConnection, parameter, monitor );
         
         if(monitor.errorsReported())
         {

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportXlsJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportXlsJob.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportXlsJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportXlsJob.java Sun Jun 22 22:20:21 2008
@@ -28,7 +28,7 @@
 
 import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.directory.studio.connection.core.Connection;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
@@ -111,7 +111,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#executeAsyncJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#executeAsyncJob(org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor)
      */
     protected void executeAsyncJob( StudioProgressMonitor monitor )
     {

Copied: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsRunnable.java (from r670090, directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsJob.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsRunnable.java?p2=directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsRunnable.java&p1=directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsJob.java&r1=670090&r2=670449&rev=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsRunnable.java Sun Jun 22 22:20:21 2008
@@ -21,18 +21,22 @@
 package org.apache.directory.studio.ldapbrowser.core.jobs;
 
 
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.directory.studio.connection.core.Connection;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioBulkRunnableWithProgress;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IRootDSE;
 
 
-public class FetchBaseDNsJob extends AbstractNotificationJob
+/**
+ * Runnable to fetch the base DNs from a directory server.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class FetchBaseDNsRunnable implements StudioBulkRunnableWithProgress
 {
 
     private IBrowserConnection connection;
@@ -40,58 +44,87 @@
     private String[] baseDNs;
 
 
-    public FetchBaseDNsJob( IBrowserConnection connection )
+    /**
+     * Creates a new instance of FetchBaseDNsRunnable.
+     * 
+     * @param connection the connection
+     */
+    public FetchBaseDNsRunnable( IBrowserConnection connection )
     {
         this.connection = connection;
-        setName( BrowserCoreMessages.jobs__fetch_basedns_name );
     }
 
 
-    protected Connection[] getConnections()
+    /**
+     * {@inheritDoc}
+     */
+    public Connection[] getConnections()
+    {
+        return null;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getName()
     {
-        return new Connection[0];
+        return BrowserCoreMessages.jobs__fetch_basedns_name;
     }
 
 
-    protected Object[] getLockedObjects()
+    /**
+     * {@inheritDoc}
+     */
+    public Object[] getLockedObjects()
     {
-        List l = new ArrayList();
-        l.add( connection );
-        return l.toArray();
+        return new Connection[]
+            { connection.getConnection() };
     }
 
 
-    protected void executeNotificationJob( StudioProgressMonitor monitor )
+    /**
+     * {@inheritDoc}
+     */
+    public void run( StudioProgressMonitor monitor )
     {
         monitor.beginTask( BrowserCoreMessages.jobs__fetch_basedns_task, 5 );
         monitor.reportProgress( " " ); //$NON-NLS-1$
         monitor.worked( 1 );
 
         IRootDSE rootDSE = connection.getRootDSE();
-        InitializeAttributesJob.initializeAttributes( rootDSE, true, monitor );
-//        IEntry[] baseDNEntries = connection.getRootDSE().getChildren();
-//        baseDNs = new String[baseDNEntries.length];
-//        for ( int i = 0; i < baseDNs.length; i++ )
-//        {
-//            baseDNs[i] = baseDNEntries[i].getDn().toString();
-//        }
-        
+        InitializeAttributesRunnable.initializeAttributes( rootDSE, true, monitor );
+        //        IEntry[] baseDNEntries = connection.getRootDSE().getChildren();
+        //        baseDNs = new String[baseDNEntries.length];
+        //        for ( int i = 0; i < baseDNs.length; i++ )
+        //        {
+        //            baseDNs[i] = baseDNEntries[i].getDn().toString();
+        //        }
+
         IAttribute attribute = rootDSE.getAttribute( IRootDSE.ROOTDSE_ATTRIBUTE_NAMINGCONTEXTS );
         if ( attribute != null )
         {
             baseDNs = attribute.getStringValues();
         }
-        
+
         monitor.worked( 1 );
     }
 
 
-    protected String getErrorMessage()
+    /**
+     * {@inheritDoc}
+     */
+    public String getErrorMessage()
     {
         return BrowserCoreMessages.jobs__fetch_basedns_error;
     }
 
 
+    /**
+     * Gets the base DNs.
+     * 
+     * @return the base DNs
+     */
     public String[] getBaseDNs()
     {
         if ( baseDNs == null )
@@ -102,9 +135,11 @@
     }
 
 
-    protected void runNotification()
+    /**
+     * {@inheritDoc}
+     */
+    public void runNotification()
     {
-
     }
 
 }

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java Sun Jun 22 22:20:21 2008
@@ -31,7 +31,7 @@
 import org.apache.directory.shared.ldap.codec.LdapResponse;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.studio.connection.core.Connection;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.dsmlv2.Dsmlv2ResponseParser;
 import org.apache.directory.studio.dsmlv2.engine.Dsmlv2Engine;
 import org.apache.directory.studio.dsmlv2.reponse.ErrorResponse;

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java Sun Jun 22 22:20:21 2008
@@ -50,7 +50,7 @@
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionCoreConstants;
 import org.apache.directory.studio.connection.core.DnUtils;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.BulkModificationEvent;
@@ -153,7 +153,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#executeNotificationJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#executeNotificationJob(org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor)
      */
     protected void executeNotificationJob( StudioProgressMonitor monitor )
     {

Copied: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java (from r670090, directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesJob.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java?p2=directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java&p1=directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesJob.java&r1=670090&r2=670449&rev=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java Sun Jun 22 22:20:21 2008
@@ -36,7 +36,8 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.syntax.AttributeTypeDescription;
 import org.apache.directory.studio.connection.core.Connection;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioBulkRunnableWithProgress;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
@@ -56,12 +57,12 @@
 
 
 /**
- * Job to initialize the attributes of an entry.
+ * Runnable to initialize the attributes of an entry.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class InitializeAttributesJob extends AbstractNotificationJob
+public class InitializeAttributesRunnable implements StudioBulkRunnableWithProgress
 {
 
     /** The entries. */
@@ -80,23 +81,22 @@
 
 
     /**
-     * Creates a new instance of InitializeAttributesJob.
+     * Creates a new instance of InitializeAttributesRunnable.
      * 
      * @param entries the entries
      * @param initOperationalAttributes true if operational attributes should be initialized
      */
-    public InitializeAttributesJob( IEntry[] entries, boolean initOperationalAttributes )
+    public InitializeAttributesRunnable( IEntry[] entries, boolean initOperationalAttributes )
     {
         this.entries = entries;
         this.initOperationalAttributes = initOperationalAttributes;
-        setName( BrowserCoreMessages.jobs__init_entries_title_attonly );
     }
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getConnections()
+     * {@inheritDoc}
      */
-    protected Connection[] getConnections()
+    public Connection[] getConnections()
     {
         Connection[] connections = new Connection[entries.length];
         for ( int i = 0; i < connections.length; i++ )
@@ -108,9 +108,18 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getLockedObjects()
+     * {@inheritDoc}
      */
-    protected Object[] getLockedObjects()
+    public String getName()
+    {
+        return BrowserCoreMessages.jobs__init_entries_title_attonly;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public Object[] getLockedObjects()
     {
         List<Object> l = new ArrayList<Object>();
         l.addAll( Arrays.asList( entries ) );
@@ -119,9 +128,9 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getErrorMessage()
+     * {@inheritDoc}
      */
-    protected String getErrorMessage()
+    public String getErrorMessage()
     {
         return entries.length == 1 ? BrowserCoreMessages.jobs__init_entries_error_1
             : BrowserCoreMessages.jobs__init_entries_error_n;
@@ -129,9 +138,9 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#executeNotificationJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * {@inheritDoc}
      */
-    protected void executeNotificationJob( StudioProgressMonitor monitor )
+    public void run( StudioProgressMonitor monitor )
     {
         monitor.beginTask( " ", entries.length + 2 ); //$NON-NLS-1$
         monitor.reportProgress( " " ); //$NON-NLS-1$
@@ -150,9 +159,9 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#runNotification()
+     * {@inheritDoc}
      */
-    protected void runNotification()
+    public void runNotification()
     {
         for ( IEntry entry : entries )
         {
@@ -236,12 +245,12 @@
             {
                 referralsHandlingMethod = ReferralHandlingMethod.MANAGE;
             }
-            
+
             // search
             ISearch search = new Search( null, entry.getBrowserConnection(), entry.getDn(),
                 entry.isSubentry() ? ISearch.FILTER_SUBENTRY : ISearch.FILTER_TRUE, attributes, SearchScope.OBJECT, 0,
                 0, aliasesDereferencingMethod, referralsHandlingMethod, false, null );
-            SearchJob.searchAndUpdateModel( entry.getBrowserConnection(), search, monitor );
+            SearchRunnable.searchAndUpdateModel( entry.getBrowserConnection(), search, monitor );
 
             // set initialized state
             entry.setAttributesInitialized( true );
@@ -277,13 +286,13 @@
         ISearch search = new Search( null, browserConnection, LdapDN.EMPTY_LDAPDN, ISearch.FILTER_TRUE, new String[]
             { ISearch.ALL_USER_ATTRIBUTES }, SearchScope.OBJECT, 0, 0, Connection.AliasDereferencingMethod.NEVER,
             Connection.ReferralHandlingMethod.IGNORE, false, null );
-        SearchJob.searchAndUpdateModel( browserConnection, search, monitor );
+        SearchRunnable.searchAndUpdateModel( browserConnection, search, monitor );
 
         // load well-known Root DSE attributes and operational attributes
         search = new Search( null, browserConnection, LdapDN.EMPTY_LDAPDN, ISearch.FILTER_TRUE, ROOT_DSE_ATTRIBUTES,
             SearchScope.OBJECT, 0, 0, Connection.AliasDereferencingMethod.NEVER,
             Connection.ReferralHandlingMethod.IGNORE, false, null );
-        SearchJob.searchAndUpdateModel( browserConnection, search, monitor );
+        SearchRunnable.searchAndUpdateModel( browserConnection, search, monitor );
 
         // the list of entries under the Root DSE
         Map<LdapDN, IEntry> rootDseEntries = new HashMap<LdapDN, IEntry>();
@@ -349,7 +358,7 @@
                     search = new Search( null, browserConnection, LdapDN.EMPTY_LDAPDN, ISearch.FILTER_TRUE,
                         ISearch.NO_ATTRIBUTES, SearchScope.ONELEVEL, 0, 0, Connection.AliasDereferencingMethod.NEVER,
                         Connection.ReferralHandlingMethod.IGNORE, false, null );
-                    SearchJob.searchAndUpdateModel( browserConnection, search, monitor );
+                    SearchRunnable.searchAndUpdateModel( browserConnection, search, monitor );
                     ISearchResult[] results = search.getSearchResults();
                     for ( ISearchResult searchResult : results )
                     {
@@ -412,7 +421,7 @@
         ReferralHandlingMethod handleReferralsMethod = browserConnection.getReferralsHandlingMethod();
         search = new Search( null, browserConnection, dn, ISearch.FILTER_TRUE, ISearch.NO_ATTRIBUTES,
             SearchScope.OBJECT, 1, 0, derefAliasMethod, handleReferralsMethod, true, null );
-        SearchJob.searchAndUpdateModel( browserConnection, search, monitor );
+        SearchRunnable.searchAndUpdateModel( browserConnection, search, monitor );
 
         // add entry to Root DSE
         ISearchResult[] results = search.getSearchResults();

Copied: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenRunnable.java (from r670090, directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenJob.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenRunnable.java?p2=directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenRunnable.java&p1=directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenJob.java&r1=670090&r2=670449&rev=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenRunnable.java Sun Jun 22 22:20:21 2008
@@ -26,7 +26,8 @@
 import java.util.List;
 
 import org.apache.directory.studio.connection.core.Connection;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioBulkRunnableWithProgress;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
@@ -45,12 +46,12 @@
 
 
 /**
- * Job to initialize the child entries of an entry
+ * Runnable to initialize the child entries of an entry
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class InitializeChildrenJob extends AbstractNotificationJob
+public class InitializeChildrenRunnable implements StudioBulkRunnableWithProgress
 {
 
     /** The entries. */
@@ -58,21 +59,20 @@
 
 
     /**
-     * Creates a new instance of InitializeChildrenJob.
+     * Creates a new instance of InitializeChildrenRunnable.
      * 
      * @param entries the entries
      */
-    public InitializeChildrenJob( IEntry[] entries )
+    public InitializeChildrenRunnable( IEntry[] entries )
     {
         this.entries = entries;
-        setName( BrowserCoreMessages.jobs__init_entries_title_subonly );
     }
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getConnections()
+     * {@inheritDoc}
      */
-    protected Connection[] getConnections()
+    public Connection[] getConnections()
     {
         Connection[] connections = new Connection[entries.length];
         for ( int i = 0; i < connections.length; i++ )
@@ -84,9 +84,18 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getLockedObjects()
+     * {@inheritDoc}
      */
-    protected Object[] getLockedObjects()
+    public String getName()
+    {
+        return BrowserCoreMessages.jobs__init_entries_title_subonly;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public Object[] getLockedObjects()
     {
         List<Object> l = new ArrayList<Object>();
         l.addAll( Arrays.asList( entries ) );
@@ -95,9 +104,9 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getErrorMessage()
+     * {@inheritDoc}
      */
-    protected String getErrorMessage()
+    public String getErrorMessage()
     {
         return entries.length == 1 ? BrowserCoreMessages.jobs__init_entries_error_1
             : BrowserCoreMessages.jobs__init_entries_error_n;
@@ -105,9 +114,9 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#executeNotificationJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * {@inheritDoc}
      */
-    protected void executeNotificationJob( StudioProgressMonitor monitor )
+    public void run( StudioProgressMonitor monitor )
     {
         monitor.beginTask( " ", entries.length + 2 ); //$NON-NLS-1$
         monitor.reportProgress( " " ); //$NON-NLS-1$
@@ -127,9 +136,9 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#runNotification()
+     * {@inheritDoc}
      */
-    protected void runNotification()
+    public void runNotification()
     {
         for ( int pi = 0; pi < entries.length; pi++ )
         {
@@ -171,10 +180,11 @@
                 }
             }
             parent.setChildrenInitialized( false );
-            
+
             // determine alias and referral handling
             SearchScope scope = SearchScope.ONELEVEL;
-            AliasDereferencingMethod aliasesDereferencingMethod = parent.getBrowserConnection().getAliasesDereferencingMethod();
+            AliasDereferencingMethod aliasesDereferencingMethod = parent.getBrowserConnection()
+                .getAliasesDereferencingMethod();
             if ( parent.isAlias() )
             {
                 aliasesDereferencingMethod = AliasDereferencingMethod.NEVER;
@@ -185,18 +195,20 @@
                 referralsHandlingMethod = ReferralHandlingMethod.MANAGE;
             }
             Control[] controls = null;
-            
+
             // get children,
             ISearch search = new Search( null, parent.getBrowserConnection(), parent.getDn(), parent
                 .getChildrenFilter(), ISearch.NO_ATTRIBUTES, scope, parent.getBrowserConnection().getCountLimit(),
                 parent.getBrowserConnection().getTimeLimit(), aliasesDereferencingMethod, referralsHandlingMethod,
                 BrowserCorePlugin.getDefault().getPluginPreferences().getBoolean(
                     BrowserCoreConstants.PREFERENCE_CHECK_FOR_CHILDREN ), controls );
-            SearchJob.searchAndUpdateModel( parent.getBrowserConnection(), search, monitor );
+            SearchRunnable.searchAndUpdateModel( parent.getBrowserConnection(), search, monitor );
             ISearchResult[] srs = search.getSearchResults();
-            monitor.reportProgress( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__init_entries_progress_subcount,
-                new String[]
-                    { srs == null ? Integer.toString( 0 ) : Integer.toString( srs.length ), parent.getDn().getUpName() } ) );
+            monitor.reportProgress( BrowserCoreMessages
+                .bind( BrowserCoreMessages.jobs__init_entries_progress_subcount,
+                    new String[]
+                        { srs == null ? Integer.toString( 0 ) : Integer.toString( srs.length ),
+                            parent.getDn().getUpName() } ) );
 
             // fill children in search result
             if ( srs != null && srs.length > 0 )
@@ -217,8 +229,8 @@
                 {
                     if ( parent.isAlias() && !( srs[i].getEntry() instanceof AliasBaseEntry ) )
                     {
-                        AliasBaseEntry aliasBaseEntry = new AliasBaseEntry( srs[i].getEntry().getBrowserConnection(), srs[i]
-                            .getEntry().getDn() );
+                        AliasBaseEntry aliasBaseEntry = new AliasBaseEntry( srs[i].getEntry().getBrowserConnection(),
+                            srs[i].getEntry().getDn() );
                         parent.addChild( aliasBaseEntry );
                     }
                     else
@@ -236,17 +248,17 @@
             ISearch subSearch = new Search( null, parent.getBrowserConnection(), parent.getDn(), parent
                 .getChildrenFilter() != null ? parent.getChildrenFilter() : ISearch.FILTER_SUBENTRY,
                 ISearch.NO_ATTRIBUTES, scope, parent.getBrowserConnection().getCountLimit(), parent
-                    .getBrowserConnection().getTimeLimit(), aliasesDereferencingMethod, referralsHandlingMethod, BrowserCorePlugin
-                    .getDefault().getPluginPreferences()
-                    .getBoolean( BrowserCoreConstants.PREFERENCE_CHECK_FOR_CHILDREN ), new Control[]
+                    .getBrowserConnection().getTimeLimit(), aliasesDereferencingMethod, referralsHandlingMethod,
+                BrowserCorePlugin.getDefault().getPluginPreferences().getBoolean(
+                    BrowserCoreConstants.PREFERENCE_CHECK_FOR_CHILDREN ), new Control[]
                     { Control.SUBENTRIES_CONTROL } );
             if ( BrowserCorePlugin.getDefault().getPluginPreferences().getBoolean(
                 BrowserCoreConstants.PREFERENCE_FETCH_SUBENTRIES ) )
             {
-                SearchJob.searchAndUpdateModel( parent.getBrowserConnection(), subSearch, monitor );
+                SearchRunnable.searchAndUpdateModel( parent.getBrowserConnection(), subSearch, monitor );
                 ISearchResult[] subSrs = subSearch.getSearchResults();
-                monitor.reportProgress( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__init_entries_progress_subcount,
-                    new String[]
+                monitor.reportProgress( BrowserCoreMessages.bind(
+                    BrowserCoreMessages.jobs__init_entries_progress_subcount, new String[]
                         { subSrs == null ? Integer.toString( 0 ) : Integer.toString( subSrs.length ),
                             parent.getDn().getUpName() } ) );
 
@@ -264,7 +276,7 @@
             // check exceeded limits / canceled
             parent.setHasMoreChildren( search.isCountLimitExceeded() || subSearch.isCountLimitExceeded()
                 || monitor.isCanceled() );
-            
+
             // set initialized state
             parent.setChildrenInitialized( true );
         }

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ModifyValueJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ModifyValueJob.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ModifyValueJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ModifyValueJob.java Sun Jun 22 22:20:21 2008
@@ -25,7 +25,7 @@
 import javax.naming.directory.DirContext;
 import javax.naming.directory.ModificationItem;
 
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributesInitializedEvent;
@@ -77,7 +77,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractAttributeModificationJob#executeAttributeModificationJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractAttributeModificationJob#executeAttributeModificationJob(org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor)
      */
     protected void executeAttributeModificationJob( StudioProgressMonitor monitor )
     {

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/MoveEntriesJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/MoveEntriesJob.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/MoveEntriesJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/MoveEntriesJob.java Sun Jun 22 22:20:21 2008
@@ -33,7 +33,7 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.DnUtils;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryMovedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
@@ -120,7 +120,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#executeNotificationJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#executeNotificationJob(org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor)
      */
     protected void executeNotificationJob( StudioProgressMonitor monitor )
     {
@@ -206,7 +206,7 @@
 
                 // add new entry to new parent
                 boolean hasMoreChildren = newParent.hasMoreChildren() || !newParent.isChildrenInitialized();
-                IEntry newEntry = ReadEntryJob.getEntry( browserConnection, newDn, monitor );
+                IEntry newEntry = ReadEntryRunnable.getEntry( browserConnection, newDn, monitor );
                 newEntries[i] = newEntry;
                 newParent.addChild( newEntry );
                 newParent.setHasMoreChildren( hasMoreChildren );

Copied: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryRunnable.java (from r670090, directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryJob.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryRunnable.java?p2=directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryRunnable.java&p1=directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryJob.java&r1=670090&r2=670449&rev=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryRunnable.java Sun Jun 22 22:20:21 2008
@@ -23,7 +23,8 @@
 
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.Connection;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioBulkRunnableWithProgress;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
@@ -34,12 +35,12 @@
 
 
 /**
- * Job to read a single entry from directory.
+ * Runnable to read a single entry from directory.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ReadEntryJob extends AbstractNotificationJob
+public class ReadEntryRunnable implements StudioBulkRunnableWithProgress
 {
 
     /** The browser connection. */
@@ -53,25 +54,23 @@
 
 
     /**
-     * Creates a new instance of ReadEntryJob.
+     * Creates a new instance of ReadEntryRunnable.
      * 
      * @param browserConnection the browser connection
      * @param dn the DN of the entry
      */
-    public ReadEntryJob( IBrowserConnection browserConnection, LdapDN dn )
+    public ReadEntryRunnable( IBrowserConnection browserConnection, LdapDN dn )
     {
         this.browserConnection = browserConnection;
         this.dn = dn;
         this.readEntry = null;
-
-        setName( BrowserCoreMessages.jobs__read_entry_name );
     }
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getConnections()
+     * {@inheritDoc}
      */
-    protected Connection[] getConnections()
+    public Connection[] getConnections()
     {
         return new Connection[]
             { browserConnection.getConnection() };
@@ -79,9 +78,18 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getLockedObjects()
+     * {@inheritDoc}
+     */
+    public String getName()
+    {
+        return BrowserCoreMessages.jobs__read_entry_name;
+    }
+
+
+    /**
+     * {@inheritDoc}
      */
-    protected Object[] getLockedObjects()
+    public Object[] getLockedObjects()
     {
         return new Object[]
             { browserConnection };
@@ -100,18 +108,18 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getErrorMessage()
+     * {@inheritDoc}
      */
-    protected String getErrorMessage()
+    public String getErrorMessage()
     {
         return BrowserCoreMessages.jobs__read_entry_error;
     }
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#executeNotificationJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * {@inheritDoc}
      */
-    protected void executeNotificationJob( StudioProgressMonitor pm )
+    public void run( StudioProgressMonitor pm )
     {
         readEntry = browserConnection.getEntryFromCache( dn );
         if ( readEntry == null )
@@ -127,9 +135,9 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#runNotification()
+     * {@inheritDoc}
      */
-    protected void runNotification()
+    public void runNotification()
     {
     }
 
@@ -158,7 +166,7 @@
             ISearch search = new Search( null, browserConnection, dn, null, ISearch.NO_ATTRIBUTES, SearchScope.OBJECT,
                 1, 0, browserConnection.getAliasesDereferencingMethod(),
                 browserConnection.getReferralsHandlingMethod(), true, null );
-            SearchJob.searchAndUpdateModel( browserConnection, search, monitor );
+            SearchRunnable.searchAndUpdateModel( browserConnection, search, monitor );
             ISearchResult[] srs = search.getSearchResults();
             if ( srs.length > 0 )
             {

Copied: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemaRunnable.java (from r670090, directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemaRunnable.java?p2=directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemaRunnable.java&p1=directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java&r1=670090&r2=670449&rev=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemaRunnable.java Sun Jun 22 22:20:21 2008
@@ -27,7 +27,8 @@
 
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.Connection;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioBulkRunnableWithProgress;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.BrowserConnectionUpdateEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
@@ -42,12 +43,12 @@
 
 
 /**
- * Job to reload the schema.
+ * Runnable to reload the schema.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class ReloadSchemasJob extends AbstractNotificationJob
+public class ReloadSchemaRunnable implements StudioBulkRunnableWithProgress
 {
 
     /** The browser connection. */
@@ -55,21 +56,20 @@
 
 
     /**
-     * Creates a new instance of ReloadSchemasJob.
+     * Creates a new instance of ReloadSchemaRunnable.
      * 
      * @param browserConnection the browser connection
      */
-    public ReloadSchemasJob( IBrowserConnection browserConnection )
+    public ReloadSchemaRunnable( IBrowserConnection browserConnection )
     {
         this.browserConnection = browserConnection;
-        setName( BrowserCoreMessages.jobs__reload_schemas_name_1 );
     }
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getConnections()
+     * {@inheritDoc}
      */
-    protected Connection[] getConnections()
+    public Connection[] getConnections()
     {
         return new Connection[]
             { browserConnection.getConnection() };
@@ -77,9 +77,18 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getLockedObjects()
+     * {@inheritDoc}
      */
-    protected Object[] getLockedObjects()
+    public String getName()
+    {
+        return BrowserCoreMessages.jobs__reload_schemas_name_1;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public Object[] getLockedObjects()
     {
         return new IBrowserConnection[]
             { browserConnection };
@@ -87,9 +96,9 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#executeNotificationJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * {@inheritDoc}
      */
-    protected void executeNotificationJob( StudioProgressMonitor monitor )
+    public void run( StudioProgressMonitor monitor )
     {
         monitor.beginTask( " ", 3 ); //$NON-NLS-1$
         monitor.reportProgress( " " ); //$NON-NLS-1$
@@ -106,9 +115,9 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#runNotification()
+     * {@inheritDoc}
      */
-    protected void runNotification()
+    public void runNotification()
     {
         BrowserConnectionUpdateEvent browserConnectionUpdateEvent = new BrowserConnectionUpdateEvent(
             browserConnection, BrowserConnectionUpdateEvent.Detail.SCHEMA_UPDATED );
@@ -117,9 +126,9 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getErrorMessage()
+     * {@inheritDoc}
      */
-    protected String getErrorMessage()
+    public String getErrorMessage()
     {
         return BrowserCoreMessages.jobs__reload_schemas_error_1;
     }
@@ -207,7 +216,7 @@
                 .setReturningAttributes( new String[]
                     { IAttribute.OPERATIONAL_ATTRIBUTE_CREATE_TIMESTAMP,
                         IAttribute.OPERATIONAL_ATTRIBUTE_MODIFY_TIMESTAMP } );
-            NamingEnumeration<SearchResult> enumeration = SearchJob.search( browserConnection, sp, monitor );
+            NamingEnumeration<SearchResult> enumeration = SearchRunnable.search( browserConnection, sp, monitor );
             while ( enumeration != null && enumeration.hasMore() )
             {
                 String createTimestamp = null;
@@ -231,8 +240,8 @@
                 String schemaTimestamp = modifyTimestamp != null ? modifyTimestamp : createTimestamp;
                 String cacheTimestamp = schema.getModifyTimestamp() != null ? schema.getModifyTimestamp() : schema
                     .getCreateTimestamp();
-                if ( cacheTimestamp != null && schemaTimestamp != null && schemaTimestamp
-                        .compareTo( cacheTimestamp ) > 0 )
+                if ( cacheTimestamp != null && schemaTimestamp != null
+                    && schemaTimestamp.compareTo( cacheTimestamp ) > 0 )
                 {
                     return true;
                 }
@@ -257,7 +266,7 @@
             sp.setScope( SearchScope.OBJECT );
             sp.setReturningAttributes( new String[]
                 { IRootDSE.ROOTDSE_ATTRIBUTE_SUBSCHEMASUBENTRY } );
-            NamingEnumeration<SearchResult> enumeration = SearchJob.search( browserConnection, sp, monitor );
+            NamingEnumeration<SearchResult> enumeration = SearchRunnable.search( browserConnection, sp, monitor );
             while ( enumeration != null && enumeration.hasMore() )
             {
                 SearchResult sr = enumeration.next();

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryJob.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryJob.java Sun Jun 22 22:20:21 2008
@@ -33,7 +33,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.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryRenamedEvent;
@@ -119,7 +119,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#executeNotificationJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractNotificationJob#executeNotificationJob(org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor)
      */
     protected void executeNotificationJob( StudioProgressMonitor monitor )
     {
@@ -189,7 +189,7 @@
             IEntry parent = oldEntry.getParententry();
             boolean hasMoreChildren = parent.hasMoreChildren();
             parent.deleteChild( oldEntry );
-            newEntry = ReadEntryJob.getEntry( browserConnection, newDn, monitor );
+            newEntry = ReadEntryRunnable.getEntry( browserConnection, newDn, monitor );
             parent.addChild( newEntry );
             parent.setHasMoreChildren( hasMoreChildren );
 

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameValuesJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameValuesJob.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameValuesJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameValuesJob.java Sun Jun 22 22:20:21 2008
@@ -24,7 +24,7 @@
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributesInitializedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryModificationEvent;
@@ -78,7 +78,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractAttributeModificationJob#executeAttributeModificationJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractAttributeModificationJob#executeAttributeModificationJob(org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor)
      */
     protected void executeAttributeModificationJob( StudioProgressMonitor monitor )
     {



Mime
View raw message