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 2007/12/11 01:19:05 UTC

svn commit: r603104 [2/2] - in /directory/apacheds/branches/bigbang: bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/ core-constants/src/main/java/org/apache/directory/server/constants/ core-entry/src/main/java/org/apac...

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java Mon Dec 10 16:19:02 2007
@@ -59,9 +59,6 @@
  */
 public class SchemaService
 {
-    public static final String SCHEMA_AREA_DN = "ou=schema";
-    public static final String SCHEMA_AREA_DN_NORMALIZED = "2.5.4.11=schema";
-
     private static final String[] EMPTY_STRING_ARRAY = new String[0];
     private static final String SCHEMA_TIMESTAMP_ENTRY_DN = "cn=schemaModifications,ou=schema";
 
@@ -99,14 +96,14 @@
 
     public boolean isSchemaSubentry( String dnString ) throws NamingException
     {
-        if ( dnString.equalsIgnoreCase( ServerDNConstants.SCHEMA_DN ) ||
-             dnString.equalsIgnoreCase( ServerDNConstants.SCHEMA_DN_NORMALIZED ) )
+        if ( dnString.equalsIgnoreCase( ServerDNConstants.CN_SCHEMA_DN ) ||
+             dnString.equalsIgnoreCase( ServerDNConstants.CN_SCHEMA_DN_NORMALIZED ) )
         {
             return true;
         }
 
         LdapDN dn = new LdapDN( dnString ).normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
-        return dn.getNormName().equals( ServerDNConstants.SCHEMA_DN_NORMALIZED );
+        return dn.getNormName().equals( ServerDNConstants.CN_SCHEMA_DN_NORMALIZED );
     }
 
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java Mon Dec 10 16:19:02 2007
@@ -46,7 +46,12 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import java.text.ParseException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
 
 
 /**
@@ -108,12 +113,12 @@
             ExprNode filter = new EqualityNode( SchemaConstants.OBJECT_CLASS_AT, ApacheSchemaConstants.TRIGGER_EXECUTION_SUBENTRY_OC );
             SearchControls ctls = new SearchControls();
             ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-            NamingEnumeration results = 
+            NamingEnumeration<SearchResult> results = 
                 nexus.search( new SearchOperationContext( baseDn, AliasDerefMode.DEREF_ALWAYS, filter, ctls ) );
             
             while ( results.hasMore() )
             {
-                SearchResult result = ( SearchResult ) results.next();
+                SearchResult result = results.next();
                 String subentryDn = result.getName();
                 Attribute triggerSpec = result.getAttributes().get( PRESCRIPTIVE_TRIGGER_ATTR );
                 

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java Mon Dec 10 16:19:02 2007
@@ -20,7 +20,11 @@
 package org.apache.directory.server.core.authz.support;
 
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
 
 import javax.naming.NamingException;
 

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java Mon Dec 10 16:19:02 2007
@@ -50,7 +50,14 @@
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
 import java.io.File;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Set;
 
 
 /**

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java Mon Dec 10 16:19:02 2007
@@ -41,7 +41,12 @@
 import javax.naming.NamingException;
 import javax.naming.ldap.LdapContext;
 import java.io.File;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Set;
 
 
 /**

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/prefs/PreferencesUtilsTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/prefs/PreferencesUtilsTest.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/prefs/PreferencesUtilsTest.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/prefs/PreferencesUtilsTest.java Mon Dec 10 16:19:02 2007
@@ -22,6 +22,7 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.prefs.PreferencesUtils;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
@@ -45,13 +46,14 @@
     public void testToSysDn() throws NamingException
     {
         // simple test
-
+        String expectedDN = "prefNodeName=kerberos,prefNodeName=apache,prefNodeName=org," +
+                ServerDNConstants.SYSPREFROOT_SYSTEM_DN;
+        
         String test = "/org/apache/kerberos/";
 
         LdapDN dn = ( LdapDN ) PreferencesUtils.toSysDn( test );
 
-        assertEquals( dn.getUpName(), "prefNodeName=kerberos,prefNodeName=apache,prefNodeName=org,"
-            + PreferencesUtils.SYSPREF_BASE );
+        assertEquals( expectedDN, dn.getUpName() );
 
         // simple test without trailing '/'
 
@@ -59,8 +61,7 @@
 
         dn = ( LdapDN ) PreferencesUtils.toSysDn( test );
 
-        assertEquals( dn.getUpName(), "prefNodeName=kerberos,prefNodeName=apache,prefNodeName=org,"
-            + PreferencesUtils.SYSPREF_BASE );
+        assertEquals( expectedDN, dn.getUpName() );
 
         // basis condition tests
 
@@ -68,7 +69,7 @@
 
         dn = ( LdapDN ) PreferencesUtils.toSysDn( test );
 
-        assertEquals( dn.getUpName(), PreferencesUtils.SYSPREF_BASE );
+        assertEquals( ServerDNConstants.SYSPREFROOT_SYSTEM_DN, dn.getUpName() );
 
         // endpoint tests
 
@@ -76,7 +77,7 @@
 
         dn = ( LdapDN ) PreferencesUtils.toSysDn( test );
 
-        assertEquals( dn.getUpName(), PreferencesUtils.SYSPREF_BASE );
+        assertEquals( ServerDNConstants.SYSPREFROOT_SYSTEM_DN, dn.getUpName() );
 
     }
 }

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java Mon Dec 10 16:19:02 2007
@@ -27,7 +27,12 @@
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.schema.SerializableComparator;
-import org.apache.directory.server.schema.bootstrap.*;
+import org.apache.directory.server.schema.bootstrap.ApacheSchema;
+import org.apache.directory.server.schema.bootstrap.ApachemetaSchema;
+import org.apache.directory.server.schema.bootstrap.BootstrapSchemaLoader;
+import org.apache.directory.server.schema.bootstrap.CoreSchema;
+import org.apache.directory.server.schema.bootstrap.Schema;
+import org.apache.directory.server.schema.bootstrap.SystemSchema;
 import org.apache.directory.server.schema.bootstrap.partition.SchemaPartitionExtractor;
 import org.apache.directory.server.schema.registries.DefaultOidRegistry;
 import org.apache.directory.server.schema.registries.DefaultRegistries;
@@ -38,7 +43,9 @@
 import javax.naming.directory.Attributes;
 import java.io.File;
 import java.io.IOException;
-import java.util.*;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
 
 
 /**

Modified: directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java (original)
+++ directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java Mon Dec 10 16:19:02 2007
@@ -25,7 +25,11 @@
 import jdbm.recman.BaseRecordManager;
 import jdbm.recman.CacheRecordManager;
 import org.apache.directory.server.core.partition.Oid;
-import org.apache.directory.server.core.partition.impl.btree.*;
+import org.apache.directory.server.core.partition.impl.btree.Index;
+import org.apache.directory.server.core.partition.impl.btree.IndexAssertion;
+import org.apache.directory.server.core.partition.impl.btree.IndexAssertionEnumeration;
+import org.apache.directory.server.core.partition.impl.btree.IndexNotFoundException;
+import org.apache.directory.server.core.partition.impl.btree.IndexRecord;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.Registries;
@@ -52,7 +56,13 @@
 import javax.naming.directory.ModificationItem;
 import java.io.File;
 import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 
 public class JdbmStore
@@ -1165,7 +1175,7 @@
     }
 
 
-    public NamingEnumeration list( Long id ) throws NamingException
+    public NamingEnumeration<?> list( Long id ) throws NamingException
     {
         return hierarchyIdx.listIndices( id );
     }
@@ -1225,11 +1235,11 @@
         // Get all standard index attribute to value mappings
         for ( Index index:this.userIndices.values() )
         {
-            NamingEnumeration list = index.listReverseIndices( id );
+            NamingEnumeration<IndexRecord> list = index.listReverseIndices( id );
             
             while ( list.hasMore() )
             {
-                IndexRecord rec = ( IndexRecord ) list.next();
+                IndexRecord rec = list.next();
                 Object val = rec.getIndexKey();
                 String attrId = index.getAttribute().getName();
                 Attribute attr = attributes.get( attrId );
@@ -1246,12 +1256,12 @@
 
         // Get all existance mappings for this id creating a special key
         // that looks like so 'existance[attribute]' and the value is set to id
-        NamingEnumeration list = existanceIdx.listReverseIndices( id );
+        NamingEnumeration<IndexRecord> list = existanceIdx.listReverseIndices( id );
         StringBuffer val = new StringBuffer();
         
         while ( list.hasMore() )
         {
-            IndexRecord rec = ( IndexRecord ) list.next();
+            IndexRecord rec = list.next();
             val.append( "_existance[" );
             val.append( rec.getIndexKey() );
             val.append( "]" );

Modified: directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java (original)
+++ directory/apacheds/branches/bigbang/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java Mon Dec 10 16:19:02 2007
@@ -25,7 +25,13 @@
 import jdbm.helper.Serializer;
 import jdbm.helper.TupleBrowser;
 import org.apache.commons.collections.iterators.ArrayIterator;
-import org.apache.directory.server.core.partition.impl.btree.*;
+import org.apache.directory.server.core.partition.impl.btree.KeyOnlyComparator;
+import org.apache.directory.server.core.partition.impl.btree.NoDupsEnumeration;
+import org.apache.directory.server.core.partition.impl.btree.Table;
+import org.apache.directory.server.core.partition.impl.btree.Tuple;
+import org.apache.directory.server.core.partition.impl.btree.TupleComparator;
+import org.apache.directory.server.core.partition.impl.btree.TupleEnumeration;
+import org.apache.directory.server.core.partition.impl.btree.TupleRenderer;
 import org.apache.directory.server.schema.SerializableComparator;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
@@ -35,7 +41,15 @@
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
 
 
 /**
@@ -1227,7 +1241,7 @@
                 // a list.  They will be in ascending order so we need to reverse
                 // the list after adding val which is not included in headSet.
                 SortedSet headset = set.headSet( val );
-                ArrayList list = new ArrayList( headset.size() + 1 );
+                List list = new ArrayList( headset.size() + 1 );
                 list.addAll( headset );
     
                 // Add largest value (val) if it is in the set.  TreeSet.headSet

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/DefaultReplicationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/DefaultReplicationContext.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/DefaultReplicationContext.java (original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/DefaultReplicationContext.java Mon Dec 10 16:19:02 2007
@@ -20,6 +20,11 @@
 package org.apache.directory.mitosis.service;
 
 
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Timer;
+import java.util.TimerTask;
+
 import org.apache.directory.mitosis.common.Replica;
 import org.apache.directory.mitosis.configuration.ReplicationConfiguration;
 import org.apache.directory.mitosis.service.protocol.handler.ReplicationClientContextHandler;
@@ -30,8 +35,6 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.mina.common.IoSession;
 import org.apache.mina.util.SessionLog;
-
-import java.util.*;
 
 /**
  * The default implementation of {@link ReplicationContext}

Modified: directory/apacheds/branches/bigbang/mitosis/src/test/java/org/apache/directory/mitosis/service/AbstractReplicationServiceTestCase.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/test/java/org/apache/directory/mitosis/service/AbstractReplicationServiceTestCase.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/test/java/org/apache/directory/mitosis/service/AbstractReplicationServiceTestCase.java (original)
+++ directory/apacheds/branches/bigbang/mitosis/src/test/java/org/apache/directory/mitosis/service/AbstractReplicationServiceTestCase.java Mon Dec 10 16:19:02 2007
@@ -25,6 +25,7 @@
 import org.apache.directory.mitosis.common.Replica;
 import org.apache.directory.mitosis.common.ReplicaId;
 import org.apache.directory.mitosis.configuration.ReplicationConfiguration;
+import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.DefaultDirectoryService;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.interceptor.Interceptor;
@@ -38,7 +39,12 @@
 import javax.naming.ldap.LdapContext;
 import java.io.File;
 import java.net.InetSocketAddress;
-import java.util.*;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
 
 
 /**
@@ -126,7 +132,7 @@
             
             Hashtable<String,Object> env = new Hashtable<String,Object>();
             env.put( DirectoryService.JNDI_KEY, service );
-            env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
+            env.put( Context.SECURITY_PRINCIPAL, ServerDNConstants.ADMIN_SYSTEM_DN );
             env.put( Context.SECURITY_CREDENTIALS, "secret" );
             env.put( Context.SECURITY_AUTHENTICATION, "simple" );
             env.put( Context.PROVIDER_URL, "" );

Modified: directory/apacheds/branches/bigbang/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java (original)
+++ directory/apacheds/branches/bigbang/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java Mon Dec 10 16:19:02 2007
@@ -28,6 +28,7 @@
 import javax.security.auth.kerberos.KerberosPrincipal;
 
 import org.apache.directory.server.changepw.protocol.ChangePasswordProtocolHandler;
+import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.server.kerberos.shared.store.JndiPrincipalStoreImpl;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
@@ -51,9 +52,6 @@
     /** The default change password principal name. */
     private static final String SERVICE_PRINCIPAL_DEFAULT = "kadmin/changepw@EXAMPLE.COM";
 
-    /** The default change password base DN. */
-    public static final String SEARCH_BASEDN_DEFAULT = "ou=users,dc=example,dc=com";
-
     /** The default change password realm. */
     private static final String REALM_DEFAULT = "EXAMPLE.COM";
 
@@ -118,7 +116,7 @@
         super.setServiceName( SERVICE_NAME_DEFAULT );
         super.setIpPort( IP_PORT_DEFAULT );
         super.setServiceId( SERVICE_PID_DEFAULT );
-        super.setSearchBaseDn( SEARCH_BASEDN_DEFAULT );
+        super.setSearchBaseDn( ServerDNConstants.USER_EXAMPLE_COM_DN );
 
         prepareEncryptionTypes();
     }

Modified: directory/apacheds/branches/bigbang/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java (original)
+++ directory/apacheds/branches/bigbang/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java Mon Dec 10 16:19:02 2007
@@ -27,6 +27,7 @@
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
+import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.kerberos.protocol.KerberosProtocolHandler;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.server.kerberos.shared.store.JndiPrincipalStoreImpl;
@@ -51,9 +52,6 @@
     /** The default kdc port */
     private static final int DEFAULT_IP_PORT = 88;
 
-    /** The default kdc search base DN */
-    public static final String DEFAULT_SEARCH_BASEDN = "ou=users,dc=example,dc=com";
-
     /** The default kdc service pid */
     private static final String DEFAULT_PID = "org.apache.directory.server.kerberos";
 
@@ -148,7 +146,7 @@
         super.setServiceName( DEFAULT_NAME );
         super.setIpPort( DEFAULT_IP_PORT );
         super.setServiceId( DEFAULT_PID );
-        super.setSearchBaseDn( DEFAULT_SEARCH_BASEDN );
+        super.setSearchBaseDn( ServerDNConstants.USER_EXAMPLE_COM_DN );
 
         prepareEncryptionTypes();
     }

Modified: directory/apacheds/branches/bigbang/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/DirectoryBackedService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/DirectoryBackedService.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/DirectoryBackedService.java (original)
+++ directory/apacheds/branches/bigbang/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/DirectoryBackedService.java Mon Dec 10 16:19:02 2007
@@ -19,6 +19,8 @@
  */
 package org.apache.directory.server.protocol.shared;
 
+import org.apache.directory.server.constants.ServerDNConstants;
+
 
 /**
  * Base class shared by all protocol providers for configuration.
@@ -34,7 +36,8 @@
      * configuration for catalog entries.  Otherwise it will use this
      * search base as a single point of searching the DIT.
      */
-    private String searchBaseDn = "ou=users,dc=example,dc=com";
+    private String searchBaseDn = ServerDNConstants.USER_EXAMPLE_COM_DN;
+    
     /** determines if the search base is pointer to a catelog or a single entry point */
     private boolean catelogBased;
 

Modified: directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/CapacityTestCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/CapacityTestCommand.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/CapacityTestCommand.java (original)
+++ directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/CapacityTestCommand.java Mon Dec 10 16:19:02 2007
@@ -54,7 +54,7 @@
     public static final String PORT_RANGE = "(" + AvailablePortFinder.MIN_PORT_NUMBER + ", "
         + AvailablePortFinder.MAX_PORT_NUMBER + ")";
 
-    private static final String baseDn = "ou=users,dc=example,dc=com";
+    private static final String baseDn = ServerDNConstants.USER_EXAMPLE_COM_DN;
     
     
     public CapacityTestCommand()

Modified: directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/disconnectnotificationcmd/DisconnectNotificationCommandExecutor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/disconnectnotificationcmd/DisconnectNotificationCommandExecutor.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/disconnectnotificationcmd/DisconnectNotificationCommandExecutor.java (original)
+++ directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/disconnectnotificationcmd/DisconnectNotificationCommandExecutor.java Mon Dec 10 16:19:02 2007
@@ -36,7 +36,12 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.event.EventContext;
 import javax.naming.event.NamingExceptionEvent;
-import javax.naming.ldap.*;
+import javax.naming.ldap.InitialLdapContext;
+import javax.naming.ldap.LdapContext;
+import javax.naming.ldap.UnsolicitedNotification;
+import javax.naming.ldap.UnsolicitedNotificationListener;
+import javax.naming.ldap.UnsolicitedNotificationEvent;
+
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.HashMap;

Modified: directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java (original)
+++ directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java Mon Dec 10 16:19:02 2007
@@ -24,6 +24,7 @@
 import jdbm.recman.BaseRecordManager;
 import jdbm.recman.CacheRecordManager;
 import org.apache.directory.server.configuration.ApacheDS;
+import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.DefaultDirectoryService;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.partition.impl.btree.Index;
@@ -33,9 +34,18 @@
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.core.schema.PartitionSchemaLoader;
 import org.apache.directory.server.schema.SerializableComparator;
-import org.apache.directory.server.schema.bootstrap.*;
+import org.apache.directory.server.schema.bootstrap.ApacheSchema;
+import org.apache.directory.server.schema.bootstrap.ApachemetaSchema;
+import org.apache.directory.server.schema.bootstrap.BootstrapSchemaLoader;
+import org.apache.directory.server.schema.bootstrap.CoreSchema;
+import org.apache.directory.server.schema.bootstrap.Schema;
+import org.apache.directory.server.schema.bootstrap.SystemSchema;
 import org.apache.directory.server.schema.bootstrap.partition.DbFileListing;
-import org.apache.directory.server.schema.registries.*;
+import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
+import org.apache.directory.server.schema.registries.DefaultOidRegistry;
+import org.apache.directory.server.schema.registries.DefaultRegistries;
+import org.apache.directory.server.schema.registries.OidRegistry;
+import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.server.tools.ToolCommandListener;
 import org.apache.directory.server.tools.execution.BaseToolCommandExecutor;
 import org.apache.directory.server.tools.util.ListenerParameter;
@@ -63,7 +73,12 @@
 import java.io.PrintWriter;
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 
 /**
@@ -161,7 +176,8 @@
         loader.loadWithDependencies( bootstrapSchemas, registries );
 
         // run referential integrity tests
-        java.util.List errors = registries.checkRefInteg();
+        List<Throwable> errors = registries.checkRefInteg();
+        
         if ( !errors.isEmpty() )
         {
             NamingException e = new NamingException();
@@ -204,7 +220,7 @@
             indexedAttributes.add( new JdbmIndex( attributeId ) );
         }
         schemaPartition.setIndexedAttributes( indexedAttributes );
-        schemaPartition.setSuffix( "ou=schema" );
+        schemaPartition.setSuffix( ServerDNConstants.OU_SCHEMA_DN );
         
         Attributes entry = new AttributesImpl();
         entry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC );
@@ -265,6 +281,7 @@
     private void processParameters( Parameter[] params )
     {
         Map<String, Object> parameters = new HashMap<String, Object>();
+        
         for ( Parameter parameter : params )
         {
             parameters.put( parameter.getName(), parameter.getValue() );
@@ -405,11 +422,12 @@
         idIndex.init( attributeType, partitionDirectory );
 
         out.println( "#---------------------" );
-        NamingEnumeration list = master.listTuples();
+        NamingEnumeration<Tuple> list = master.listTuples();
         StringBuffer buf = new StringBuffer();
+        
         while ( list.hasMore() )
         {
-            Tuple tuple = ( Tuple ) list.next();
+            Tuple tuple = list.next();
             Long id = ( Long ) tuple.getKey();
             String dn = ( String ) idIndex.reverseLookup( id );
             Attributes entry = ( Attributes ) tuple.getValue();
@@ -442,10 +460,12 @@
     {
         List<String> toRemove = new ArrayList<String>();
         AttributeTypeRegistry registry = bootstrapRegistries.getAttributeTypeRegistry();
-        NamingEnumeration attrs = entry.getAll();
+        NamingEnumeration<? extends Attribute> attrs = entry.getAll();
+        
         while ( attrs.hasMore() )
         {
-            Attribute attr = ( Attribute ) attrs.next();
+            Attribute attr = attrs.next();
+            
             if ( !registry.hasAttributeType( attr.getID() ) )
             {
                 if ( !isQuietEnabled() )

Modified: directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/exportcmd/ExportCommandExecutor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/exportcmd/ExportCommandExecutor.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/exportcmd/ExportCommandExecutor.java (original)
+++ directory/apacheds/branches/bigbang/server-tools/src/main/java/org/apache/directory/server/tools/commands/exportcmd/ExportCommandExecutor.java Mon Dec 10 16:19:02 2007
@@ -36,14 +36,24 @@
 import javax.naming.Context;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.InitialDirContext;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+
 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileWriter;
 import java.io.Serializable;
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.util.*;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Set;
 
 
 /**

Modified: directory/apacheds/branches/bigbang/server-tools/src/test/java/org/apache/directory/server/tools/commands/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-tools/src/test/java/org/apache/directory/server/tools/commands/AbstractTestCase.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-tools/src/test/java/org/apache/directory/server/tools/commands/AbstractTestCase.java (original)
+++ directory/apacheds/branches/bigbang/server-tools/src/test/java/org/apache/directory/server/tools/commands/AbstractTestCase.java Mon Dec 10 16:19:02 2007
@@ -30,6 +30,8 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 
+import org.apache.directory.server.constants.ServerDNConstants;
+
 import junit.framework.TestCase;
 
 
@@ -44,7 +46,7 @@
     // General server settings
     protected final static String host = "localhost";
     protected final static int port = 10389;
-    protected final static String user = "uid=admin,ou=system";
+    protected final static String user = ServerDNConstants.ADMIN_SYSTEM_DN;
     protected final static String password = "secret";
 
     protected DirContext ctx;

Modified: directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java Mon Dec 10 16:19:02 2007
@@ -47,7 +47,11 @@
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
 
 
 /**
@@ -232,7 +236,7 @@
 
         configureLdapServer();
         ldapServer.start();
-        setContexts( "uid=admin,ou=system", "secret" );
+        setContexts( ServerDNConstants.ADMIN_SYSTEM_DN, "secret" );
     }
 
     protected void configureDirectoryService()
@@ -308,7 +312,7 @@
         envFinal.put( Context.PROVIDER_URL, "" );
         rootDSE = new InitialLdapContext( envFinal, null );
 
-        envFinal.put( Context.PROVIDER_URL, "ou=schema" );
+        envFinal.put( Context.PROVIDER_URL, ServerDNConstants.OU_SCHEMA_DN );
         schemaRoot = new InitialLdapContext( envFinal, null );
     }
 

Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java?rev=603104&r1=603103&r2=603104&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java (original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/KeyDerivationServiceITest.java Mon Dec 10 16:19:02 2007
@@ -44,7 +44,13 @@
 import javax.naming.directory.InitialDirContext;
 import java.io.IOException;
 import java.security.InvalidKeyException;
-import java.util.*;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 
 /**
@@ -102,16 +108,7 @@
             schemaRoot.modifyAttributes( "cn=Krb5kdc", mods );
         }
 
-/*
-        Hashtable<String, String> env = new Hashtable<String, String>();
-        env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
-        env.put( "java.naming.provider.url", "ldap://localhost:" + port + "/dc=example,dc=com" );
-        env.put( "java.naming.security.principal", "uid=admin,ou=system" );
-        env.put( "java.naming.security.credentials", "secret" );
-        env.put( "java.naming.security.authentication", "simple" );
-*/
         ctx =   directoryService.getJndiContext( "dc=example,dc=com" );
-//                new InitialDirContext( env );
 
         attrs = getOrgUnitAttributes( "users" );
         DirContext users = ctx.createSubcontext( "ou=users", attrs );