directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r582014 - in /directory/studio/trunk: studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/ studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/ ...
Date Thu, 04 Oct 2007 21:24:14 GMT
Author: seelmann
Date: Thu Oct  4 14:24:12 2007
New Revision: 582014

URL: http://svn.apache.org/viewvc?rev=582014&view=rev
Log:
DIRSTUDIO-123: removed convenience methods from IBrowserConnection interface

Modified:
    directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/BrowserConnectionWidget.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/BrowserConnection.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/ConnectionModifyHandler.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/DummyConnection.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/ModificationLogger.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/OpenBrowserConnectionsJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/URL.java
    directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java

Modified: directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/BrowserConnectionWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/BrowserConnectionWidget.java?rev=582014&r1=582013&r2=582014&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/BrowserConnectionWidget.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/BrowserConnectionWidget.java
Thu Oct  4 14:24:12 2007
@@ -125,7 +125,7 @@
     public void setBrowserConnection( IBrowserConnection connection )
     {
         selectedBrowserConnection = connection;
-        browserConnectionText.setText( selectedBrowserConnection != null ? selectedBrowserConnection.getName()
: "" );
+        browserConnectionText.setText( selectedBrowserConnection != null ? selectedBrowserConnection.getConnection().getName()
: "" );
     }
 
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/BrowserConnection.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?rev=582014&r1=582013&r2=582014&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/BrowserConnection.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/BrowserConnection.java
Thu Oct  4 14:24:12 2007
@@ -33,8 +33,6 @@
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.ConnectionFolder;
 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;
@@ -584,24 +582,6 @@
     
     
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getName()
-     */
-    public final String getName()
-    {
-        return connection.getName();
-    }
-
-
-    /**
-     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setName(java.lang.String)
-     */
-    public final void setName( String name )
-    {
-        connection.setName( name );
-    }
-
-
-    /**
      * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#isFetchBaseDNs()
      */
     public boolean isFetchBaseDNs()
@@ -666,42 +646,6 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getHost()
-     */
-    public String getHost()
-    {
-        return connection.getHost();
-    }
-
-
-    /**
-     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setHost(java.lang.String)
-     */
-    public void setHost( String host )
-    {
-        connection.setHost( host );
-    }
-
-
-    /**
-     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getPort()
-     */
-    public int getPort()
-    {
-        return connection.getPort();
-    }
-
-
-    /**
-     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setPort(int)
-     */
-    public void setPort( int port )
-    {
-        connection.setPort( port );
-    }
-
-
-    /**
      * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getAliasesDereferencingMethod()
      */
     public int getAliasesDereferencingMethod()
@@ -740,23 +684,6 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getEncryptionMethod()
-     */
-    public EncryptionMethod getEncryptionMethod()
-    {
-        return connection.getEncryptionMethod();
-    }
-
-
-    /**
-     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setEncryptionMethod(org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod)
-     */
-    public void setEncryptionMethod( EncryptionMethod encryptionMethod )
-    {
-        connection.setEncryptionMethod( encryptionMethod );
-    }
-    
-    /**
      * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getTimeLimit()
      */
     public int getTimeLimit()
@@ -776,64 +703,6 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getBindPrincipal()
-     */
-    public String getBindPrincipal()
-    {
-        return connection.getBindPrincipal();
-    }
-
-
-    /**
-     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setBindPrincipal(java.lang.String)
-     */
-    public void setBindPrincipal( String bindPrincipal )
-    {
-        connection.setBindPrincipal( bindPrincipal );
-    }
-
-
-    /**
-     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getBindPassword()
-     */
-    public String getBindPassword()
-    {
-        return connection.getBindPassword();
-    }
-
-
-    /**
-     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setBindPassword(java.lang.String)
-     */
-    public void setBindPassword( String bindPassword )
-    {
-        connection.setBindPassword( bindPassword );
-    }
-
-
-    /**
-     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getAuthMethod()
-     */
-    public AuthenticationMethod getAuthMethod()
-    {
-        return connection.getAuthMethod();
-    }
-
-
-    /**
-     * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#setAuthMethod(org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod)
-     */
-    public void setAuthMethod( AuthenticationMethod authMethod )
-    {
-        connection.setAuthMethod( authMethod );
-    }
-
-    
-    
-    
-    
-
-    /**
      * @see org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection#getRootDSE()
      */
     public final IRootDSE getRootDSE()
@@ -882,7 +751,7 @@
      */
     public String toString()
     {
-        return getName();
+        return getConnection().getName();
     }
 
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/ConnectionModifyHandler.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/ConnectionModifyHandler.java?rev=582014&r1=582013&r2=582014&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/ConnectionModifyHandler.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/ConnectionModifyHandler.java
Thu Oct  4 14:24:12 2007
@@ -64,7 +64,7 @@
 class ConnectionModifyHandler
 {
 
-    private BrowserConnection connection;
+    private BrowserConnection browserConnection;
 
     private ModificationLogger modificationLogger;
 
@@ -73,7 +73,7 @@
 
     ConnectionModifyHandler( BrowserConnection connection )
     {
-        this.connection = connection;
+        this.browserConnection = connection;
 
         this.modificationLogger = new ModificationLogger( connection );
 
@@ -331,7 +331,7 @@
                 uncacheChildren( children[i] );
             }
         }
-        connection.uncacheEntry( entry );
+        browserConnection.uncacheEntry( entry );
     }
 
 
@@ -346,7 +346,7 @@
 
             this.applyModificationAndLog( cdr, monitor );
 
-            connection.uncacheEntry( entry );
+            browserConnection.uncacheEntry( entry );
 
         }
         catch ( ConnectionException e )
@@ -377,16 +377,16 @@
 
                         // update cache and adjust attribute/children initialization flags
                         DN dn = new DN( record.getDnLine().getValueAsString() );
-                        IEntry entry = connection.getEntryFromCache( dn );
+                        IEntry entry = browserConnection.getEntryFromCache( dn );
                         DN parentDn = dn.getParentDn();
-                        IEntry parentEntry = parentDn != null ? connection.getEntryFromCache(
dn.getParentDn() ) : null;
+                        IEntry parentEntry = parentDn != null ? browserConnection.getEntryFromCache(
dn.getParentDn() ) : null;
 
                         if ( record instanceof LdifChangeDeleteRecord )
                         {
                             if ( entry != null )
                             {
                                 entry.setAttributesInitialized( false );
-                                connection.uncacheEntry( entry );
+                                browserConnection.uncacheEntry( entry );
                             }
                             if ( parentEntry != null )
                             {
@@ -398,7 +398,7 @@
                             if ( entry != null )
                             {
                                 entry.setAttributesInitialized( false );
-                                connection.uncacheEntry( entry );
+                                browserConnection.uncacheEntry( entry );
                             }
                             if ( parentEntry != null )
                             {
@@ -408,7 +408,7 @@
                             if ( modDnRecord.getNewsuperiorLine() != null )
                             {
                                 DN newSuperiorDn = new DN( modDnRecord.getNewsuperiorLine().getValueAsString()
);
-                                IEntry newSuperiorEntry = connection.getEntryFromCache( newSuperiorDn
);
+                                IEntry newSuperiorEntry = browserConnection.getEntryFromCache(
newSuperiorDn );
                                 if ( newSuperiorEntry != null )
                                 {
                                     newSuperiorEntry.setChildrenInitialized( false );
@@ -491,10 +491,10 @@
             {
                 try
                 {
-                    int referralsHandlingMethod = connection.getReferralsHandlingMethod();
+                    int referralsHandlingMethod = browserConnection.getReferralsHandlingMethod();
                     // int referralsHandlingMethod =
                     // IConnection.HANDLE_REFERRALS_IGNORE;
-                    connection.connectionProvider.applyModification( records[i], referralsHandlingMethod,
monitor );
+                    browserConnection.connectionProvider.applyModification( records[i], referralsHandlingMethod,
monitor );
 
                     StringWriter writer = new StringWriter();
                     this.logModification( writer, records[i], monitor );
@@ -507,7 +507,7 @@
                     if ( ce instanceof ReferralException )
                     {
 
-                        if ( connection.getReferralsHandlingMethod() == IBrowserConnection.HANDLE_REFERRALS_FOLLOW
)
+                        if ( browserConnection.getReferralsHandlingMethod() == IBrowserConnection.HANDLE_REFERRALS_FOLLOW
)
                         {
 
                             // get referral handler
@@ -576,7 +576,7 @@
 
             logWriter.write( LdifCommentLine.create( "#!RESULT ERROR" ).toFormattedString()
); //$NON-NLS-1$
             logWriter.write( LdifCommentLine.create(
-                "#!CONNECTION ldap://" + connection.getHost() + ":" + connection.getPort()
).toFormattedString() ); //$NON-NLS-1$ //$NON-NLS-2$
+                "#!CONNECTION ldap://" + browserConnection.getConnection().getHost() + ":"
+ browserConnection.getConnection().getPort() ).toFormattedString() ); //$NON-NLS-1$ //$NON-NLS-2$
             logWriter.write( LdifCommentLine.create( "#!DATE " + df.format( new Date() )
).toFormattedString() ); //$NON-NLS-1$
             logWriter.write( errorCommentLine.toFormattedString() );
             logWriter.write( record.toFormattedString() );
@@ -595,7 +595,7 @@
             DateFormat df = new SimpleDateFormat( BrowserCoreConstants.DATEFORMAT );
             logWriter.write( LdifCommentLine.create( "#!RESULT OK" ).toFormattedString()
); //$NON-NLS-1$
             logWriter.write( LdifCommentLine.create(
-                "#!CONNECTION ldap://" + connection.getHost() + ":" + connection.getPort()
).toFormattedString() ); //$NON-NLS-1$ //$NON-NLS-2$
+                "#!CONNECTION ldap://" + browserConnection.getConnection().getHost() + ":"
+ browserConnection.getConnection().getPort() ).toFormattedString() ); //$NON-NLS-1$ //$NON-NLS-2$
             logWriter.write( LdifCommentLine.create( "#!DATE " + df.format( new Date() )
).toFormattedString() ); //$NON-NLS-1$
             logWriter.write( record.toFormattedString() );
         }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/DummyConnection.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/DummyConnection.java?rev=582014&r1=582013&r2=582014&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/DummyConnection.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/DummyConnection.java
Thu Oct  4 14:24:12 2007
@@ -25,8 +25,6 @@
 
 import org.apache.directory.studio.connection.core.Connection;
 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.ldapbrowser.core.BookmarkManager;
 import org.apache.directory.studio.ldapbrowser.core.SearchManager;
 import org.apache.directory.studio.ldapbrowser.core.model.DN;
@@ -101,30 +99,12 @@
     }
 
 
-    public AuthenticationMethod getAuthMethod()
-    {
-        return AuthenticationMethod.NONE;
-    }
-
-
     public DN getBaseDN()
     {
         return new DN();
     }
 
 
-    public String getBindPrincipal()
-    {
-        return null;
-    }
-
-
-    public String getBindPassword()
-    {
-        return null;
-    }
-
-
     public BookmarkManager getBookmarkManager()
     {
         return null;
@@ -143,12 +123,6 @@
     }
 
 
-    public EncryptionMethod getEncryptionMethod()
-    {
-        return EncryptionMethod.NONE;
-    }
-
-
     public IEntry getEntry( DN dn, StudioProgressMonitor monitor )
     {
         return null;
@@ -161,24 +135,6 @@
     }
 
 
-    public String getHost()
-    {
-        return null;
-    }
-
-
-    public String getName()
-    {
-        return null;
-    }
-
-
-    public int getPort()
-    {
-        return -1;
-    }
-
-
     public IRootDSE getRootDSE()
     {
         return null;
@@ -241,26 +197,11 @@
     }
 
 
-    public void setAuthMethod( AuthenticationMethod authMethod )
-    {
-    }
-
-
     public void setBaseDN( DN baseDN )
     {
     }
 
 
-    public void setBindPrincipal( String bindPrincipal )
-    {
-    }
-
-
-    public void setBindPassword( String bindPassword )
-    {
-    }
-
-
     public void setCountLimit( int countLimit )
     {
     }
@@ -271,27 +212,7 @@
     }
 
 
-    public void setEncryptionMethod( EncryptionMethod encryptionMethod )
-    {
-    }
-
-
     public void setFetchBaseDNs( boolean fetchBaseDNs )
-    {
-    }
-
-
-    public void setHost( String host )
-    {
-    }
-
-
-    public void setName( String name )
-    {
-    }
-
-
-    public void setPort( int port )
     {
     }
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/ModificationLogger.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/ModificationLogger.java?rev=582014&r1=582013&r2=582014&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/ModificationLogger.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/ModificationLogger.java
Thu Oct  4 14:24:12 2007
@@ -37,7 +37,7 @@
 public class ModificationLogger
 {
 
-    private BrowserConnection connection;
+    private BrowserConnection browserConnection;
 
     private FileHandler fileHandler;
 
@@ -46,7 +46,7 @@
 
     public ModificationLogger( BrowserConnection connection )
     {
-        this.connection = connection;
+        this.browserConnection = connection;
     }
 
 
@@ -55,7 +55,7 @@
         this.logger = Logger.getAnonymousLogger();
         this.logger.setLevel( Level.ALL );
 
-        String logfileName = BrowserConnectionManager.getModificationLogFileName( connection
);
+        String logfileName = BrowserConnectionManager.getModificationLogFileName( browserConnection
);
         try
         {
             fileHandler = new FileHandler( logfileName, 100000, 10, true );
@@ -98,7 +98,7 @@
     {
         if ( this.logger == null )
         {
-            if ( connection.getName() != null )
+            if ( browserConnection.getConnection().getName() != null )
             {
                 this.initModificationLogger();
             }
@@ -115,7 +115,7 @@
     {
         if ( this.logger == null )
         {
-            if ( connection.getName() != null )
+            if ( browserConnection.getConnection().getName() != null )
             {
                 this.initModificationLogger();
             }

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/OpenBrowserConnectionsJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/OpenBrowserConnectionsJob.java?rev=582014&r1=582013&r2=582014&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/OpenBrowserConnectionsJob.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/OpenBrowserConnectionsJob.java
Thu Oct  4 14:24:12 2007
@@ -66,7 +66,7 @@
         monitor.reportProgress( " " ); //$NON-NLS-1$
 
         monitor.setTaskName( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__open_connections_task,
new String[]
-            { this.connection.getName() } ) );
+            { this.connection.getConnection().getName() } ) );
         monitor.worked( 1 );
 
         connection.open( monitor );

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java?rev=582014&r1=582013&r2=582014&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java
Thu Oct  4 14:24:12 2007
@@ -254,9 +254,9 @@
     }
 
 
-    protected static String getLockIdentifier( IBrowserConnection connection )
+    protected static String getLockIdentifier( IBrowserConnection browserConnection )
     {
-        return connection.getHost() + ":" + connection.getPort();
+        return browserConnection.getConnection().getHost() + ":" + browserConnection.getConnection().getPort();
     }
 
 

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java?rev=582014&r1=582013&r2=582014&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java
Thu Oct  4 14:24:12 2007
@@ -77,7 +77,7 @@
     private String exportDsmlFilename;
 
     /** The connection to use */
-    private IBrowserConnection connection;
+    private IBrowserConnection browserConnection;
 
     /** The Search Parameter of the export*/
     private SearchParameter searchParameter;
@@ -96,7 +96,7 @@
     public ExportDsmlJob( String exportDsmlFilename, IBrowserConnection connection, SearchParameter
searchParameter )
     {
         this.exportDsmlFilename = exportDsmlFilename;
-        this.connection = connection;
+        this.browserConnection = connection;
         this.searchParameter = searchParameter;
 
         setName( BrowserCoreMessages.jobs__export_dsml_name );
@@ -109,7 +109,7 @@
     protected Connection[] getConnections()
     {
         return new Connection[]
-            { connection.getConnection() };
+            { browserConnection.getConnection() };
     }
 
 
@@ -119,7 +119,7 @@
     protected Object[] getLockedObjects()
     {
         List<String> l = new ArrayList<String>();
-        l.add( connection.getUrl() + "_" + DigestUtils.shaHex( exportDsmlFilename ) );
+        l.add( browserConnection.getUrl() + "_" + DigestUtils.shaHex( exportDsmlFilename
) );
         return l.toArray();
     }
 
@@ -212,8 +212,9 @@
             Element rootElement = xmlRequest.addElement( "batchRequest" );
             SearchRequestDsml searchRequestDsml = new SearchRequestDsml( searchRequest );
             searchRequestDsml.toDsml( rootElement );
-            Dsmlv2Engine engine = new Dsmlv2Engine( connection.getHost(), connection.getPort(),
connection
-                .getBindPrincipal(), connection.getBindPassword() );
+            Dsmlv2Engine engine = new Dsmlv2Engine( browserConnection.getConnection().getHost(),
browserConnection
+                .getConnection().getPort(), browserConnection.getConnection().getBindPrincipal(),
browserConnection
+                .getConnection().getBindPassword() );
             String response = engine.processDSML( xmlRequest.asXML() );
 
             // Saving the response

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java?rev=582014&r1=582013&r2=582014&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java
Thu Oct  4 14:24:12 2007
@@ -48,7 +48,7 @@
 public class ImportDsmlJob extends AbstractEclipseJob
 {
     /** The connection to use */
-    private IBrowserConnection connection;
+    private IBrowserConnection browserConnection;
 
     /** The DSML file to use */
     private File dsmlFile;
@@ -71,7 +71,7 @@
      */
     public ImportDsmlJob( IBrowserConnection connection, File dsmlFile, File saveFile )
     {
-        this.connection = connection;
+        this.browserConnection = connection;
         this.dsmlFile = dsmlFile;
         this.responseFile = saveFile;
 
@@ -101,7 +101,7 @@
     protected Connection[] getConnections()
     {
         return new Connection[]
-            { connection.getConnection() };
+            { browserConnection.getConnection() };
     }
 
 
@@ -111,7 +111,7 @@
     protected Object[] getLockedObjects()
     {
         List l = new ArrayList();
-        l.add( connection.getUrl() + "_" + DigestUtils.shaHex( dsmlFile.toString() ) );
+        l.add( browserConnection.getUrl() + "_" + DigestUtils.shaHex( dsmlFile.toString()
) );
         return l.toArray();
     }
 
@@ -126,7 +126,9 @@
         monitor.reportProgress( " " ); //$NON-NLS-1$
         monitor.worked( 1 );
         
-        Dsmlv2Engine engine = new Dsmlv2Engine( connection.getHost(), connection.getPort(),
connection.getBindPrincipal(), connection.getBindPassword() );
+        Dsmlv2Engine engine = new Dsmlv2Engine( browserConnection.getConnection().getHost(),
browserConnection
+            .getConnection().getPort(), browserConnection.getConnection().getBindPrincipal(),
browserConnection
+            .getConnection().getBindPassword() );
         try
         {
             // Executing the DSML request and getting the response

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java?rev=582014&r1=582013&r2=582014&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java
Thu Oct  4 14:24:12 2007
@@ -75,7 +75,7 @@
         for ( int i = 0; i < browserConnections.length; i++ )
         {
             monitor.setTaskName( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__reload_schemas_task,
new String[]
-                { browserConnections[i].getName() } ) );
+                { browserConnections[i].getConnection().getName() } ) );
             monitor.worked( 1 );
 
             browserConnections[i].reloadSchema( monitor );

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java?rev=582014&r1=582013&r2=582014&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java
Thu Oct  4 14:24:12 2007
@@ -75,12 +75,6 @@
     public abstract URL getUrl();
 
 
-    public abstract String getName();
-
-
-    public abstract void setName( String name );
-
-
     public abstract boolean isFetchBaseDNs();
 
 
@@ -99,24 +93,6 @@
     public abstract void setCountLimit( int countLimit );
 
 
-    public abstract String getHost();
-
-
-    public abstract void setHost( String host );
-
-
-    public abstract int getPort();
-
-
-    public abstract void setPort( int port );
-
-
-    public abstract EncryptionMethod getEncryptionMethod();
-
-
-    public abstract void setEncryptionMethod( EncryptionMethod encryptionMethod );
-
-
     public abstract int getAliasesDereferencingMethod();
 
 
@@ -133,24 +109,6 @@
 
 
     public abstract void setTimeLimit( int timeLimit );
-
-
-    public String getBindPrincipal();
-
-
-    public void setBindPrincipal( String bindPrincipal );
-
-
-    public String getBindPassword();
-
-
-    public void setBindPassword( String bindPassword );
-
-
-    public AuthenticationMethod getAuthMethod();
-
-
-    public void setAuthMethod( AuthenticationMethod authMethod );
 
 
     public abstract IRootDSE getRootDSE();

Modified: directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/URL.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/URL.java?rev=582014&r1=582013&r2=582014&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/URL.java
(original)
+++ directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/URL.java
Thu Oct  4 14:24:12 2007
@@ -123,16 +123,16 @@
      * Creates a new instance of URL, based on the given connection. Only
      * the fields protocol, host and port exists when using this constructor.
      *
-     * @param connection the connection
+     * @param browserConnection the browser connection
      */
-    public URL( IBrowserConnection connection )
+    public URL( IBrowserConnection browserConnection )
     {
-        if ( connection == null )
+        if ( browserConnection == null )
         {
             throw new IllegalArgumentException( BrowserCoreMessages.model__empty_url );
         }
 
-        if ( connection.getEncryptionMethod() == EncryptionMethod.LDAPS )
+        if ( browserConnection.getConnection().getEncryptionMethod() == EncryptionMethod.LDAPS
)
         {
             this.protocol = "ldaps";; //$NON-NLS-1$
         }
@@ -140,8 +140,8 @@
         {
             this.protocol = "ldap"; //$NON-NLS-1$
         }
-        this.host = connection.getHost();
-        this.port = Integer.toString( connection.getPort() );
+        this.host = browserConnection.getConnection().getHost();
+        this.port = Integer.toString( browserConnection.getConnection().getPort() );
     }
 
 

Modified: directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java?rev=582014&r1=582013&r2=582014&view=diff
==============================================================================
--- directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java
(original)
+++ directory/studio/trunk/studio-ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java
Thu Oct  4 14:24:12 2007
@@ -126,7 +126,7 @@
 
     private IToolBarManager actionToolBarManager;
 
-    private IBrowserConnection connection;
+    private IBrowserConnection browserConnection;
 
     private ProjectionSupport projectionSupport;
 
@@ -556,28 +556,28 @@
      */
     public IBrowserConnection getConnection()
     {
-        return connection;
+        return browserConnection;
     }
 
 
     /**
      * Sets the Connection
      *
-     * @param connection
-     *      the Connection to set
+     * @param browserConnection
+     *      the browser connection to set
      */
-    private void setConnection( IBrowserConnection connection )
+    private void setConnection( IBrowserConnection browserConnection )
     {
-        this.connection = connection;
+        this.browserConnection = browserConnection;
         getEditorSite().getActionBars().getStatusLineManager().setMessage(
-            "Used Connection: " + ( this.connection == null ? "-" : this.connection.getName()
) );
+            "Used Connection: " + ( this.browserConnection == null ? "-" : this.browserConnection.getConnection().getName()
) );
         // getStatusField("ldapconnection").setText();
         
         IAction action = getAction( ExecuteLdifAction.class.getName() );
         if ( action != null )
         {
-            action.setEnabled( connection == null );
-            action.setEnabled( connection != null );
+            action.setEnabled( browserConnection == null );
+            action.setEnabled( browserConnection != null );
         }
     }
 



Mime
View raw message