directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r569899 [4/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/events/BulkModificationEvent.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/BulkModificationEvent.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/BulkModificationEvent.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/BulkModificationEvent.java Sun Aug 26 15:36:01 2007
@@ -22,7 +22,7 @@
 
 
 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;
 
 
 /**
@@ -39,7 +39,7 @@
      * 
      * @param connection the connection
      */
-    public BulkModificationEvent( IConnection connection )
+    public BulkModificationEvent( IBrowserConnection connection )
     {
         super( connection, connection.getRootDSE() );
     }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ChildrenInitializedEvent.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ChildrenInitializedEvent.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ChildrenInitializedEvent.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ChildrenInitializedEvent.java Sun Aug 26 15:36:01 2007
@@ -43,7 +43,7 @@
      */
     public ChildrenInitializedEvent( IEntry initializedEntry )
     {
-        super( initializedEntry.getConnection(), initializedEntry );
+        super( initializedEntry.getBrowserConnection(), initializedEntry );
     }
 
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EmptyValueAddedEvent.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EmptyValueAddedEvent.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EmptyValueAddedEvent.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EmptyValueAddedEvent.java Sun Aug 26 15:36:01 2007
@@ -23,7 +23,7 @@
 
 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.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.IValue;
 
@@ -52,7 +52,7 @@
      * @param modifiedAttribute the modified attribute
      * @param addedValue the added value
      */
-    public EmptyValueAddedEvent( IConnection connection, IEntry modifiedEntry, IAttribute modifiedAttribute,
+    public EmptyValueAddedEvent( IBrowserConnection connection, IEntry modifiedEntry, IAttribute modifiedAttribute,
         IValue addedValue )
     {
         super( connection, modifiedEntry );

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EmptyValueDeletedEvent.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EmptyValueDeletedEvent.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EmptyValueDeletedEvent.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EmptyValueDeletedEvent.java Sun Aug 26 15:36:01 2007
@@ -23,7 +23,7 @@
 
 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.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.IValue;
 
@@ -52,7 +52,7 @@
      * @param modifiedAttribute the modified attribute
      * @param deletedValue the deleted value
      */
-    public EmptyValueDeletedEvent( IConnection connection, IEntry modifiedEntry, IAttribute modifiedAttribute,
+    public EmptyValueDeletedEvent( IBrowserConnection connection, IEntry modifiedEntry, IAttribute modifiedAttribute,
         IValue deletedValue )
     {
         super( connection, modifiedEntry );

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryAddedEvent.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryAddedEvent.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryAddedEvent.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryAddedEvent.java Sun Aug 26 15:36:01 2007
@@ -22,7 +22,7 @@
 
 
 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.IEntry;
 
 
@@ -41,7 +41,7 @@
      * @param connection the connection
      * @param addedEntry the added entry
      */
-    public EntryAddedEvent( IConnection connection, IEntry addedEntry )
+    public EntryAddedEvent( IBrowserConnection connection, IEntry addedEntry )
     {
         super( connection, addedEntry );
     }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryDeletedEvent.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryDeletedEvent.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryDeletedEvent.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryDeletedEvent.java Sun Aug 26 15:36:01 2007
@@ -22,7 +22,7 @@
 
 
 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.IEntry;
 
 
@@ -41,7 +41,7 @@
      * @param connection the connection
      * @param deletedEntry the deleted entry
      */
-    public EntryDeletedEvent( IConnection connection, IEntry deletedEntry )
+    public EntryDeletedEvent( IBrowserConnection connection, IEntry deletedEntry )
     {
         super( connection, deletedEntry );
     }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryModificationEvent.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryModificationEvent.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryModificationEvent.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryModificationEvent.java Sun Aug 26 15:36:01 2007
@@ -21,7 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.core.events;
 
 
-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;
 
 
@@ -35,7 +35,7 @@
 {
 
     /** The connection. */
-    protected IConnection connection;
+    protected IBrowserConnection connection;
 
     /** The entry. */
     protected IEntry modifiedEntry;
@@ -47,7 +47,7 @@
      * @param modifiedEntry the modified entry
      * @param connection the connection
      */
-    public EntryModificationEvent( IConnection connection, IEntry modifiedEntry )
+    public EntryModificationEvent( IBrowserConnection connection, IEntry modifiedEntry )
     {
         this.connection = connection;
         this.modifiedEntry = modifiedEntry;
@@ -59,7 +59,7 @@
      * 
      * @return the connection
      */
-    public IConnection getConnection()
+    public IBrowserConnection getConnection()
     {
         return connection;
     }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryMovedEvent.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryMovedEvent.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryMovedEvent.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryMovedEvent.java Sun Aug 26 15:36:01 2007
@@ -49,7 +49,7 @@
      */
     public EntryMovedEvent( IEntry oldEntry, IEntry newEntry )
     {
-        super( newEntry.getConnection(), newEntry.getParententry() );
+        super( newEntry.getBrowserConnection(), newEntry.getParententry() );
         this.oldEntry = oldEntry;
         this.newEntry = newEntry;
     }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryRenamedEvent.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryRenamedEvent.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryRenamedEvent.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EntryRenamedEvent.java Sun Aug 26 15:36:01 2007
@@ -49,7 +49,7 @@
      */
     public EntryRenamedEvent( IEntry oldEntry, IEntry newEntry )
     {
-        super( newEntry.getConnection(), newEntry.getParententry() );
+        super( newEntry.getBrowserConnection(), newEntry.getParententry() );
         this.oldEntry = oldEntry;
         this.newEntry = newEntry;
     }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EventRegistry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EventRegistry.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EventRegistry.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/EventRegistry.java Sun Aug 26 15:36:01 2007
@@ -217,77 +217,6 @@
         }
     }
 
-    /** The map with connection update listeners and their runners */
-    private static Map<ConnectionUpdateListener, EventRunner> connectionUpdateListeners = new HashMap<ConnectionUpdateListener, EventRunner>();
-
-
-    /**
-     * Adds the connection update listener.
-     *
-     * @param listener the listener
-     * @param runner the runner
-     */
-    public static void addConnectionUpdateListener( ConnectionUpdateListener listener, EventRunner runner )
-    {
-        assert listener != null;
-        assert runner != null;
-
-        if ( !connectionUpdateListeners.containsKey( listener ) )
-        {
-            connectionUpdateListeners.put( listener, runner );
-        }
-    }
-
-
-    /**
-     * Removes the connection update listener.
-     *
-     * @param listener the listener
-     */
-    public static void removeConnectionUpdateListener( ConnectionUpdateListener listener )
-    {
-        if ( connectionUpdateListeners.containsKey( listener ) )
-        {
-            connectionUpdateListeners.remove( listener );
-        }
-    }
-
-
-    /**
-     * Notifies each {@link ConnectionUpdateListener} about the the given {@link ConnectionUpdateEvent}.
-     * Uses the {@link EventRunner}s.
-     *
-     * @param connectionUpdateEvent the connection update event
-     * @param source the source
-     */
-    public static void fireConnectionUpdated( final ConnectionUpdateEvent connectionUpdateEvent, final Object source )
-    {
-        if( isEventFireingSuspendedInCurrentThread() )
-        {
-            return;
-        }
-
-        Iterator<ConnectionUpdateListener> it = connectionUpdateListeners.keySet().iterator();
-        while( it.hasNext() )
-        {
-            final ConnectionUpdateListener listener = it.next();
-            EventRunnable runnable = new EventRunnable()
-            {
-                public void run()
-                {
-                    listener.connectionUpdated( connectionUpdateEvent );
-                }
-            };
-
-            EventRunner runner = connectionUpdateListeners.get( listener );
-            synchronized( lock )
-            {
-                runner.execute( runnable );
-            }
-        }
-    }
-
-
     /** The map with entry update listeners and their runners */
     private static Map<EntryUpdateListener, EventRunner> entryUpdateListeners = new HashMap<EntryUpdateListener, EventRunner>();
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueAddedEvent.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueAddedEvent.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueAddedEvent.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueAddedEvent.java Sun Aug 26 15:36:01 2007
@@ -23,7 +23,7 @@
 
 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.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.IValue;
 
@@ -52,7 +52,7 @@
      * @param modifiedAttribute the modified attribute
      * @param addedValue the added value
      */
-    public ValueAddedEvent( IConnection connection, IEntry modifiedEntry, IAttribute modifiedAttribute,
+    public ValueAddedEvent( IBrowserConnection connection, IEntry modifiedEntry, IAttribute modifiedAttribute,
         IValue addedValue )
     {
         super( connection, modifiedEntry );

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueDeletedEvent.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueDeletedEvent.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueDeletedEvent.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueDeletedEvent.java Sun Aug 26 15:36:01 2007
@@ -23,7 +23,7 @@
 
 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.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.IValue;
 
@@ -52,7 +52,7 @@
      * @param modifiedAttribute the modified attribute
      * @param deletedValue the deleted value
      */
-    public ValueDeletedEvent( IConnection connection, IEntry modifiedEntry, IAttribute modifiedAttribute,
+    public ValueDeletedEvent( IBrowserConnection connection, IEntry modifiedEntry, IAttribute modifiedAttribute,
         IValue deletedValue )
     {
         super( connection, modifiedEntry );

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueModifiedEvent.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueModifiedEvent.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueModifiedEvent.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueModifiedEvent.java Sun Aug 26 15:36:01 2007
@@ -23,7 +23,7 @@
 
 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.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.IValue;
 
@@ -56,7 +56,7 @@
      * @param oldValue the old value
      * @param newValue the new value
      */
-    public ValueModifiedEvent( IConnection connection, IEntry modifiedEntry, IAttribute modifiedAttribute,
+    public ValueModifiedEvent( IBrowserConnection connection, IEntry modifiedEntry, IAttribute modifiedAttribute,
         IValue oldValue, IValue newValue )
     {
         super( connection, modifiedEntry );

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueRenamedEvent.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueRenamedEvent.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueRenamedEvent.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/events/ValueRenamedEvent.java Sun Aug 26 15:36:01 2007
@@ -22,7 +22,7 @@
 
 
 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.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
 
@@ -52,7 +52,7 @@
      * @param oldValue the old value with the old attribute type
      * @param newValue the new value with the new attribute type
      */
-    public ValueRenamedEvent( IConnection connection, IEntry modifiedEntry, IValue oldValue, IValue newValue )
+    public ValueRenamedEvent( IBrowserConnection connection, IEntry modifiedEntry, IValue oldValue, IValue newValue )
     {
         super( connection, modifiedEntry );
         this.oldValue = oldValue;

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/AbstractEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/AbstractEntry.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/AbstractEntry.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/AbstractEntry.java Sun Aug 26 15:36:01 2007
@@ -29,6 +29,9 @@
 import java.util.List;
 import java.util.Map;
 
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.event.ConnectionUpdateListener;
+import org.apache.directory.studio.connection.core.event.EventRunner;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributeAddedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributeDeletedEvent;
@@ -41,7 +44,7 @@
 import org.apache.directory.studio.ldapbrowser.core.internal.search.LdapSearchPageScoreComputer;
 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.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;
 import org.apache.directory.studio.ldapbrowser.core.model.RDN;
@@ -95,7 +98,7 @@
             ci.childrenSet = new LinkedHashSet();
         }
         ci.childrenSet.add( childToAdd );
-        this.entryModified( new EntryAddedEvent( childToAdd.getConnection(), childToAdd ) );
+        this.entryModified( new EntryAddedEvent( childToAdd.getBrowserConnection(), childToAdd ) );
     }
 
 
@@ -119,7 +122,7 @@
     public void addAttribute( IAttribute attributeToAdd ) throws ModelModificationException
     {
 
-        String oidString = attributeToAdd.getAttributeDescription().toOidString( getConnection().getSchema() );
+        String oidString = attributeToAdd.getAttributeDescription().toOidString( getBrowserConnection().getSchema() );
 
         AttributeInfo ai = this.getJNDIConnection().getAttributeInfo( this );
         if ( ai == null )
@@ -152,7 +155,7 @@
     public void deleteAttribute( IAttribute attributeToDelete ) throws ModelModificationException
     {
 
-        String oidString = attributeToDelete.getAttributeDescription().toOidString( getConnection().getSchema() );
+        String oidString = attributeToDelete.getAttributeDescription().toOidString( getBrowserConnection().getSchema() );
 
         AttributeInfo ai = this.getJNDIConnection().getAttributeInfo( this );
 
@@ -193,7 +196,8 @@
         }
 
         // check empty attributes and empty values
-        Iterator attributeIterator = ai.attributeMap.values().iterator();
+        Map<String, IAttribute> aiAttributeMap = new HashMap<String, IAttribute>( ai.attributeMap );
+        Iterator attributeIterator = aiAttributeMap.values().iterator();
         while ( attributeIterator.hasNext() )
         {
             IAttribute attribute = ( IAttribute ) attributeIterator.next();
@@ -214,7 +218,7 @@
             boolean structuralObjectClassAvailable = false;
             for ( int i = 0; i < ocValues.length; i++ )
             {
-                ObjectClassDescription ocd = this.getConnection().getSchema().getObjectClassDescription( ocValues[i] );
+                ObjectClassDescription ocd = this.getBrowserConnection().getSchema().getObjectClassDescription( ocValues[i] );
                 if ( ocd.isStructural() )
                 {
                     structuralObjectClassAvailable = true;
@@ -415,7 +419,7 @@
         else
         {
             AttributeDescription ad = new AttributeDescription( attributeDescription );
-            String oidString = ad.toOidString( getConnection().getSchema() );
+            String oidString = ad.toOidString( getBrowserConnection().getSchema() );
             return ( IAttribute ) ai.attributeMap.get( oidString.toLowerCase() );
         }
     }
@@ -447,7 +451,7 @@
                 IAttribute attribute = ( IAttribute ) iterator.next();
 
                 AttributeDescription other = attribute.getAttributeDescription();
-                if ( other.isSubtypeOf( ad, getConnection().getSchema() ) )
+                if ( other.isSubtypeOf( ad, getBrowserConnection().getSchema() ) )
                 {
                     attributeList.add( attribute );
                 }
@@ -619,9 +623,9 @@
     }
 
 
-    private Connection getJNDIConnection()
+    private BrowserConnection getJNDIConnection()
     {
-        return ( Connection ) this.getConnection();
+        return ( BrowserConnection ) this.getBrowserConnection();
     }
 
 
@@ -642,23 +646,27 @@
         IEntry e = ( IEntry ) o;
 
         // compare dn and connection
-        return this.getDn() == null ? e.getDn() == null : ( this.getDn().equals( e.getDn() ) && this.getConnection()
-            .equals( e.getConnection() ) );
+        return this.getDn() == null ? e.getDn() == null : ( this.getDn().equals( e.getDn() ) && this.getBrowserConnection()
+            .equals( e.getBrowserConnection() ) );
     }
 
 
     public Object getAdapter( Class adapter )
     {
-
-        if ( adapter.isAssignableFrom( ISearchPageScoreComputer.class ) )
+        Class<?> clazz = ( Class<?> ) adapter;
+        if ( clazz.isAssignableFrom( ISearchPageScoreComputer.class ) )
         {
             return new LdapSearchPageScoreComputer();
         }
-        if ( adapter == IConnection.class )
+        if ( clazz.isAssignableFrom( Connection.class ) )
+        {
+            return getBrowserConnection().getConnection();
+        }
+        if ( clazz.isAssignableFrom( IBrowserConnection.class ) )
         {
-            return this.getConnection();
+            return this.getBrowserConnection();
         }
-        if ( adapter == IEntry.class )
+        if ( clazz.isAssignableFrom( IEntry.class ) )
         {
             return this;
         }
@@ -674,7 +682,7 @@
 
     public URL getUrl()
     {
-        return new URL( getConnection(), getDn() );
+        return new URL( getBrowserConnection(), getDn() );
     }
 
 }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/AliasBaseEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/AliasBaseEntry.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/AliasBaseEntry.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/AliasBaseEntry.java Sun Aug 26 15:36:01 2007
@@ -22,7 +22,7 @@
 
 
 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;
 
 
 public class AliasBaseEntry extends DelegateEntry
@@ -36,7 +36,7 @@
     }
 
 
-    public AliasBaseEntry( IConnection connection, DN dn )
+    public AliasBaseEntry( IBrowserConnection connection, DN dn )
     {
         super( connection, dn );
     }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/Attribute.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/Attribute.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/Attribute.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/Attribute.java Sun Aug 26 15:36:01 2007
@@ -25,6 +25,7 @@
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.EmptyValueAddedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EmptyValueDeletedEvent;
@@ -35,7 +36,7 @@
 import org.apache.directory.studio.ldapbrowser.core.events.ValueModifiedEvent;
 import org.apache.directory.studio.ldapbrowser.core.internal.search.LdapSearchPageScoreComputer;
 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.IValue;
 import org.apache.directory.studio.ldapbrowser.core.model.ModelModificationException;
@@ -206,7 +207,7 @@
         {
             IValue emptyValue = new Value( this );
             valueList.add( emptyValue );
-            this.attributeModified( new EmptyValueAddedEvent( getEntry().getConnection(), getEntry(), this, emptyValue ) );
+            this.attributeModified( new EmptyValueAddedEvent( getEntry().getBrowserConnection(), getEntry(), this, emptyValue ) );
         }
         catch ( ModelModificationException mme )
         {
@@ -226,7 +227,7 @@
             if ( value.isEmpty() )
             {
                 it.remove();
-                attributeModified( new EmptyValueDeletedEvent( getEntry().getConnection(), getEntry(), this, value ) );
+                attributeModified( new EmptyValueDeletedEvent( getEntry().getBrowserConnection(), getEntry(), this, value ) );
                 return;
             }
         }
@@ -292,7 +293,7 @@
         this.checkValue( valueToAdd );
 
         valueList.add( valueToAdd );
-        attributeModified( new ValueAddedEvent( getEntry().getConnection(), getEntry(), this, valueToAdd ) );
+        attributeModified( new ValueAddedEvent( getEntry().getBrowserConnection(), getEntry(), this, valueToAdd ) );
     }
 
 
@@ -305,7 +306,7 @@
 
         if ( this.internalDeleteValue( valueToDelete ) )
         {
-            this.attributeModified( new ValueDeletedEvent( getEntry().getConnection(), getEntry(), this, valueToDelete ) );
+            this.attributeModified( new ValueDeletedEvent( getEntry().getBrowserConnection(), getEntry(), this, valueToDelete ) );
         }
     }
 
@@ -320,7 +321,7 @@
 
         this.internalDeleteValue( oldValue );
         this.valueList.add( newValue );
-        this.attributeModified( new ValueModifiedEvent( getEntry().getConnection(), getEntry(), this, oldValue,
+        this.attributeModified( new ValueModifiedEvent( getEntry().getBrowserConnection(), getEntry(), this, oldValue,
             newValue ) );
     }
 
@@ -457,7 +458,7 @@
      */
     public AttributeTypeDescription getAttributeTypeDescription()
     {
-        return getEntry().getConnection().getSchema().getAttributeTypeDescription( getType() );
+        return getEntry().getBrowserConnection().getSchema().getAttributeTypeDescription( getType() );
     }
 
 
@@ -466,15 +467,18 @@
      */
     public Object getAdapter( Class adapter )
     {
-
         Class<?> clazz = ( Class<?> ) adapter;
         if ( clazz.isAssignableFrom( ISearchPageScoreComputer.class ) )
         {
             return new LdapSearchPageScoreComputer();
         }
-        if ( clazz.isAssignableFrom( IConnection.class ) )
+        if ( clazz.isAssignableFrom( Connection.class ) )
+        {
+            return getEntry().getBrowserConnection().getConnection();
+        }
+        if ( clazz.isAssignableFrom( IBrowserConnection.class ) )
         {
-            return getEntry().getConnection();
+            return getEntry().getBrowserConnection();
         }
         if ( clazz.isAssignableFrom( IEntry.class ) )
         {

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/AttributeComparator.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/AttributeComparator.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/AttributeComparator.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/AttributeComparator.java Sun Aug 26 15:36:01 2007
@@ -26,7 +26,7 @@
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 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.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.IValue;
 import org.apache.directory.studio.ldapbrowser.core.model.ldif.lines.LdifAttrValLine;
@@ -39,7 +39,7 @@
     private IEntry dummyEntry;
 
 
-    public AttributeComparator( IConnection connection )
+    public AttributeComparator( IBrowserConnection connection )
     {
         this.dummyEntry = new DummyEntry( new DN(), connection );
     }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/BaseDNEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/BaseDNEntry.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/BaseDNEntry.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/BaseDNEntry.java Sun Aug 26 15:36:01 2007
@@ -23,7 +23,7 @@
 
 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;
 import org.apache.directory.studio.ldapbrowser.core.model.RDN;
@@ -37,7 +37,7 @@
     protected DN baseDn;
 
     // protected String connectionName;
-    protected IConnection connection;
+    protected IBrowserConnection connection;
 
 
     protected BaseDNEntry()
@@ -45,7 +45,7 @@
     }
 
 
-    public BaseDNEntry( DN baseDn, IConnection connection ) throws ModelModificationException
+    public BaseDNEntry( DN baseDn, IBrowserConnection connection ) throws ModelModificationException
     {
         super();
 
@@ -73,11 +73,11 @@
 
     public IEntry getParententry()
     {
-        return getConnection().getRootDSE();
+        return getBrowserConnection().getRootDSE();
     }
 
 
-    public IConnection getConnection()
+    public IBrowserConnection getBrowserConnection()
     {
         // return
         // BrowserCorePlugin.getDefault().getConnectionManager().getConnection(this.connectionName);

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/Bookmark.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/Bookmark.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/Bookmark.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/Bookmark.java Sun Aug 26 15:36:01 2007
@@ -21,13 +21,14 @@
 package org.apache.directory.studio.ldapbrowser.core.internal.model;
 
 
+import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.core.events.BookmarkUpdateEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.internal.search.LdapSearchPageScoreComputer;
 import org.apache.directory.studio.ldapbrowser.core.model.BookmarkParameter;
 import org.apache.directory.studio.ldapbrowser.core.model.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
-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.eclipse.search.ui.ISearchPageScoreComputer;
 
@@ -45,7 +46,7 @@
     private static final long serialVersionUID = 2914726541167255499L;
 
     /** The connection. */
-    private IConnection connection;
+    private IBrowserConnection connection;
 
     /** The bookmark parameter. */
     private BookmarkParameter bookmarkParameter;
@@ -68,7 +69,7 @@
      * @param connection the connection
      * @param bookmarkParameter the bookmark parameter
      */
-    public Bookmark( IConnection connection, BookmarkParameter bookmarkParameter )
+    public Bookmark( IBrowserConnection connection, BookmarkParameter bookmarkParameter )
     {
         this.connection = connection;
         this.bookmarkParameter = bookmarkParameter;
@@ -83,7 +84,7 @@
      * @param dn the target DN
      * @param name the symbolic name
      */
-    public Bookmark( IConnection connection, DN dn, String name )
+    public Bookmark( IBrowserConnection connection, DN dn, String name )
     {
         this.connection = connection;
         this.bookmarkParameter = new BookmarkParameter( dn, name );
@@ -139,9 +140,13 @@
         {
             return new LdapSearchPageScoreComputer();
         }
-        if ( clazz.isAssignableFrom( IConnection.class ) )
+        if ( clazz.isAssignableFrom( Connection.class ) )
         {
-            return getConnection();
+            return getBrowserConnection().getConnection();
+        }
+        if ( clazz.isAssignableFrom( IBrowserConnection.class ) )
+        {
+            return getBrowserConnection();
         }
         if ( clazz.isAssignableFrom( IEntry.class ) )
         {
@@ -185,7 +190,7 @@
     /**
      * {@inheritDoc}
      */
-    public IConnection getConnection()
+    public IBrowserConnection getBrowserConnection()
     {
         return this.connection;
     }

Copied: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/BrowserConnection.java (from r560556, directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/Connection.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/BrowserConnection.java?p2=directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/BrowserConnection.java&p1=directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/Connection.java&r1=560556&r2=569899&rev=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/Connection.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/BrowserConnection.java Sun Aug 26 15:36:01 2007
@@ -24,29 +24,25 @@
 import java.io.Serializable;
 import java.io.Writer;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod;
+import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
+import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
+import org.apache.directory.studio.connection.core.event.ConnectionUpdateListener;
 import org.apache.directory.studio.ldapbrowser.core.BookmarkManager;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
-import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.SearchManager;
-import org.apache.directory.studio.ldapbrowser.core.events.ConnectionRenamedEvent;
-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.internal.search.LdapSearchPageScoreComputer;
-import org.apache.directory.studio.ldapbrowser.core.jobs.ExtendedProgressMonitor;
-import org.apache.directory.studio.ldapbrowser.core.model.ConnectionParameter;
 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.IAuthHandler;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnection;
-import org.apache.directory.studio.ldapbrowser.core.model.IConnectionProvider;
-import org.apache.directory.studio.ldapbrowser.core.model.ICredentials;
+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;
@@ -62,12 +58,14 @@
 import org.eclipse.search.ui.ISearchPageScoreComputer;
 
 
-public class Connection implements IConnection, Serializable
+public class BrowserConnection implements ConnectionUpdateListener, IBrowserConnection, Serializable
 {
 
     private static final long serialVersionUID = 2987596234755856270L;
 
-    private ConnectionParameter connectionParameter;
+    private org.apache.directory.studio.connection.core.Connection connection;
+    
+//    private BrowserConnectionParameter browserConnectionParameter;
 
     private IRootDSE rootDSE;
 
@@ -77,184 +75,105 @@
 
     private BookmarkManager bookmarkManager;
 
-    private volatile Map dnToEntryCache;
-
-    private volatile Map entryToChildrenFilterMap;
-
-    private volatile Map entryToAttributeInfoMap;
+    private volatile Map<String, IEntry> dnToEntryCache;
 
-    private volatile Map entryToChildrenInfoMap;
+    private volatile Map<IEntry, String> entryToChildrenFilterMap;
 
-    private static final String DEFAULT_PROVIDER = JNDIConnectionProvider.class.getName();
+    private volatile Map<IEntry, AttributeInfo> entryToAttributeInfoMap;
 
-    transient IConnectionProvider connectionProvider;
+    private volatile Map<IEntry, ChildrenInfo> entryToChildrenInfoMap;
 
+    transient JNDIConnectionProvider connectionProvider;
+    
     transient ConnectionModifyHandler modifyHandler;
 
     transient ConnectionSearchHandler searchHandler;
 
 
-    public Connection()
+    /**
+     * Creates a new instance of BrowserConnection.
+     *
+     * @param connection the connection
+     */
+    public BrowserConnection( org.apache.directory.studio.connection.core.Connection connection )
     {
-        this( null, null, 0, 0, true, new DN(), 0, 0, IConnection.DEREFERENCE_ALIASES_NEVER,
-            IConnection.HANDLE_REFERRALS_IGNORE, IConnection.AUTH_ANONYMOUS, null, null );
-    }
-
-
-    public Connection( String name, String host, int port, int encryptionMethod, boolean fetchBaseDNs, DN baseDN,
-        int countLimit, int timeLimit, int aliasesDereferencingMethod, int referralsHandlingMethod, int authMethod,
-        String bindPrincipal, String bindPassword )
-    {
-
-        this.connectionParameter = new ConnectionParameter();
-        this.connectionParameter.setName( name );
-        this.connectionParameter.setHost( host );
-        this.connectionParameter.setPort( port );
-        this.connectionParameter.setEncryptionMethod( encryptionMethod );
-        this.connectionParameter.setCountLimit( countLimit );
-        this.connectionParameter.setTimeLimit( timeLimit );
-        this.connectionParameter.setAliasesDereferencingMethod( aliasesDereferencingMethod );
-        this.connectionParameter.setReferralsHandlingMethod( referralsHandlingMethod );
-        this.connectionParameter.setFetchBaseDNs( fetchBaseDNs );
-        this.connectionParameter.setBaseDN( baseDN );
-        this.connectionParameter.setAuthMethod( authMethod );
-        // this.connectionParameter.setBindDN(bindDn);
-        this.connectionParameter.setBindPrincipal( bindPrincipal );
-        this.connectionParameter.setBindPassword( bindPassword );
-
+        this.connection = connection;
+        
+        if( connection.getConnectionParameter().getExtendedProperty( CONNECTION_PARAMETER_COUNT_LIMIT ) == null )
+        {
+            connection.getConnectionParameter().setExtendedIntProperty( CONNECTION_PARAMETER_COUNT_LIMIT, 0 );
+            connection.getConnectionParameter().setExtendedIntProperty( CONNECTION_PARAMETER_TIME_LIMIT, 0 );
+            connection.getConnectionParameter().setExtendedIntProperty( CONNECTION_PARAMETER_ALIASES_DEREFERENCING_METHOD, IBrowserConnection.DEREFERENCE_ALIASES_NEVER );
+            connection.getConnectionParameter().setExtendedIntProperty( CONNECTION_PARAMETER_REFERRALS_HANDLING_METHOD, IBrowserConnection.HANDLE_REFERRALS_IGNORE );
+            connection.getConnectionParameter().setExtendedBoolProperty( CONNECTION_PARAMETER_FETCH_BASE_DNS, true );
+            connection.getConnectionParameter().setExtendedProperty( CONNECTION_PARAMETER_BASE_DN, "" );
+        }
+        
+//        this.browserConnectionParameter = new BrowserConnectionParameter();
+//        this.browserConnectionParameter.setCountLimit( 0 );
+//        this.browserConnectionParameter.setTimeLimit( 0 );
+//        this.browserConnectionParameter.setAliasesDereferencingMethod( IConnection.DEREFERENCE_ALIASES_NEVER );
+//        this.browserConnectionParameter.setReferralsHandlingMethod( IConnection.HANDLE_REFERRALS_IGNORE );
+//        this.browserConnectionParameter.setFetchBaseDNs( true );
+//        this.browserConnectionParameter.setBaseDN( new DN() );
+        
         this.rootDSE = null;
 
         this.schema = Schema.DEFAULT_SCHEMA;
         this.searchManager = new SearchManager( this );
         this.bookmarkManager = new BookmarkManager( this );
 
-        this.entryToChildrenFilterMap = new HashMap();
-        this.dnToEntryCache = new HashMap();
-        this.entryToAttributeInfoMap = new HashMap();
-        this.entryToChildrenInfoMap = new HashMap();
+        this.entryToChildrenFilterMap = new HashMap<IEntry, String>();
+        this.dnToEntryCache = new HashMap<String, IEntry>();
+        this.entryToAttributeInfoMap = new HashMap<IEntry, AttributeInfo>();
+        this.entryToChildrenInfoMap = new HashMap<IEntry, ChildrenInfo>();
 
-        this.setConnectionProviderClassName( DEFAULT_PROVIDER );
+        this.connectionProvider = new JNDIConnectionProvider( connection );
         this.modifyHandler = new ConnectionModifyHandler( this );
         this.searchHandler = new ConnectionSearchHandler( this );
+        
+        ConnectionEventRegistry.addConnectionUpdateListener( this, ConnectionCorePlugin.getDefault().getEventRunner() );
     }
-
-
+    
+    
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getUrl()
+     */
     public URL getUrl()
     {
         return new URL( this );
     }
 
 
-    public Object clone()
-    {
-        Connection newConnection = new Connection( this.getName(), this.getHost(), this.getPort(), this
-            .getEncryptionMethod(), this.isFetchBaseDNs(), this.getBaseDN(), this.getCountLimit(), this.getTimeLimit(),
-            this.getAliasesDereferencingMethod(), this.getReferralsHandlingMethod(), this.getAuthMethod(), this
-                .getBindPrincipal(), this.getBindPassword() );
-
-        return newConnection;
-    }
-
-
-    public void reloadSchema( ExtendedProgressMonitor monitor )
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#reloadSchema(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     */
+    public void reloadSchema( StudioProgressMonitor monitor )
     {
+        fetchRootDSE( monitor );
+        
         monitor.reportProgress( BrowserCoreMessages.model__loading_schema );
-        this.loadSchema( monitor );
-    }
-
-
-    public void connect( ExtendedProgressMonitor monitor )
-    {
-        if ( this.connectionProvider == null )
-        {
-            if ( this.getConnectionProviderClassName() == null )
-            {
-                monitor.reportError( BrowserCoreMessages.model__no_connection_provider );
-                return;
-            }
-
-            try
-            {
-                this.connectionProvider = ( IConnectionProvider ) Class.forName( this.getConnectionProviderClassName() )
-                    .newInstance();
-            }
-            catch ( Exception e )
-            {
-                monitor.reportError( BrowserCoreMessages.model__no_connection_provider );
-                return;
-            }
-        }
-
-        try
-        {
-            this.entryToChildrenFilterMap = new HashMap();
-            this.dnToEntryCache = new HashMap();
-            this.entryToAttributeInfoMap = new HashMap();
-            this.entryToChildrenInfoMap = new HashMap();
-
-            modifyHandler.connectionOpened();
-            searchHandler.connectionOpened();
-
-            monitor.reportProgress( BrowserCoreMessages.model__connecting );
-            this.connectionProvider.connect( this.connectionParameter, monitor );
-            monitor.worked( 1 );
-        }
-        catch ( ConnectionException e )
-        {
-            monitor.reportError( e.getMessage(), e );
-            this.connectionProvider = null;
-        }
-    }
-
-
-    public void bind( ExtendedProgressMonitor monitor )
-    {
-        this.connect( monitor );
-
-        if ( this.connectionProvider != null )
-        {
-            try
-            {
-                monitor.reportProgress( BrowserCoreMessages.model__binding );
-
-                IAuthHandler authHandler = BrowserCorePlugin.getDefault().getAuthHandler();
-                if ( authHandler == null )
-                {
-                    throw new ConnectionException( BrowserCoreMessages.model__no_auth_handler );
-                }
-
-                ICredentials credentials = authHandler.getCredentials( this.connectionParameter );
-                if ( credentials == null )
-                {
-                    throw new ConnectionException( BrowserCoreMessages.model__no_credentials );
-                }
-
-                this.connectionProvider.bind( this.connectionParameter, credentials, monitor );
-                monitor.worked( 1 );
-            }
-            catch ( ConnectionException e )
-            {
-                monitor.reportError( e.getMessage(), e );
-                this.connectionProvider = null;
-            }
-        }
+        loadSchema( monitor );
     }
 
 
-    public void fetchRootDSE( ExtendedProgressMonitor monitor )
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#fetchRootDSE(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     */
+    public void fetchRootDSE( StudioProgressMonitor monitor )
     {
-        if ( this.connectionProvider != null && !monitor.errorsReported() )
+        if ( !monitor.errorsReported() )
         {
             try
             {
                 monitor.reportProgress( BrowserCoreMessages.model__loading_rootdse );
-                this.loadRootDSE( monitor );
+                loadRootDSE( monitor );
                 monitor.worked( 1 );
             }
             catch ( Exception e )
             {
                 monitor.reportError( BrowserCoreMessages.model__error_loading_rootdse );
-                this.rootDSE = null;
+                rootDSE = null;
             }
 
             if ( monitor.errorsReported() )
@@ -265,10 +184,13 @@
     }
 
 
-    public void open( ExtendedProgressMonitor monitor )
+    /**
+     * Open.
+     * 
+     * @param monitor the monitor
+     */
+    public void open( StudioProgressMonitor monitor )
     {
-        this.bind( monitor );
-        
         this.fetchRootDSE( monitor );
 
         if ( this.connectionProvider != null && this.rootDSE != null )
@@ -349,72 +271,45 @@
                 e.printStackTrace();
                 return;
             }
-
-            EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( this,
-                ConnectionUpdateEvent.EventDetail.CONNECTION_OPENED ), this );
         }
     }
 
 
-    public boolean isOpened()
-    {
-        return this.connectionProvider != null;
-    }
-
-
-    public boolean canOpen()
-    {
-        return !this.isOpened();
-    }
-
-
-    public boolean canClose()
-    {
-        return this.isOpened();
-    }
-
-
-    public void close()
+    /**
+     * Closes the connections, clears all caches
+     * 
+     * TODO: call when connection is closed
+     */
+    private void close()
     {
-        if ( this.isOpened() )
+        for ( int i = 0; i < getSearchManager().getSearchCount(); i++ )
         {
-            if ( this.connectionProvider != null )
-            {
-                try
-                {
-                    this.connectionProvider.close();
-                }
-                catch ( ConnectionException ce )
-                {
-                    ce.printStackTrace();
-                }
-                this.connectionProvider = null;
-            }
-
-            for ( int i = 0; i < this.getSearchManager().getSearchCount(); i++ )
-            {
-                this.getSearchManager().getSearches()[i].setSearchResults( null );
-            }
+            this.getSearchManager().getSearches()[i].setSearchResults( null );
+        }
 
-            this.dnToEntryCache.clear();
-            this.entryToAttributeInfoMap.clear();
-            this.entryToChildrenInfoMap.clear();
-            this.entryToChildrenFilterMap.clear();
+        dnToEntryCache.clear();
+        entryToAttributeInfoMap.clear();
+        entryToChildrenInfoMap.clear();
+        entryToChildrenFilterMap.clear();
 
-            modifyHandler.connectionClosed();
-            searchHandler.connectionClosed();
+        modifyHandler.connectionClosed();
+        searchHandler.connectionClosed();
 
-            this.rootDSE = null;
-            this.schema = Schema.DEFAULT_SCHEMA;
+        rootDSE = null;
+        schema = Schema.DEFAULT_SCHEMA;
 
-            EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( this,
-                ConnectionUpdateEvent.EventDetail.CONNECTION_CLOSED ), this );
-            System.gc();
-        }
+        System.gc();
     }
 
 
-    private void loadRootDSE( ExtendedProgressMonitor monitor ) throws Exception
+    /**
+     * Loads the Root DSE.
+     * 
+     * @param monitor the progress monitor
+     * 
+     * @throws Exception the exception
+     */
+    private void loadRootDSE( StudioProgressMonitor monitor ) throws Exception
     {
         if(rootDSE == null)
         {
@@ -424,7 +319,7 @@
 
         // get well-known root DSE attributes, includes + and *
         ISearch search = new Search( null, this, new DN(), ISearch.FILTER_TRUE, ROOT_DSE_ATTRIBUTES, ISearch.SCOPE_OBJECT, 0,
-            0, IConnection.DEREFERENCE_ALIASES_NEVER, IConnection.HANDLE_REFERRALS_IGNORE, false, false, null );
+            0, IBrowserConnection.DEREFERENCE_ALIASES_NEVER, IBrowserConnection.HANDLE_REFERRALS_IGNORE, false, false, null );
         search( search, monitor );
 
         // get base DNs
@@ -438,7 +333,7 @@
             
             // check if entry exists
             search = new Search( null, this, dn, ISearch.FILTER_TRUE, ISearch.NO_ATTRIBUTES, ISearch.SCOPE_OBJECT, 1, 0,
-                IConnection.DEREFERENCE_ALIASES_NEVER, IConnection.HANDLE_REFERRALS_IGNORE, true, true, null );
+                IBrowserConnection.DEREFERENCE_ALIASES_NEVER, IBrowserConnection.HANDLE_REFERRALS_IGNORE, true, true, null );
             search( search, monitor );
         }
         else
@@ -472,7 +367,7 @@
                 {
                     // special handling of empty namingContext: perform a one-level search and add all result DNs to the set
                     search = new Search( null, this, new DN(), ISearch.FILTER_TRUE, ISearch.NO_ATTRIBUTES, ISearch.SCOPE_ONELEVEL, 0,
-                        0, IConnection.DEREFERENCE_ALIASES_NEVER, IConnection.HANDLE_REFERRALS_IGNORE, false, false, null );
+                        0, IBrowserConnection.DEREFERENCE_ALIASES_NEVER, IBrowserConnection.HANDLE_REFERRALS_IGNORE, false, false, null );
                     search( search, monitor );
                     ISearchResult[] results = search.getSearchResults();
                     for ( int k = 0; results != null && k < results.length; k++ )
@@ -512,15 +407,23 @@
         rootDSE.setChildrenInitialized( true );
         rootDSE.setHasChildrenHint( true );
         rootDSE.setDirectoryEntry( true );
-
     }
 
 
+    /**
+     * Gets the directory metadata entries.
+     * 
+     * @param metadataAttributeName the metadata attribute name
+     * 
+     * @return the directory metadata entries
+     * 
+     * @throws ModelModificationException the model modification exception
+     */
     private DirectoryMetadataEntry[] getDirectoryMetadataEntries( String metadataAttributeName )
         throws ModelModificationException
     {
-        List metadataEntryList = new ArrayList();
-        IAttribute attribute = this.rootDSE.getAttribute( metadataAttributeName );
+        List<DN> metadataEntryList = new ArrayList<DN>();
+        IAttribute attribute = getRootDSE().getAttribute( metadataAttributeName );
         if ( attribute != null )
         {
             String[] values = attribute.getStringValues();
@@ -539,7 +442,7 @@
         DirectoryMetadataEntry[] metadataEntries = new DirectoryMetadataEntry[metadataEntryList.size()];
         for ( int i = 0; i < metadataEntryList.size(); i++ )
         {
-            metadataEntries[i] = new DirectoryMetadataEntry( ( DN ) metadataEntryList.get( i ), this );
+            metadataEntries[i] = new DirectoryMetadataEntry( metadataEntryList.get( i ), this );
             metadataEntries[i].setDirectoryEntry( true );
             cacheEntry( metadataEntries[i] );
         }
@@ -547,18 +450,21 @@
     }
 
 
-    private void loadSchema( ExtendedProgressMonitor monitor )
+    /**
+     * Loads the schema.
+     * 
+     * @param monitor the progress monitor
+     */
+    private void loadSchema( StudioProgressMonitor monitor )
     {
-
-        this.schema = Schema.DEFAULT_SCHEMA;
+        schema = Schema.DEFAULT_SCHEMA;
 
         try
         {
-
-            if ( this.rootDSE.getAttribute( IRootDSE.ROOTDSE_ATTRIBUTE_SUBSCHEMASUBENTRY ) != null )
+            if ( getRootDSE().getAttribute( IRootDSE.ROOTDSE_ATTRIBUTE_SUBSCHEMASUBENTRY ) != null )
             {
                 SearchParameter sp = new SearchParameter();
-                sp.setSearchBase( new DN( this.rootDSE.getAttribute( IRootDSE.ROOTDSE_ATTRIBUTE_SUBSCHEMASUBENTRY )
+                sp.setSearchBase( new DN( getRootDSE().getAttribute( IRootDSE.ROOTDSE_ATTRIBUTE_SUBSCHEMASUBENTRY )
                     .getStringValue() ) );
                 sp.setFilter( Schema.SCHEMA_FILTER );
                 sp.setScope( ISearch.SCOPE_OBJECT );
@@ -567,14 +473,15 @@
                         Schema.SCHEMA_ATTRIBUTE_LDAPSYNTAXES, Schema.SCHEMA_ATTRIBUTE_MATCHINGRULES,
                         Schema.SCHEMA_ATTRIBUTE_MATCHINGRULEUSE, IAttribute.OPERATIONAL_ATTRIBUTE_CREATE_TIMESTAMP,
                         IAttribute.OPERATIONAL_ATTRIBUTE_MODIFY_TIMESTAMP, } );
-                LdifEnumeration le = this.connectionProvider.search( sp, monitor );
+                LdifEnumeration le = connectionProvider.search( sp, monitor );
                 if ( le.hasNext( monitor ) )
                 {
                     LdifContentRecord schemaRecord = ( LdifContentRecord ) le.next( monitor );
-                    this.schema = new Schema();
-                    this.schema.loadFromRecord( schemaRecord );
-                    EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( this,
-                        ConnectionUpdateEvent.EventDetail.SCHEMA_LOADED ), this );
+                    schema = new Schema();
+                    schema.loadFromRecord( schemaRecord );
+                    // TODO: Schema update event
+//                    EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( this,
+//                        ConnectionUpdateEvent.EventDetail.SCHEMA_LOADED ), this );
                 }
                 else
                 {
@@ -592,21 +499,20 @@
             e.printStackTrace();
         }
 
-        if ( this.schema == null )
+        if ( schema == null )
         {
-            this.schema = Schema.DEFAULT_SCHEMA;
+            schema = Schema.DEFAULT_SCHEMA;
         }
-
     }
 
 
-    public void search( ISearch searchRequest, ExtendedProgressMonitor monitor )
+    public void search( ISearch searchRequest, StudioProgressMonitor monitor )
     {
         searchHandler.search( searchRequest, monitor );
     }
 
 
-    public boolean existsEntry( DN dn, ExtendedProgressMonitor monitor )
+    public boolean existsEntry( DN dn, StudioProgressMonitor monitor )
     {
         return searchHandler.existsEntry( dn, monitor );
     }
@@ -617,53 +523,53 @@
 
         if ( this.dnToEntryCache != null && this.dnToEntryCache.containsKey( dn.toOidString( this.schema ) ) )
         {
-            return ( IEntry ) dnToEntryCache.get( dn.toOidString( this.schema ) );
+            return dnToEntryCache.get( dn.toOidString( this.schema ) );
         }
-        if ( this.rootDSE != null && this.rootDSE.getDn() != null && this.rootDSE.getDn().equals( dn ) )
+        if ( getRootDSE().getDn().equals( dn ) )
         {
-            return this.rootDSE;
+            return getRootDSE();
         }
         return null;
     }
 
 
-    public IEntry getEntry( DN dn, ExtendedProgressMonitor monitor )
+    public IEntry getEntry( DN dn, StudioProgressMonitor monitor )
     {
         return searchHandler.getEntry( dn, monitor );
     }
 
 
-    public void create( IValue[] valuesToCreate, ExtendedProgressMonitor monitor )
+    public void create( IValue[] valuesToCreate, StudioProgressMonitor monitor )
     {
         modifyHandler.create( valuesToCreate, monitor );
     }
 
 
-    public void modify( IValue oldValue, IValue newValue, ExtendedProgressMonitor monitor )
+    public void modify( IValue oldValue, IValue newValue, StudioProgressMonitor monitor )
     {
         modifyHandler.modify( oldValue, newValue, monitor );
     }
 
 
-    public void create( IEntry entryToCreate, ExtendedProgressMonitor monitor )
+    public void create( IEntry entryToCreate, StudioProgressMonitor monitor )
     {
         modifyHandler.create( entryToCreate, monitor );
     }
 
 
-    public void rename( IEntry entryToRename, DN newDn, boolean deleteOldRdn, ExtendedProgressMonitor monitor )
+    public void rename( IEntry entryToRename, DN newDn, boolean deleteOldRdn, StudioProgressMonitor monitor )
     {
         modifyHandler.rename( entryToRename, newDn, deleteOldRdn, monitor );
     }
 
 
-    public void move( IEntry entryToMove, DN newSuperior, ExtendedProgressMonitor monitor )
+    public void move( IEntry entryToMove, DN newSuperior, StudioProgressMonitor monitor )
     {
         modifyHandler.move( entryToMove, newSuperior, monitor );
     }
 
 
-    public LdifEnumeration exportLdif( SearchParameter searchParameter, ExtendedProgressMonitor monitor )
+    public LdifEnumeration exportLdif( SearchParameter searchParameter, StudioProgressMonitor monitor )
         throws ConnectionException
     {
         LdifEnumeration subEnumeration = this.connectionProvider.search( searchParameter, monitor );
@@ -671,216 +577,274 @@
     }
 
 
+    
+    
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getName()
+     */
     public final String getName()
     {
-        return this.connectionParameter.getName();
+        return connection.getName();
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setName(java.lang.String)
+     */
     public final void setName( String name )
     {
-        String oldName = this.getName();
-        this.connectionParameter.setName( name );
-        EventRegistry.fireConnectionUpdated( new ConnectionRenamedEvent( this, oldName ), this );
+        connection.setName( name );
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#isFetchBaseDNs()
+     */
     public boolean isFetchBaseDNs()
     {
-        return this.connectionParameter.isFetchBaseDNs();
+        return connection.getConnectionParameter().getExtendedBoolProperty( CONNECTION_PARAMETER_FETCH_BASE_DNS );
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setFetchBaseDNs(boolean)
+     */
     public void setFetchBaseDNs( boolean fetchBaseDNs )
     {
-        this.connectionParameter.setFetchBaseDNs( fetchBaseDNs );
-        EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( this,
-            ConnectionUpdateEvent.EventDetail.CONNECTION_PARAMETER_UPDATED ), this );
+        connection.getConnectionParameter().setExtendedBoolProperty( CONNECTION_PARAMETER_FETCH_BASE_DNS, fetchBaseDNs );
+        ConnectionEventRegistry.fireConnectionUpdated( connection, this );
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getBaseDN()
+     */
     public DN getBaseDN()
     {
-        return this.connectionParameter.getBaseDN();
+        try
+        {
+            return new DN( connection.getConnectionParameter().getExtendedProperty( CONNECTION_PARAMETER_BASE_DN ) );
+        }
+        catch ( NameException e )
+        {
+            return null;
+        }
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setBaseDN(org.apache.directory.studio.ldapbrowser.core.model.DN)
+     */
     public void setBaseDN( DN baseDN )
     {
-        this.connectionParameter.setBaseDN( baseDN );
-        EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( this,
-            ConnectionUpdateEvent.EventDetail.CONNECTION_PARAMETER_UPDATED ), this );
+        connection.getConnectionParameter().setExtendedProperty( CONNECTION_PARAMETER_BASE_DN, baseDN.toString() );
+        ConnectionEventRegistry.fireConnectionUpdated( connection, this );
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getCountLimit()
+     */
     public int getCountLimit()
     {
-        return this.connectionParameter.getCountLimit();
+        return connection.getConnectionParameter().getExtendedIntProperty( CONNECTION_PARAMETER_COUNT_LIMIT );
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setCountLimit(int)
+     */
     public void setCountLimit( int countLimit )
     {
-        this.connectionParameter.setCountLimit( countLimit );
-        EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( this,
-            ConnectionUpdateEvent.EventDetail.CONNECTION_PARAMETER_UPDATED ), this );
+        connection.getConnectionParameter().setExtendedIntProperty( CONNECTION_PARAMETER_COUNT_LIMIT, countLimit );
+        ConnectionEventRegistry.fireConnectionUpdated( connection, this );
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getHost()
+     */
     public String getHost()
     {
-        return this.connectionParameter.getHost();
+        return connection.getHost();
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setHost(java.lang.String)
+     */
     public void setHost( String host )
     {
-        this.connectionParameter.setHost( host );
-        EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( this,
-            ConnectionUpdateEvent.EventDetail.CONNECTION_PARAMETER_UPDATED ), this );
+        connection.setHost( host );
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getPort()
+     */
     public int getPort()
     {
-        return this.connectionParameter.getPort();
+        return connection.getPort();
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setPort(int)
+     */
     public void setPort( int port )
     {
-        this.connectionParameter.setPort( port );
-        EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( this,
-            ConnectionUpdateEvent.EventDetail.CONNECTION_PARAMETER_UPDATED ), this );
+        connection.setPort( port );
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getAliasesDereferencingMethod()
+     */
     public int getAliasesDereferencingMethod()
     {
-        return this.connectionParameter.getAliasesDereferencingMethod();
+        return connection.getConnectionParameter().getExtendedIntProperty( CONNECTION_PARAMETER_ALIASES_DEREFERENCING_METHOD );
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setAliasesDereferencingMethod(int)
+     */
     public void setAliasesDereferencingMethod( int aliasesDereferencingMethod )
     {
-        this.connectionParameter.setAliasesDereferencingMethod( aliasesDereferencingMethod );
-        EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( this,
-            ConnectionUpdateEvent.EventDetail.CONNECTION_PARAMETER_UPDATED ), this );
+        connection.getConnectionParameter().setExtendedIntProperty( CONNECTION_PARAMETER_ALIASES_DEREFERENCING_METHOD, aliasesDereferencingMethod );
+        ConnectionEventRegistry.fireConnectionUpdated( connection, this );
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getReferralsHandlingMethod()
+     */
     public int getReferralsHandlingMethod()
     {
-        return this.connectionParameter.getReferralsHandlingMethod();
+        return connection.getConnectionParameter().getExtendedIntProperty( CONNECTION_PARAMETER_REFERRALS_HANDLING_METHOD );
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setReferralsHandlingMethod(int)
+     */
     public void setReferralsHandlingMethod( int referralsHandlingMethod )
     {
-        this.connectionParameter.setReferralsHandlingMethod( referralsHandlingMethod );
-        EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( this,
-            ConnectionUpdateEvent.EventDetail.CONNECTION_PARAMETER_UPDATED ), this );
+        connection.getConnectionParameter().setExtendedIntProperty( CONNECTION_PARAMETER_REFERRALS_HANDLING_METHOD, referralsHandlingMethod );
+        ConnectionEventRegistry.fireConnectionUpdated( connection, this );
     }
 
 
-    public int getEncryptionMethod()
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getEncryptionMethod()
+     */
+    public EncryptionMethod getEncryptionMethod()
     {
-        return this.connectionParameter.getEncryptionMethod();
+        return connection.getEncryptionMethod();
     }
 
 
-    public void setEncryptionMethod( int encryptionMethod )
-    {
-        this.connectionParameter.setEncryptionMethod( encryptionMethod );
-        EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( this,
-            ConnectionUpdateEvent.EventDetail.CONNECTION_PARAMETER_UPDATED ), this );
-    }
-    
-    public int getSASLMechanism ()
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setEncryptionMethod(org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod)
+     */
+    public void setEncryptionMethod( EncryptionMethod encryptionMethod )
     {
-    	return this.connectionParameter.getSaslMechanism();
+        connection.setEncryptionMethod( encryptionMethod );
     }
     
-    public void setSASLMechanism (int saslMethod)
-    {
-    	this.connectionParameter.setSaslMechanism(saslMethod);
-    	EventRegistry.fireConnectionUpdated(new ConnectionUpdateEvent (this,
-    			ConnectionUpdateEvent.EventDetail.CONNECTION_PARAMETER_UPDATED), this);
-    }
-
-
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getTimeLimit()
+     */
     public int getTimeLimit()
     {
-        return this.connectionParameter.getTimeLimit();
+        return connection.getConnectionParameter().getExtendedIntProperty( CONNECTION_PARAMETER_TIME_LIMIT );
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setTimeLimit(int)
+     */
     public void setTimeLimit( int timeLimit )
     {
-        this.connectionParameter.setTimeLimit( timeLimit );
-        EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( this,
-            ConnectionUpdateEvent.EventDetail.CONNECTION_PARAMETER_UPDATED ), this );
+        connection.getConnectionParameter().setExtendedIntProperty( CONNECTION_PARAMETER_TIME_LIMIT, timeLimit );
+        ConnectionEventRegistry.fireConnectionUpdated( connection, this );
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getBindPrincipal()
+     */
     public String getBindPrincipal()
     {
-        return this.connectionParameter.getBindPrincipal();
+        return connection.getBindPrincipal();
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setBindPrincipal(java.lang.String)
+     */
     public void setBindPrincipal( String bindPrincipal )
     {
-        this.connectionParameter.setBindPrincipal( bindPrincipal );
-        EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( this,
-            ConnectionUpdateEvent.EventDetail.CONNECTION_PARAMETER_UPDATED ), this );
+        connection.setBindPrincipal( bindPrincipal );
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getBindPassword()
+     */
     public String getBindPassword()
     {
-        return this.connectionParameter.getBindPassword();
+        return connection.getBindPassword();
     }
 
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setBindPassword(java.lang.String)
+     */
     public void setBindPassword( String bindPassword )
     {
-        this.connectionParameter.setBindPassword( bindPassword );
-        EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( this,
-            ConnectionUpdateEvent.EventDetail.CONNECTION_PARAMETER_UPDATED ), this );
-    }
-
-
-    public int getAuthMethod()
-    {
-        return this.connectionParameter.getAuthMethod();
-    }
-
-
-    public void setAuthMethod( int authMethod )
-    {
-        this.connectionParameter.setAuthMethod( authMethod );
-        EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( this,
-            ConnectionUpdateEvent.EventDetail.CONNECTION_PARAMETER_UPDATED ), this );
+        connection.setBindPassword( bindPassword );
     }
 
 
-    public String getConnectionProviderClassName()
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getAuthMethod()
+     */
+    public AuthenticationMethod getAuthMethod()
     {
-        return this.connectionParameter.getConnectionProviderClassName();
+        return connection.getAuthMethod();
     }
 
 
-    public void setConnectionProviderClassName( String connectionProviderClassName )
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setAuthMethod(org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod)
+     */
+    public void setAuthMethod( AuthenticationMethod authMethod )
     {
-        this.connectionParameter.setConnectionProviderClassName( connectionProviderClassName );
-        EventRegistry.fireConnectionUpdated( new ConnectionUpdateEvent( this,
-            ConnectionUpdateEvent.EventDetail.CONNECTION_PARAMETER_UPDATED ), this );
+        connection.setAuthMethod( authMethod );
     }
 
+    
+    
+    
+    
 
+    /**
+     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getRootDSE()
+     */
     public final IRootDSE getRootDSE()
     {
+        if( rootDSE == null )
+        {
+            try
+            {
+                rootDSE = new RootDSE( this );
+                cacheEntry( rootDSE );
+            }
+            catch ( ModelModificationException e )
+            {
+            }
+        }
         return this.rootDSE;
     }
 
@@ -897,21 +861,24 @@
     }
 
 
-    public ConnectionParameter getConnectionParameter()
-    {
-        return connectionParameter;
-    }
-
-
-    public void setConnectionParameter( ConnectionParameter connectionParameter )
-    {
-        this.connectionParameter = connectionParameter;
-    }
+//    public BrowserConnectionParameter getConnectionParameter()
+//    {
+//        return browserConnectionParameter;
+//    }
+//
+//
+//    public void setConnectionParameter( BrowserConnectionParameter connectionParameter )
+//    {
+//        this.browserConnectionParameter = connectionParameter;
+//    }
 
 
+    /**
+     * @see java.lang.Object#toString()
+     */
     public String toString()
     {
-        return this.connectionParameter.getName();
+        return getName();
     }
 
 
@@ -940,7 +907,7 @@
         {
             return new LdapSearchPageScoreComputer();
         }
-        if ( adapter == IConnection.class )
+        if ( adapter == IBrowserConnection.class )
         {
             return this;
         }
@@ -949,12 +916,6 @@
     }
 
 
-    public IConnection getConnection()
-    {
-        return this;
-    }
-
-
     protected void cacheEntry( IEntry entry )
     {
         this.dnToEntryCache.put( entry.getDn().toOidString( this.schema ), entry );
@@ -975,7 +936,7 @@
 
     protected String getChildrenFilter( IEntry entry )
     {
-        return this.entryToChildrenFilterMap == null ? null : ( String ) this.entryToChildrenFilterMap.get( entry );
+        return this.entryToChildrenFilterMap == null ? null : this.entryToChildrenFilterMap.get( entry );
     }
 
 
@@ -993,7 +954,7 @@
 
     protected AttributeInfo getAttributeInfo( IEntry entry )
     {
-        return this.entryToAttributeInfoMap == null ? null : ( AttributeInfo ) this.entryToAttributeInfoMap.get( entry );
+        return this.entryToAttributeInfoMap == null ? null : this.entryToAttributeInfoMap.get( entry );
     }
 
 
@@ -1012,7 +973,7 @@
 
     protected ChildrenInfo getChildrenInfo( IEntry entry )
     {
-        return this.entryToChildrenInfoMap == null ? null : ( ChildrenInfo ) this.entryToChildrenInfoMap.get( entry );
+        return this.entryToChildrenInfoMap == null ? null : this.entryToChildrenInfoMap.get( entry );
     }
 
 
@@ -1029,52 +990,61 @@
     }
 
 
-    public void delete( IEntry entry, ExtendedProgressMonitor monitor )
+    public void delete( IEntry entry, StudioProgressMonitor monitor )
     {
         modifyHandler.delete( entry, monitor );
     }
 
 
-    public void delete( IValue[] valuesToDelete, ExtendedProgressMonitor monitor )
+    public void delete( IValue[] valuesToDelete, StudioProgressMonitor monitor )
     {
         modifyHandler.delete( valuesToDelete, monitor );
     }
 
 
-    public void delete( IAttribute[] attriubtesToDelete, ExtendedProgressMonitor monitor )
+    public void delete( IAttribute[] attriubtesToDelete, StudioProgressMonitor monitor )
     {
         modifyHandler.delete( attriubtesToDelete, monitor );
     }
 
 
     public void importLdif( LdifEnumeration enumeration, Writer logWriter, boolean continueOnError,
-        ExtendedProgressMonitor monitor )
+        StudioProgressMonitor monitor )
     {
         modifyHandler.importLdif( enumeration, logWriter, continueOnError, monitor );
     }
 
 
-    public synchronized boolean isSuspended()
+    public org.apache.directory.studio.connection.core.Connection getConnection()
     {
-        return modifyHandler.isSuspended();
+        return connection;
     }
-
-
-    public synchronized void suspend()
+    
+    public void connectionAdded( org.apache.directory.studio.connection.core.Connection connection )
     {
-        modifyHandler.suspend();
     }
-
-
-    public synchronized void resume( ExtendedProgressMonitor monitor )
+    public void connectionRemoved( org.apache.directory.studio.connection.core.Connection connection )
     {
-        modifyHandler.resume( monitor );
     }
-
-
-    public synchronized void reset()
+    public void connectionUpdated( org.apache.directory.studio.connection.core.Connection connection )
     {
-        modifyHandler.reset();
+    }
+    public void connectionRenamed( org.apache.directory.studio.connection.core.Connection connection, String oldName )
+    {
+    }
+    public void connectionOpened( org.apache.directory.studio.connection.core.Connection connection )
+    {
+        if(this.connection == connection)
+        {
+            new OpenBrowserConnectionsJob( this ).execute();
+        }
+    }
+    public void connectionClosed( org.apache.directory.studio.connection.core.Connection connection )
+    {
+        if(this.connection == connection)
+        {
+            close();
+        }
     }
 
 }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/ChildrenInfo.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/ChildrenInfo.java?rev=569899&r1=569898&r2=569899&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/ChildrenInfo.java (original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/ChildrenInfo.java Sun Aug 26 15:36:01 2007
@@ -25,7 +25,7 @@
 import java.util.Set;
 
 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;
 
 
 public class ChildrenInfo implements Serializable
@@ -52,7 +52,7 @@
 
         private static final long serialVersionUID = -8339682035388780022L;
 
-        protected IConnection connection;
+        protected IBrowserConnection connection;
 
         protected DN dn;
 
@@ -62,7 +62,7 @@
         }
 
 
-        public AliasOrReferral( IConnection connection, DN dn )
+        public AliasOrReferral( IBrowserConnection connection, DN dn )
         {
             this.connection = connection;
             this.dn = dn;



Mime
View raw message