directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccust...@apache.org
Subject svn commit: r556238 [2/8] - in /directory: apacheds/trunk-with-dependencies/ sandbox/ccustine/new_installers/apacheds/ sandbox/ccustine/new_installers/apacheds/benchmarks/ sandbox/ccustine/new_installers/apacheds/bootstrap-extract/ sandbox/ccustine/new...
Date Sat, 14 Jul 2007 07:55:59 GMT
Modified: directory/sandbox/ccustine/new_installers/apacheds/core-unit/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core-unit/src/test/resources/log4j.properties?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core-unit/src/test/resources/log4j.properties (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core-unit/src/test/resources/log4j.properties Sat Jul 14 00:55:44 2007
@@ -1,4 +1,4 @@
-log4j.rootCategory=ERROR, stdout
+log4j.rootCategory=OFF, stdout
 
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/pom.xml?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/pom.xml (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/pom.xml Sat Jul 14 00:55:44 2007
@@ -3,7 +3,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.apache.directory.server</groupId>
-    <artifactId>build</artifactId>
+    <artifactId>apacheds-parent</artifactId>
     <version>1.5.1-SNAPSHOT</version>
   </parent>
   <artifactId>apacheds-core</artifactId>
@@ -21,12 +21,6 @@
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
       <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>nlog4j</artifactId>
-      <scope>provided</scope>
     </dependency>
 
     <dependency>

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Sat Jul 14 00:55:44 2007
@@ -565,7 +565,7 @@
 
             partitionNexus.add( new AddOperationContext( name, attributes ) );
             
-            Interceptor authzInterceptor = interceptorChain.get( AuthorizationService.NAME );
+            Interceptor authzInterceptor = interceptorChain.get( StartupConfiguration.AUTHORIZATION_SERVICE_NAME );
             
             if ( authzInterceptor == null )
             {
@@ -846,7 +846,7 @@
         // --------------------------------------------------------------------
         
         MutablePartitionConfiguration schemaPartitionConfig = new MutablePartitionConfiguration();
-        schemaPartitionConfig.setName( "schema" );
+        schemaPartitionConfig.setId( "schema" );
         schemaPartitionConfig.setCacheSize( 1000 );
         
         DbFileListing listing = null;
@@ -861,7 +861,6 @@
         }
         
         schemaPartitionConfig.setIndexedAttributes( listing.getIndexedAttributes() );
-        schemaPartitionConfig.setOptimizerEnabled( true );
         schemaPartitionConfig.setSuffix( "ou=schema" );
         
         Attributes entry = new AttributesImpl();
@@ -871,7 +870,6 @@
         schemaPartitionConfig.setContextEntry( entry );
         JdbmPartition schemaPartition = new JdbmPartition();
         schemaPartition.init( configuration, schemaPartitionConfig );
-        schemaPartitionConfig.setContextPartition( schemaPartition );
 
         // --------------------------------------------------------------------
         // Enable schemas of all indices of partition configurations 
@@ -977,7 +975,7 @@
         {
             AttributeType type = list.next();
             
-            if ( !type.getSyntax().isHumanReadible() )
+            if ( !type.getSyntax().isHumanReadable() )
             {
                 // add the OID for the attributeType
                 binaries.add( type.getOid() );
@@ -1000,7 +998,8 @@
 
         partitionNexus = new DefaultPartitionNexus( new AttributesImpl() );
         partitionNexus.init( configuration, null );
-        partitionNexus.addContextPartition( new AddContextPartitionOperationContext( schemaPartitionConfig ) );
+        partitionNexus.addContextPartition( 
+            new AddContextPartitionOperationContext( schemaPartitionConfig, schemaPartition ) );
 
         interceptorChain = new InterceptorChain();
         interceptorChain.init( configuration );

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java Sat Jul 14 00:55:44 2007
@@ -52,6 +52,7 @@
 import org.apache.directory.server.core.jndi.LdapJndiProperties;
 import org.apache.directory.server.core.jndi.ServerContext;
 import org.apache.directory.shared.ldap.exception.LdapAuthenticationException;
+import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
 import org.apache.directory.shared.ldap.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
@@ -70,9 +71,6 @@
 {
     private static final Logger log = LoggerFactory.getLogger( AuthenticationService.class );
     
-    /** The service name */
-    public static final String NAME = "authenticationService";
-    
     /** Speedup for logs */
     private static final boolean IS_DEBUG = log.isDebugEnabled();
 
@@ -133,6 +131,52 @@
         authenticators.clear();
     }
 
+    
+    private Authenticator instantiateAuthenticator( AuthenticatorConfiguration cfg ) throws NamingException
+    {
+        if ( cfg == null )
+        {
+            throw new IllegalStateException( "Cannot get instance of authenticator without a proper " +
+                    "configuration." );
+        }
+        
+        Class authenticatorClass;
+        try
+        {
+            authenticatorClass = Class.forName( cfg.getAuthenticatorClassName() );
+        }
+        catch ( ClassNotFoundException e )
+        {
+            String msg = "Could not load authenticator implementation class '" 
+                + cfg.getAuthenticatorClassName() + "' for authenticator with name " + cfg.getName();
+            log.error( msg );
+            throw new LdapConfigurationException( msg, e );
+        }
+        
+        Authenticator authenticator = null;
+        try
+        {
+            authenticator = ( Authenticator ) authenticatorClass.newInstance();
+        }
+        catch ( InstantiationException e )
+        {
+            String msg = "No default constructor in authenticator implementation class '" 
+                + cfg.getAuthenticatorClassName() + "' for authenticator with name " + cfg.getName();
+            log.error( msg );
+            throw new LdapConfigurationException( msg, e );
+        }
+        catch ( IllegalAccessException e )
+        {
+            String msg = "Default constructor for authenticator implementation class '" 
+                + cfg.getAuthenticatorClassName() + "' for authenticator with name " 
+                + cfg.getName() + " is not publicly accessible.";
+            log.error( msg );
+            throw new LdapConfigurationException( msg, e );
+        }
+        
+        return authenticator;
+    }
+    
 
     /**
      * Initializes the specified {@link Authenticator} and registers it to
@@ -140,17 +184,18 @@
      */
     private void register( AuthenticatorConfiguration cfg ) throws NamingException
     {
-        cfg.getAuthenticator().init( factoryCfg, cfg );
+        Authenticator authenticator = instantiateAuthenticator( cfg );
+        authenticator.init( factoryCfg, cfg );
 
-        Collection<Authenticator> authenticatorList = getAuthenticators( cfg.getAuthenticator().getAuthenticatorType() );
+        Collection<Authenticator> authenticatorList = getAuthenticators( authenticator.getAuthenticatorType() );
         
         if ( authenticatorList == null )
         {
             authenticatorList = new ArrayList<Authenticator>();
-            authenticators.put( cfg.getAuthenticator().getAuthenticatorType(), authenticatorList );
+            authenticators.put( authenticator.getAuthenticatorType(), authenticatorList );
         }
 
-        authenticatorList.add( cfg.getAuthenticator() );
+        authenticatorList.add( authenticator );
     }
 
 

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java Sat Jul 14 00:55:44 2007
@@ -36,22 +36,12 @@
 import javax.naming.directory.Attributes;
 
 import org.apache.commons.collections.map.LRUMap;
-import org.apache.directory.server.core.authz.AuthorizationService;
-import org.apache.directory.server.core.authz.DefaultAuthorizationService;
-import org.apache.directory.server.core.collective.CollectiveAttributeService;
-import org.apache.directory.server.core.event.EventService;
-import org.apache.directory.server.core.exception.ExceptionService;
+import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.jndi.ServerContext;
-import org.apache.directory.server.core.normalization.NormalizationService;
-import org.apache.directory.server.core.operational.OperationalAttributeService;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
-import org.apache.directory.server.core.referral.ReferralService;
-import org.apache.directory.server.core.schema.SchemaService;
-import org.apache.directory.server.core.subtree.SubentryService;
-import org.apache.directory.server.core.trigger.TriggerService;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
 import org.apache.directory.shared.ldap.constants.LdapSecurityConstants;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
@@ -112,18 +102,18 @@
     static
     {
         Set<String> c = new HashSet<String>();
-        c.add( NormalizationService.NAME );
-        c.add( AuthenticationService.NAME );
-        c.add( ReferralService.NAME );
-        c.add( AuthorizationService.NAME );
-        c.add( DefaultAuthorizationService.NAME );
-        c.add( ExceptionService.NAME );
-        c.add( OperationalAttributeService.NAME );
-        c.add( SchemaService.NAME );
-        c.add( SubentryService.NAME );
-        c.add( CollectiveAttributeService.NAME );
-        c.add( EventService.NAME );
-        c.add( TriggerService.NAME );
+        c.add( StartupConfiguration.NORMALIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHENTICATION_SERVICE_NAME );
+        c.add( StartupConfiguration.REFERRAL_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.DEFAULT_AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.EXCEPTION_SERVICE_NAME );
+        c.add( StartupConfiguration.OPERATIONAL_ATTRIBUTE_SERVICE_NAME );
+        c.add( StartupConfiguration.SCHEMA_SERVICE_NAME );
+        c.add( StartupConfiguration.SUBENTRY_SERVICE_NAME );
+        c.add( StartupConfiguration.COLLECTIVE_ATTRIBUTE_SERVICE_NAME );
+        c.add( StartupConfiguration.EVENT_SERVICE_NAME );
+        c.add( StartupConfiguration.TRIGGER_SERVICE_NAME );
         USERLOOKUP_BYPASS = Collections.unmodifiableCollection( c );
     }
 

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java Sat Jul 14 00:55:44 2007
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core.authz;
 
 
-
 import java.text.ParseException;
 import java.util.Collection;
 import java.util.Collections;
@@ -39,6 +38,7 @@
 import org.apache.directory.server.core.authn.LdapPrincipal;
 import org.apache.directory.server.core.authz.support.ACDFEngine;
 import org.apache.directory.server.core.configuration.InterceptorConfiguration;
+import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.enumeration.SearchResultFilter;
 import org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration;
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
@@ -87,9 +87,6 @@
 {
     /** the logger for this class */
     private static final Logger log = LoggerFactory.getLogger( AuthorizationService.class );
-    
-    /** The service name */
-    public static final String NAME = "authorizationService";
 
     /**
      * the multivalued op attr used to track the perscriptive access control
@@ -422,7 +419,7 @@
         }
 
         // perform checks below here for all non-admin users
-        SubentryService subentryService = ( SubentryService ) chain.get( SubentryService.NAME );
+        SubentryService subentryService = ( SubentryService ) chain.get( StartupConfiguration.SUBENTRY_SERVICE_NAME );
         Attributes subentryAttrs = subentryService.getSubentryAttributes( name, entry );
         NamingEnumeration attrList = entry.getAll();
         
@@ -535,9 +532,12 @@
         // bypass authz code but manage caches if operation is performed by the admin
         if ( isPrincipalAnAdministrator( principalDn ) )
         {
-            
             next.modify( opContext );
-            tupleCache.subentryModified( name, mods, entry );
+            /**
+             * @TODO: A virtual entry can be created here for not hitting the backend again.
+             */
+            Attributes modifiedEntry = proxy.lookup( new LookupOperationContext( name ), PartitionNexusProxy.LOOKUP_BYPASS );
+            tupleCache.subentryModified( name, mods, modifiedEntry );
             groupCache.groupModified( name, mods, entry );
             return;
         }
@@ -555,14 +555,34 @@
 
         for ( int ii = 0; ii < mods.length; ii++ )
         {
+            Attribute attr = mods[ii].getAttribute();
+            
             switch ( mods[ii].getModificationOp() )
             {
                 case ( DirContext.ADD_ATTRIBUTE  ):
                     perms = ADD_PERMS;
+                    // If the attribute is being created with an initial value ...
+                    if ( entry.get( attr.getID() ) == null )
+                    {
+                        // ... we also need to check if adding the attribute is permitted
+                        engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name,
+                            attr.getID(), null, perms, tuples, entry );
+                    }
                     break;
                     
                 case ( DirContext.REMOVE_ATTRIBUTE  ):
                     perms = REMOVE_PERMS;
+                    Attribute entryAttr = entry.get( attr.getID() );
+                    if (  entryAttr != null )
+                    {
+                        // If there is only one value remaining in the attribute ...
+                        if ( entryAttr.size() == 1 )
+                        {
+                            // ... we also need to check if removing the attribute at all is permitted
+                            engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name,
+                                attr.getID(), null, perms, tuples, entry );
+                        }
+                    }
                     break;
                     
                 case ( DirContext.REPLACE_ATTRIBUTE  ):
@@ -570,19 +590,21 @@
                     break;
             }
 
-            Attribute attr = mods[ii].getAttribute();
-            
             for ( int jj = 0; jj < attr.size(); jj++ )
             {
-                engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name, attr
-                    .getID(), attr.get( jj ), perms, tuples, entry );
+                engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name,
+                    attr.getID(), attr.get( jj ), perms, tuples, entry );
             }
         }
 
         
 
         next.modify( opContext );
-        tupleCache.subentryModified( name, mods, entry );
+        /**
+         * @TODO: A virtual entry can be created here for not hitting the backend again.
+         */
+        Attributes modifiedEntry = proxy.lookup( new LookupOperationContext( name ), PartitionNexusProxy.LOOKUP_BYPASS );
+        tupleCache.subentryModified( name, mods, modifiedEntry );
         groupCache.groupModified( name, mods, entry );
     }
 
@@ -796,7 +818,7 @@
         // we need to construct an entry to represent it
         // at least with minimal requirements which are object class
         // and access control subentry operational attributes.
-        SubentryService subentryService = ( SubentryService ) chain.get( SubentryService.NAME );
+        SubentryService subentryService = ( SubentryService ) chain.get( StartupConfiguration.SUBENTRY_SERVICE_NAME );
         Attributes subentryAttrs = subentryService.getSubentryAttributes( newName, importedEntry );
         NamingEnumeration attrList = importedEntry.getAll();
         
@@ -871,7 +893,7 @@
         // we need to construct an entry to represent it
         // at least with minimal requirements which are object class
         // and access control subentry operational attributes.
-        SubentryService subentryService = ( SubentryService ) chain.get( SubentryService.NAME );
+        SubentryService subentryService = ( SubentryService ) chain.get( StartupConfiguration.SUBENTRY_SERVICE_NAME );
         Attributes subentryAttrs = subentryService.getSubentryAttributes( newName, importedEntry );
         NamingEnumeration attrList = importedEntry.getAll();
         

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationService.java Sat Jul 14 00:55:44 2007
@@ -74,9 +74,6 @@
 {
     /** the logger for this class */
     private static final Logger log = LoggerFactory.getLogger( DefaultAuthorizationService.class );
-    
-    /** The service name */
-    public static final String NAME = "defaultAuthorizationService";
 
     /**
      * the base distinguished {@link Name} for all users

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java Sat Jul 14 00:55:44 2007
@@ -245,20 +245,17 @@
         {
             return;
         }
-
-        boolean isAciModified = false;
         
         for ( int ii = 0; ii < mods.length; ii++ )
         {
-            // Check for the name and for the OID
-            isAciModified |= AttributeUtils.containsValueCaseIgnore( mods[ii].getAttribute(), SchemaConstants.PRESCRIPTIVE_ACI_AT );
-            isAciModified |= AttributeUtils.containsValueCaseIgnore( mods[ii].getAttribute(), SchemaConstants.PRESCRIPTIVE_ACI_AT_OID );
-        }
-        
-        if ( isAciModified )
-        {
-            subentryDeleted( normName, entry );
-            subentryAdded( normName.getUpName(), normName, entry );
+            String attrID = mods[ii].getAttribute().getID();
+            if ( attrID.equalsIgnoreCase( SchemaConstants.PRESCRIPTIVE_ACI_AT ) ||
+                attrID.equalsIgnoreCase( SchemaConstants.PRESCRIPTIVE_ACI_AT_OID ) )
+            {
+                subentryDeleted( normName, entry );
+                subentryAdded( normName.getUpName(), normName, entry );
+                continue;
+            }
         }
     }
 

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java Sat Jul 14 00:55:44 2007
@@ -29,21 +29,15 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
-import org.apache.directory.server.core.authn.AuthenticationService;
-import org.apache.directory.server.core.authz.AuthorizationService;
-import org.apache.directory.server.core.authz.DefaultAuthorizationService;
+import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.event.Evaluator;
-import org.apache.directory.server.core.event.EventService;
 import org.apache.directory.server.core.event.ExpressionEvaluator;
 import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
-import org.apache.directory.server.core.normalization.NormalizationService;
-import org.apache.directory.server.core.operational.OperationalAttributeService;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
-import org.apache.directory.server.core.schema.SchemaService;
 import org.apache.directory.server.core.subtree.RefinementEvaluator;
 import org.apache.directory.server.core.subtree.RefinementLeafEvaluator;
-import org.apache.directory.server.core.subtree.SubentryService;
 import org.apache.directory.server.core.subtree.SubtreeEvaluator;
+import org.apache.directory.server.core.trigger.TriggerService;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.shared.ldap.aci.ACITuple;
@@ -94,13 +88,16 @@
         SubtreeEvaluator subtreeEvaluator = new SubtreeEvaluator( oidRegistry, attrTypeRegistry );
         RefinementEvaluator refinementEvaluator = new RefinementEvaluator( new RefinementLeafEvaluator( oidRegistry ) );
 
-        filters = new ACITupleFilter[]
-            { new RelatedUserClassFilter( subtreeEvaluator ),
-                new RelatedProtectedItemFilter( refinementEvaluator, entryEvaluator, oidRegistry, attrTypeRegistry ), 
-                new MaxValueCountFilter(),
-                new MaxImmSubFilter(), new RestrictedByFilter(), new MicroOperationFilter(),
-                new HighestPrecedenceFilter(), new MostSpecificUserClassFilter(),
-                new MostSpecificProtectedItemFilter(), };
+        filters = new ACITupleFilter[] {
+            new RelatedUserClassFilter( subtreeEvaluator ),
+            new RelatedProtectedItemFilter( refinementEvaluator, entryEvaluator, oidRegistry, attrTypeRegistry ),
+            new MaxValueCountFilter(),
+            new MaxImmSubFilter(),
+            new RestrictedByFilter(),
+            new MicroOperationFilter(),
+            new HighestPrecedenceFilter(),
+            new MostSpecificUserClassFilter(),
+            new MostSpecificProtectedItemFilter() };
     }
 
 
@@ -123,7 +120,7 @@
      */
     public void checkPermission( PartitionNexusProxy proxy, Collection userGroupNames, LdapDN username,
                                  AuthenticationLevel authenticationLevel, LdapDN entryName, String attrId, Object attrValue,
-                                 Collection microOperations, Collection aciTuples, Attributes entry ) throws NamingException
+                                 Collection microOperations, Collection<ACITuple> aciTuples, Attributes entry ) throws NamingException
     {
         if ( !hasPermission( proxy, userGroupNames, username, authenticationLevel, entryName, attrId, attrValue,
             microOperations, aciTuples, entry ) )
@@ -136,14 +133,15 @@
     static
     {
         Collection<String> c = new HashSet<String>();
-        c.add( NormalizationService.NAME );
-        c.add( AuthenticationService.NAME );
-        c.add( AuthorizationService.NAME );
-        c.add( DefaultAuthorizationService.NAME );
-        c.add( SchemaService.NAME );
-        c.add( SubentryService.NAME );
-        c.add( OperationalAttributeService.NAME );
-        c.add( EventService.NAME );
+        c.add( StartupConfiguration.NORMALIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHENTICATION_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.DEFAULT_AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.SCHEMA_SERVICE_NAME );
+        c.add( StartupConfiguration.SUBENTRY_SERVICE_NAME );
+        c.add( StartupConfiguration.OPERATIONAL_ATTRIBUTE_SERVICE_NAME );
+        c.add( StartupConfiguration.EVENT_SERVICE_NAME );
+        c.add( StartupConfiguration.TRIGGER_SERVICE_NAME );
         USER_LOOKUP_BYPASS = Collections.unmodifiableCollection( c );
     }
 
@@ -166,7 +164,7 @@
      */
     public boolean hasPermission( PartitionNexusProxy proxy, Collection userGroupNames, LdapDN userName,
                                   AuthenticationLevel authenticationLevel, LdapDN entryName, String attrId, Object attrValue,
-                                  Collection microOperations, Collection aciTuples, Attributes entry ) throws NamingException
+                                  Collection microOperations, Collection<ACITuple> aciTuples, Attributes entry ) throws NamingException
     {
         if ( entryName == null )
         {
@@ -191,7 +189,7 @@
         }
 
         // Clone aciTuples in case it is unmodifiable.
-        aciTuples = new ArrayList( aciTuples );
+        aciTuples = new ArrayList<ACITuple>( aciTuples );
 
         // Filter unrelated and invalid tuples
         for ( int i = 0; i < filters.length; i++ )

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java Sat Jul 14 00:55:44 2007
@@ -32,16 +32,9 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 
-import org.apache.directory.server.core.authn.AuthenticationService;
-import org.apache.directory.server.core.authz.AuthorizationService;
-import org.apache.directory.server.core.authz.DefaultAuthorizationService;
-import org.apache.directory.server.core.event.EventService;
+import org.apache.directory.server.core.configuration.StartupConfiguration;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
-import org.apache.directory.server.core.normalization.NormalizationService;
-import org.apache.directory.server.core.operational.OperationalAttributeService;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
-import org.apache.directory.server.core.schema.SchemaService;
-import org.apache.directory.server.core.subtree.SubentryService;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.aci.AuthenticationLevel;
 import org.apache.directory.shared.ldap.aci.ProtectedItem;
@@ -129,14 +122,14 @@
     static
     {
         Collection<String> c = new HashSet<String>();
-        c.add( NormalizationService.NAME );
-        c.add( AuthenticationService.NAME );
-        c.add( AuthorizationService.NAME );
-        c.add( DefaultAuthorizationService.NAME );
-        c.add( SchemaService.NAME );
-        c.add( SubentryService.NAME );
-        c.add( OperationalAttributeService.NAME );
-        c.add( EventService.NAME );
+        c.add( StartupConfiguration.NORMALIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHENTICATION_SERVICE_NAME );
+        c.add( StartupConfiguration.AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.DEFAULT_AUTHORIZATION_SERVICE_NAME );
+        c.add( StartupConfiguration.SCHEMA_SERVICE_NAME );
+        c.add( StartupConfiguration.SUBENTRY_SERVICE_NAME );
+        c.add( StartupConfiguration.OPERATIONAL_ATTRIBUTE_SERVICE_NAME );
+        c.add( StartupConfiguration.EVENT_SERVICE_NAME );
         SEARCH_BYPASS = Collections.unmodifiableCollection( c );
     }
 

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java Sat Jul 14 00:55:44 2007
@@ -131,7 +131,7 @@
             }
             else if ( item instanceof ProtectedItem.AllAttributeValues )
             {
-                if ( scope != OperationScope.ATTRIBUTE_TYPE && scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE )
+                if ( scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE )
                 {
                     continue;
                 }

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java Sat Jul 14 00:55:44 2007
@@ -66,9 +66,6 @@
  */
 public class CollectiveAttributeService extends BaseInterceptor
 {
-    /** The service name */
-    public static final String NAME = "collectiveAttributeService";
-
     public static final String EXCLUDE_ALL_COLLECTIVE_ATTRIBUTES_OID = "2.5.18.0";
     public static final String EXCLUDE_ALL_COLLECTIVE_ATTRIBUTES = "excludeAllCollectiveAttributes";
     

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/AddPartitionConfiguration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/AddPartitionConfiguration.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/AddPartitionConfiguration.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/AddPartitionConfiguration.java Sat Jul 14 00:55:44 2007
@@ -20,10 +20,6 @@
 package org.apache.directory.server.core.configuration;
 
 
-import org.apache.directory.server.core.partition.Partition;
-import org.apache.directory.server.core.partition.PartitionNexus;
-
-
 /**
  * A {@link Configuration} that adds a new {@link Partition} to
  * the current {@link PartitionNexus}.

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/AttributesPropertyEditor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/AttributesPropertyEditor.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/AttributesPropertyEditor.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/AttributesPropertyEditor.java Sat Jul 14 00:55:44 2007
@@ -42,6 +42,7 @@
 import org.apache.directory.shared.ldap.util.MultiMap;
 import org.apache.directory.shared.ldap.util.StringTools;
 
+
 /**
  * A JavaBeans {@link PropertyEditor} that can convert {@link Attributes} to
  * LDIF string and vice versa. This class is useful when you're going to

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/AuthenticatorConfiguration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/AuthenticatorConfiguration.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/AuthenticatorConfiguration.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/AuthenticatorConfiguration.java Sat Jul 14 00:55:44 2007
@@ -32,7 +32,7 @@
 public class AuthenticatorConfiguration
 {
     private String name;
-    private Authenticator authenticator;
+    private String authenticatorClassName;
 
 
     /**
@@ -44,20 +44,21 @@
 
 
     /**
-     * Returns the {@link Authenticator} this configuration is configuring.
+     * Returns the fully qualified class name for the Authenticator implementation 
+     * class.
      */
-    public Authenticator getAuthenticator()
+    public String getAuthenticatorClassName()
     {
-        return authenticator;
+        return authenticatorClassName;
     }
 
 
     /**
      * Sets the {@link Authenticator} to configure.
      */
-    protected void setAuthenticator( Authenticator authenticator )
+    protected void setAuthenticatorClassName( String authenticatorClassName )
     {
-        this.authenticator = authenticator;
+        this.authenticatorClassName = authenticatorClassName;
     }
 
     /**
@@ -66,9 +67,9 @@
      * @param name The authenticator name
      * @param authenticator The authenticator to register
      */
-    protected void setAuthenticator( String name, Authenticator authenticator )
+    protected void setAuthenticatorClassName( String name, String authenticatorClassName )
     {
-        this.authenticator = authenticator;
+        this.authenticatorClassName = authenticatorClassName;
         this.name = name;
     }
 
@@ -104,9 +105,9 @@
             throw new ConfigurationException( "Name is not specified." );
         }
 
-        if ( authenticator == null )
+        if ( authenticatorClassName == null )
         {
-            throw new ConfigurationException( "Authenticator is not specified." );
+            throw new ConfigurationException( "Authenticator class name is not specified." );
         }
     }
 }

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/Configuration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/Configuration.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/Configuration.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/Configuration.java Sat Jul 14 00:55:44 2007
@@ -23,8 +23,6 @@
 import java.io.Serializable;
 import java.util.Hashtable;
 
-import org.apache.directory.server.core.DirectoryService;
-
 
 /**
  * A configuration that provides required, optional, or default properties

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/InterceptorConfiguration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/InterceptorConfiguration.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/InterceptorConfiguration.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/InterceptorConfiguration.java Sat Jul 14 00:55:44 2007
@@ -20,11 +20,8 @@
 package org.apache.directory.server.core.configuration;
 
 
-import org.apache.directory.server.core.interceptor.Interceptor;
-
-
 /**
- * A configuration for {@link Interceptor}.
+ * Holds general configuration information for interceptors.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
@@ -32,7 +29,7 @@
 public class InterceptorConfiguration
 {
     private String name;
-    private Interceptor interceptor;
+    private String interceptorClassName;
 
 
     /**
@@ -44,22 +41,22 @@
 
 
     /**
-     * Returns the {@link Interceptor} that this configuration
-     * configures.
+     * Returns the fully qualified class name of the interceptor 
+     * implementation associated with this configuration.
      */
-    public Interceptor getInterceptor()
+    public String getInterceptorClassName()
     {
-        return interceptor;
+        return interceptorClassName;
     }
 
 
     /**
-     * Sets the {@link Interceptor} that this configuration
-     * configures.
+     * Sets the fully qualified class name of the interceptor associated
+     * with this configuration.
      */
-    protected void setInterceptor( Interceptor authenticator )
+    protected void setInterceptorClassName( String interceptorClass )
     {
-        this.interceptor = authenticator;
+        this.interceptorClassName = interceptorClass;
     }
 
 
@@ -93,9 +90,9 @@
             throw new ConfigurationException( "Name is not specified." );
         }
 
-        if ( interceptor == null )
+        if ( interceptorClassName == null )
         {
-            throw new ConfigurationException( "Interceptor is not specified." );
+            throw new ConfigurationException( "Interceptor class name is not specified." );
         }
     }
     

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableAuthenticatorConfiguration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableAuthenticatorConfiguration.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableAuthenticatorConfiguration.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableAuthenticatorConfiguration.java Sat Jul 14 00:55:44 2007
@@ -20,9 +20,6 @@
 package org.apache.directory.server.core.configuration;
 
 
-import org.apache.directory.server.core.authn.Authenticator;
-
-
 /**
  * A mutable version of {@link AuthenticatorConfiguration}.
  *
@@ -31,7 +28,6 @@
  */
 public class MutableAuthenticatorConfiguration extends AuthenticatorConfiguration
 {
-
     /**
      * Creates a new instance.
      */
@@ -39,27 +35,30 @@
     {
     }
 
+    
     /**
      * Create and register an authenticator with its name
      * 
      * @param name The authenticator name
      * @param authenticator The authenticator to register
      */
-    public MutableAuthenticatorConfiguration( String name, Authenticator authenticator )
+    public MutableAuthenticatorConfiguration( String name, String authenticatorClassName )
     {
-        super.setAuthenticator( name, authenticator );
+        super.setAuthenticatorClassName( name, authenticatorClassName );
     }
 
+    
     /**
      * Register an authenticator
      * 
      * @param authenticator The authenticator to register
      */
-    public void setAuthenticator( Authenticator authenticator )
+    public void setAuthenticatorClassName( String authenticatorClassName )
     {
-        super.setAuthenticator( authenticator );
+        super.setAuthenticatorClassName( authenticatorClassName );
     }
 
+    
     public void setName( String name )
     {
         super.setName( name );

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableInterceptorConfiguration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableInterceptorConfiguration.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableInterceptorConfiguration.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableInterceptorConfiguration.java Sat Jul 14 00:55:44 2007
@@ -20,9 +20,6 @@
 package org.apache.directory.server.core.configuration;
 
 
-import org.apache.directory.server.core.interceptor.Interceptor;
-
-
 /**
  * A mutable version of {@link InterceptorConfiguration}.
  *
@@ -40,9 +37,9 @@
     }
 
 
-    public void setInterceptor( Interceptor interceptor )
+    public void setInterceptorClassName( String interceptorClassName )
     {
-        super.setInterceptor( interceptor );
+        super.setInterceptorClassName( interceptorClassName );
     }
 
 

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutablePartitionConfiguration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutablePartitionConfiguration.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutablePartitionConfiguration.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutablePartitionConfiguration.java Sat Jul 14 00:55:44 2007
@@ -25,9 +25,6 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
-import org.apache.directory.server.core.partition.Partition;
-import org.apache.directory.server.core.partition.impl.btree.BTreePartitionConfiguration;
-
 
 /**
  * A mutable version of {@link PartitionConfiguration}.
@@ -35,7 +32,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class MutablePartitionConfiguration extends BTreePartitionConfiguration
+public class MutablePartitionConfiguration extends PartitionConfiguration
 {
     /**
      * Creates a new instance.
@@ -45,9 +42,9 @@
     }
 
 
-    public void setName( String name )
+    public void setId( String id )
     {
-        super.setName( name );
+        super.setId( id );
     }
 
 
@@ -57,9 +54,9 @@
     }
 
 
-    public void setContextPartition( Partition partition )
+    public void setPartitionClassName( String partitionClassName )
     {
-        super.setContextPartition( partition );
+        super.setPartitionClassName( partitionClassName );
     }
 
 
@@ -74,11 +71,6 @@
         super.setSuffix( suffix );
     }
     
-    
-    public void setOptimizerEnabled( boolean optimizerEnabled )
-    {
-        super.setOptimizerEnabled( optimizerEnabled );
-    }
     
     /**
      * Get's the entry cache size for this partition.

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/MutableStartupConfiguration.java Sat Jul 14 00:55:44 2007
@@ -24,8 +24,6 @@
 import java.util.List;
 import java.util.Set;
 
-import org.apache.directory.server.core.DirectoryService;
-
 
 /**
  * A mutable version of {@link StartupConfiguration}.
@@ -74,7 +72,7 @@
     }
 
 
-    public void setAuthenticatorConfigurations( Set authenticators )
+    public void setAuthenticatorConfigurations( Set<AuthenticatorConfiguration> authenticators )
     {
         super.setAuthenticatorConfigurations( authenticators );
     }

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/PartitionConfiguration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/PartitionConfiguration.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/PartitionConfiguration.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/PartitionConfiguration.java Sat Jul 14 00:55:44 2007
@@ -27,9 +27,6 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
-import org.apache.directory.server.core.partition.Partition;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
-import org.apache.directory.server.schema.registries.MatchingRuleRegistry;
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -46,14 +43,16 @@
 {
     /** The name of reserved system partition */
     public static final String SYSTEM_PARTITION_NAME = "system";
+    public static final String DEFAULT_PARTITION_IMPLEMENTATION =
+        "org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition";
     public static final int DEFAULT_CACHE_SIZE = 10000;
 
-    private String name;
+    private String id;
     private int cacheSize = -1;
     private String suffix;
     private Set indexedAttributes; // Set<String> or <IndexConfiguration>
     private Attributes contextEntry = new AttributesImpl( true );
-    private Partition contextPartition = new JdbmPartition();
+    private String partitionClassName = DEFAULT_PARTITION_IMPLEMENTATION;
 
 
     /**
@@ -69,9 +68,9 @@
      * Returns user-defined name of the {@link Partition} that
      * this configuration configures.
      */
-    public String getName()
+    public String getId()
     {
-        return name;
+        return id;
     }
 
 
@@ -79,10 +78,10 @@
      * Sets user-defined name of the {@link Partition} that
      * this configuration configures.
      */
-    protected void setName( String name )
+    protected void setId( String id )
     {
-        name = name.trim();
-        this.name = name;
+        id = id.trim();
+        this.id = id;
     }
 
 
@@ -106,24 +105,24 @@
 
 
     /**
-     * Returns the {@link Partition} that this configuration configures.
+     * Returns the partition implementation's fully qualified class name.
      */
-    public Partition getContextPartition()
+    public String getPartitionClassName()
     {
-        return contextPartition;
+        return partitionClassName;
     }
 
 
     /**
-     * Sets the {@link Partition} that this configuration configures.
+     * Sets the fully qualified class name of the partition implementation.
      */
-    protected void setContextPartition( Partition partition )
+    protected void setPartitionClassName( String partitionClassName )
     {
-        if ( partition == null )
+        if ( partitionClassName == null )
         {
-            throw new NullPointerException( "partition" );
+            throw new NullPointerException( "partitionClassName" );
         }
-        this.contextPartition = partition;
+        this.partitionClassName = partitionClassName;
     }
 
 
@@ -159,15 +158,6 @@
     /**
      * Returns the normalized suffix of the {@link Partition}.
      */
-    public Name getNormalizedSuffix( MatchingRuleRegistry matchingRuleRegistry ) throws NamingException
-    {
-        return getNormalizedSuffix( matchingRuleRegistry.lookup( "distinguishedNameMatch" ).getNormalizer() );
-    }
-
-
-    /**
-     * Returns the normalized suffix of the {@link Partition}.
-     */
     public Name getNormalizedSuffix( Normalizer normalizer ) throws NamingException
     {
         return new LdapDN( normalizer.normalize( suffix ).toString() );
@@ -199,7 +189,7 @@
      */
     public void validate()
     {
-        if ( getName() == null || getName().length() == 0 )
+        if ( getId() == null || getId().length() == 0 )
         {
             throw new ConfigurationException( "Name is not specified." );
         }
@@ -207,6 +197,11 @@
         if ( getSuffix() == null )
         {
             throw new ConfigurationException( "Suffix is not specified." );
+        }
+
+        if ( getPartitionClassName() == null )
+        {
+            throw new ConfigurationException( "PartitionClassName is not specified." );
         }
     }
 

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/RemovePartitionConfiguration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/RemovePartitionConfiguration.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/RemovePartitionConfiguration.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/RemovePartitionConfiguration.java Sat Jul 14 00:55:44 2007
@@ -22,8 +22,6 @@
 
 import javax.naming.NamingException;
 
-import org.apache.directory.server.core.partition.Partition;
-import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/ShutdownConfiguration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/ShutdownConfiguration.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/ShutdownConfiguration.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/ShutdownConfiguration.java Sat Jul 14 00:55:44 2007
@@ -20,9 +20,6 @@
 package org.apache.directory.server.core.configuration;
 
 
-import org.apache.directory.server.core.DirectoryService;
-
-
 /**
  * A {@link Configuration} that shuts down ApacheDS.
  *

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/StartupConfiguration.java Sat Jul 14 00:55:44 2007
@@ -29,23 +29,8 @@
 
 import javax.naming.directory.Attributes;
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.authn.AnonymousAuthenticator;
-import org.apache.directory.server.core.authn.AuthenticationService;
-import org.apache.directory.server.core.authn.SimpleAuthenticator;
-import org.apache.directory.server.core.authn.StrongAuthenticator;
-import org.apache.directory.server.core.authz.AuthorizationService;
-import org.apache.directory.server.core.authz.DefaultAuthorizationService;
-import org.apache.directory.server.core.collective.CollectiveAttributeService;
-import org.apache.directory.server.core.event.EventService;
-import org.apache.directory.server.core.exception.ExceptionService;
-import org.apache.directory.server.core.normalization.NormalizationService;
-import org.apache.directory.server.core.operational.OperationalAttributeService;
-import org.apache.directory.server.core.referral.ReferralService;
-import org.apache.directory.server.core.schema.SchemaService;
-import org.apache.directory.server.core.subtree.SubentryService;
-import org.apache.directory.server.core.trigger.TriggerService;
 import org.apache.directory.shared.ldap.ldif.Entry;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -58,11 +43,64 @@
  */
 public class StartupConfiguration extends Configuration
 {
+    /** fully qualified class name of the string authenticator implementation */
+    private static final String STRONG_AUTHENTICATOR = "org.apache.directory.server.core.authn.StrongAuthenticator";
+    /** fully qualified class name of the simple authenticator implementation */
+    private static final String SIMPLE_AUTHENTICATOR = "org.apache.directory.server.core.authn.SimpleAuthenticator";
+    /** fully qualified class name of the anonymous authenticator implementation */
+    private static final String ANONYMOUS_AUTHENTICATOR = "org.apache.directory.server.core.authn.AnonymousAuthenticator";
+    
+    /** The normalizationService name */
+    public static final String NORMALIZATION_SERVICE_NAME = "normalizationService";
+    /** The fully qualified class name for the normalization service */
+    private static final String NORMALIZATION_SERVICE_CLASS = "org.apache.directory.server.core.normalization.NormalizationService";
+    /** The authenticationService name */
+    public static final String AUTHENTICATION_SERVICE_NAME = "authenticationService";
+    /** The fully qualified class name for the normalization service */
+    private static final String AUTHENTICATION_SERVICE_CLASS = "org.apache.directory.server.core.authn.AuthenticationService";
+    /** The referralService name */
+    public static final String REFERRAL_SERVICE_NAME = "referralService";
+    /** The fully qualified class name for the referral service */
+    private static final String REFERRAL_SERVICE_CLASS = "org.apache.directory.server.core.referral.ReferralService";
+    /** The authorizationService name */
+    public static final String AUTHORIZATION_SERVICE_NAME = "authorizationService";
+    /** The fully qualified class name for the authorization service */
+    private static final String AUTHORIZATION_SERVICE_CLASS = "org.apache.directory.server.core.authz.AuthorizationService";
+    /** The default authorization service name */
+    public static final String DEFAULT_AUTHORIZATION_SERVICE_NAME = "defaultAuthorizationService";
+    /** The fully qualified class name for the default authorization service */
+    private static final String DEFAULT_AUTHORIZATION_SERVICE_CLASS = "org.apache.directory.server.core.authz.DefaultAuthorizationService";
+    /** The exceptionService name */
+    public static final String EXCEPTION_SERVICE_NAME = "exceptionService";
+    /** The fully qualified class name for the default authorization service */
+    private static final String EXCEPTION_SERVICE_CLASS = "org.apache.directory.server.core.exception.ExceptionService";
+    /** The operationalAttributeService name */
+    public static final String OPERATIONAL_ATTRIBUTE_SERVICE_NAME = "operationalAttributeService";
+    /** The fully qualified class name for the default operational attribute service */
+    private static final String OPERATIONAL_ATTRIBUTE_SERVICE_CLASS = "org.apache.directory.server.core.operational.OperationalAttributeService";
+    /** The schemaService name */
+    public static final String SCHEMA_SERVICE_NAME = "schemaService";
+    /** The fully qualified class name for the schema service */
+    private static final String SCHEMA_SERVICE_CLASS = "org.apache.directory.server.core.schema.SchemaService";
+    /** The subentryService name */
+    public static final String SUBENTRY_SERVICE_NAME = "subentryService";
+    /** The fully qualified class name for the subentry service */
+    private static final String SUBENTRY_SERVICE_CLASS = "org.apache.directory.server.core.subtree.SubentryService";
+    /** The collectiveAttributeService name */
+    public static final String COLLECTIVE_ATTRIBUTE_SERVICE_NAME = "collectiveAttributeService";
+    /** The fully qualified class name for the collective attribute service */
+    private static final String COLLECTIVE_ATTRIBUTE_SERVICE_CLASS = "org.apache.directory.server.core.collective.CollectiveAttributeService";
+    /** The eventService name */
+    public static final String EVENT_SERVICE_NAME = "eventService";
+    /** The fully qualified class name for the event service */
+    private static final String EVENT_SERVICE_CLASS = "org.apache.directory.server.core.event.EventService";
+    /** The triggerService name */
+    public static final String TRIGGER_SERVICE_NAME = "triggerService";
+    /** The fully qualified class name for the trigger service */
+    private static final String TRIGGER_SERVICE_CLASS = "org.apache.directory.server.core.trigger.TriggerService";
+    /** The logger for this class */
     private static final Logger log = LoggerFactory.getLogger( StartupConfiguration.class );
 
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = log.isDebugEnabled();
-
     private static final long serialVersionUID = 4826762196566871677L;
 
     public static final int MAX_THREADS_DEFAULT = 4;
@@ -81,7 +119,8 @@
     private Set authenticatorConfigurations; // Set<AuthenticatorConfiguration>
     private List interceptorConfigurations; // Set<InterceptorConfiguration>
     private PartitionConfiguration systemPartitionConfiguration; 
-    private Set<PartitionConfiguration> partitionConfigurations = new HashSet<PartitionConfiguration>();
+    private Set<? extends PartitionConfiguration> partitionConfigurations = 
+        new HashSet<PartitionConfiguration>();
     private List testEntries = new ArrayList(); // List<Attributes>
 
 
@@ -112,20 +151,20 @@
     private void setDefaultAuthenticatorConfigurations()
     {
         Set<AuthenticatorConfiguration> set = new HashSet<AuthenticatorConfiguration>();
-
+        
         // Anonymous
-        set.add( new MutableAuthenticatorConfiguration( "Anonymous", new AnonymousAuthenticator() ) );
+        set.add( new MutableAuthenticatorConfiguration( "Anonymous", ANONYMOUS_AUTHENTICATOR ) );
 
         // Simple
-        set.add( new MutableAuthenticatorConfiguration( "Simple", new SimpleAuthenticator() ) );
+        set.add( new MutableAuthenticatorConfiguration( "Simple", SIMPLE_AUTHENTICATOR ) );
 
         // Strong
-        set.add( new MutableAuthenticatorConfiguration( "Strong", new StrongAuthenticator() ) );
+        set.add( new MutableAuthenticatorConfiguration( "Strong", STRONG_AUTHENTICATOR ) );
 
         setAuthenticatorConfigurations( set );
     }
 
-
+    
     private void setDefaultInterceptorConfigurations()
     {
         // Set default interceptor chains
@@ -133,63 +172,63 @@
         List<InterceptorConfiguration> list = new ArrayList<InterceptorConfiguration>();
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( NormalizationService.NAME );
-        interceptorCfg.setInterceptor( new NormalizationService() );
+        interceptorCfg.setName( NORMALIZATION_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( NORMALIZATION_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( AuthenticationService.NAME );
-        interceptorCfg.setInterceptor( new AuthenticationService() );
+        interceptorCfg.setName( AUTHENTICATION_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( AUTHENTICATION_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( ReferralService.NAME );
-        interceptorCfg.setInterceptor( new ReferralService() );
+        interceptorCfg.setName( REFERRAL_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( REFERRAL_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( AuthorizationService.NAME );
-        interceptorCfg.setInterceptor( new AuthorizationService() );
+        interceptorCfg.setName( AUTHORIZATION_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( AUTHORIZATION_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( DefaultAuthorizationService.NAME );
-        interceptorCfg.setInterceptor( new DefaultAuthorizationService() );
+        interceptorCfg.setName( DEFAULT_AUTHORIZATION_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( DEFAULT_AUTHORIZATION_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( ExceptionService.NAME );
-        interceptorCfg.setInterceptor( new ExceptionService() );
+        interceptorCfg.setName( EXCEPTION_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( EXCEPTION_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( OperationalAttributeService.NAME );
-        interceptorCfg.setInterceptor( new OperationalAttributeService() );
+        interceptorCfg.setName( OPERATIONAL_ATTRIBUTE_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( OPERATIONAL_ATTRIBUTE_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( SchemaService.NAME );
-        interceptorCfg.setInterceptor( new SchemaService() );
+        interceptorCfg.setName( SCHEMA_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( SCHEMA_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( SubentryService.NAME );
-        interceptorCfg.setInterceptor( new SubentryService() );
+        interceptorCfg.setName( SUBENTRY_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( SUBENTRY_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( CollectiveAttributeService.NAME );
-        interceptorCfg.setInterceptor( new CollectiveAttributeService() );
+        interceptorCfg.setName( COLLECTIVE_ATTRIBUTE_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( COLLECTIVE_ATTRIBUTE_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( EventService.NAME );
-        interceptorCfg.setInterceptor( new EventService() );
+        interceptorCfg.setName( EVENT_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( EVENT_SERVICE_CLASS );
         list.add( interceptorCfg );
         
         interceptorCfg = new MutableInterceptorConfiguration();
-        interceptorCfg.setName( TriggerService.NAME );
-        interceptorCfg.setInterceptor( new TriggerService() );
+        interceptorCfg.setName( TRIGGER_SERVICE_NAME );
+        interceptorCfg.setInterceptorClassName( TRIGGER_SERVICE_CLASS );
         list.add( interceptorCfg );
 
         setInterceptorConfigurations( list );
@@ -249,22 +288,23 @@
      */
     protected void setPartitionConfigurations( Set<? extends PartitionConfiguration> contextParitionConfigurations )
     {
-        Set newSet = ConfigurationUtil.getTypeSafeSet( contextParitionConfigurations,
-            PartitionConfiguration.class );
+        Set<? extends PartitionConfiguration> newSet = 
+            ( Set <? extends PartitionConfiguration> ) ConfigurationUtil
+            .getTypeSafeSet( contextParitionConfigurations, PartitionConfiguration.class );
 
-        Set names = new HashSet();
+        Set<String> names = new HashSet<String>();
         Iterator i = newSet.iterator();
         while ( i.hasNext() )
         {
             PartitionConfiguration cfg = ( PartitionConfiguration ) i.next();
             cfg.validate();
 
-            String name = cfg.getName();
-            if ( names.contains( name ) )
+            String id = cfg.getId();
+            if ( names.contains( id ) )
             {
-                throw new ConfigurationException( "Duplicate partition name: " + name );
+                throw new ConfigurationException( "Duplicate partition id: " + id );
             }
-            names.add( name );
+            names.add( id );
         }
 
         this.partitionConfigurations = newSet;
@@ -323,7 +363,7 @@
     {
         List newList = ConfigurationUtil.getTypeSafeList( interceptorConfigurations, InterceptorConfiguration.class );
 
-        Set names = new HashSet();
+        Set<String> names = new HashSet<String>();
         Iterator i = newList.iterator();
         while ( i.hasNext() )
         {

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/SyncConfiguration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/SyncConfiguration.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/SyncConfiguration.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/SyncConfiguration.java Sat Jul 14 00:55:44 2007
@@ -20,9 +20,6 @@
 package org.apache.directory.server.core.configuration;
 
 
-import org.apache.directory.server.core.DirectoryService;
-
-
 /**
  * A {@link Configuration} that makes a call to {@link DirectoryService#sync()}.
  *

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/event/EventService.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/event/EventService.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/event/EventService.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/event/EventService.java Sat Jul 14 00:55:44 2007
@@ -83,9 +83,6 @@
 {
     private static Logger log = LoggerFactory.getLogger( EventService.class );
     
-    /** The service name */
-    public static final String NAME = "eventService";
-    
     private PartitionNexus nexus;
     private Map sources = new HashMap();
     private Evaluator evaluator = null;

Modified: directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java?view=diff&rev=556238&r1=556237&r2=556238
==============================================================================
--- directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java (original)
+++ directory/sandbox/ccustine/new_installers/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java Sat Jul 14 00:55:44 2007
@@ -73,9 +73,6 @@
  */
 public class ExceptionService extends BaseInterceptor
 {
-    /** The service name */
-    public static final String NAME = "exceptionService";
-
     private PartitionNexus nexus;
     private LdapDN subschemSubentryDn;
     



Mime
View raw message