directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r569899 [6/9] - in /directory/studio/trunk: studio-aciitemeditor/META-INF/ studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/ studio-aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueedito...
Date Sun, 26 Aug 2007 22:36:14 GMT
Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateValuesJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateValuesJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateValuesJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateValuesJob.java Sun Aug 26 15:36:01 2007
@@ -24,6 +24,7 @@
 import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.directory.studio.connection.core.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.events.ValueAddedEvent;
@@ -66,7 +67,7 @@
     }
 
 
-    protected void executeAsyncModificationJob( ExtendedProgressMonitor monitor ) throws ModelModificationException
+    protected void executeAsyncModificationJob( StudioProgressMonitor monitor ) throws ModelModificationException
     {
 
         monitor.beginTask( rawValues.length == 1 ? BrowserCoreMessages.jobs__create_values_task_1
@@ -96,11 +97,11 @@
 
             if ( this.event == null )
             {
-                event = new ValueAddedEvent( entry.getConnection(), entry, attribute, newValues[i] );
+                event = new ValueAddedEvent( entry.getBrowserConnection(), entry, attribute, newValues[i] );
             }
         }
 
-        entry.getConnection().create( newValues, monitor );
+        entry.getBrowserConnection().create( newValues, monitor );
     }
 
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteAttributesValueJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteAttributesValueJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteAttributesValueJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteAttributesValueJob.java Sun Aug 26 15:36:01 2007
@@ -24,6 +24,7 @@
 import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.directory.studio.connection.core.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributeDeletedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryModificationEvent;
@@ -85,7 +86,7 @@
     }
 
 
-    protected void executeAsyncModificationJob( ExtendedProgressMonitor monitor ) throws ModelModificationException
+    protected void executeAsyncModificationJob( StudioProgressMonitor monitor ) throws ModelModificationException
     {
 
         monitor.beginTask( attributes.length + values.length == 1 ? BrowserCoreMessages.jobs__delete_attributes_task_1
@@ -102,16 +103,16 @@
             values[i].getAttribute().deleteValue( values[i] );
         }
 
-        entry.getConnection().delete( attributes, monitor );
-        entry.getConnection().delete( values, monitor );
+        entry.getBrowserConnection().delete( attributes, monitor );
+        entry.getBrowserConnection().delete( values, monitor );
 
         if ( values.length > 0 )
         {
-            this.event = new ValueDeletedEvent( entry.getConnection(), entry, values[0].getAttribute(), values[0] );
+            this.event = new ValueDeletedEvent( entry.getBrowserConnection(), entry, values[0].getAttribute(), values[0] );
         }
         else if ( attributes.length > 0 )
         {
-            this.event = new AttributeDeletedEvent( entry.getConnection(), entry, attributes[0] );
+            this.event = new AttributeDeletedEvent( entry.getBrowserConnection(), entry, attributes[0] );
         }
     }
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteEntriesJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteEntriesJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteEntriesJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteEntriesJob.java Sun Aug 26 15:36:01 2007
@@ -28,6 +28,8 @@
 import java.util.List;
 import java.util.Set;
 
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.ChildrenInitializedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryDeletedEvent;
@@ -35,7 +37,7 @@
 import org.apache.directory.studio.ldapbrowser.core.events.SearchUpdateEvent;
 import org.apache.directory.studio.ldapbrowser.core.internal.model.Search;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
@@ -62,12 +64,12 @@
     }
 
 
-    protected IConnection[] getConnections()
+    protected Connection[] getConnections()
     {
-        IConnection[] connections = new IConnection[entriesToDelete.length];
+        Connection[] connections = new Connection[entriesToDelete.length];
         for ( int i = 0; i < connections.length; i++ )
         {
-            connections[i] = entriesToDelete[i].getConnection();
+            connections[i] = entriesToDelete[i].getBrowserConnection().getConnection();
         }
         return connections;
     }
@@ -81,7 +83,7 @@
     }
 
 
-    protected void executeBulkJob( ExtendedProgressMonitor monitor )
+    protected void executeBulkJob( StudioProgressMonitor monitor )
     {
 
         monitor.beginTask( entriesToDelete.length == 1 ? BrowserCoreMessages.bind(
@@ -97,7 +99,7 @@
         {
 
             IEntry entryToDelete = entriesToDelete[i];
-            IConnection connection = entryToDelete.getConnection();
+            IBrowserConnection connection = entryToDelete.getBrowserConnection();
 
             // delete from directory
             // TODO: use TreeDelete Control, if available
@@ -144,7 +146,7 @@
 
 
     private int deleteEntryRecursive( IEntry entry, boolean refInitialized, int numberOfDeletedEntries,
-        ExtendedProgressMonitor monitor )
+        StudioProgressMonitor monitor )
     {
         try
         {
@@ -158,13 +160,13 @@
                 subParam.setSearchBase( entry.getDn() );
                 subParam.setFilter( ISearch.FILTER_TRUE );
                 subParam.setScope( ISearch.SCOPE_ONELEVEL );
-                subParam.setAliasesDereferencingMethod( IConnection.DEREFERENCE_ALIASES_NEVER );
-                subParam.setReferralsHandlingMethod( IConnection.HANDLE_REFERRALS_IGNORE );
+                subParam.setAliasesDereferencingMethod( IBrowserConnection.DEREFERENCE_ALIASES_NEVER );
+                subParam.setReferralsHandlingMethod( IBrowserConnection.HANDLE_REFERRALS_IGNORE );
                 subParam.setReturningAttributes( new String[]
                     { IAttribute.OBJECTCLASS_ATTRIBUTE, IAttribute.REFERRAL_ATTRIBUTE } );
                 subParam.setCountLimit( 100 );
-                ISearch search = new Search( entry.getConnection(), subParam );
-                entry.getConnection().search( search, monitor );
+                ISearch search = new Search( entry.getBrowserConnection(), subParam );
+                entry.getBrowserConnection().search( search, monitor );
 
                 ISearchResult[] srs = search.getSearchResults();
                 for ( int i = 0; !monitor.isCanceled() && srs != null && i < srs.length; i++ )
@@ -187,12 +189,12 @@
                     param.setSearchBase( entry.getDn() );
                     param.setFilter( ISearch.FILTER_TRUE );
                     param.setScope( ISearch.SCOPE_OBJECT );
-                    param.setAliasesDereferencingMethod( IConnection.DEREFERENCE_ALIASES_NEVER );
-                    param.setReferralsHandlingMethod( IConnection.HANDLE_REFERRALS_IGNORE );
+                    param.setAliasesDereferencingMethod( IBrowserConnection.DEREFERENCE_ALIASES_NEVER );
+                    param.setReferralsHandlingMethod( IBrowserConnection.HANDLE_REFERRALS_IGNORE );
                     param.setReturningAttributes( new String[]
                         { IAttribute.OBJECTCLASS_ATTRIBUTE, IAttribute.REFERRAL_ATTRIBUTE } );
-                    ISearch search = new Search( entry.getConnection(), param );
-                    entry.getConnection().search( search, monitor );
+                    ISearch search = new Search( entry.getBrowserConnection(), param );
+                    entry.getBrowserConnection().search( search, monitor );
 
                     ISearchResult[] srs = search.getSearchResults();
                     if ( !monitor.isCanceled() && srs != null && srs.length == 1 )
@@ -201,7 +203,7 @@
                     }
                 }
 
-                entry.getConnection().delete( entry, monitor );
+                entry.getBrowserConnection().delete( entry, monitor );
 
                 numberOfDeletedEntries++;
                 monitor.reportProgress( BrowserCoreMessages.bind( BrowserCoreMessages.model__deleted_n_entries,
@@ -224,7 +226,7 @@
         for ( Iterator it = deletedEntriesSet.iterator(); it.hasNext(); )
         {
             IEntry entry = ( IEntry ) it.next();
-            EventRegistry.fireEntryUpdated( new EntryDeletedEvent( entry.getConnection(), entry ), this );
+            EventRegistry.fireEntryUpdated( new EntryDeletedEvent( entry.getBrowserConnection(), entry ), this );
         }
         for ( Iterator it = entriesToUpdateSet.iterator(); it.hasNext(); )
         {

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExecuteLdifJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExecuteLdifJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExecuteLdifJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExecuteLdifJob.java Sun Aug 26 15:36:01 2007
@@ -28,8 +28,10 @@
 import java.util.List;
 
 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.ldapbrowser.core.BrowserCoreMessages;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifEnumeration;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.parser.LdifParser;
 
@@ -37,14 +39,14 @@
 public class ExecuteLdifJob extends AbstractEclipseJob
 {
 
-    private IConnection connection;
+    private IBrowserConnection connection;
 
     private String ldif;
 
     private boolean continueOnError;
 
 
-    public ExecuteLdifJob( IConnection connection, String ldif, boolean continueOnError )
+    public ExecuteLdifJob( IBrowserConnection connection, String ldif, boolean continueOnError )
     {
         this.connection = connection;
         this.ldif = ldif;
@@ -54,10 +56,10 @@
     }
 
 
-    protected IConnection[] getConnections()
+    protected Connection[] getConnections()
     {
-        return new IConnection[]
-            { connection };
+        return new Connection[]
+            { connection.getConnection() };
     }
 
 
@@ -69,7 +71,7 @@
     }
 
 
-    protected void executeAsyncJob( ExtendedProgressMonitor monitor )
+    protected void executeAsyncJob( StudioProgressMonitor monitor )
     {
 
         monitor.beginTask( BrowserCoreMessages.jobs__execute_ldif_task, 2 );

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportCsvJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportCsvJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportCsvJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportCsvJob.java Sun Aug 26 15:36:01 2007
@@ -32,13 +32,15 @@
 import java.util.Map;
 
 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.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.internal.model.AttributeDescription;
 import org.apache.directory.studio.ldapbrowser.core.internal.model.ConnectionException;
 import org.apache.directory.studio.ldapbrowser.core.internal.model.ReferralException;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.SearchParameter;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifEnumeration;
@@ -54,14 +56,14 @@
 
     private String exportLdifFilename;
 
-    private IConnection connection;
+    private IBrowserConnection connection;
 
     private SearchParameter searchParameter;
 
     private boolean exportDn;
 
 
-    public ExportCsvJob( String exportLdifFilename, IConnection connection, SearchParameter searchParameter,
+    public ExportCsvJob( String exportLdifFilename, IBrowserConnection connection, SearchParameter searchParameter,
         boolean exportDn )
     {
         this.exportLdifFilename = exportLdifFilename;
@@ -73,10 +75,10 @@
     }
 
 
-    protected IConnection[] getConnections()
+    protected Connection[] getConnections()
     {
-        return new IConnection[]
-            { connection };
+        return new Connection[]
+            { connection.getConnection() };
     }
 
 
@@ -88,7 +90,7 @@
     }
 
 
-    protected void executeAsyncJob( ExtendedProgressMonitor monitor )
+    protected void executeAsyncJob( StudioProgressMonitor monitor )
     {
 
         monitor.beginTask( BrowserCoreMessages.jobs__export_csv_task, 2 );
@@ -145,8 +147,8 @@
     }
 
 
-    private static void export( IConnection connection, SearchParameter searchParameter, BufferedWriter bufferedWriter,
-        int count, ExtendedProgressMonitor monitor, String[] attributes, String attributeDelimiter,
+    private static void export( IBrowserConnection connection, SearchParameter searchParameter, BufferedWriter bufferedWriter,
+        int count, StudioProgressMonitor monitor, String[] attributes, String attributeDelimiter,
         String valueDelimiter, String quoteCharacter, String lineSeparator, String encoding, int binaryEncoding, boolean exportDn )
         throws IOException, ConnectionException
     {
@@ -182,7 +184,7 @@
             else if ( ce instanceof ReferralException )
             {
 
-                if ( searchParameter.getReferralsHandlingMethod() == IConnection.HANDLE_REFERRALS_FOLLOW )
+                if ( searchParameter.getReferralsHandlingMethod() == IBrowserConnection.HANDLE_REFERRALS_FOLLOW )
                 {
 
                     ReferralException re = ( ReferralException ) ce;
@@ -191,14 +193,8 @@
                     {
                         ISearch referralSearch = referralSearches[i];
 
-                        // open connection
-                        if ( !referralSearch.getConnection().isOpened() )
-                        {
-                            referralSearch.getConnection().open( monitor );
-                        }
-
                         // export recursive
-                        export( referralSearch.getConnection(), referralSearch.getSearchParameter(), bufferedWriter,
+                        export( referralSearch.getBrowserConnection(), referralSearch.getSearchParameter(), bufferedWriter,
                             count, monitor, attributes, attributeDelimiter, valueDelimiter, quoteCharacter,
                             lineSeparator, encoding, binaryEncoding, exportDn );
                     }
@@ -213,7 +209,7 @@
     }
 
 
-    private static String recordToCsv( IConnection connection, LdifContentRecord record, String[] attributes, String attributeDelimiter,
+    private static String recordToCsv( IBrowserConnection connection, LdifContentRecord record, String[] attributes, String attributeDelimiter,
         String valueDelimiter, String quoteCharacter, String lineSeparator, String encoding, int binaryEncoding, boolean exportDn )
     {
 
@@ -263,7 +259,7 @@
     }
 
 
-    static Map getAttributeMap( IConnection connection, LdifContentRecord record, String valueDelimiter, String encoding, int binaryEncoding )
+    static Map getAttributeMap( IBrowserConnection connection, LdifContentRecord record, String valueDelimiter, String encoding, int binaryEncoding )
     {
         Map attributeMap = new HashMap();
         LdifAttrValLine[] lines = record.getAttrVals();

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java Sun Aug 26 15:36:01 2007
@@ -29,8 +29,6 @@
 import java.util.List;
 
 import org.apache.commons.codec.digest.DigestUtils;
-import org.apache.directory.studio.dsmlv2.engine.Dsmlv2Engine;
-import org.apache.directory.studio.dsmlv2.request.SearchRequestDsml;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.ldap.codec.AttributeValueAssertion;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
@@ -53,9 +51,13 @@
 import org.apache.directory.shared.ldap.filter.SubstringNode;
 import org.apache.directory.shared.ldap.message.ScopeEnum;
 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.dsmlv2.engine.Dsmlv2Engine;
+import org.apache.directory.studio.dsmlv2.request.SearchRequestDsml;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.model.Control;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.SearchParameter;
 import org.dom4j.Document;
@@ -75,7 +77,7 @@
     private String exportDsmlFilename;
 
     /** The connection to use */
-    private IConnection connection;
+    private IBrowserConnection connection;
 
     /** The Search Parameter of the export*/
     private SearchParameter searchParameter;
@@ -91,7 +93,7 @@
      * @param searchParameter
      *          the Search Parameter of the export
      */
-    public ExportDsmlJob( String exportDsmlFilename, IConnection connection, SearchParameter searchParameter )
+    public ExportDsmlJob( String exportDsmlFilename, IBrowserConnection connection, SearchParameter searchParameter )
     {
         this.exportDsmlFilename = exportDsmlFilename;
         this.connection = connection;
@@ -104,10 +106,10 @@
     /* (non-Javadoc)
      * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getConnections()
      */
-    protected IConnection[] getConnections()
+    protected Connection[] getConnections()
     {
-        return new IConnection[]
-            { connection };
+        return new Connection[]
+            { connection.getConnection() };
     }
 
 
@@ -125,7 +127,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#executeAsyncJob(org.apache.directory.studio.ldapbrowser.core.jobs.ExtendedProgressMonitor)
      */
-    protected void executeAsyncJob( ExtendedProgressMonitor monitor )
+    protected void executeAsyncJob( StudioProgressMonitor monitor )
     {
         monitor.beginTask( BrowserCoreMessages.jobs__export_dsml_task, 2 );
         monitor.reportProgress( " " ); //$NON-NLS-1$
@@ -156,19 +158,19 @@
 
             // DerefAliases
             int derefAliases = searchParameter.getAliasesDereferencingMethod();
-            if ( derefAliases == IConnection.DEREFERENCE_ALIASES_ALWAYS )
+            if ( derefAliases == IBrowserConnection.DEREFERENCE_ALIASES_ALWAYS )
             {
                 searchRequest.setDerefAliases( LdapConstants.DEREF_ALWAYS );
             }
-            else if ( derefAliases == IConnection.DEREFERENCE_ALIASES_FINDING )
+            else if ( derefAliases == IBrowserConnection.DEREFERENCE_ALIASES_FINDING )
             {
                 searchRequest.setDerefAliases( LdapConstants.DEREF_FINDING_BASE_OBJ );
             }
-            else if ( derefAliases == IConnection.DEREFERENCE_ALIASES_NEVER )
+            else if ( derefAliases == IBrowserConnection.DEREFERENCE_ALIASES_NEVER )
             {
                 searchRequest.setDerefAliases( LdapConstants.NEVER_DEREF_ALIASES );
             }
-            else if ( derefAliases == IConnection.DEREFERENCE_ALIASES_SEARCH )
+            else if ( derefAliases == IBrowserConnection.DEREFERENCE_ALIASES_SEARCH )
             {
                 searchRequest.setDerefAliases( LdapConstants.DEREF_IN_SEARCHING );
             }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportLdifJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportLdifJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportLdifJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportLdifJob.java Sun Aug 26 15:36:01 2007
@@ -29,11 +29,13 @@
 import java.util.List;
 
 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.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.internal.model.AttributeComparator;
 import org.apache.directory.studio.ldapbrowser.core.internal.model.ConnectionException;
 import org.apache.directory.studio.ldapbrowser.core.internal.model.ReferralException;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.SearchParameter;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifEnumeration;
@@ -49,12 +51,12 @@
 
     private String exportLdifFilename;
 
-    private IConnection connection;
+    private IBrowserConnection connection;
 
     private SearchParameter searchParameter;
 
 
-    public ExportLdifJob( String exportLdifFilename, IConnection connection, SearchParameter searchParameter )
+    public ExportLdifJob( String exportLdifFilename, IBrowserConnection connection, SearchParameter searchParameter )
     {
         this.exportLdifFilename = exportLdifFilename;
         this.connection = connection;
@@ -64,10 +66,10 @@
     }
 
 
-    protected IConnection[] getConnections()
+    protected Connection[] getConnections()
     {
-        return new IConnection[]
-            { connection };
+        return new Connection[]
+            { connection.getConnection() };
     }
 
 
@@ -79,7 +81,7 @@
     }
 
 
-    protected void executeAsyncJob( ExtendedProgressMonitor monitor )
+    protected void executeAsyncJob( StudioProgressMonitor monitor )
     {
 
         monitor.beginTask( BrowserCoreMessages.jobs__export_ldif_task, 2 );
@@ -109,8 +111,8 @@
     }
 
 
-    private static void export( IConnection connection, SearchParameter searchParameter, BufferedWriter bufferedWriter,
-        int count, ExtendedProgressMonitor monitor ) throws IOException, ConnectionException
+    private static void export( IBrowserConnection connection, SearchParameter searchParameter, BufferedWriter bufferedWriter,
+        int count, StudioProgressMonitor monitor ) throws IOException, ConnectionException
     {
         try
         {
@@ -160,7 +162,7 @@
             else if ( ce instanceof ReferralException )
             {
 
-                if ( searchParameter.getReferralsHandlingMethod() == IConnection.HANDLE_REFERRALS_FOLLOW )
+                if ( searchParameter.getReferralsHandlingMethod() == IBrowserConnection.HANDLE_REFERRALS_FOLLOW )
                 {
 
                     ReferralException re = ( ReferralException ) ce;
@@ -169,14 +171,8 @@
                     {
                         ISearch referralSearch = referralSearches[i];
 
-                        // open connection
-                        if ( !referralSearch.getConnection().isOpened() )
-                        {
-                            referralSearch.getConnection().open( monitor );
-                        }
-
                         // export recursive
-                        export( referralSearch.getConnection(), referralSearch.getSearchParameter(), bufferedWriter,
+                        export( referralSearch.getBrowserConnection(), referralSearch.getSearchParameter(), bufferedWriter,
                             count, monitor );
                     }
                 }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportXlsJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportXlsJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportXlsJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportXlsJob.java Sun Aug 26 15:36:01 2007
@@ -30,12 +30,14 @@
 import java.util.Map;
 
 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.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.internal.model.ConnectionException;
 import org.apache.directory.studio.ldapbrowser.core.internal.model.ReferralException;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.SearchParameter;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifEnumeration;
@@ -55,14 +57,14 @@
 
     private String exportLdifFilename;
 
-    private IConnection connection;
+    private IBrowserConnection connection;
 
     private SearchParameter searchParameter;
 
     private boolean exportDn;
 
 
-    public ExportXlsJob( String exportLdifFilename, IConnection connection, SearchParameter searchParameter,
+    public ExportXlsJob( String exportLdifFilename, IBrowserConnection connection, SearchParameter searchParameter,
         boolean exportDn )
     {
         this.exportLdifFilename = exportLdifFilename;
@@ -74,10 +76,10 @@
     }
 
 
-    protected IConnection[] getConnections()
+    protected Connection[] getConnections()
     {
-        return new IConnection[]
-            { connection };
+        return new Connection[]
+            { connection.getConnection() };
     }
 
 
@@ -89,7 +91,7 @@
     }
 
 
-    protected void executeAsyncJob( ExtendedProgressMonitor monitor )
+    protected void executeAsyncJob( StudioProgressMonitor monitor )
     {
 
         monitor.beginTask( BrowserCoreMessages.jobs__export_xls_task, 2 );
@@ -174,8 +176,8 @@
     }
 
 
-    private static void export( IConnection connection, SearchParameter searchParameter, HSSFSheet sheet,
-        HSSFRow headerRow, int count, ExtendedProgressMonitor monitor, LinkedHashMap attributeNameMap,
+    private static void export( IBrowserConnection connection, SearchParameter searchParameter, HSSFSheet sheet,
+        HSSFRow headerRow, int count, StudioProgressMonitor monitor, LinkedHashMap attributeNameMap,
         String valueDelimiter, int binaryEncoding, boolean exportDn ) throws IOException, ConnectionException
     {
         try
@@ -210,7 +212,7 @@
             else if ( ce instanceof ReferralException )
             {
 
-                if ( searchParameter.getReferralsHandlingMethod() == IConnection.HANDLE_REFERRALS_FOLLOW )
+                if ( searchParameter.getReferralsHandlingMethod() == IBrowserConnection.HANDLE_REFERRALS_FOLLOW )
                 {
 
                     ReferralException re = ( ReferralException ) ce;
@@ -219,14 +221,8 @@
                     {
                         ISearch referralSearch = referralSearches[i];
 
-                        // open connection
-                        if ( !referralSearch.getConnection().isOpened() )
-                        {
-                            referralSearch.getConnection().open( monitor );
-                        }
-
                         // export recursive
-                        export( referralSearch.getConnection(), referralSearch.getSearchParameter(), sheet, headerRow,
+                        export( referralSearch.getBrowserConnection(), referralSearch.getSearchParameter(), sheet, headerRow,
                             count, monitor, attributeNameMap, valueDelimiter, binaryEncoding, exportDn );
                     }
                 }
@@ -240,7 +236,7 @@
     }
 
 
-    private static void recordToHSSFRow( IConnection connection, LdifContentRecord record, HSSFSheet sheet, HSSFRow headerRow,
+    private static void recordToHSSFRow( IBrowserConnection connection, LdifContentRecord record, HSSFSheet sheet, HSSFRow headerRow,
         Map headerRowAttributeNameMap, String valueDelimiter, int binaryEncoding, boolean exportDn )
     {
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsJob.java Sun Aug 26 15:36:01 2007
@@ -24,29 +24,34 @@
 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.ldapbrowser.core.BrowserCoreMessages;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.DN;
+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.IEntry;
+import org.apache.directory.studio.ldapbrowser.core.model.IRootDSE;
 
 
 public class FetchBaseDNsJob extends AbstractAsyncBulkJob
 {
 
-    private IConnection connection;
+    private IBrowserConnection connection;
 
     private String[] baseDNs;
 
 
-    public FetchBaseDNsJob( IConnection connection )
+    public FetchBaseDNsJob( IBrowserConnection connection )
     {
         this.connection = connection;
         setName( BrowserCoreMessages.jobs__fetch_basedns_name );
     }
 
 
-    protected IConnection[] getConnections()
+    protected Connection[] getConnections()
     {
-        return new IConnection[0];
+        return new Connection[0];
     }
 
 
@@ -58,26 +63,28 @@
     }
 
 
-    protected void executeBulkJob( ExtendedProgressMonitor monitor )
+    protected void executeBulkJob( StudioProgressMonitor monitor )
     {
-
         monitor.beginTask( BrowserCoreMessages.jobs__fetch_basedns_task, 5 );
         monitor.reportProgress( " " ); //$NON-NLS-1$
         monitor.worked( 1 );
 
-        connection.bind( monitor );
-        connection.fetchRootDSE( monitor );
-
-        IEntry[] baseDNEntries = connection.getRootDSE().getChildren();
-        baseDNs = new String[baseDNEntries.length];
-        for ( int i = 0; i < baseDNs.length; i++ )
+        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();
+//        }
+        
+        IAttribute attribute = rootDSE.getAttribute( IRootDSE.ROOTDSE_ATTRIBUTE_NAMINGCONTEXTS );
+        if ( attribute != null )
         {
-            baseDNs[i] = baseDNEntries[i].getDn().toString();
+            baseDNs = attribute.getStringValues();
         }
+        
         monitor.worked( 1 );
-
-        connection.close();
-
     }
 
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java Sun Aug 26 15:36:01 2007
@@ -28,13 +28,15 @@
 import java.util.List;
 
 import org.apache.commons.codec.digest.DigestUtils;
+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.dsmlv2.Dsmlv2ResponseParser;
 import org.apache.directory.studio.dsmlv2.engine.Dsmlv2Engine;
 import org.apache.directory.studio.dsmlv2.reponse.ErrorResponse;
-import org.apache.directory.shared.ldap.codec.LdapResponse;
-import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 
 
 /**
@@ -46,7 +48,7 @@
 public class ImportDsmlJob extends AbstractEclipseJob
 {
     /** The connection to use */
-    private IConnection connection;
+    private IBrowserConnection connection;
 
     /** The DSML file to use */
     private File dsmlFile;
@@ -67,7 +69,7 @@
      * @param continueOnError
      *          The ContinueOnError flag
      */
-    public ImportDsmlJob( IConnection connection, File dsmlFile, File saveFile )
+    public ImportDsmlJob( IBrowserConnection connection, File dsmlFile, File saveFile )
     {
         this.connection = connection;
         this.dsmlFile = dsmlFile;
@@ -87,7 +89,7 @@
      * @param continueOnError
      *          The ContinueOnError flag
      */
-    public ImportDsmlJob( IConnection connection, File dsmlFile )
+    public ImportDsmlJob( IBrowserConnection connection, File dsmlFile )
     {
         this( connection, dsmlFile, null );
     }
@@ -96,10 +98,10 @@
     /* (non-Javadoc)
      * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#getConnections()
      */
-    protected IConnection[] getConnections()
+    protected Connection[] getConnections()
     {
-        return new IConnection[]
-            { connection };
+        return new Connection[]
+            { connection.getConnection() };
     }
 
 
@@ -117,7 +119,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.studio.ldapbrowser.core.jobs.AbstractEclipseJob#executeAsyncJob(org.apache.directory.studio.ldapbrowser.core.jobs.ExtendedProgressMonitor)
      */
-    protected void executeAsyncJob( ExtendedProgressMonitor monitor )
+    protected void executeAsyncJob( StudioProgressMonitor monitor )
     {
 
         monitor.beginTask( BrowserCoreMessages.jobs__import_dsml_task, 2 );

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java Sun Aug 26 15:36:01 2007
@@ -33,10 +33,12 @@
 import java.util.List;
 
 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.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.BulkModificationEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.ModelModificationException;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.LdifEnumeration;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.parser.LdifParser;
@@ -45,7 +47,7 @@
 public class ImportLdifJob extends AbstractAsyncBulkJob
 {
 
-    private IConnection connection;
+    private IBrowserConnection connection;
 
     private File ldifFile;
 
@@ -54,7 +56,7 @@
     private boolean continueOnError;
 
 
-    public ImportLdifJob( IConnection connection, File ldifFile, File logFile, boolean continueOnError )
+    public ImportLdifJob( IBrowserConnection connection, File ldifFile, File logFile, boolean continueOnError )
     {
         this.connection = connection;
         this.ldifFile = ldifFile;
@@ -65,16 +67,16 @@
     }
 
 
-    public ImportLdifJob( IConnection connection, File ldifFile, boolean continueOnError )
+    public ImportLdifJob( IBrowserConnection connection, File ldifFile, boolean continueOnError )
     {
         this( connection, ldifFile, null, continueOnError );
     }
 
 
-    protected IConnection[] getConnections()
+    protected Connection[] getConnections()
     {
-        return new IConnection[]
-            { connection };
+        return new Connection[]
+            { connection.getConnection() };
     }
 
 
@@ -86,7 +88,7 @@
     }
 
 
-    protected void executeBulkJob( ExtendedProgressMonitor monitor ) throws ModelModificationException
+    protected void executeBulkJob( StudioProgressMonitor monitor ) throws ModelModificationException
     {
 
         monitor.beginTask( BrowserCoreMessages.jobs__import_ldif_task, 2 );

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesJob.java Sun Aug 26 15:36:01 2007
@@ -26,13 +26,15 @@
 import java.util.LinkedHashSet;
 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.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributesInitializedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.internal.model.RootDSE;
 import org.apache.directory.studio.ldapbrowser.core.internal.model.Search;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.IRootDSE;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
@@ -56,12 +58,12 @@
     }
 
 
-    protected IConnection[] getConnections()
+    protected Connection[] getConnections()
     {
-        IConnection[] connections = new IConnection[entries.length];
+        Connection[] connections = new Connection[entries.length];
         for ( int i = 0; i < connections.length; i++ )
         {
-            connections[i] = entries[i].getConnection();
+            connections[i] = entries[i].getBrowserConnection().getConnection();
         }
         return connections;
     }
@@ -82,7 +84,7 @@
     }
 
 
-    protected void executeBulkJob( ExtendedProgressMonitor monitor )
+    protected void executeBulkJob( StudioProgressMonitor monitor )
     {
         monitor.beginTask( " ", entries.length + 2 ); //$NON-NLS-1$
         monitor.reportProgress( " " ); //$NON-NLS-1$
@@ -92,8 +94,7 @@
             monitor.setTaskName( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__init_entries_task, new String[]
                 { this.entries[pi].getDn().toString() } ) );
             monitor.worked( 1 );
-            if ( entries[pi].getConnection() != null && entries[pi].getConnection().isOpened()
-                && entries[pi].isDirectoryEntry() )
+            if ( entries[pi].getBrowserConnection() != null && entries[pi].isDirectoryEntry() )
             {
                 initializeAttributes( entries[pi], initOperationalAttributes, monitor );
             }
@@ -106,7 +107,7 @@
         for ( int pi = 0; pi < entries.length; pi++ )
         {
             IEntry parent = entries[pi];
-            if ( parent.getConnection() != null && entries[pi].getConnection().isOpened() && parent.isDirectoryEntry() )
+            if ( parent.getBrowserConnection() != null && parent.isDirectoryEntry() )
             {
                 EventRegistry.fireEntryUpdated( new AttributesInitializedEvent( parent ), this );
             }
@@ -115,7 +116,7 @@
 
 
     public static void initializeAttributes( IEntry entry, boolean initOperationalAttributes,
-        ExtendedProgressMonitor monitor )
+        StudioProgressMonitor monitor )
     {
 
         // get user attributes or both user and operational attributes
@@ -124,7 +125,7 @@
         raSet.add( ISearch.ALL_USER_ATTRIBUTES );
         if ( initOperationalAttributes )
         {
-            AttributeTypeDescription[] opAtds = SchemaUtils.getOperationalAttributeDescriptions( entry.getConnection()
+            AttributeTypeDescription[] opAtds = SchemaUtils.getOperationalAttributeDescriptions( entry.getBrowserConnection()
                 .getSchema() );
             String[] attributeTypeDescriptionNames = SchemaUtils.getAttributeTypeDescriptionNames( opAtds );
             raSet.addAll( Arrays.asList( attributeTypeDescriptionNames ) );
@@ -145,7 +146,7 @@
     }
 
 
-    public static void initializeAttributes( IEntry entry, String[] attributes, ExtendedProgressMonitor monitor )
+    public static void initializeAttributes( IEntry entry, String[] attributes, StudioProgressMonitor monitor )
     {
 
         monitor.reportProgress( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__init_entries_progress_att,
@@ -167,17 +168,17 @@
             entry.setChildrenInitialized( false );
             
             // special handling for Root DSE
-        	entry.getConnection().fetchRootDSE( monitor );
+        	entry.getBrowserConnection().fetchRootDSE( monitor );
         	entry.setAttributesInitialized( true );
         	entry.setChildrenInitialized( true );
         }
         else
         {
 	        // search
-	        ISearch search = new Search( null, entry.getConnection(), entry.getDn(), entry.isSubentry()?ISearch.FILTER_SUBENTRY:ISearch.FILTER_TRUE, attributes,
-	            ISearch.SCOPE_OBJECT, 0, 0, IConnection.DEREFERENCE_ALIASES_NEVER, IConnection.HANDLE_REFERRALS_IGNORE,
+	        ISearch search = new Search( null, entry.getBrowserConnection(), entry.getDn(), entry.isSubentry()?ISearch.FILTER_SUBENTRY:ISearch.FILTER_TRUE, attributes,
+	            ISearch.SCOPE_OBJECT, 0, 0, IBrowserConnection.DEREFERENCE_ALIASES_NEVER, IBrowserConnection.HANDLE_REFERRALS_IGNORE,
 	            false, false, null );
-	        entry.getConnection().search( search, monitor );
+	        entry.getBrowserConnection().search( search, monitor );
 	
 	        // set initialized state
 	        entry.setAttributesInitialized( true );

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenJob.java Sun Aug 26 15:36:01 2007
@@ -25,6 +25,8 @@
 import java.util.Arrays;
 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.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
@@ -34,7 +36,7 @@
 import org.apache.directory.studio.ldapbrowser.core.internal.model.ReferralBaseEntry;
 import org.apache.directory.studio.ldapbrowser.core.internal.model.Search;
 import org.apache.directory.studio.ldapbrowser.core.model.Control;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.IRootDSE;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
@@ -54,12 +56,12 @@
     }
 
 
-    protected IConnection[] getConnections()
+    protected Connection[] getConnections()
     {
-        IConnection[] connections = new IConnection[entries.length];
+        Connection[] connections = new Connection[entries.length];
         for ( int i = 0; i < connections.length; i++ )
         {
-            connections[i] = entries[i].getConnection();
+            connections[i] = entries[i].getBrowserConnection().getConnection();
         }
         return connections;
     }
@@ -80,7 +82,7 @@
     }
 
 
-    protected void executeBulkJob( ExtendedProgressMonitor monitor )
+    protected void executeBulkJob( StudioProgressMonitor monitor )
     {
         monitor.beginTask( " ", entries.length + 2 ); //$NON-NLS-1$
         monitor.reportProgress( " " ); //$NON-NLS-1$
@@ -92,8 +94,7 @@
                 { this.entries[pi].getDn().toString() } ) );
             monitor.worked( 1 );
 
-            if ( entries[pi].getConnection() != null && entries[pi].getConnection().isOpened()
-                && entries[pi].isDirectoryEntry() )
+            if ( entries[pi].getBrowserConnection() != null && entries[pi].isDirectoryEntry() )
             {
                 initializeChildren( entries[pi], monitor );
             }
@@ -106,7 +107,7 @@
         for ( int pi = 0; pi < entries.length; pi++ )
         {
             IEntry parent = entries[pi];
-            if ( parent.getConnection() != null && entries[pi].getConnection().isOpened() && parent.isDirectoryEntry() )
+            if ( parent.getBrowserConnection() != null && parent.isDirectoryEntry() )
             {
                 EventRegistry.fireEntryUpdated( new ChildrenInitializedEvent( parent ), this );
             }
@@ -114,7 +115,7 @@
     }
 
 
-    public static void initializeChildren( IEntry parent, ExtendedProgressMonitor monitor )
+    public static void initializeChildren( IEntry parent, StudioProgressMonitor monitor )
     {
 
         if ( parent instanceof IRootDSE )
@@ -141,26 +142,26 @@
             
             // determine alias and referral handling
             int scope = ISearch.SCOPE_ONELEVEL;
-            int derefAliasMethod = parent.getConnection().getAliasesDereferencingMethod();
-            int handleReferralsMethod = parent.getConnection().getReferralsHandlingMethod();
+            int derefAliasMethod = parent.getBrowserConnection().getAliasesDereferencingMethod();
+            int handleReferralsMethod = parent.getBrowserConnection().getReferralsHandlingMethod();
             if ( BrowserCorePlugin.getDefault().getPluginPreferences().getBoolean(
                 BrowserCoreConstants.PREFERENCE_SHOW_ALIAS_AND_REFERRAL_OBJECTS ) )
             {
                 scope = ( parent.isAlias() || parent.isReferral() ) ? ISearch.SCOPE_OBJECT : ISearch.SCOPE_ONELEVEL;
-                derefAliasMethod = parent.isAlias() ? IConnection.DEREFERENCE_ALIASES_FINDING
-                    : IConnection.DEREFERENCE_ALIASES_NEVER;
-                handleReferralsMethod = parent.isReferral() ? IConnection.HANDLE_REFERRALS_FOLLOW
-                    : IConnection.HANDLE_REFERRALS_IGNORE;
+                derefAliasMethod = parent.isAlias() ? IBrowserConnection.DEREFERENCE_ALIASES_FINDING
+                    : IBrowserConnection.DEREFERENCE_ALIASES_NEVER;
+                handleReferralsMethod = parent.isReferral() ? IBrowserConnection.HANDLE_REFERRALS_FOLLOW
+                    : IBrowserConnection.HANDLE_REFERRALS_IGNORE;
             }
 
             // get children,
-            ISearch search = new Search( null, parent.getConnection(), parent.getDn(), parent.getChildrenFilter(),
-                ISearch.NO_ATTRIBUTES, scope, parent.getConnection().getCountLimit(),
-                parent.getConnection().getTimeLimit(), derefAliasMethod, handleReferralsMethod, BrowserCorePlugin
+            ISearch search = new Search( null, parent.getBrowserConnection(), parent.getDn(), parent.getChildrenFilter(),
+                ISearch.NO_ATTRIBUTES, scope, parent.getBrowserConnection().getCountLimit(),
+                parent.getBrowserConnection().getTimeLimit(), derefAliasMethod, handleReferralsMethod, BrowserCorePlugin
                     .getDefault().getPluginPreferences().getBoolean( BrowserCoreConstants.PREFERENCE_CHECK_FOR_CHILDREN ),
                 BrowserCorePlugin.getDefault().getPluginPreferences().getBoolean(
                     BrowserCoreConstants.PREFERENCE_SHOW_ALIAS_AND_REFERRAL_OBJECTS ), null );
-            parent.getConnection().search( search, monitor );
+            parent.getBrowserConnection().search( search, monitor );
             ISearchResult[] srs = search.getSearchResults();
             monitor.reportProgress( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__init_entries_progress_subcount,
                 new String[]
@@ -188,7 +189,7 @@
                 {
                     if ( parent.isReferral() )
                     {
-                        ReferralBaseEntry referralBaseEntry = new ReferralBaseEntry( srs[i].getEntry().getConnection(),
+                        ReferralBaseEntry referralBaseEntry = new ReferralBaseEntry( srs[i].getEntry().getBrowserConnection(),
                             srs[i].getEntry().getDn() );
                         parent.addChild( referralBaseEntry );
                         // System.out.println("Ref: " +
@@ -196,7 +197,7 @@
                     }
                     else if ( parent.isAlias() )
                     {
-                        AliasBaseEntry aliasBaseEntry = new AliasBaseEntry( srs[i].getEntry().getConnection(), srs[i]
+                        AliasBaseEntry aliasBaseEntry = new AliasBaseEntry( srs[i].getEntry().getBrowserConnection(), srs[i]
                             .getEntry().getDn() );
                         parent.addChild( aliasBaseEntry );
                         // System.out.println("Ali: " +
@@ -214,9 +215,9 @@
             }
 
             // get subentries
-            ISearch subSearch = new Search( null, parent.getConnection(), parent.getDn(), parent.getChildrenFilter()!=null?parent.getChildrenFilter():ISearch.FILTER_SUBENTRY,
-                ISearch.NO_ATTRIBUTES, scope, parent.getConnection().getCountLimit(),
-                parent.getConnection().getTimeLimit(), derefAliasMethod, handleReferralsMethod, BrowserCorePlugin
+            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(), derefAliasMethod, handleReferralsMethod, BrowserCorePlugin
                     .getDefault().getPluginPreferences().getBoolean( BrowserCoreConstants.PREFERENCE_CHECK_FOR_CHILDREN ),
                 BrowserCorePlugin.getDefault().getPluginPreferences().getBoolean(
                     BrowserCoreConstants.PREFERENCE_SHOW_ALIAS_AND_REFERRAL_OBJECTS ), new Control[]
@@ -224,7 +225,7 @@
             if ( BrowserCorePlugin.getDefault().getPluginPreferences().getBoolean(
                 BrowserCoreConstants.PREFERENCE_FETCH_SUBENTRIES ) )
             {
-                parent.getConnection().search( subSearch, monitor );
+                parent.getBrowserConnection().search( subSearch, monitor );
                 ISearchResult[] subSrs = subSearch.getSearchResults();
                 monitor.reportProgress( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__init_entries_progress_subcount,
                     new String[]

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ModifyValueJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ModifyValueJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ModifyValueJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ModifyValueJob.java Sun Aug 26 15:36:01 2007
@@ -21,6 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.core.jobs;
 
 
+import org.apache.directory.studio.connection.core.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.events.ValueModifiedEvent;
@@ -52,7 +53,7 @@
     }
 
 
-    protected void executeAsyncModificationJob( ExtendedProgressMonitor monitor ) throws ModelModificationException
+    protected void executeAsyncModificationJob( StudioProgressMonitor monitor ) throws ModelModificationException
     {
 
         monitor.beginTask( BrowserCoreMessages.jobs__modify_value_task, 2 );
@@ -61,9 +62,9 @@
 
         IValue newValue = new Value( attribute, newRawValue );
         attribute.modifyValue( oldValue, newValue );
-        attribute.getEntry().getConnection().modify( oldValue, newValue, monitor );
+        attribute.getEntry().getBrowserConnection().modify( oldValue, newValue, monitor );
 
-        this.event = new ValueModifiedEvent( attribute.getEntry().getConnection(), attribute.getEntry(), attribute,
+        this.event = new ValueModifiedEvent( attribute.getEntry().getBrowserConnection(), attribute.getEntry(), attribute,
             oldValue, newValue );
     }
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/MoveEntriesJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/MoveEntriesJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/MoveEntriesJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/MoveEntriesJob.java Sun Aug 26 15:36:01 2007
@@ -28,12 +28,14 @@
 import java.util.List;
 import java.util.Set;
 
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.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;
 import org.apache.directory.studio.ldapbrowser.core.events.SearchUpdateEvent;
 import org.apache.directory.studio.ldapbrowser.core.model.DN;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
@@ -42,7 +44,7 @@
 public class MoveEntriesJob extends AbstractAsyncBulkJob
 {
 
-    private IConnection connection;
+    private IBrowserConnection connection;
 
     private IEntry[] oldEntries;
 
@@ -55,7 +57,7 @@
 
     public MoveEntriesJob( IEntry[] entries, IEntry newParent )
     {
-        this.connection = newParent.getConnection();
+        this.connection = newParent.getBrowserConnection();
         this.oldEntries = entries;
         this.newParent = newParent;
 
@@ -64,10 +66,10 @@
     }
 
 
-    protected IConnection[] getConnections()
+    protected Connection[] getConnections()
     {
-        return new IConnection[]
-            { connection };
+        return new Connection[]
+            { connection.getConnection() };
     }
 
 
@@ -80,7 +82,7 @@
     }
 
 
-    protected void executeBulkJob( ExtendedProgressMonitor monitor )
+    protected void executeBulkJob( StudioProgressMonitor monitor )
     {
 
         monitor.beginTask( BrowserCoreMessages.bind(

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryJob.java Sun Aug 26 15:36:01 2007
@@ -24,9 +24,11 @@
 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.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.model.DN;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.ModelModificationException;
 
@@ -34,14 +36,14 @@
 public class ReadEntryJob extends AbstractAsyncBulkJob
 {
 
-    private IConnection connection;
+    private IBrowserConnection connection;
 
     private DN dn;
 
     private IEntry readEntry;
 
 
-    public ReadEntryJob( IConnection connection, DN dn )
+    public ReadEntryJob( IBrowserConnection connection, DN dn )
     {
         this.connection = connection;
         this.dn = dn;
@@ -51,10 +53,10 @@
     }
 
 
-    protected IConnection[] getConnections()
+    protected Connection[] getConnections()
     {
-        return new IConnection[]
-            { connection };
+        return new Connection[]
+            { connection.getConnection() };
     }
 
 
@@ -78,7 +80,7 @@
     }
 
 
-    protected void executeBulkJob( ExtendedProgressMonitor pm ) throws ModelModificationException
+    protected void executeBulkJob( StudioProgressMonitor pm ) throws ModelModificationException
     {
         readEntry = connection.getEntryFromCache( dn );
         if ( readEntry == null )

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java Sun Aug 26 15:36:01 2007
@@ -25,28 +25,33 @@
 import java.util.Arrays;
 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.ldapbrowser.core.BrowserCoreMessages;
-import org.apache.directory.studio.ldapbrowser.core.events.ConnectionUpdateEvent;
-import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 
 
 public class ReloadSchemasJob extends AbstractAsyncBulkJob
 {
 
-    private IConnection[] connections;
+    private IBrowserConnection[] browserConnections;
 
 
-    public ReloadSchemasJob( IConnection[] connections )
+    public ReloadSchemasJob( IBrowserConnection[] connections )
     {
-        this.connections = connections;
+        this.browserConnections = connections;
         setName( connections.length == 1 ? BrowserCoreMessages.jobs__reload_schemas_name_1
             : BrowserCoreMessages.jobs__reload_schemas_name_n );
     }
 
 
-    protected IConnection[] getConnections()
+    protected Connection[] getConnections()
     {
+        Connection[] connections = new Connection[browserConnections.length];
+        for ( int i = 0; i < browserConnections.length; i++ )
+        {
+            connections[i] = browserConnections[i].getConnection();
+        }
         return connections;
     }
 
@@ -54,45 +59,41 @@
     protected Object[] getLockedObjects()
     {
         List l = new ArrayList();
-        l.addAll( Arrays.asList( connections ) );
+        l.addAll( Arrays.asList( browserConnections ) );
         return l.toArray();
     }
 
 
-    protected void executeBulkJob( ExtendedProgressMonitor monitor )
+    protected void executeBulkJob( StudioProgressMonitor monitor )
     {
-
-        monitor.beginTask( " ", connections.length + 1 ); //$NON-NLS-1$
+        monitor.beginTask( " ", browserConnections.length + 1 ); //$NON-NLS-1$
         monitor.reportProgress( " " ); //$NON-NLS-1$
 
-        for ( int i = 0; i < connections.length; i++ )
+        for ( int i = 0; i < browserConnections.length; i++ )
         {
-
             monitor.setTaskName( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__reload_schemas_task, new String[]
-                { connections[i].getName() } ) );
+                { browserConnections[i].getName() } ) );
             monitor.worked( 1 );
 
-            if ( connections[i].isOpened() )
-            {
-                connections[i].reloadSchema( monitor );
-            }
+            browserConnections[i].reloadSchema( monitor );
         }
     }
 
 
     protected void runNotification()
     {
-        for ( int i = 0; i < connections.length; i++ )
+        for ( int i = 0; i < browserConnections.length; i++ )
         {
-            EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( connections[i],
-                ConnectionUpdateEvent.EventDetail.SCHEMA_LOADED ), this );
+            // TODO: schema update event
+//            EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( connections[i],
+//                ConnectionUpdateEvent.EventDetail.SCHEMA_LOADED ), this );
         }
     }
 
 
     protected String getErrorMessage()
     {
-        return connections.length == 1 ? BrowserCoreMessages.jobs__reload_schemas_error_1
+        return browserConnections.length == 1 ? BrowserCoreMessages.jobs__reload_schemas_error_1
             : BrowserCoreMessages.jobs__reload_schemas_error_n;
     }
 }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryJob.java Sun Aug 26 15:36:01 2007
@@ -27,12 +27,14 @@
 import java.util.List;
 import java.util.Set;
 
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.EntryRenamedEvent;
 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.model.DN;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
@@ -42,7 +44,7 @@
 public class RenameEntryJob extends AbstractAsyncBulkJob
 {
 
-    private IConnection connection;
+    private IBrowserConnection browserConnection;
 
     private IEntry oldEntry;
 
@@ -57,7 +59,7 @@
 
     public RenameEntryJob( IEntry entry, RDN newRdn, boolean deleteOldRdn )
     {
-        this.connection = entry.getConnection();
+        this.browserConnection = entry.getBrowserConnection();
         this.oldEntry = entry;
         this.newEntry = entry;
         this.newRdn = newRdn;
@@ -67,10 +69,10 @@
     }
 
 
-    protected IConnection[] getConnections()
+    protected Connection[] getConnections()
     {
-        return new IConnection[]
-            { connection };
+        return new Connection[]
+            { browserConnection.getConnection() };
     }
 
 
@@ -82,7 +84,7 @@
     }
 
 
-    protected void executeBulkJob( ExtendedProgressMonitor monitor )
+    protected void executeBulkJob( StudioProgressMonitor monitor )
     {
 
         monitor.beginTask( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__rename_entry_task, new String[]
@@ -96,13 +98,13 @@
         // rename in directory
         // TODO: use manual/simulated rename, if rename of subtree is not
         // supported
-        connection.rename( oldEntry, newDn, deleteOldRdn, monitor );
+        browserConnection.rename( oldEntry, newDn, deleteOldRdn, monitor );
 
         if ( !monitor.errorsReported() )
         {
             // rename in parent
             parent.deleteChild( oldEntry );
-            this.newEntry = connection.getEntry( newDn, monitor );
+            this.newEntry = browserConnection.getEntry( newDn, monitor );
             parent.addChild( newEntry );
             parent.setHasMoreChildren( false );
 
@@ -113,7 +115,7 @@
             }
 
             // rename in searches
-            ISearch[] searches = connection.getSearchManager().getSearches();
+            ISearch[] searches = browserConnection.getSearchManager().getSearches();
             for ( int j = 0; j < searches.length; j++ )
             {
                 ISearch search = searches[j];

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameValuesJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameValuesJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameValuesJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameValuesJob.java Sun Aug 26 15:36:01 2007
@@ -24,6 +24,7 @@
 import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.directory.studio.connection.core.StudioProgressMonitor;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.events.ValueRenamedEvent;
@@ -58,7 +59,7 @@
     }
 
 
-    protected void executeAsyncModificationJob( ExtendedProgressMonitor monitor ) throws ModelModificationException
+    protected void executeAsyncModificationJob( StudioProgressMonitor monitor ) throws ModelModificationException
     {
 
         monitor.beginTask( oldValues.length == 1 ? BrowserCoreMessages.jobs__rename_value_task_1
@@ -92,17 +93,17 @@
 
             if ( this.event == null )
             {
-                this.event = new ValueRenamedEvent( entry.getConnection(), entry, oldValues[0], newValues[0] );
+                this.event = new ValueRenamedEvent( entry.getBrowserConnection(), entry, oldValues[0], newValues[0] );
             }
         }
 
         if ( !monitor.errorsReported() )
         {
-            entry.getConnection().create( newValues, monitor );
+            entry.getBrowserConnection().create( newValues, monitor );
         }
         if ( !monitor.errorsReported() )
         {
-            entry.getConnection().delete( oldValues, monitor );
+            entry.getBrowserConnection().delete( oldValues, monitor );
         }
     }
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchJob.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchJob.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchJob.java Sun Aug 26 15:36:01 2007
@@ -25,10 +25,12 @@
 import java.util.Arrays;
 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.ldapbrowser.core.BrowserCoreMessages;
 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.model.IConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 
 
@@ -45,12 +47,12 @@
     }
 
 
-    protected IConnection[] getConnections()
+    protected Connection[] getConnections()
     {
-        IConnection[] connections = new IConnection[searches.length];
+        Connection[] connections = new Connection[searches.length];
         for ( int i = 0; i < connections.length; i++ )
         {
-            connections[i] = searches[i].getConnection();
+            connections[i] = searches[i].getBrowserConnection().getConnection();
         }
         return connections;
     }
@@ -64,7 +66,7 @@
     }
 
 
-    protected void executeBulkJob( ExtendedProgressMonitor monitor )
+    protected void executeBulkJob( StudioProgressMonitor monitor )
     {
 
         monitor.beginTask( " ", searches.length + 1 ); //$NON-NLS-1$
@@ -78,19 +80,9 @@
                 { search.getName() } ) );
             monitor.worked( 1 );
 
-            if ( search.getConnection() != null && search.getConnection().isOpened() )
+            if ( search.getBrowserConnection() != null )
             {
-
-                // // clear search result attributes
-                // if(search.getSearchResults() != null) {
-                // ISearchResult[] srs = search.getSearchResults();
-                // for (int s = 0; s < srs.length; s++) {
-                // IEntry entry = srs[s].getEntry();
-                // entry.setAttributesInitialized(false, entry.getConnection());
-                // }
-                // }
-
-                search.getConnection().search( search, monitor );
+                search.getBrowserConnection().search( search, monitor );
             }
         }
     }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java Sun Aug 26 15:36:01 2007
@@ -23,10 +23,10 @@
 
 import java.io.Serializable;
 
+import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
 import org.apache.directory.studio.ldapbrowser.core.internal.model.AttributeDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeTypeDescription;
 import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.AttributePropertyPageProvider;
-import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.ConnectionPropertyPageProvider;
 import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.EntryPropertyPageProvider;
 import org.eclipse.core.runtime.IAdaptable;
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBookmark.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBookmark.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBookmark.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBookmark.java Sun Aug 26 15:36:01 2007
@@ -23,8 +23,8 @@
 
 import java.io.Serializable;
 
+import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
 import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.BookmarkPropertyPageProvider;
-import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.ConnectionPropertyPageProvider;
 import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.EntryPropertyPageProvider;
 import org.eclipse.core.runtime.IAdaptable;
 
@@ -73,11 +73,11 @@
 
 
     /**
-     * Gets the connection.
+     * Gets the browser connection.
      * 
-     * @return the connection
+     * @return the browser connection
      */
-    public IConnection getConnection();
+    public IBrowserConnection getBrowserConnection();
 
 
     /**



Mime
View raw message