You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2010/05/25 19:55:08 UTC

svn commit: r948132 - in /directory/apacheds/trunk: server-annotations/src/main/java/org/apache/directory/server/factory/ server-tools/src/main/java/org/apache/directory/server/tools/ test-framework/src/main/java/org/apache/directory/server/core/integ/...

Author: elecharny
Date: Tue May 25 17:55:08 2010
New Revision: 948132

URL: http://svn.apache.org/viewvc?rev=948132&view=rev
Log:
Minor refactoring (removing some PMD warnings)

Modified:
    directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/DefaultLdapServerFactory.java
    directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java
    directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java
    directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java

Modified: directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/DefaultLdapServerFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/DefaultLdapServerFactory.java?rev=948132&r1=948131&r2=948132&view=diff
==============================================================================
--- directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/DefaultLdapServerFactory.java (original)
+++ directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/DefaultLdapServerFactory.java Tue May 25 17:55:08 2010
@@ -20,14 +20,10 @@
 package org.apache.directory.server.factory;
 
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.partition.Partition;
-import org.apache.directory.server.core.schema.SchemaPartition;
 import org.apache.directory.server.ldap.LdapServer;
-import org.apache.directory.server.protocol.shared.transport.Transport;
 
 /**
- * 
- * TODO DefaultLdapServerFactory.
+ * The default LdapServer factory
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
@@ -36,20 +32,9 @@ public class DefaultLdapServerFactory
 {
     private LdapServer ldapServer;
     
-    /* The DirectoryService instance */
+    /** The DirectoryService instance */
     private DirectoryService directoryService = null;
     
-    private Partition wrappedPartition = null;
-    
-    /** The Schema partition */
-    private SchemaPartition schemaPartition = null;
-    
-    /** The LDAP transport */
-    private Transport ldapTransport;
-    
-    /** The LDAPS transport */
-    private Transport ldapsTransport;
-    
     
     public DefaultLdapServerFactory() throws Exception
     {
@@ -70,6 +55,14 @@ public class DefaultLdapServerFactory
     }
     
     
+    /**
+     * @return the directoryService
+     */
+    public DirectoryService getDirectoryService()
+    {
+        return directoryService;
+    }
+
     public void setDirectoryService( DirectoryService directoryService )
     {
         this.directoryService = directoryService;

Modified: directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java?rev=948132&r1=948131&r2=948132&view=diff
==============================================================================
--- directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java (original)
+++ directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/DumpCommand.java Tue May 25 17:55:08 2010
@@ -138,15 +138,6 @@ public class DumpCommand extends ToolCom
             throw new LdapConfigurationException( I18n.err( I18n.ERR_697, schemaDirectory ) );
         }
 
-        DirectoryService directoryService = new DefaultDirectoryService();
-        //schemaPartition.init( directoryService );
-
-        // --------------------------------------------------------------------
-        // Initialize schema subsystem and reset registries
-        // --------------------------------------------------------------------
-//        PartitionSchemaLoader schemaLoader = new PartitionSchemaLoader( schemaPartition, registries );
-//        schemaLoader.loadEnabled( globalRegistries );
-//        SerializableComparator.setRegistry( globalRegistries.getComparatorRegistry() );
         return schemaManager;
     }
 

Modified: directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java?rev=948132&r1=948131&r2=948132&view=diff
==============================================================================
--- directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java (original)
+++ directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/FrameworkSuite.java Tue May 25 17:55:08 2010
@@ -114,7 +114,7 @@ public class FrameworkSuite extends Suit
         
         if ( createPartition != null )
         {
-            
+            // TODO we should have something done here !
         }
     }
 

Modified: directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java?rev=948132&r1=948131&r2=948132&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java (original)
+++ directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java Tue May 25 17:55:08 2010
@@ -535,11 +535,7 @@ public class PartitionFrame extends JFra
             }
             else if ( mode.equals( FilterDialog.ANNOTATE_MODE ) )
             {
-                if ( doAnnotate( dialog.getFilter() ) )
-                {
-                    // continue
-                }
-                else
+                if ( !doAnnotate( dialog.getFilter() ) )
                 {
                     // We failed don't loose users filter buf
                     // allow user to make edits.
@@ -584,11 +580,7 @@ public class PartitionFrame extends JFra
                 {
                     doRunDebugAnnotate( dialog, mode );
                 }
-                else if ( cmd.equals( FilterDialog.CANCEL_CMD ) )
-                {
-                    // Do nothing! Just exit dialog.
-                }
-                else
+                else if ( !cmd.equals( FilterDialog.CANCEL_CMD ) )
                 {
                     throw new RuntimeException( I18n.err( I18n.ERR_731, cmd ) );
                 }