directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1022899 - in /directory/studio/branches/studio-connection-refactoring/plugins: connection.core/src/main/java/org/apache/directory/studio/connection/core/ connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ connect...
Date Fri, 15 Oct 2010 12:55:49 GMT
Author: pamarcelot
Date: Fri Oct 15 12:55:49 2010
New Revision: 1022899

URL: http://svn.apache.org/viewvc?rev=1022899&view=rev
Log:
Updated the ConnectionWrapper interface to include operation methods (search, add, etc.).
Added a ConnectionWrapper for the Directory LDAP API.

Added:
    directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/DirectoryApiConnectionWrapper.java
Modified:
    directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
    directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java
    directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioNamingEnumeration.java
    directory/studio/branches/studio-connection-refactoring/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java
    directory/studio/branches/studio-connection-refactoring/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/GenericSchemaConnector.java

Modified: directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java?rev=1022899&r1=1022898&r2=1022899&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
(original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/Connection.java
Fri Oct 15 12:55:49 2010
@@ -26,6 +26,8 @@ import org.apache.directory.studio.conne
 import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
 import org.apache.directory.studio.connection.core.ConnectionParameter.NetworkProvider;
 import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
+import org.apache.directory.studio.connection.core.io.ConnectionWrapper;
+import org.apache.directory.studio.connection.core.io.DirectoryApiConnectionWrapper;
 import org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper;
 import org.eclipse.core.runtime.IAdaptable;
 
@@ -171,7 +173,7 @@ public class Connection implements Conne
 
     private ConnectionParameter connectionParameter;
 
-    private JNDIConnectionWrapper jndiConnectionWrapper;
+    private ConnectionWrapper jndiConnectionWrapper;
 
 
     /**
@@ -205,11 +207,11 @@ public class Connection implements Conne
      * 
      * @return the JNDI connection wrapper
      */
-    public JNDIConnectionWrapper getJNDIConnectionWrapper()
+    public ConnectionWrapper getJNDIConnectionWrapper()
     {
         if ( jndiConnectionWrapper == null )
         {
-            jndiConnectionWrapper = new JNDIConnectionWrapper( this );
+            jndiConnectionWrapper = new DirectoryApiConnectionWrapper( this );
         }
         return jndiConnectionWrapper;
     }

Modified: directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java?rev=1022899&r1=1022898&r2=1022899&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java
(original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java
Fri Oct 15 12:55:49 2010
@@ -20,7 +20,18 @@
 package org.apache.directory.studio.connection.core.io;
 
 
+import java.util.Collection;
+
+import javax.naming.directory.Attributes;
+import javax.naming.directory.ModificationItem;
+import javax.naming.directory.SearchControls;
+import javax.naming.ldap.Control;
+
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
+import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
+import org.apache.directory.studio.connection.core.io.jndi.ReferralsInfo;
+import org.apache.directory.studio.connection.core.io.jndi.StudioNamingEnumeration;
 
 
 /**
@@ -66,4 +77,83 @@ public interface ConnectionWrapper
      */
     public boolean isConnected();
 
+
+    /**
+     * Sets the binary attributes.
+     * 
+     * @param binaryAttributes the binary attributes
+     */
+    public void setBinaryAttributes( Collection<String> binaryAttributes );
+
+
+    /**
+     * Search.
+     * 
+     * @param searchBase the search base
+     * @param filter the filter
+     * @param searchControls the controls
+     * @param aliasesDereferencingMethod the aliases dereferencing method
+     * @param referralsHandlingMethod the referrals handling method
+     * @param controls the LDAP controls
+     * @param monitor the progress monitor
+     * @param referralsInfo the referrals info
+     * 
+     * @return the naming enumeration or null if an exception occurs.
+     */
+    public StudioNamingEnumeration search( final String searchBase, final String filter,
+        final SearchControls searchControls, final AliasDereferencingMethod aliasesDereferencingMethod,
+        final ReferralHandlingMethod referralsHandlingMethod, final Control[] controls,
+        final StudioProgressMonitor monitor, final ReferralsInfo referralsInfo );
+
+
+    /**
+     * Modifies attributes of an entry.
+     * 
+     * @param dn the DN
+     * @param modificationItems the modification items
+     * @param controls the controls
+     * @param monitor the progress monitor
+     * @param referralsInfo the referrals info
+     */
+    public void modifyEntry( final String dn, final ModificationItem[] modificationItems,
final Control[] controls,
+        final StudioProgressMonitor monitor, final ReferralsInfo referralsInfo );
+
+
+    /**
+     * Renames an entry.
+     * 
+     * @param oldDn the old DN
+     * @param newDn the new DN
+     * @param deleteOldRdn true to delete the old RDN
+     * @param controls the controls
+     * @param monitor the progress monitor
+     * @param referralsInfo the referrals info
+     */
+    public void renameEntry( final String oldDn, final String newDn, final boolean deleteOldRdn,
+        final Control[] controls, final StudioProgressMonitor monitor, final ReferralsInfo
referralsInfo );
+
+
+    /**
+     * Creates an entry.
+     * 
+     * @param dn the entry's DN
+     * @param attributes the entry's attributes
+     * @param controls the controls
+     * @param monitor the progress monitor
+     * @param referralsInfo the referrals info
+     */
+    public void createEntry( final String dn, final Attributes attributes, final Control[]
controls,
+        final StudioProgressMonitor monitor, final ReferralsInfo referralsInfo );
+
+
+    /**
+     * Deletes an entry.
+     * 
+     * @param dn the DN of the entry to delete
+     * @param controls the controls
+     * @param monitor the progress monitor
+     * @param referralsInfo the referrals info
+     */
+    public void deleteEntry( final String dn, final Control[] controls, final StudioProgressMonitor
monitor,
+        final ReferralsInfo referralsInfo );
 }

Added: directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/DirectoryApiConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/DirectoryApiConnectionWrapper.java?rev=1022899&view=auto
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/DirectoryApiConnectionWrapper.java
(added)
+++ directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/DirectoryApiConnectionWrapper.java
Fri Oct 15 12:55:49 2010
@@ -0,0 +1,360 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.connection.core.io;
+
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.ModificationItem;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+import javax.naming.ldap.Control;
+import javax.naming.ldap.LdapContext;
+
+import org.apache.directory.ldap.client.api.LdapConnectionConfig;
+import org.apache.directory.ldap.client.api.LdapNetworkConnection;
+import org.apache.directory.shared.ldap.cursor.Cursor;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
+import org.apache.directory.shared.ldap.filter.SearchScope;
+import org.apache.directory.shared.ldap.message.ArrayNamingEnumeration;
+import org.apache.directory.shared.ldap.message.Response;
+import org.apache.directory.shared.ldap.message.SearchResultEntry;
+import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.util.AttributeUtils;
+import org.apache.directory.shared.ldap.util.JndiUtils;
+import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
+import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
+import org.apache.directory.studio.connection.core.io.jndi.ReferralsInfo;
+import org.apache.directory.studio.connection.core.io.jndi.StudioNamingEnumeration;
+
+
+/**
+ * A ConnectionWrapper is a wrapper for a real directory connection implementation.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class DirectoryApiConnectionWrapper implements ConnectionWrapper
+{
+    private Connection connection;
+
+    private LdapNetworkConnection ldapConnection;
+
+
+    /**
+     * Creates a new instance of JNDIConnectionContext.
+     * 
+     * @param connection the connection
+     */
+    public DirectoryApiConnectionWrapper( Connection connection )
+    {
+        this.connection = connection;
+    }
+
+
+    private LdapNetworkConnection getLdapConnection()
+    {
+        if ( ldapConnection != null )
+        {
+            return ldapConnection;
+        }
+
+        LdapConnectionConfig config = new LdapConnectionConfig();
+        config.setLdapHost( connection.getHost() );
+        config.setLdapPort( connection.getPort() );
+        config.setName( connection.getBindPrincipal() );
+        config.setCredentials( connection.getBindPassword() );
+
+        ldapConnection = new LdapNetworkConnection( config );
+
+        return ldapConnection;
+    }
+
+
+    /**
+     * Connects to the directory server.
+     * 
+     * @param monitor the progres monitor
+     */
+    public void connect( StudioProgressMonitor monitor )
+    {
+        try
+        {
+            System.out.println( "connect" );
+            boolean bool = getLdapConnection().connect();
+            System.out.println( "connect done " + bool );
+        }
+        catch ( LdapException e )
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        catch ( IOException e )
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+
+
+    /**
+     * Disconnects from the directory server.
+     */
+    public void disconnect()
+    {
+        try
+        {
+            getLdapConnection().close();
+        }
+        catch ( IOException e )
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+
+
+    /**
+     * Binds to the directory server.
+     * 
+     * @param monitor the progress monitor
+     */
+    public void bind( StudioProgressMonitor monitor )
+    {
+        try
+        {
+            System.out.println( "Bind" );
+            getLdapConnection().bind( getLdapConnection().getConfig().getName(),
+                getLdapConnection().getConfig().getCredentials() );
+            System.out.println( "Bind done" );
+        }
+        catch ( LdapException e )
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        catch ( IOException e )
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+
+
+    /**
+     * Unbinds from the directory server.
+     */
+    public void unbind()
+    {
+        try
+        {
+            getLdapConnection().unBind();
+        }
+        catch ( LdapException e )
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+
+
+    /**
+     * Checks if is connected.
+     * 
+     * @return true, if is connected
+     */
+    public boolean isConnected()
+    {
+        return getLdapConnection().isConnected();
+    }
+
+
+    /**
+     * Sets the binary attributes.
+     * 
+     * @param binaryAttributes the binary attributes
+     */
+    public void setBinaryAttributes( Collection<String> binaryAttributes )
+    {
+    }
+
+
+    /**
+     * Search.
+     * 
+     * @param searchBase the search base
+     * @param filter the filter
+     * @param searchControls the controls
+     * @param aliasesDereferencingMethod the aliases dereferencing method
+     * @param referralsHandlingMethod the referrals handling method
+     * @param controls the LDAP controls
+     * @param monitor the progress monitor
+     * @param referralsInfo the referrals info
+     * 
+     * @return the naming enumeration or null if an exception occurs.
+     */
+    public StudioNamingEnumeration search( final String searchBase, final String filter,
+        final SearchControls searchControls, final AliasDereferencingMethod aliasesDereferencingMethod,
+        final ReferralHandlingMethod referralsHandlingMethod, final Control[] controls,
+        final StudioProgressMonitor monitor, final ReferralsInfo referralsInfo )
+    {
+        System.out.println( "search" );
+
+        try
+        {
+            Cursor<Response> cursor = getLdapConnection().search( new DN( searchBase
), filter,
+                getSearchScope( searchControls ), searchControls.getReturningAttributes()
);
+
+            List<SearchResult> searchResults = new ArrayList<SearchResult>();
+
+            System.out.println( "base: " + searchBase );
+            System.out.println( "filter: " + filter );
+            System.out.println( "searchControls: " + searchControls );
+
+            while ( cursor.next() )
+            {
+                System.out.println( "cursor.next()" );
+                Response response = cursor.get();
+                if ( response instanceof SearchResultEntry )
+                {
+                    SearchResultEntry sre = ( SearchResultEntry ) response;
+                    SearchResult sr = new SearchResult( sre.getObjectName().toString(), null,
+                        AttributeUtils.toAttributes( sre.getEntry() ) );
+                    sr.setNameInNamespace( sre.getObjectName().toString() );
+                    searchResults.add( sr );
+                }
+            }
+
+            NamingEnumeration<SearchResult> ne = new ArrayNamingEnumeration<SearchResult>(
+                searchResults.toArray( new SearchResult[0] ) );
+
+            return new StudioNamingEnumeration( connection, null, ne, null, searchBase, filter,
searchControls,
+                aliasesDereferencingMethod, referralsHandlingMethod, controls, 1, monitor,
referralsInfo );
+
+        }
+        catch ( LdapInvalidDnException e )
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        catch ( LdapException e )
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        catch ( Exception e )
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+
+        return null;
+    }
+
+
+    private SearchScope getSearchScope( SearchControls searchControls )
+    {
+        int scope = searchControls.getSearchScope();
+        if ( scope == SearchControls.OBJECT_SCOPE )
+        {
+            return SearchScope.OBJECT;
+        }
+        else if ( scope == SearchControls.ONELEVEL_SCOPE )
+        {
+            return SearchScope.ONELEVEL;
+        }
+        else if ( scope == SearchControls.SUBTREE_SCOPE )
+        {
+            return SearchScope.SUBTREE;
+        }
+        else
+        {
+            return SearchScope.SUBTREE;
+        }
+    }
+
+
+    /**
+     * Modifies attributes of an entry.
+     * 
+     * @param dn the DN
+     * @param modificationItems the modification items
+     * @param controls the controls
+     * @param monitor the progress monitor
+     * @param referralsInfo the referrals info
+     */
+    public void modifyEntry( final String dn, final ModificationItem[] modificationItems,
final Control[] controls,
+        final StudioProgressMonitor monitor, final ReferralsInfo referralsInfo )
+    {
+    }
+
+
+    /**
+     * Renames an entry.
+     * 
+     * @param oldDn the old DN
+     * @param newDn the new DN
+     * @param deleteOldRdn true to delete the old RDN
+     * @param controls the controls
+     * @param monitor the progress monitor
+     * @param referralsInfo the referrals info
+     */
+    public void renameEntry( final String oldDn, final String newDn, final boolean deleteOldRdn,
+        final Control[] controls, final StudioProgressMonitor monitor, final ReferralsInfo
referralsInfo )
+    {
+    }
+
+
+    /**
+     * Creates an entry.
+     * 
+     * @param dn the entry's DN
+     * @param attributes the entry's attributes
+     * @param controls the controls
+     * @param monitor the progress monitor
+     * @param referralsInfo the referrals info
+     */
+    public void createEntry( final String dn, final Attributes attributes, final Control[]
controls,
+        final StudioProgressMonitor monitor, final ReferralsInfo referralsInfo )
+    {
+    }
+
+
+    /**
+     * Deletes an entry.
+     * 
+     * @param dn the DN of the entry to delete
+     * @param controls the controls
+     * @param monitor the progress monitor
+     * @param referralsInfo the referrals info
+     */
+    public void deleteEntry( final String dn, final Control[] controls, final StudioProgressMonitor
monitor,
+        final ReferralsInfo referralsInfo )
+    {
+    }
+}

Modified: directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioNamingEnumeration.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioNamingEnumeration.java?rev=1022899&r1=1022898&r2=1022899&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioNamingEnumeration.java
(original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioNamingEnumeration.java
Fri Oct 15 12:55:49 2010
@@ -83,7 +83,7 @@ public class StudioNamingEnumeration imp
      * @param monitor the progress monitor
      * @param referralsInfo the referrals info
      */
-    StudioNamingEnumeration( Connection connection, LdapContext ctx, NamingEnumeration<SearchResult>
delegate,
+    public StudioNamingEnumeration( Connection connection, LdapContext ctx, NamingEnumeration<SearchResult>
delegate,
         NamingException initialReferralException, String searchBase, String filter, SearchControls
searchControls,
         AliasDereferencingMethod aliasesDereferencingMethod, ReferralHandlingMethod referralsHandlingMethod,
         Control[] controls, long requestNum, StudioProgressMonitor monitor, ReferralsInfo
referralsInfo )

Modified: directory/studio/branches/studio-connection-refactoring/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java?rev=1022899&r1=1022898&r2=1022899&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java
(original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java
Fri Oct 15 12:55:49 2010
@@ -35,7 +35,7 @@ import org.apache.directory.studio.commo
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
-import org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper;
+import org.apache.directory.studio.connection.core.io.ConnectionWrapper;
 import org.apache.directory.studio.schemaeditor.model.AttributeTypeImpl;
 import org.apache.directory.studio.schemaeditor.model.MatchingRuleImpl;
 import org.apache.directory.studio.schemaeditor.model.ObjectClassImpl;
@@ -94,7 +94,7 @@ public class ApacheDsSchemaConnector ext
     {
         List<Schema> schemas = new ArrayList<Schema>();
 
-        JNDIConnectionWrapper wrapper = connection.getJNDIConnectionWrapper();
+        ConnectionWrapper wrapper = connection.getJNDIConnectionWrapper();
 
         monitor.beginTask( Messages.getString( "GenericSchemaConnector.FetchingSchema" ),
1 ); //$NON-NLS-1$
 
@@ -146,7 +146,7 @@ public class ApacheDsSchemaConnector ext
      */
     public boolean isSuitableConnector( Connection connection, StudioProgressMonitor monitor
)
     {
-        JNDIConnectionWrapper wrapper = connection.getJNDIConnectionWrapper();
+        ConnectionWrapper wrapper = connection.getJNDIConnectionWrapper();
 
         SearchControls constraintSearch = new SearchControls();
         constraintSearch.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -198,7 +198,7 @@ public class ApacheDsSchemaConnector ext
     }
 
 
-    private static Schema getSchema( JNDIConnectionWrapper wrapper, String name, StudioProgressMonitor
monitor )
+    private static Schema getSchema( ConnectionWrapper wrapper, String name, StudioProgressMonitor
monitor )
         throws NamingException
     {
         monitor.subTask( name ); //$NON-NLS-1$

Modified: directory/studio/branches/studio-connection-refactoring/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/GenericSchemaConnector.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/GenericSchemaConnector.java?rev=1022899&r1=1022898&r2=1022899&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/GenericSchemaConnector.java
(original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/GenericSchemaConnector.java
Fri Oct 15 12:55:49 2010
@@ -43,7 +43,7 @@ import org.apache.directory.studio.conne
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.connection.core.Utils;
-import org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper;
+import org.apache.directory.studio.connection.core.io.ConnectionWrapper;
 import org.apache.directory.studio.schemaeditor.model.AttributeTypeImpl;
 import org.apache.directory.studio.schemaeditor.model.MatchingRuleImpl;
 import org.apache.directory.studio.schemaeditor.model.ObjectClassImpl;
@@ -80,7 +80,7 @@ public class GenericSchemaConnector exte
     {
         List<Schema> schemas = new ArrayList<Schema>();
 
-        JNDIConnectionWrapper wrapper = connection.getJNDIConnectionWrapper();
+        ConnectionWrapper wrapper = connection.getJNDIConnectionWrapper();
 
         monitor.beginTask( Messages.getString( "GenericSchemaConnector.FetchingSchema" ),
1 ); //$NON-NLS-1$
 
@@ -131,7 +131,7 @@ public class GenericSchemaConnector exte
 
     private static String getSubschemaSubentry( Connection connection, StudioProgressMonitor
monitor )
     {
-        JNDIConnectionWrapper wrapper = connection.getJNDIConnectionWrapper();
+        ConnectionWrapper wrapper = connection.getJNDIConnectionWrapper();
 
         SearchControls constraintSearch = new SearchControls();
         constraintSearch.setSearchScope( SearchControls.OBJECT_SCOPE );
@@ -183,7 +183,7 @@ public class GenericSchemaConnector exte
     }
 
 
-    private static Schema getSchema( JNDIConnectionWrapper wrapper, SearchResult searchResult,
+    private static Schema getSchema( ConnectionWrapper wrapper, SearchResult searchResult,
         StudioProgressMonitor monitor ) throws NamingException, ParseException
     {
         // Creating the schema



Mime
View raw message