directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r580555 [2/4] - in /directory/apacheds/branches/bigbang: ./ apacheds-xbean-spring/ apacheds-xbean-spring/src/ apacheds-xbean-spring/src/main/ apacheds-xbean-spring/src/main/java/ bootstrap-extract/src/main/java/org/apache/directory/server/s...
Date Sat, 29 Sep 2007 08:25:04 GMT
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java?rev=580555&r1=580554&r2=580555&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java Sat Sep 29 01:24:59 2007
@@ -24,7 +24,6 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
-import java.util.ListIterator;
 import java.util.Map;
 
 import javax.naming.ConfigurationException;
@@ -34,7 +33,6 @@
 import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
-import org.apache.directory.server.core.configuration.InterceptorConfiguration;
 import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
@@ -58,7 +56,6 @@
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
-import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -82,7 +79,12 @@
         private PartitionNexus nexus;
 
 
-        public void init( DirectoryServiceConfiguration factoryCfg, InterceptorConfiguration cfg )
+        public String getName()
+        {
+            return "FINAL";
+        }
+
+        public void init( DirectoryServiceConfiguration factoryCfg )
         {
             this.nexus = factoryCfg.getPartitionNexus();
         }
@@ -233,29 +235,27 @@
     /**
      * Initializes and registers all interceptors according to the specified
      * {@link DirectoryServiceConfiguration}.
+     * @param factoryCfg Configuration to initialize with
+     * @throws javax.naming.NamingException if an interceptor cannot be initialized.
      */
     public synchronized void init( DirectoryServiceConfiguration factoryCfg ) throws NamingException
     {
         this.factoryCfg = factoryCfg;
 
         // Initialize tail first.
-        FINAL_INTERCEPTOR.init( factoryCfg, null );
+        FINAL_INTERCEPTOR.init( factoryCfg);
 
         // And register and initialize all interceptors
-        ListIterator<InterceptorConfiguration> i = factoryCfg.getStartupConfiguration().getInterceptorConfigurations().listIterator();
-        Interceptor interceptor = null;
         try
         {
-            while ( i.hasNext() )
+            for (Interceptor interceptor: factoryCfg.getStartupConfiguration().getInterceptors() )
             {
-                InterceptorConfiguration cfg = i.next();
-
                 if ( IS_DEBUG )
                 {
-                    log.debug( "Adding interceptor " + cfg.getName() );
+                    log.debug( "Adding interceptor " + interceptor.getName() );
                 }
 
-                register( cfg );
+                register( interceptor );
             }
         }
         catch ( Throwable t )
@@ -269,7 +269,7 @@
             }
             else
             {
-                throw new InterceptorException( interceptor, "Failed to initialize interceptor chain.", t );
+                throw new InterceptorException( null, "Failed to initialize interceptor chain.", t );
             }
         }
     }
@@ -282,7 +282,7 @@
     {
         List<Entry> entries = new ArrayList<Entry>();
         Entry e = tail;
-        
+
         do
         {
             entries.add( e );
@@ -309,6 +309,7 @@
 
     /**
      * Returns the registered interceptor with the specified name.
+     * @param interceptorName name of the interceptor to look for
      * @return <tt>null</tt> if the specified name doesn't exist.
      */
     public Interceptor get( String interceptorName )
@@ -325,12 +326,13 @@
 
     /**
      * Returns the list of all registered interceptors.
+     * @return a list of all the registered interceptors.
      */
     public synchronized List<Interceptor> getAll()
     {
         List<Interceptor> result = new ArrayList<Interceptor>();
         Entry e = head;
-        
+
         do
         {
             result.add( e.interceptor );
@@ -342,19 +344,19 @@
     }
 
 
-    public synchronized void addFirst( InterceptorConfiguration cfg ) throws NamingException
+    public synchronized void addFirst( Interceptor interceptor ) throws NamingException
     {
-        register0( cfg, head );
+        register0( interceptor, head );
     }
 
 
-    public synchronized void addLast( InterceptorConfiguration cfg ) throws NamingException
+    public synchronized void addLast( Interceptor interceptor ) throws NamingException
     {
-        register0( cfg, tail );
+        register0( interceptor, tail );
     }
 
 
-    public synchronized void addBefore( String nextInterceptorName, InterceptorConfiguration cfg )
+    public synchronized void addBefore( String nextInterceptorName, Interceptor interceptor )
         throws NamingException
     {
         Entry e = name2entry.get( nextInterceptorName );
@@ -362,7 +364,7 @@
         {
             throw new ConfigurationException( "Interceptor not found: " + nextInterceptorName );
         }
-        register0( cfg, e );
+        register0( interceptor, e );
     }
 
 
@@ -372,7 +374,7 @@
     }
 
 
-    public synchronized void addAfter( String prevInterceptorName, InterceptorConfiguration cfg )
+    public synchronized void addAfter( String prevInterceptorName, Interceptor interceptor )
         throws NamingException
     {
         Entry e = name2entry.get( prevInterceptorName );
@@ -380,22 +382,28 @@
         {
             throw new ConfigurationException( "Interceptor not found: " + prevInterceptorName );
         }
-        register0( cfg, e.nextEntry );
+        register0( interceptor, e.nextEntry );
     }
 
 
     /**
      * Adds and initializes an interceptor with the specified configuration.
+     * @param interceptor interceptor to add to end of chain
+     * @throws javax.naming.NamingException if there is already an interceptor of this name or the interceptor
+     * cannot be initialized.
      */
-    private void register( InterceptorConfiguration cfg ) throws NamingException
+    private void register( Interceptor interceptor ) throws NamingException
     {
-        checkAddable( cfg );
-        register0( cfg, tail );
+        checkAddable( interceptor );
+        register0( interceptor, tail );
     }
 
 
     /**
      * Removes and deinitializes the interceptor with the specified name.
+     * @param name name of interceptor to remove
+     * @return name of interceptor removed, if any
+     * @throws javax.naming.ConfigurationException if no interceptor registered under that name
      */
     private String deregister( String name ) throws ConfigurationException
     {
@@ -426,68 +434,27 @@
         return entry.getName();
     }
 
-    
-    private Interceptor getInterceptorInstance( InterceptorConfiguration interceptorConfiguration ) 
-        throws NamingException
+    private void register0( Interceptor interceptor, Entry nextEntry ) throws NamingException
     {
-        Class<?> interceptorClass = null;
-        Interceptor interceptor = null;
-        
-        // Load the interceptor class and if we cannot find it blow a config exception
-        try
-        {
-            interceptorClass = Class.forName( interceptorConfiguration.getInterceptorClassName() );
-        }
-        catch( ClassNotFoundException e )
-        {
-            LdapConfigurationException lce = new LdapConfigurationException( "Failed to load interceptor class '" +
-                interceptorConfiguration.getInterceptorClassName() + "' for interceptor named '" +
-                interceptorConfiguration.getName() );
-            lce.setRootCause( e );
-            throw lce;
-        }
-        
-        // Now instantiate the interceptor
-        try
-        {
-            interceptor = ( Interceptor ) interceptorClass.newInstance();
-        }
-        catch ( Exception e )
-        {
-            LdapConfigurationException lce = 
-                new LdapConfigurationException( "Failed while trying to instantiate interceptor class '" +
-                interceptorConfiguration.getInterceptorClassName() + "' for interceptor named '" +
-                interceptorConfiguration.getName() );
-            lce.setRootCause( e );
-            throw lce;
-        }
-        
-        return interceptor;
-    }
-    
-
-    private void register0( InterceptorConfiguration cfg, Entry nextEntry ) throws NamingException
-    {
-        String name = cfg.getName();
-        Interceptor interceptor = getInterceptorInstance( cfg );
-        interceptor.init( factoryCfg, cfg );
+        String name = interceptor.getName();
+        interceptor.init( factoryCfg);
 
         Entry newEntry;
         if ( nextEntry == head )
         {
-            newEntry = new Entry( cfg.getName(), null, head, interceptor );
+            newEntry = new Entry( interceptor.getName(), null, head, interceptor );
             head.prevEntry = newEntry;
             head = newEntry;
         }
         else if ( head == tail )
         {
-            newEntry = new Entry( cfg.getName(), null, tail, interceptor );
+            newEntry = new Entry( interceptor.getName(), null, tail, interceptor );
             tail.prevEntry = newEntry;
             head = newEntry;
         }
         else
         {
-            newEntry = new Entry( cfg.getName(), nextEntry.prevEntry, nextEntry, interceptor );
+            newEntry = new Entry( interceptor.getName(), nextEntry.prevEntry, nextEntry, interceptor );
             nextEntry.prevEntry.nextEntry = newEntry;
             nextEntry.prevEntry = newEntry;
         }
@@ -499,15 +466,17 @@
     /**
      * Throws an exception when the specified interceptor name is not registered in this chain.
      *
+     * @param name name of interceptor to look for
      * @return An interceptor entry with the specified name.
+     * @throws javax.naming.ConfigurationException if no interceptor has that name
      */
-    private Entry checkOldName( String baseName ) throws ConfigurationException
+    private Entry checkOldName( String name ) throws ConfigurationException
     {
-        Entry e = name2entry.get( baseName );
+        Entry e = name2entry.get( name );
 
         if ( e == null )
         {
-            throw new ConfigurationException( "Unknown interceptor name:" + baseName );
+            throw new ConfigurationException( "Unknown interceptor name:" + name );
         }
 
         return e;
@@ -516,12 +485,14 @@
 
     /**
      * Checks the specified interceptor name is already taken and throws an exception if already taken.
+     * @param interceptor interceptor to check
+     * @throws javax.naming.ConfigurationException if interceptor name is already registered
      */
-    private void checkAddable( InterceptorConfiguration cfg ) throws ConfigurationException
+    private void checkAddable( Interceptor interceptor ) throws ConfigurationException
     {
-        if ( name2entry.containsKey( cfg.getName() ) )
+        if ( name2entry.containsKey( interceptor.getName() ) )
         {
-            throw new ConfigurationException( "Other interceptor is using name '" + cfg.getName() + "'" );
+            throw new ConfigurationException( "Other interceptor is using name '" + interceptor.getName() + "'" );
         }
     }
 
@@ -571,7 +542,7 @@
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
-        
+
         try
         {
             return head.getRootDSE( next, opContext );
@@ -615,7 +586,7 @@
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
-        
+
         try
         {
             return head.getSuffix( next, opContext );
@@ -637,7 +608,7 @@
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
-        
+
         try
         {
             return head.compare( next, opContext );
@@ -659,7 +630,7 @@
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
-        
+
         try
         {
             return head.listSuffixes( next, opContext );
@@ -681,7 +652,7 @@
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
-        
+
         try
         {
             head.addContextPartition( next, opContext );
@@ -703,7 +674,7 @@
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
-        
+
         try
         {
             head.removeContextPartition( next, opContext );
@@ -725,7 +696,7 @@
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
-        
+
         try
         {
             head.delete( next, opContext );
@@ -746,7 +717,7 @@
         Entry node = getStartingEntry();
         Interceptor head = node.interceptor;
         NextInterceptor next = node.nextInterceptor;
-        
+
         try
         {
             head.add( next, opContext );
@@ -767,7 +738,7 @@
         Entry node = getStartingEntry();
         Interceptor head = node.interceptor;
         NextInterceptor next = node.nextInterceptor;
-        
+
         try
         {
             head.bind( next, opContext );
@@ -788,7 +759,7 @@
         Entry node = getStartingEntry();
         Interceptor head = node.interceptor;
         NextInterceptor next = node.nextInterceptor;
-        
+
         try
         {
             head.unbind( next, opContext );
@@ -809,7 +780,7 @@
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
-        
+
         try
         {
             head.modify( next, opContext );
@@ -830,7 +801,7 @@
         Entry entry = getStartingEntry();
         Interceptor head = entry.configuration.getInterceptor();
         NextInterceptor next = entry.nextInterceptor;
-        
+
         try
         {
             head.modify( next, name, mods );
@@ -851,7 +822,7 @@
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
-        
+
         try
         {
             return head.list( next, opContext );
@@ -874,7 +845,7 @@
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
-        
+
         try
         {
             return head.search( next, opContext );
@@ -896,7 +867,7 @@
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
-        
+
         try
         {
             return head.lookup( next, opContext );
@@ -918,7 +889,7 @@
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
-        
+
         try
         {
             return head.hasEntry( next, opContext );
@@ -940,7 +911,7 @@
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
-        
+
         try
         {
             head.rename( next, opContext );
@@ -961,7 +932,7 @@
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
-        
+
         try
         {
             head.move( next, opContext );
@@ -982,7 +953,7 @@
         Entry entry = getStartingEntry();
         Interceptor head = entry.interceptor;
         NextInterceptor next = entry.nextInterceptor;
-        
+
         try
         {
             head.moveAndRename( next, opContext );
@@ -1002,27 +973,27 @@
      */
     private class Entry
     {
-        private Entry prevEntry;
+        private volatile Entry prevEntry;
 
-        private Entry nextEntry;
+        private volatile Entry nextEntry;
 
         private final String name;
-        
+
         private final Interceptor interceptor;
 
         private final NextInterceptor nextInterceptor;
 
-        
-        private final String getName()
+
+        private String getName()
         {
             return name;
         }
 
-        
+
         private Entry( String name, Entry prevEntry, Entry nextEntry, Interceptor interceptor )
         {
             this.name = name;
-            
+
             if ( interceptor == null )
             {
                 throw new NullPointerException( "interceptor" );
@@ -1070,6 +1041,7 @@
                     return next;
                 }
 
+
                 public boolean compare( CompareOperationContext opContext ) throws NamingException
                 {
                     Entry next = getNextEntry();
@@ -1089,6 +1061,7 @@
                         throw new InternalError(); // Should be unreachable
                     }
                 }
+
 
                 public Attributes getRootDSE( GetRootDSEOperationContext opContext ) throws NamingException
                 {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddContextPartitionOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddContextPartitionOperationContext.java?rev=580555&r1=580554&r2=580555&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddContextPartitionOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/AddContextPartitionOperationContext.java Sat Sep 29 01:24:59 2007
@@ -78,7 +78,7 @@
      */
     public String toString()
     {
-        return "AddContextPartitionOperationContext for partition context '" + partitionConfiguration.getId() + "'";
+        return "AddContextPartitionOperationContext for partition context '" + partitionConfiguration.getName() + "'";
     }
 
     
@@ -129,7 +129,7 @@
         {
             String msg = "Could not load partition implementation class '" 
                 + partitionConfiguration.getPartitionClassName() + "' for partition with id " 
-                + partitionConfiguration.getId();
+                + partitionConfiguration.getName();
             log.error( msg );
             throw new LdapConfigurationException( msg, e );
         }
@@ -142,7 +142,7 @@
         {
             String msg = "No default constructor in partition implementation class '" 
                 + partitionConfiguration.getPartitionClassName() + "' for partition with id " 
-                + partitionConfiguration.getId();
+                + partitionConfiguration.getName();
             log.error( msg );
             throw new LdapConfigurationException( msg, e );
         }
@@ -150,7 +150,7 @@
         {
             String msg = "Default constructor for partition implementation class '" 
                 + partitionConfiguration.getPartitionClassName() + "' for partition with id " 
-                + partitionConfiguration.getId() + " is not publicly accessible.";
+                + partitionConfiguration.getName() + " is not publicly accessible.";
             log.error( msg );
             throw new LdapConfigurationException( msg, e );
         }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/LookupOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/LookupOperationContext.java?rev=580555&r1=580554&r2=580555&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/LookupOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/LookupOperationContext.java Sat Sep 29 01:24:59 2007
@@ -132,7 +132,7 @@
     /**
      * Set the attribute oIds
      *
-     * @param attrsId The String array containing all the attribute OIDs
+     * @param attrsOid The String array containing all the attribute OIDs
      */
     public void setAttrsOid( String[] attrsOid )
     {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/ModifyOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/ModifyOperationContext.java?rev=580555&r1=580554&r2=580555&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/ModifyOperationContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/interceptor/context/ModifyOperationContext.java Sat Sep 29 01:24:59 2007
@@ -65,7 +65,7 @@
 
     /**
      * Set the modified attributes
-     * @param value The modified attributes
+     * @param modItems The modified attributes
      */
     public void setModItems( ModificationItemImpl[] modItems ) 
     {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java?rev=580555&r1=580554&r2=580555&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java Sat Sep 29 01:24:59 2007
@@ -62,7 +62,7 @@
     {
         super( service, env );
         refService = (( ReferralService )service.getConfiguration()
-            .getInterceptorChain().get( StartupConfiguration.REFERRAL_SERVICE_NAME ) );        
+            .getInterceptorChain().get( ReferralService.class.getName() ) );        
     }
 
 
@@ -77,7 +77,7 @@
     {
         super( service, principal, dn );
         refService = (( ReferralService )service.getConfiguration()
-            .getInterceptorChain().get( StartupConfiguration.REFERRAL_SERVICE_NAME ) );        
+            .getInterceptorChain().get( ReferralService.class.getName() ) );        
     }
 
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationService.java?rev=580555&r1=580554&r2=580555&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationService.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationService.java Sat Sep 29 01:24:59 2007
@@ -43,6 +43,18 @@
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.server.core.normalization.NormalizationService;
+import org.apache.directory.server.core.authn.AuthenticationService;
+import org.apache.directory.server.core.referral.ReferralService;
+import org.apache.directory.server.core.authz.AuthorizationService;
+import org.apache.directory.server.core.authz.DefaultAuthorizationService;
+import org.apache.directory.server.core.exception.ExceptionService;
+import org.apache.directory.server.core.operational.OperationalAttributeService;
+import org.apache.directory.server.core.schema.SchemaService;
+import org.apache.directory.server.core.subtree.SubentryService;
+import org.apache.directory.server.core.collective.CollectiveAttributeService;
+import org.apache.directory.server.core.event.EventService;
+import org.apache.directory.server.core.trigger.TriggerService;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.KerberosKeyFactory;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.RandomKeyFactory;
@@ -67,6 +79,8 @@
  * are used to derive Kerberos keys.  If the 'userPassword' is the special keyword
  * 'randomKey', a random key is generated and used as the Kerberos key.
  * 
+ * @org.apache.xbean.XBean
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
@@ -85,18 +99,18 @@
     static
     {
         Set<String> c = new HashSet<String>();
-        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 );
+        c.add( NormalizationService.class.getName() );
+        c.add( AuthenticationService.class.getName() );
+        c.add( ReferralService.class.getName() );
+        c.add( AuthorizationService.class.getName() );
+        c.add( DefaultAuthorizationService.class.getName() );
+        c.add( ExceptionService.class.getName() );
+        c.add( OperationalAttributeService.class.getName() );
+        c.add( SchemaService.class.getName() );
+        c.add( SubentryService.class.getName() );
+        c.add( CollectiveAttributeService.class.getName() );
+        c.add( EventService.class.getName() );
+        c.add( TriggerService.class.getName() );
         USERLOOKUP_BYPASS = Collections.unmodifiableCollection( c );
     }
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyService.java?rev=580555&r1=580554&r2=580555&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyService.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/kerberos/PasswordPolicyService.java Sat Sep 29 01:24:59 2007
@@ -48,6 +48,8 @@
  * rejected if it does not pass the password policy checks.  The password MUST be passed to
  * the core as plaintext.
  * 
+ * @org.apache.xbean.XBean
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java?rev=580555&r1=580554&r2=580555&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationService.java Sat Sep 29 01:24:59 2007
@@ -28,7 +28,6 @@
 import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
-import org.apache.directory.server.core.configuration.InterceptorConfiguration;
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
 import org.apache.directory.server.core.interceptor.NextInterceptor;
 import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
@@ -65,6 +64,8 @@
  * names are normalized before calls are made against the respective interface methods
  * on {@link PartitionNexus}.
  *
+ * @org.apache.xbean.XBean
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
@@ -85,7 +86,7 @@
     /**
      * Initialize the registries, normalizers. 
      */
-    public void init( DirectoryServiceConfiguration factoryCfg, InterceptorConfiguration cfg ) throws NamingException
+    public void init(DirectoryServiceConfiguration factoryCfg) throws NamingException
     {
         OidRegistry oidRegistry = factoryCfg.getRegistries().getOidRegistry();
         attributeRegistry = factoryCfg.getRegistries().getAttributeTypeRegistry();

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java?rev=580555&r1=580554&r2=580555&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeService.java Sat Sep 29 01:24:59 2007
@@ -37,7 +37,6 @@
 
 import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
-import org.apache.directory.server.core.configuration.InterceptorConfiguration;
 import org.apache.directory.server.core.enumeration.SearchResultFilter;
 import org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration;
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
@@ -74,6 +73,8 @@
  * <tt>'creatorsName'</tt>, <tt>'createTimestamp'</tt>, <tt>'modifiersName'</tt>,
  * and <tt>'modifyTimestamp'</tt>.
  *
+ * @org.apache.xbean.XBean
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
@@ -132,7 +133,7 @@
     }
 
 
-    public void init( DirectoryServiceConfiguration factoryCfg, InterceptorConfiguration cfg ) throws NamingException
+    public void init(DirectoryServiceConfiguration factoryCfg) throws NamingException
     {
         nexus = factoryCfg.getPartitionNexus();
         registry = factoryCfg.getRegistries().getAttributeTypeRegistry();

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=580555&r1=580554&r2=580555&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java Sat Sep 29 01:24:59 2007
@@ -323,9 +323,9 @@
             // check a few things to make sure users configured it properly
             // ---------------------------------------------------------------
 
-            if ( ! systemCfg.getId().equals( "system" ) ) 
+            if ( ! systemCfg.getName().equals( "system" ) ) 
             {
-                throw new ConfigurationException( "System partition has wrong name: should be 'system'." );
+                throw new ConfigurationException( "System partition has wrong name: should be 'system' not '" + systemCfg.getName() + "'." );
             }
             
             // add all attribute oids of index configs to a hashset
@@ -384,7 +384,7 @@
         else
         {
             systemCfg = new MutableBTreePartitionConfiguration();
-            systemCfg.setId( "system" );
+            systemCfg.setName( "system" );
             
             // @TODO need to make this configurable for the system partition
             systemCfg.setCacheSize( 500 );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java?rev=580555&r1=580554&r2=580555&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java Sat Sep 29 01:24:59 2007
@@ -41,8 +41,10 @@
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
+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.PartitionConfiguration;
-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.event.EventService;
@@ -68,6 +70,12 @@
 import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
+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.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapSizeLimitExceededException;
 import org.apache.directory.shared.ldap.exception.LdapTimeLimitExceededException;
@@ -87,33 +95,51 @@
  */
 public class PartitionNexusProxy extends PartitionNexus
 {
-    /** safe to use set of bypass instructions to lookup raw entries */
+    /**
+     * safe to use set of bypass instructions to lookup raw entries
+     */
     public static final Collection<String> LOOKUP_BYPASS;
-    
-    /** safe to use set of bypass instructions to getMatchedDn */
+
+    /**
+     * safe to use set of bypass instructions to getMatchedDn
+     */
     public static final Collection<String> GETMATCHEDDN_BYPASS;
-    
-    /** safe to use set of bypass instructions to lookup raw entries excluding operational attributes */
+
+    /**
+     * safe to use set of bypass instructions to lookup raw entries excluding operational attributes
+     */
     public static final Collection<String> LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS;
-    
-    /** Bypass String to use when ALL interceptors should be skipped */
+
+    /**
+     * Bypass String to use when ALL interceptors should be skipped
+     */
     public static final String BYPASS_ALL = "*";
-    
-    /** Bypass String to use when ALL interceptors should be skipped */
+
+    /**
+     * Bypass String to use when ALL interceptors should be skipped
+     */
     public static final Collection<String> BYPASS_ALL_COLLECTION = Collections.singleton( BYPASS_ALL );
-    
-    /** A static object to store the rootDSE entry with all the attributes */
+
+    /**
+     * A static object to store the rootDSE entry with all the attributes
+     */
     private static Attributes ROOT_DSE_ALL;
 
-    /** A static object to store the rootDSE entry without operationnal attributes */
+    /**
+     * A static object to store the rootDSE entry without operationnal attributes
+     */
     private static Attributes ROOT_DSE_NO_OPERATIONNAL;
 
-    /** A mutex to protect the rootDSE construction */
+    /**
+     * A mutex to protect the rootDSE construction
+     */
     private static final Object ROOT_DSE_ALL_MUTEX = new Object();
-    
-    /** A mutex to protect the rootDSE construction */
+
+    /**
+     * A mutex to protect the rootDSE construction
+     */
     private static final Object ROOT_DSE_NOOP_MUTEX = new Object();
-    
+
     private final Context caller;
     private final DirectoryService service;
     private final DirectoryServiceConfiguration configuration;
@@ -121,49 +147,59 @@
     static
     {
         Collection<String> c = new HashSet<String>();
-        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.REFERRAL_SERVICE_NAME );
-        c.add( StartupConfiguration.EVENT_SERVICE_NAME );
+        c.add( NormalizationService.class.getName() );
+        c.add( AuthenticationService.class.getName() );
+        c.add( ReferralService.class.getName() );
+        c.add( AuthorizationService.class.getName() );
+        c.add( DefaultAuthorizationService.class.getName() );
+//        c.add( ExceptionService.class.getName() );
+        c.add( OperationalAttributeService.class.getName() );
+        c.add( SchemaService.class.getName() );
+        c.add( SubentryService.class.getName() );
+//        c.add( CollectiveAttributeService.class.getName() );
+        c.add( EventService.class.getName() );
+//        c.add( TriggerService.class.getName() );
         LOOKUP_BYPASS = Collections.unmodifiableCollection( c );
 
         c = new HashSet<String>();
-        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.REFERRAL_SERVICE_NAME );
-        c.add( StartupConfiguration.EVENT_SERVICE_NAME );
+//        c.add( NormalizationService.class.getName() );
+        c.add( AuthenticationService.class.getName() );
+        c.add( ReferralService.class.getName() );
+        c.add( AuthorizationService.class.getName() );
+        c.add( DefaultAuthorizationService.class.getName() );
+//        c.add( ExceptionService.class.getName() );
+        c.add( OperationalAttributeService.class.getName() );
+        c.add( SchemaService.class.getName() );
+        c.add( SubentryService.class.getName() );
+//        c.add( CollectiveAttributeService.class.getName() );
+        c.add( EventService.class.getName() );
+//        c.add( TriggerService.class.getName() );
         GETMATCHEDDN_BYPASS = Collections.unmodifiableCollection( c );
 
-    	c = new HashSet<String>();
-    	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.REFERRAL_SERVICE_NAME );
-    	c.add( StartupConfiguration.EVENT_SERVICE_NAME );
-    	c.add( StartupConfiguration.TRIGGER_SERVICE_NAME );
-    	LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS = Collections.unmodifiableCollection( c );
+        c = new HashSet<String>();
+        c.add( NormalizationService.class.getName() );
+        c.add( AuthenticationService.class.getName() );
+        c.add( ReferralService.class.getName() );
+        c.add( AuthorizationService.class.getName() );
+        c.add( DefaultAuthorizationService.class.getName() );
+//        c.add( ExceptionService.class.getName() );
+//        c.add( OperationalAttributeService.class.getName() );
+        c.add( SchemaService.class.getName() );
+        c.add( SubentryService.class.getName() );
+//        c.add( CollectiveAttributeService.class.getName() );
+        c.add( EventService.class.getName() );
+        c.add( TriggerService.class.getName() );
+        LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS = Collections.unmodifiableCollection( c );
     }
 
 
     /**
      * Creates a new instance.
-     * 
-     * @param caller a JNDI {@link Context} object that will call this proxy
+     *
+     * @param caller  a JNDI {@link Context} object that will call this proxy
      * @param service a JNDI service
      */
-    public PartitionNexusProxy(Context caller, DirectoryService service) throws NamingException
+    public PartitionNexusProxy( Context caller, DirectoryService service ) throws NamingException
     {
         this.caller = caller;
         this.service = service;
@@ -176,20 +212,20 @@
         return this.configuration.getPartitionNexus().getLdapContext();
     }
 
-    
+
     public String getId()
     {
         throw new UnsupportedOperationException( "Nexus partition proxy objects do not have an Id." );
     }
 
-    
+
     public PartitionConfiguration getConfiguration()
     {
         throw new UnsupportedOperationException( "Nexus partition proxy objects do not have a " +
                 "partition configuration." );
     }
 
-    
+
     public void init( DirectoryServiceConfiguration factoryCfg, PartitionConfiguration cfg ) throws NamingException
     {
     }
@@ -241,7 +277,7 @@
     }
 
 
-    public LdapDN getMatchedName ( GetMatchedNameOperationContext opContext ) throws NamingException
+    public LdapDN getMatchedName( GetMatchedNameOperationContext opContext ) throws NamingException
     {
         return getMatchedName( opContext, null );
     }
@@ -251,9 +287,9 @@
     {
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
-        Object[] args = new Object[] { opContext };
+        Object[] args = new Object[] {opContext};
         stack.push( new Invocation( this, caller, "getMatchedName", args, bypass ) );
-        
+
         try
         {
             return this.configuration.getInterceptorChain().getMatchedName( opContext );
@@ -265,7 +301,7 @@
     }
 
 
-    public LdapDN getSuffix ( GetSuffixOperationContext opContext ) throws NamingException
+    public LdapDN getSuffix( GetSuffixOperationContext opContext ) throws NamingException
     {
         return getSuffix( opContext, null );
     }
@@ -275,7 +311,7 @@
     {
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
-        Object[] args = new Object[] { opContext };
+        Object[] args = new Object[] {opContext};
         stack.push( new Invocation( this, caller, "getSuffix", args, bypass ) );
         try
         {
@@ -298,7 +334,7 @@
     {
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
-        Object[] args = new Object[] { };
+        Object[] args = new Object[] {};
         stack.push( new Invocation( this, caller, "listSuffixes", args, bypass ) );
         try
         {
@@ -322,7 +358,7 @@
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         stack.push( new Invocation( this, caller, "compare", new Object[]
-            { opContext }, bypass ) );
+                {opContext}, bypass ) );
         try
         {
             return this.configuration.getInterceptorChain().compare( opContext );
@@ -345,7 +381,7 @@
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         stack.push( new Invocation( this, caller, "delete", new Object[]
-            { opContext }, bypass ) );
+                {opContext}, bypass ) );
         try
         {
             this.configuration.getInterceptorChain().delete( opContext );
@@ -368,7 +404,7 @@
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         stack.push( new Invocation( this, caller, "add", new Object[]
-            { opContext }, bypass ) );
+                {opContext}, bypass ) );
         try
         {
             this.configuration.getInterceptorChain().add( opContext );
@@ -391,8 +427,8 @@
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         stack.push( new Invocation( this, caller, "modify", new Object[]
-            { opContext }, bypass ) );
-        
+                {opContext}, bypass ) );
+
         try
         {
             this.configuration.getInterceptorChain().modify( opContext );
@@ -410,13 +446,13 @@
     }
 
 
-    public NamingEnumeration<SearchResult> list( ListOperationContext opContext, Collection<String> bypass ) 
-        throws NamingException
+    public NamingEnumeration<SearchResult> list( ListOperationContext opContext, Collection<String> bypass )
+            throws NamingException
     {
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         stack.push( new Invocation( this, caller, "list", new Object[]
-            { opContext }, bypass ) );
+                {opContext}, bypass ) );
         try
         {
             return this.configuration.getInterceptorChain().list( opContext );
@@ -429,7 +465,7 @@
 
 
     public NamingEnumeration<SearchResult> search( SearchOperationContext opContext )
-        throws NamingException
+            throws NamingException
     {
         NamingEnumeration<SearchResult> ne = search( opContext, null );
 
@@ -437,10 +473,10 @@
         {
             SearchResultFilteringEnumeration results = ( SearchResultFilteringEnumeration ) ne;
             SearchControls searchCtls = opContext.getSearchControls();
-            
+
             if ( searchCtls.getTimeLimit() + searchCtls.getCountLimit() > 0 )
             {
-                // this will be he last filter added so other filters before it must 
+                // this will be the last filter added so other filters before it must
                 // have passed/approved of the entry to be returned back to the client
                 // so the candidate we have is going to be returned for sure
                 results.addResultFilter( new SearchResultFilter()
@@ -450,7 +486,7 @@
 
 
                     public boolean accept( Invocation invocation, SearchResult result, SearchControls controls )
-                        throws NamingException
+                            throws NamingException
                     {
                         if ( controls.getTimeLimit() > 0 )
                         {
@@ -475,18 +511,18 @@
                 } );
             }
         }
-        
+
         return ne;
     }
 
 
     public NamingEnumeration<SearchResult> search( SearchOperationContext opContext, Collection<String> bypass )
-        throws NamingException
+            throws NamingException
     {
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         stack.push( new Invocation( this, caller, "search", new Object[]
-            { opContext }, bypass ) );
+                {opContext}, bypass ) );
         try
         {
             return this.configuration.getInterceptorChain().search( opContext );
@@ -500,37 +536,36 @@
 
     public Attributes lookup( LookupOperationContext opContext ) throws NamingException
     {
-    	if ( opContext.getDn().size() == 0 )
-    	{
-    		List<String> attrs = opContext.getAttrsId();
-    		
-    		if ( ( attrs == null ) || ( attrs.size() == 0 ) )
-    		{
-    			synchronized( ROOT_DSE_NOOP_MUTEX )
-    			{
-    				if ( ROOT_DSE_NO_OPERATIONNAL == null )
-    				{
-    					ROOT_DSE_NO_OPERATIONNAL = lookup( opContext, ( Collection<String> ) null );
-    				}
-    			}
-    			
-        		return ROOT_DSE_NO_OPERATIONNAL;
-    		}
-    		else if ( ( attrs.size() == 1 ) && ( attrs.contains( SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES ) ) )
-    		{
-    			synchronized( ROOT_DSE_ALL_MUTEX )
-    			{
-    				if ( ROOT_DSE_ALL == null )
-    				{
-    					ROOT_DSE_ALL = lookup( opContext, ( Collection<String> ) null );
-    				}
-    			}
-    			
-    			return ROOT_DSE_ALL;
-    		}
-    			
-    	}
-    	
+        if ( opContext.getDn().size() == 0 )
+        {
+            List<String> attrs = opContext.getAttrsId();
+
+            if ( ( attrs == null ) || ( attrs.size() == 0 ) )
+            {
+                synchronized ( ROOT_DSE_NOOP_MUTEX )
+                {
+                    if ( ROOT_DSE_NO_OPERATIONNAL == null )
+                    {
+                        ROOT_DSE_NO_OPERATIONNAL = lookup( opContext, ( Collection<String> ) null );
+                    }
+                }
+
+                return ROOT_DSE_NO_OPERATIONNAL;
+            } else if ( ( attrs.size() == 1 ) && ( attrs.contains( SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES ) ) )
+            {
+                synchronized ( ROOT_DSE_ALL_MUTEX )
+                {
+                    if ( ROOT_DSE_ALL == null )
+                    {
+                        ROOT_DSE_ALL = lookup( opContext, ( Collection<String> ) null );
+                    }
+                }
+
+                return ROOT_DSE_ALL;
+            }
+
+        }
+
         return lookup( opContext, ( Collection<String> ) null );
     }
 
@@ -540,7 +575,7 @@
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         stack.push( new Invocation( this, caller, "lookup", new Object[]
-            { opContext }, bypass ) );
+                {opContext}, bypass ) );
         try
         {
             return this.configuration.getInterceptorChain().lookup( opContext );
@@ -562,7 +597,7 @@
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         stack.push( new Invocation( this, caller, "hasEntry", new Object[]
-            { opContext }, bypass ) );
+                {opContext}, bypass ) );
         try
         {
             return this.configuration.getInterceptorChain().hasEntry( opContext );
@@ -585,7 +620,7 @@
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         Object[] args = new Object[]
-            { opContext };
+                {opContext};
         stack.push( new Invocation( this, caller, "rename", args, bypass ) );
         try
         {
@@ -609,7 +644,7 @@
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         stack.push( new Invocation( this, caller, "move", new Object[]
-            { opContext }, bypass ) );
+                {opContext}, bypass ) );
         try
         {
             this.configuration.getInterceptorChain().move( opContext );
@@ -628,12 +663,12 @@
 
 
     public void moveAndRename( MoveAndRenameOperationContext opContext, Collection<String> bypass )
-        throws NamingException
+            throws NamingException
     {
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         Object[] args = new Object[]
-            { opContext };
+                {opContext};
         stack.push( new Invocation( this, caller, "moveAndRename", args, bypass ) );
         try
         {
@@ -647,21 +682,21 @@
 
     /**
      * TODO : check if we can find another way to procect ourselves from recursion.
-     * 
+     *
      * @param opContext The operation context
      * @param bypass
      * @throws NamingException
      */
     public void bind( BindOperationContext opContext, Collection<String> bypass )
-        throws NamingException
+            throws NamingException
     {
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         Object[] args = new Object[]
-            { opContext };
-        
+                {opContext};
+
         stack.push( new Invocation( this, caller, "bind", args, bypass ) );
-        
+
         try
         {
             configuration.getInterceptorChain().bind( opContext );
@@ -677,7 +712,7 @@
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         Object[] args = new Object[]
-            { opContext };
+                {opContext};
         stack.push( new Invocation( this, caller, "unbind", args, bypass ) );
         try
         {
@@ -704,25 +739,25 @@
 
     public Attributes getRootDSE( GetRootDSEOperationContext opContext ) throws NamingException
     {
-    	if ( opContext.getDn().size() == 0 )
-    	{
-    		synchronized( ROOT_DSE_ALL_MUTEX )
-    		{
-    			if ( ROOT_DSE_ALL == null )
-    			{
-    				ROOT_DSE_ALL = getRootDSE( null, null );
-    			}
-    		}
-    		
-    		return ROOT_DSE_ALL;
-    	}
-    	
+        if ( opContext.getDn().size() == 0 )
+        {
+            synchronized ( ROOT_DSE_ALL_MUTEX )
+            {
+                if ( ROOT_DSE_ALL == null )
+                {
+                    ROOT_DSE_ALL = getRootDSE( null, null );
+                }
+            }
+
+            return ROOT_DSE_ALL;
+        }
+
         return getRootDSE( null, null );
     }
 
 
-    public Attributes getRootDSE( GetRootDSEOperationContext opContext, Collection<String> bypass ) 
-        throws NamingException
+    public Attributes getRootDSE( GetRootDSEOperationContext opContext, Collection<String> bypass )
+            throws NamingException
     {
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
@@ -744,13 +779,13 @@
     }
 
 
-    public void addContextPartition( AddContextPartitionOperationContext opContext, Collection<String> bypass ) 
-        throws NamingException
+    public void addContextPartition( AddContextPartitionOperationContext opContext, Collection<String> bypass )
+            throws NamingException
     {
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         stack.push( new Invocation( this, caller, "addContextPartition", new Object[]
-            { opContext }, bypass ) );
+                {opContext}, bypass ) );
         try
         {
             this.configuration.getInterceptorChain().addContextPartition( opContext );
@@ -768,13 +803,13 @@
     }
 
 
-    public void removeContextPartition( RemoveContextPartitionOperationContext opContext, Collection<String> bypass ) 
-        throws NamingException
+    public void removeContextPartition( RemoveContextPartitionOperationContext opContext, Collection<String> bypass )
+            throws NamingException
     {
         ensureStarted();
         InvocationStack stack = InvocationStack.getInstance();
         stack.push( new Invocation( this, caller, "removeContextPartition", new Object[]
-            { opContext }, bypass ) );
+                {opContext}, bypass ) );
         try
         {
             this.configuration.getInterceptorChain().removeContextPartition( opContext );
@@ -800,7 +835,6 @@
         configuration.getPartitionNexus().registerSupportedExtensions( extensionOids );
     }
 
-
     // -----------------------------------------------------------------------
     // EventContext and EventDirContext notification methods
     // -----------------------------------------------------------------------
@@ -813,10 +847,10 @@
      */
 
     public void addNamingListener( EventContext ctx, Name name, ExprNode filter, SearchControls searchControls,
-                                   NamingListener namingListener ) throws NamingException
+            NamingListener namingListener ) throws NamingException
     {
         InterceptorChain chain = this.configuration.getInterceptorChain();
-        EventService interceptor = ( EventService ) chain.get( StartupConfiguration.EVENT_SERVICE_NAME );
+        EventService interceptor = ( EventService ) chain.get( EventService.class.getName() );
         interceptor.addNamingListener( ctx, name, filter, searchControls, namingListener );
     }
 
@@ -828,7 +862,7 @@
         {
             return;
         }
-        EventService interceptor = ( EventService ) chain.get( StartupConfiguration.EVENT_SERVICE_NAME );
+        EventService interceptor = ( EventService ) chain.get( EventService.class.getName() );
         interceptor.removeNamingListener( ctx, namingListener );
     }
 }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?rev=580555&r1=580554&r2=580555&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java Sat Sep 29 01:24:59 2007
@@ -98,7 +98,7 @@
     
     public String getId()
     {
-        return cfg.getId();
+        return cfg.getName();
     }
     
     

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartitionConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartitionConfiguration.java?rev=580555&r1=580554&r2=580555&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartitionConfiguration.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartitionConfiguration.java Sat Sep 29 01:24:59 2007
@@ -79,7 +79,7 @@
         newConfig.setContextEntry( config.getContextEntry() );
         newConfig.setPartitionClassName( config.getPartitionClassName() );
         newConfig.setIndexedAttributes( config.getIndexedAttributes() );
-        newConfig.setId( config.getId() );
+        newConfig.setName( config.getName() );
         newConfig.setSuffix( config.getSuffix() );
         return newConfig;
     }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MutableBTreePartitionConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MutableBTreePartitionConfiguration.java?rev=580555&r1=580554&r2=580555&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MutableBTreePartitionConfiguration.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MutableBTreePartitionConfiguration.java Sat Sep 29 01:24:59 2007
@@ -31,6 +31,8 @@
 /**
  * A mutable form of {@link BTreePartitionConfiguration}.
  *
+ * @org.apache.xbean.XBean
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
@@ -42,12 +44,16 @@
     }
     
     
-    public void setId( String name )
+    public void setName( String name )
     {
-        super.setId( name );
+        super.setName( name );
     }
 
-
+    /**
+     * @org.apache.xbean.Property nestedType="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration"
+     *
+     * @param indexedAttributes
+     */
     public void setIndexedAttributes( Set<Object> indexedAttributes )
     {
         super.setIndexedAttributes( indexedAttributes );
@@ -91,7 +97,7 @@
         newConfig.setCacheSize( config.getCacheSize() );
         newConfig.setContextEntry( config.getContextEntry() );
         newConfig.setIndexedAttributes( config.getIndexedAttributes() );
-        newConfig.setId( config.getId() );
+        newConfig.setName( config.getName() );
         newConfig.setSuffix( config.getSuffix() );
         newConfig.setSynchOnWrite( false );
         return newConfig;

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MutableIndexConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MutableIndexConfiguration.java?rev=580555&r1=580554&r2=580555&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MutableIndexConfiguration.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/MutableIndexConfiguration.java Sat Sep 29 01:24:59 2007
@@ -23,6 +23,8 @@
 /**
  * A mutable version of {@link IndexConfiguration}.
  *
+ * @org.apache.xbean.XBean
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=580555&r1=580554&r2=580555&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java Sat Sep 29 01:24:59 2007
@@ -93,13 +93,13 @@
         storeConfig.setCacheSize( cfg.getCacheSize() );
         storeConfig.setContextEntry( cfg.getContextEntry() );
         storeConfig.setIndexedAttributes( cfg.getIndexedAttributes() );
-        storeConfig.setName( cfg.getId() );
+        storeConfig.setName( cfg.getName() );
         storeConfig.setOidRegistry( oidRegistry );
         storeConfig.setSuffixDn( cfg.getSuffix() );
         
         storeConfig.setWorkingDirectory( new File( 
             factoryCfg.getStartupConfiguration().getWorkingDirectory().getPath()
-            + File.separator + cfg.getId() ) );
+            + File.separator + cfg.getName() ) );
         
         if ( cfg instanceof BTreePartitionConfiguration )
         {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java?rev=580555&r1=580554&r2=580555&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java Sat Sep 29 01:24:59 2007
@@ -38,11 +38,13 @@
 import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.core.DirectoryServiceConfiguration;
-import org.apache.directory.server.core.configuration.InterceptorConfiguration;
-import org.apache.directory.server.core.configuration.StartupConfiguration;
+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.enumeration.ReferralHandlingEnumeration;
 import org.apache.directory.server.core.enumeration.SearchResultFilter;
 import org.apache.directory.server.core.enumeration.SearchResultFilteringEnumeration;
+import org.apache.directory.server.core.event.EventService;
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
 import org.apache.directory.server.core.interceptor.NextInterceptor;
 import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
@@ -59,9 +61,14 @@
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
+import org.apache.directory.server.core.normalization.NormalizationService;
+import org.apache.directory.server.core.operational.OperationalAttributeService;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.PartitionNexus;
 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.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.NotImplementedException;
@@ -87,6 +94,8 @@
  * referral handling behavoir when the {@link Context.REFERRAL} is implicitly
  * or explicitly set to "ignore", when set to "throw" and when set to "follow". 
  * 
+ * @org.apache.xbean.XBean
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
@@ -113,16 +122,18 @@
          * partitions of the system during startup and during add/remove partition ops
          */
         Collection<String> c = new HashSet<String>();
-        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.REFERRAL_SERVICE_NAME );
-        c.add( StartupConfiguration.EVENT_SERVICE_NAME );
-        c.add( StartupConfiguration.TRIGGER_SERVICE_NAME );
+        c.add( NormalizationService.class.getName() );
+        c.add( AuthenticationService.class.getName() );
+        c.add( ReferralService.class.getName() );
+        c.add( AuthorizationService.class.getName() );
+        c.add( DefaultAuthorizationService.class.getName() );
+//        c.add( ExceptionService.class.getName() );
+        c.add( OperationalAttributeService.class.getName() );
+        c.add( SchemaService.class.getName() );
+        c.add( SubentryService.class.getName() );
+//        c.add( CollectiveAttributeService.class.getName() );
+        c.add( EventService.class.getName() );
+        c.add( TriggerService.class.getName() );
         SEARCH_BYPASS = Collections.unmodifiableCollection( c );
     }
 
@@ -269,7 +280,7 @@
     }
 
 
-    public void init( DirectoryServiceConfiguration dsConfig, InterceptorConfiguration cfg ) throws NamingException
+    public void init(DirectoryServiceConfiguration dsConfig) throws NamingException
     {
         nexus = dsConfig.getPartitionNexus();
         attrRegistry = dsConfig.getRegistries().getAttributeTypeRegistry();

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java?rev=580555&r1=580554&r2=580555&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaManager.java Sat Sep 29 01:24:59 2007
@@ -35,11 +35,17 @@
 
 import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.constants.MetaSchemaConstants;
-import org.apache.directory.server.core.configuration.StartupConfiguration;
+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.collective.CollectiveAttributeService;
+import org.apache.directory.server.core.exception.ExceptionService;
 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
+import org.apache.directory.server.core.normalization.NormalizationService;
+import org.apache.directory.server.core.referral.ReferralService;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
 import org.apache.directory.server.schema.registries.ObjectClassRegistry;
 import org.apache.directory.server.schema.registries.OidRegistry;
@@ -171,16 +177,20 @@
         VALID_OU_VALUES.add( SchemaConstants.DIT_CONTENT_RULES_AT.toLowerCase() );
         VALID_OU_VALUES.add( SchemaConstants.DIT_STRUCTURE_RULES_AT.toLowerCase() );
         
-        HashSet<String> set = new HashSet<String>();
-        set.add( StartupConfiguration.NORMALIZATION_SERVICE_NAME );
-        set.add( StartupConfiguration.AUTHENTICATION_SERVICE_NAME );
-        set.add( StartupConfiguration.REFERRAL_SERVICE_NAME );
-        set.add( StartupConfiguration.AUTHORIZATION_SERVICE_NAME );
-        set.add( StartupConfiguration.DEFAULT_AUTHORIZATION_SERVICE_NAME );
-        set.add( StartupConfiguration.EXCEPTION_SERVICE_NAME );
-        set.add( StartupConfiguration.SCHEMA_SERVICE_NAME );
-        set.add( StartupConfiguration.COLLECTIVE_ATTRIBUTE_SERVICE_NAME );
-        SCHEMA_MODIFICATION_ATTRIBUTES_UPDATE_BYPASS = Collections.unmodifiableCollection( set );
+        HashSet<String> c = new HashSet<String>();
+        c.add( NormalizationService.class.getName() );
+        c.add( AuthenticationService.class.getName() );
+        c.add( ReferralService.class.getName() );
+        c.add( AuthorizationService.class.getName() );
+        c.add( DefaultAuthorizationService.class.getName() );
+        c.add( ExceptionService.class.getName() );
+//        c.add( OperationalAttributeService.class.getName() );
+        c.add( SchemaService.class.getName() );
+//        c.add( SubentryService.class.getName() );
+        c.add( CollectiveAttributeService.class.getName() );
+//        c.add( EventService.class.getName() );
+//        c.add( TriggerService.class.getName() );
+        SCHEMA_MODIFICATION_ATTRIBUTES_UPDATE_BYPASS = Collections.unmodifiableCollection( c );
     }
 
 



Mime
View raw message