directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r201550 [2/5] - in /directory/apacheds/trunk/core: ./ src/main/aspects/ src/main/java/org/apache/ldap/server/ src/main/java/org/apache/ldap/server/authn/ src/main/java/org/apache/ldap/server/authz/ src/main/java/org/apache/ldap/server/confi...
Date Fri, 24 Jun 2005 03:08:39 GMT
Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/Configuration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/Configuration.java?rev=201550&r1=201549&r2=201550&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/Configuration.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/Configuration.java Thu Jun 23 20:08:31 2005
@@ -21,9 +21,11 @@
 import java.io.Serializable;
 import java.util.Hashtable;
 
+import org.apache.ldap.server.jndi.ContextFactoryService;
+
 /**
  * A configuration that provides required, optional, or default properties
- * to configure ApacheDS.
+ * to configure {@link ContextFactoryService}.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
@@ -54,9 +56,8 @@
     }
 
     /**
-     * Valids this configuration.
-     * 
-     * @throws ConfigurationException if this configuration is invalid
+     * Validates this configuration.
+     * @throws ConfigurationException if this configuration is not valid
      */
     public void validate()
     {
@@ -73,7 +74,7 @@
         env.put( JNDI_KEY, this );
         return env;
     }
-    
+
     public Object clone()
     {
         try

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/ConfigurationUtil.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/ConfigurationUtil.java?rev=201550&r1=201549&r2=201550&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/ConfigurationUtil.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/ConfigurationUtil.java Thu Jun 23 20:08:31 2005
@@ -98,20 +98,23 @@
     }
     
     /**
-     * Returns the deep clone of the specified {@link Attributes} set.
+     * Returns the deep clone of the specified {@link Attributes} list.
      */
     static List getClonedAttributesList( List list )
     {
-        ArrayList newList = new ArrayList();
-
-        for( int ii = 0; ii < list.size(); ii++ )
+        List newList = new ArrayList();
+        Iterator i = list.iterator();
+        while( i.hasNext() )
         {
-            newList.add( ( Attributes ) list.get( ii ) );
+            newList.add( ( ( Attributes ) i.next() ).clone() );
         }
-
         return newList;
     }
 
+    /**
+     * Throws a {@link ConfigurationException} if the specified port number
+     * is out of range.
+     */
     static void validatePortNumber( int port )
     {
         if( port < 0 || port > 65535 )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java?rev=201550&r1=201549&r2=201550&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/ContextPartitionConfiguration.java Thu Jun 23 20:08:31 2005
@@ -23,10 +23,16 @@
 import java.util.Iterator;
 import java.util.Set;
 
+import javax.naming.Name;
+import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.BasicAttributes;
 
-import org.apache.ldap.server.ContextPartition;
+import org.apache.ldap.common.name.LdapName;
+import org.apache.ldap.common.schema.Normalizer;
+import org.apache.ldap.server.partition.ContextPartition;
+import org.apache.ldap.server.partition.impl.btree.jdbm.JdbmContextPartition;
+import org.apache.ldap.server.schema.MatchingRuleRegistry;
 
 
 /**
@@ -37,11 +43,14 @@
  */
 public class ContextPartitionConfiguration
 {
+    /** The name of reserved system partition */
+    public static final String SYSTEM_PARTITION_NAME = "system";
+
     private String name;
     private String suffix;
     private Set indexedAttributes = new HashSet(); // Set<String>
     private Attributes contextEntry = new BasicAttributes();
-    private ContextPartition contextPartition;
+    private ContextPartition contextPartition = new JdbmContextPartition();
     
     /**
      * Creates a new instance.
@@ -50,22 +59,37 @@
     {
     }
     
+    /**
+     * Returns user-defined name of the {@link ContextPartition} that
+     * this configuration configures.
+     */
     public String getName()
     {
         return name;
     }
     
-    public void setName( String name )
+    /**
+     * Sets user-defined name of the {@link ContextPartition} that
+     * this configuration configures.
+     */
+    protected void setName( String name )
     {
         // TODO name can be a directory name.
-        this.name = name.trim();
+        name = name.trim();
+        this.name = name;
     }
 
+    /**
+     * Returns the set of attribute type strings to create an index on.
+     */
     public Set getIndexedAttributes()
     {
         return ConfigurationUtil.getClonedSet( indexedAttributes );
     }
     
+    /**
+     * Sets the set of attribute type strings to create an index on.
+     */
     protected void setIndexedAttributes( Set indexedAttributes )
     {
         Set newIndexedAttributes = ConfigurationUtil.getTypeSafeSet(
@@ -81,38 +105,83 @@
         this.indexedAttributes = newIndexedAttributes;
     }
     
+    /**
+     * Returns the {@link ContextPartition} that this configuration configures.
+     */
     public ContextPartition getContextPartition()
     {
         return contextPartition;
     }
     
     /**
-     * Set this to null if you want to use {@link org.apache.ldap.server.ApplicationPartition}.
+     * Sets the {@link ContextPartition} that this configuration configures.
      */
     protected void setContextPartition( ContextPartition partition )
     {
+        if( partition == null )
+        {
+            throw new NullPointerException( "partition" );
+        }
         this.contextPartition = partition;
     }
     
+    /**
+     * Returns root entry that will be added to the {@link ContextPartition}
+     * after it is initialized.
+     */
     public Attributes getContextEntry()
     {
         return ( Attributes ) contextEntry.clone();
     }
     
+    /**
+     * Sets root entry that will be added to the {@link ContextPartition}
+     * after it is initialized.
+     */
     protected void setContextEntry( Attributes rootEntry )
     {
         this.contextEntry = ( Attributes ) rootEntry.clone();
     }
     
+    /**
+     * Returns the suffix of the {@link ContextPartition}.
+     */
     public String getSuffix()
     {
         return suffix;
     }
     
+    /**
+     * Returns the normalized suffix of the {@link ContextPartition}.
+     */
+    public Name getNormalizedSuffix( MatchingRuleRegistry matchingRuleRegistry ) throws NamingException
+    {
+        return getNormalizedSuffix( matchingRuleRegistry.lookup( "distinguishedNameMatch" ).getNormalizer() );
+    }
+    
+    /**
+     * Returns the normalized suffix of the {@link ContextPartition}.
+     */
+    public Name getNormalizedSuffix( Normalizer normalizer ) throws NamingException
+    {
+        return new LdapName( normalizer.normalize( suffix ).toString() );
+    }
+    
+    /**
+     * Sets the suffix of the {@link ContextPartition}.
+     */
     protected void setSuffix( String suffix )
     {
-        // TODO Suffix should be normalized before being set
-        this.suffix = suffix.trim();
+        suffix = suffix.trim();
+        try
+        {
+            new LdapName( suffix );
+        }
+        catch( NamingException e )
+        {
+            throw new ConfigurationException( "Failed to normalize the suffix: " + suffix );
+        }
+        this.suffix = suffix;
     }
     
     

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/InterceptorConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/InterceptorConfiguration.java?rev=201550&r1=201549&r2=201550&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/InterceptorConfiguration.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/InterceptorConfiguration.java Thu Jun 23 20:08:31 2005
@@ -31,30 +31,52 @@
     private String name;
     private Interceptor interceptor;
 
+    /**
+     * Creates a new instance.
+     */
     protected InterceptorConfiguration()
     {
     }
 
+    /**
+     * Returns the {@link Interceptor} that this configuration
+     * configures.
+     */
     public Interceptor getInterceptor()
     {
         return interceptor;
     }
 
+    /**
+     * Sets the {@link Interceptor} that this configuration
+     * configures.
+     */
     protected void setInterceptor( Interceptor authenticator )
     {
         this.interceptor = authenticator;
     }
 
+    /**
+     * Returns the name of the {@link Interceptor}.
+     */
     public String getName()
     {
         return name;
     }
 
+    /**
+     * Sets the name of the {@link Interceptor}.
+     */
     protected void setName( String name )
     {
         this.name = name.trim();
     }
 
+    /**
+     * Validates this configuration.
+     *
+     * @throws ConfigurationException if this configuration is not valid.
+     */
     public void validate()
     {
         if( name == null )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableAuthenticatorConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableAuthenticatorConfiguration.java?rev=201550&r1=201549&r2=201550&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableAuthenticatorConfiguration.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableAuthenticatorConfiguration.java Thu Jun 23 20:08:31 2005
@@ -30,6 +30,9 @@
         AuthenticatorConfiguration
 {
 
+    /**
+     * Creates a new instance.
+     */
     public MutableAuthenticatorConfiguration()
     {
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableContextPartitionConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableContextPartitionConfiguration.java?rev=201550&r1=201549&r2=201550&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableContextPartitionConfiguration.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableContextPartitionConfiguration.java Thu Jun 23 20:08:31 2005
@@ -22,7 +22,7 @@
 
 import javax.naming.directory.Attributes;
 
-import org.apache.ldap.server.ContextPartition;
+import org.apache.ldap.server.partition.ContextPartition;
 
 /**
  * A mutable version of {@link ContextPartitionConfiguration}.
@@ -38,6 +38,11 @@
      */
     public MutableContextPartitionConfiguration()
     {
+    }
+    
+    public void setName( String name )
+    {
+        super.setName( name );
     }
 
     public void setIndexedAttributes( Set indexedAttributes )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableInterceptorConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableInterceptorConfiguration.java?rev=201550&r1=201549&r2=201550&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableInterceptorConfiguration.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableInterceptorConfiguration.java Thu Jun 23 20:08:31 2005
@@ -30,6 +30,9 @@
         InterceptorConfiguration
 {
 
+    /**
+     * Creates a new instance.
+     */
     public MutableInterceptorConfiguration()
     {
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableStartupConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableStartupConfiguration.java?rev=201550&r1=201549&r2=201550&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableStartupConfiguration.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableStartupConfiguration.java Thu Jun 23 20:08:31 2005
@@ -32,6 +32,9 @@
 {
     private static final long serialVersionUID = -987437370955222007L;
 
+    /**
+     * Creates a new instance.
+     */
     public MutableStartupConfiguration()
     {
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java?rev=201550&r1=201549&r2=201550&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java Thu Jun 23 20:08:31 2005
@@ -164,10 +164,19 @@
         Set newSet = ConfigurationUtil.getTypeSafeSet(
                 authenticatorConfigurations, AuthenticatorConfiguration.class );
         
+        Set names = new HashSet();
         Iterator i = newSet.iterator();
         while( i.hasNext() )
         {
-            ( ( AuthenticatorConfiguration ) i.next() ).validate();
+            AuthenticatorConfiguration cfg = ( AuthenticatorConfiguration ) i.next();
+            cfg.validate();
+            
+            String name = cfg.getName();
+            if( names.contains( name ) )
+            {
+                throw new ConfigurationException( "Duplicate authenticator name: " + name );
+            }
+            names.add( name );
         }
         
         this.authenticatorConfigurations = newSet;
@@ -206,10 +215,19 @@
         Set newSet = ConfigurationUtil.getTypeSafeSet(
                 contextParitionConfigurations, ContextPartitionConfiguration.class );
         
+        Set names = new HashSet();
         Iterator i = newSet.iterator();
         while( i.hasNext() )
         {
-            ( ( ContextPartitionConfiguration ) i.next() ).validate();
+            ContextPartitionConfiguration cfg = ( ContextPartitionConfiguration ) i.next();
+            cfg.validate();
+
+            String name = cfg.getName();
+            if( names.contains( name ) )
+            {
+                throw new ConfigurationException( "Duplicate partition name: " + name );
+            }
+            names.add( name );
         }
         
         this.contextPartitionConfigurations = newSet;
@@ -247,10 +265,19 @@
         List newList = ConfigurationUtil.getTypeSafeList(
                 interceptorConfigurations, InterceptorConfiguration.class );
         
+        Set names = new HashSet();
         Iterator i = newList.iterator();
         while( i.hasNext() )
         {
-            ( ( InterceptorConfiguration ) i.next() ).validate();
+            InterceptorConfiguration cfg = ( InterceptorConfiguration ) i.next();
+            cfg.validate();
+
+            String name = cfg.getName();
+            if( names.contains( name ) )
+            {
+                throw new ConfigurationException( "Duplicate interceptor name: " + name );
+            }
+            names.add( name );
         }
 
         this.interceptorConfigurations = interceptorConfigurations;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/SyncConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/SyncConfiguration.java?rev=201550&r1=201549&r2=201550&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/SyncConfiguration.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/SyncConfiguration.java Thu Jun 23 20:08:31 2005
@@ -18,16 +18,16 @@
  */
 package org.apache.ldap.server.configuration;
 
+import org.apache.ldap.server.jndi.ContextFactoryService;
+
 /**
- * A {@link Configuration} that syncs ApacheDS backend storage with disk.
+ * A {@link Configuration} that makes a call to {@link ContextFactoryService#sync()}.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
 public class SyncConfiguration extends Configuration
 {
-    private static SyncConfiguration instance = new SyncConfiguration();
-
     private static final long serialVersionUID = -3260859085299322327L;
 
     /**
@@ -35,26 +35,5 @@
      */
     public SyncConfiguration()
     {
-        if ( instance == null )
-        {
-            instance = this;
-        }
-    }
-
-
-    /**
-     * Returns existing static instance or creates a new one if
-     * it does not exist.
-     *
-     * @return a reusable static instance
-     */
-    public static SyncConfiguration getInstance()
-    {
-        if ( instance == null )
-        {
-            instance = new SyncConfiguration();
-        }
-
-        return instance;
     }
 }

Propchange: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/enumeration/SearchResultEnumeration.java
------------------------------------------------------------------------------
    svn:keywords = HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Propchange: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/enumeration/SearchResultFilter.java
------------------------------------------------------------------------------
    svn:keywords = HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Propchange: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/enumeration/SearchResultFilteringEnumeration.java
------------------------------------------------------------------------------
    svn:keywords = HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/exception/ExceptionService.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/exception/ExceptionService.java?rev=201550&r1=201549&r2=201550&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/exception/ExceptionService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/exception/ExceptionService.java Thu Jun 23 20:08:31 2005
@@ -17,29 +17,34 @@
 package org.apache.ldap.server.exception;
 
 
+import java.util.Map;
+
+import javax.naming.Name;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.ModificationItem;
+import javax.naming.directory.SearchControls;
+
 import org.apache.ldap.common.exception.LdapContextNotEmptyException;
 import org.apache.ldap.common.exception.LdapNameAlreadyBoundException;
 import org.apache.ldap.common.exception.LdapNameNotFoundException;
 import org.apache.ldap.common.exception.LdapNamingException;
+import org.apache.ldap.common.filter.ExprNode;
 import org.apache.ldap.common.message.ResultCodeEnum;
 import org.apache.ldap.common.name.LdapName;
-import org.apache.ldap.server.BackingStore;
-import org.apache.ldap.server.RootNexus;
+import org.apache.ldap.server.configuration.InterceptorConfiguration;
 import org.apache.ldap.server.interceptor.BaseInterceptor;
-import org.apache.ldap.server.interceptor.InterceptorContext;
 import org.apache.ldap.server.interceptor.NextInterceptor;
-import org.apache.ldap.server.invocation.*;
-
-import javax.naming.Name;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
+import org.apache.ldap.server.jndi.ContextFactoryConfiguration;
+import org.apache.ldap.server.partition.ContextPartition;
+import org.apache.ldap.server.partition.ContextPartitionNexus;
 
 
 /**
  * An {@link org.apache.ldap.server.interceptor.Interceptor} that detects any operations that breaks integrity
- * of {@link BackingStore} and terminates the current invocation chain by
+ * of {@link ContextPartition} and terminates the current invocation chain by
  * throwing a {@link NamingException}. Those operations include when an entry
  * already exists at a DN and is added once again to the same DN.
  *
@@ -51,7 +56,7 @@
     /**
      * the root nexus of the system
      */
-    private RootNexus nexus;
+    private ContextPartitionNexus nexus;
 
 
     /**
@@ -62,9 +67,9 @@
     }
 
 
-    public void init( InterceptorContext ctx )
+    public void init( ContextFactoryConfiguration factoryCfg, InterceptorConfiguration cfg )
     {
-        this.nexus = ctx.getRootNexus();
+        this.nexus = factoryCfg.getPartitionNexus();
     }
 
 
@@ -77,11 +82,9 @@
      * In the pre-invocation state this interceptor method checks to see if the entry to be added already exists.  If it
      * does an exception is raised.
      */
-    protected void process( NextInterceptor nextInterceptor, Add call ) throws NamingException
+    public void add( NextInterceptor nextInterceptor, String upName, Name normName, Attributes entry ) throws NamingException
     {
         // check if the entry already exists
-        Name normName = call.getName();
-        String upName = call.getUserProvidedName();
         if ( nexus.hasEntry( normName ) )
         {
             NamingException ne = new LdapNameAlreadyBoundException();
@@ -108,7 +111,7 @@
             throw e;
         }
 
-        nextInterceptor.process( call );
+        nextInterceptor.add( upName, normName, entry );
     }
 
 
@@ -116,10 +119,8 @@
      * Checks to make sure the entry being deleted exists, and has no children, otherwise throws the appropriate
      * LdapException.
      */
-    protected void process( NextInterceptor nextInterceptor, Delete call ) throws NamingException
+    public void delete( NextInterceptor nextInterceptor, Name name ) throws NamingException
     {
-        Name name = call.getName();
-        
         // check if entry to delete exists
         String msg = "Attempt to delete non-existant entry: ";
         assertHasEntry( msg, name );
@@ -140,88 +141,85 @@
             throw e;
         }
 
-        nextInterceptor.process( call );
+        nextInterceptor.delete( name );
     }
 
 
     /**
      * Checks to see the base being searched exists, otherwise throws the appropriate LdapException.
      */
-    protected void process( NextInterceptor nextInterceptor, List call ) throws NamingException
+    public NamingEnumeration list( NextInterceptor nextInterceptor, Name baseName ) throws NamingException
     {
         // check if entry to search exists
         String msg = "Attempt to search under non-existant entry: ";
-        assertHasEntry( msg, call.getBaseName() );
+        assertHasEntry( msg, baseName );
 
-        nextInterceptor.process( call );
+        return nextInterceptor.list( baseName );
     }
 
 
     /**
      * Checks to make sure the entry being looked up exists other wise throws the appropriate LdapException.
      */
-    protected void process( NextInterceptor nextInterceptor, Lookup call ) throws NamingException
+    public Attributes lookup( NextInterceptor nextInterceptor, Name name ) throws NamingException
     {
         String msg = "Attempt to lookup non-existant entry: ";
-        assertHasEntry( msg, call.getName() );
+        assertHasEntry( msg, name );
 
-        nextInterceptor.process( call );
+        return nextInterceptor.lookup( name );
     }
 
 
     /**
      * Checks to see the base being searched exists, otherwise throws the appropriate LdapException.
      */
-    protected void process( NextInterceptor nextInterceptor, LookupWithAttrIds call ) throws NamingException
+    public Attributes lookup( NextInterceptor nextInterceptor, Name name, String[] attrIds ) throws NamingException
     {
         // check if entry to lookup exists
         String msg = "Attempt to lookup non-existant entry: ";
-        assertHasEntry( msg, call.getName() );
+        assertHasEntry( msg, name );
 
-        nextInterceptor.process( call );
+        return nextInterceptor.lookup( name, attrIds );
     }
 
 
     /**
      * Checks to see the entry being modified exists, otherwise throws the appropriate LdapException.
      */
-    protected void process( NextInterceptor nextInterceptor, Modify call ) throws NamingException
+    public void modify( NextInterceptor nextInterceptor, Name name, int modOp, Attributes attrs ) throws NamingException
     {
         // check if entry to modify exists
         String msg = "Attempt to modify non-existant entry: ";
-        assertHasEntry( msg, call.getName() );
+        assertHasEntry( msg, name );
 
-        nextInterceptor.process( call );
+        nextInterceptor.modify( name, modOp, attrs );
     }
 
 
     /**
      * Checks to see the entry being modified exists, otherwise throws the appropriate LdapException.
      */
-    protected void process( NextInterceptor nextInterceptor, ModifyMany call ) throws NamingException
+    public void modify( NextInterceptor nextInterceptor, Name name, ModificationItem[] items ) throws NamingException
     {
         // check if entry to modify exists
         String msg = "Attempt to modify non-existant entry: ";
-        assertHasEntry( msg, call.getName() );
+        assertHasEntry( msg, name );
 
-        nextInterceptor.process( call );
+        nextInterceptor.modify( name, items );
     }
 
 
     /**
      * Checks to see the entry being renamed exists, otherwise throws the appropriate LdapException.
      */
-    protected void process( NextInterceptor nextInterceptor, ModifyRN call ) throws NamingException
+    public void modifyRn( NextInterceptor nextInterceptor, Name dn, String newRn, boolean deleteOldRn ) throws NamingException
     {
-        Name dn = call.getName();
-        String newRdn = call.getNewRelativeName();
-        
         // check if entry to rename exists
         String msg = "Attempt to rename non-existant entry: ";
         assertHasEntry( msg, dn );
 
         // check to see if target entry exists
-        Name target = dn.getSuffix( 1 ).add( newRdn );
+        Name target = dn.getSuffix( 1 ).add( newRn );
         if ( nexus.hasEntry( target ) )
         {
             LdapNameAlreadyBoundException e = null;
@@ -231,7 +229,7 @@
             throw e;
         }
 
-        nextInterceptor.process( call );
+        nextInterceptor.modifyRn( dn, newRn, deleteOldRn );
     }
 
 
@@ -239,19 +237,19 @@
      * Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate
      * LdapException.
      */
-    protected void process( NextInterceptor nextInterceptor, Move call ) throws NamingException
+    public void move( NextInterceptor nextInterceptor, Name oriChildName, Name newParentName ) throws NamingException
     {
         // check if child to move exists
         String msg = "Attempt to move to non-existant parent: ";
-        assertHasEntry( msg, call.getName() );
+        assertHasEntry( msg, oriChildName );
 
         // check if parent to move to exists
         msg = "Attempt to move to non-existant parent: ";
-        assertHasEntry( msg, call.getNewParentName() );
+        assertHasEntry( msg, newParentName );
 
         // check to see if target entry exists
-        String rdn = call.getName().get( call.getName().size() - 1 );
-        Name target = ( Name ) call.getNewParentName().clone();
+        String rdn = oriChildName.get( oriChildName.size() - 1 );
+        Name target = ( Name ) newParentName.clone();
         target.add( rdn );
         if ( nexus.hasEntry( target ) )
         {
@@ -262,7 +260,7 @@
             throw e;
         }
 
-        nextInterceptor.process( call );
+        nextInterceptor.move( oriChildName, newParentName );
     }
 
 
@@ -270,19 +268,21 @@
      * Checks to see the entry being moved exists, and so does its parent, otherwise throws the appropriate
      * LdapException.
      */
-    protected void process( NextInterceptor nextInterceptor, MoveAndModifyRN call ) throws NamingException
+    public void move( NextInterceptor nextInterceptor,
+            Name oriChildName, Name newParentName, String newRn,
+            boolean deleteOldRn ) throws NamingException
     {
         // check if child to move exists
         String msg = "Attempt to move to non-existant parent: ";
-        assertHasEntry( msg, call.getName() );
+        assertHasEntry( msg, oriChildName );
 
         // check if parent to move to exists
         msg = "Attempt to move to non-existant parent: ";
-        assertHasEntry( msg, call.getNewParentName() );
+        assertHasEntry( msg, newParentName );
 
         // check to see if target entry exists
-        Name target = ( Name ) call.getNewParentName().clone();
-        target.add( call.getNewRelativeName() );
+        Name target = ( Name ) newParentName.clone();
+        target.add( newRn );
         if ( nexus.hasEntry( target ) )
         {
             LdapNameAlreadyBoundException e = null;
@@ -292,34 +292,33 @@
             throw e;
         }
 
-        nextInterceptor.process( call );
+        nextInterceptor.move( oriChildName, newParentName, newRn, deleteOldRn );
     }
 
 
     /**
      * Checks to see the entry being searched exists, otherwise throws the appropriate LdapException.
      */
-    protected void process( NextInterceptor nextInterceptor, Search call ) throws NamingException
+    public NamingEnumeration search( NextInterceptor nextInterceptor, 
+            Name base, Map env, ExprNode filter,
+            SearchControls searchCtls ) throws NamingException
     {
         String msg = "Attempt to search under non-existant entry: ";
 
-        Name base = call.getBaseName();
         if ( base.size() == 0 )
         {
-            nextInterceptor.process( call );
-            return;
+            return nextInterceptor.search( base, env, filter, searchCtls );
         }
 
         Attribute attr = nexus.getRootDSE().get( "subschemaSubentry" );
         if ( ( ( String ) attr.get() ).equalsIgnoreCase( base.toString() ) )
         {
-            nextInterceptor.process( call );
-            return;
+            return nextInterceptor.search( base, env, filter, searchCtls );
         }
 
         assertHasEntry( msg, base );
 
-        nextInterceptor.process( call );
+        return nextInterceptor.search( base, env, filter, searchCtls );
     }
 
 
@@ -346,7 +345,7 @@
                 e = new LdapNameNotFoundException( dn.toString() );
             }
 
-            e.setResolvedName( nexus.getMatchedDn( dn, false ) );
+            e.setResolvedName( nexus.getMatchedName( dn, false ) );
             throw e;
         }
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/interceptor/BaseInterceptor.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/interceptor/BaseInterceptor.java?rev=201550&r1=201549&r2=201550&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/interceptor/BaseInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/interceptor/BaseInterceptor.java Thu Jun 23 20:08:31 2005
@@ -17,35 +17,30 @@
 package org.apache.ldap.server.interceptor;
 
 
-import org.apache.ldap.server.authn.LdapPrincipal;
-import org.apache.ldap.server.invocation.*;
-import org.apache.ldap.server.jndi.ServerContext;
+import java.util.Iterator;
+import java.util.Map;
 
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.ModificationItem;
+import javax.naming.directory.SearchControls;
+import javax.naming.ldap.LdapContext;
+
+import org.apache.ldap.common.filter.ExprNode;
+import org.apache.ldap.server.authn.LdapPrincipal;
+import org.apache.ldap.server.configuration.InterceptorConfiguration;
+import org.apache.ldap.server.invocation.InvocationStack;
+import org.apache.ldap.server.jndi.ContextFactoryConfiguration;
+import org.apache.ldap.server.jndi.ServerContext;
 
 
 /**
- * A easy-to-use implementation of {@link Interceptor} that demultiplexes invocations
- * using method signature overloading.
- * <p/>
- * This {@link Interceptor} forwards received process requests to an appropriate
- * <code>process(NextInterceptor, <em>ConcreteInvocation</em>)</code> methods.  Users
- * can override any <code>process(..)</code> methods that correspond to
- * {@link Invocation} types that he or she wants to filter.
- * <p/>
- * For example, if user wants to filter {@link Add} invocation:
- * <pre>
- * public class MyInterceptor extends BaseInterceptor
- * {
- *     protected void process( NextInterceptor nextInterceptor, Add invocation )
- *     {
- *         nextInterceptor.process( invocation );
- *         System.out.println( "Item added!" );
- *     }
- * }
- * </pre>
- * <code>BaseInterceptor</code> handles all long and tedious if-elseif blocks behind the
- * scenes.
+ * A easy-to-use implementation of {@link Interceptor}.  All methods are
+ * implemented to pass the flow of control to next interceptor by defaults.
+ * Please override the methods you have concern in.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
@@ -53,201 +48,149 @@
 public abstract class BaseInterceptor implements Interceptor
 {
     /**
-     * Gets the call's current context's Principal.
-     *
-     * @return the principal making the call
+     * Returns {@link LdapPrincipal} of current context.
      */
-    public static LdapPrincipal getPrincipal( Invocation call )
+    public static LdapPrincipal getPrincipal()
     {
-        ServerContext ctx = ( ServerContext ) call.getContextStack().peek();
+        ServerContext ctx = ( ServerContext ) getContext();
         return ctx.getPrincipal();
     }
+    
+    /**
+     * Returns the current JNDI {@link Context}.
+     */
+    public static LdapContext getContext()
+    {
+        return ( LdapContext ) InvocationStack.getInstance().peek().getCaller();
+    }
 
 
+    /**
+     * Creates a new instance.
+     */
     protected BaseInterceptor()
     {
     }
 
 
-    // ------------------------------------------------------------------------
-    // Interceptor's Invoke Method
-    // ------------------------------------------------------------------------
+    /**
+     * This method does nothing by default.
+     */
+    public void init( ContextFactoryConfiguration factoryCfg, InterceptorConfiguration cfg ) throws NamingException
+    {
+    }
+
 
     /**
-     * Uses a switch on the invocation method type to call the respective member
-     * analog method that does the work of the Interceptor for that Invocation method.
+     * This method does nothing by default.
      */
-    public void process( NextInterceptor nextInterceptor, Invocation call )
-            throws NamingException
+    public void destroy()
     {
-        if ( call instanceof Add )
-        {
-            process( nextInterceptor, ( Add ) call );
-        }
-        else if ( call instanceof Delete )
-        {
-            process( nextInterceptor, ( Delete ) call );
-        }
-        else if ( call instanceof GetMatchedDN )
-        {
-            process( nextInterceptor, ( GetMatchedDN ) call );
-        }
-        else if ( call instanceof GetSuffix )
-        {
-            process( nextInterceptor, ( GetSuffix ) call );
-        }
-        else if ( call instanceof HasEntry )
-        {
-            process( nextInterceptor, ( HasEntry ) call );
-        }
-        else if ( call instanceof IsSuffix )
-        {
-            process( nextInterceptor, ( IsSuffix ) call );
-        }
-        else if ( call instanceof List )
-        {
-            process( nextInterceptor, ( List ) call );
-        }
-        else if ( call instanceof ListSuffixes )
-        {
-            process( nextInterceptor, ( ListSuffixes ) call );
-        }
-        else if ( call instanceof Lookup )
-        {
-            process( nextInterceptor, ( Lookup ) call );
-        }
-        else if ( call instanceof LookupWithAttrIds )
-        {
-            process( nextInterceptor, ( LookupWithAttrIds ) call );
-        }
-        else if ( call instanceof Modify )
-        {
-            process( nextInterceptor, ( Modify ) call );
-        }
-        else if ( call instanceof ModifyMany )
-        {
-            process( nextInterceptor, ( ModifyMany ) call );
-        }
-        else if ( call instanceof ModifyRN )
-        {
-            process( nextInterceptor, ( ModifyRN ) call );
-        }
-        else if ( call instanceof Move )
-        {
-            process( nextInterceptor, ( Move ) call );
-        }
-        else if ( call instanceof MoveAndModifyRN )
-        {
-            process( nextInterceptor, ( MoveAndModifyRN ) call );
-        }
-        else if ( call instanceof Search )
-        {
-            process( nextInterceptor, ( Search ) call );
-        }
-        else
-        {
-            throw new IllegalArgumentException( "Unknown call type: " + call.getClass() );
-        }
     }
 
 
     // ------------------------------------------------------------------------
-    // Invocation Analogs
+    // Interceptor's Invoke Method
     // ------------------------------------------------------------------------
 
+    public void add( NextInterceptor next, String upName, Name normName, Attributes entry ) throws NamingException
+    {
+        next.add( upName, normName, entry );
+    }
+
 
-    protected void process( NextInterceptor nextInterceptor, Add call ) throws NamingException
+    public void delete( NextInterceptor next, Name name ) throws NamingException
     {
-        nextInterceptor.process( call );
+        next.delete( name );
     }
 
 
-    protected void process( NextInterceptor nextInterceptor, Delete call ) throws NamingException
+    public Name getMatchedName( NextInterceptor next, Name dn, boolean normalized ) throws NamingException
     {
-        nextInterceptor.process( call );
+        return next.getMatchedName( dn, normalized );
     }
 
 
-    protected void process( NextInterceptor nextInterceptor, GetMatchedDN call ) throws NamingException
+    public Attributes getRootDSE( NextInterceptor next ) throws NamingException
     {
-        nextInterceptor.process( call );
+        return next.getRootDSE();
     }
 
 
-    protected void process( NextInterceptor nextInterceptor, GetSuffix call ) throws NamingException
+    public Name getSuffix( NextInterceptor next, Name dn, boolean normalized ) throws NamingException
     {
-        nextInterceptor.process( call );
+        return next.getSuffix( dn, normalized );
     }
 
 
-    protected void process( NextInterceptor nextInterceptor, HasEntry call ) throws NamingException
+    public boolean hasEntry( NextInterceptor next, Name name ) throws NamingException
     {
-        nextInterceptor.process( call );
+        return next.hasEntry( name );
     }
 
 
-    protected void process( NextInterceptor nextInterceptor, IsSuffix call ) throws NamingException
+    public boolean isSuffix( NextInterceptor next, Name name ) throws NamingException
     {
-        nextInterceptor.process( call );
+        return next.isSuffix( name );
     }
 
 
-    protected void process( NextInterceptor nextInterceptor, List call ) throws NamingException
+    public NamingEnumeration list( NextInterceptor next, Name base ) throws NamingException
     {
-        nextInterceptor.process( call );
+        return next.list( base );
     }
 
 
-    protected void process( NextInterceptor nextInterceptor, ListSuffixes call ) throws NamingException
+    public Iterator listSuffixes( NextInterceptor next, boolean normalized ) throws NamingException
     {
-        nextInterceptor.process( call );
+        return next.listSuffixes( normalized );
     }
 
 
-    protected void process( NextInterceptor nextInterceptor, Lookup call ) throws NamingException
+    public Attributes lookup( NextInterceptor next, Name dn, String[] attrIds ) throws NamingException
     {
-        nextInterceptor.process( call );
+        return next.lookup( dn, attrIds );
     }
 
 
-    protected void process( NextInterceptor nextInterceptor, LookupWithAttrIds call ) throws NamingException
+    public Attributes lookup( NextInterceptor next, Name name ) throws NamingException
     {
-        nextInterceptor.process( call );
+        return next.lookup( name );
     }
 
 
-    protected void process( NextInterceptor nextInterceptor, Modify call ) throws NamingException
+    public void modify( NextInterceptor next, Name name, int modOp, Attributes mods ) throws NamingException
     {
-        nextInterceptor.process( call );
+        next.modify( name, modOp, mods );
     }
 
 
-    protected void process( NextInterceptor nextInterceptor, ModifyMany call ) throws NamingException
+    public void modify( NextInterceptor next, Name name, ModificationItem[] mods ) throws NamingException
     {
-        nextInterceptor.process( call );
+        next.modify( name, mods );
     }
 
 
-    protected void process( NextInterceptor nextInterceptor, ModifyRN call ) throws NamingException
+    public void modifyRn( NextInterceptor next, Name name, String newRn, boolean deleteOldRn ) throws NamingException
     {
-        nextInterceptor.process( call );
+        next.modifyRn( name, newRn, deleteOldRn );
     }
 
 
-    protected void process( NextInterceptor nextInterceptor, Move call ) throws NamingException
+    public void move( NextInterceptor next, Name oriChildName, Name newParentName, String newRn, boolean deleteOldRn ) throws NamingException
     {
-        nextInterceptor.process( call );
+        next.move( oriChildName, newParentName, newRn, deleteOldRn );
     }
 
 
-    protected void process( NextInterceptor nextInterceptor, MoveAndModifyRN call ) throws NamingException
+    public void move( NextInterceptor next, Name oriChildName, Name newParentName ) throws NamingException
     {
-        nextInterceptor.process( call );
+        next.move( oriChildName, newParentName );
     }
 
 
-    protected void process( NextInterceptor nextInterceptor, Search call ) throws NamingException
+    public NamingEnumeration search( NextInterceptor next, Name base, Map env, ExprNode filter, SearchControls searchCtls ) throws NamingException
     {
-        nextInterceptor.process( call );
+        return next.search( base, env, filter, searchCtls );
     }
 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/interceptor/Interceptor.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/interceptor/Interceptor.java?rev=201550&r1=201549&r2=201550&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/interceptor/Interceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/interceptor/Interceptor.java Thu Jun 23 20:08:31 2005
@@ -17,50 +17,63 @@
 package org.apache.ldap.server.interceptor;
 
 
-import javax.naming.NamingException;
+import java.util.Iterator;
+import java.util.Map;
 
-import org.apache.ldap.server.BackingStore;
-import org.apache.ldap.server.configuration.StartupConfiguration;
-import org.apache.ldap.server.invocation.Invocation;
+import javax.naming.Name;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.ModificationItem;
+import javax.naming.directory.SearchControls;
+
+import org.apache.ldap.common.filter.ExprNode;
+import org.apache.ldap.server.configuration.InterceptorConfiguration;
+import org.apache.ldap.server.jndi.ContextFactoryConfiguration;
+import org.apache.ldap.server.partition.ContextPartition;
+import org.apache.ldap.server.partition.ContextPartitionNexus;
 
 
 /**
- * Filters any directory operations.  You can filter any {@link Invocation}
- * performed on {@link BackingStore}s just like Servlet filters do.
- * <p/>
- * <h2>Interceptor Chaining</h2> Interceptors should usually pass the control
- * of current invocation to the next interceptor by calling
- * {@link NextInterceptor#process(Invocation)}. The flow control is returned
- * when the next interceptor's {@link Interceptor#process(NextInterceptor, Invocation)}
- * returns. You can therefore implement pre-, post-, around- invocation handler
- * by how you place the statement.
+ * Filters invocations on {@link ContextPartitionNexus}.  {@link Interceptor}
+ * filters most method calls performed on {@link ContextPartitionNexus} just
+ * like Servlet filters do.
+ * <p/>
+ * <h2>Interceptor Chaining</h2>
+ * 
+ * Interceptors should usually pass the control
+ * of current invocation to the next interceptor by calling an appropriate method
+ * on {@link NextInterceptor}.  The flow control is returned when the next 
+ * interceptor's filter method returns. You can therefore implement pre-, post-,
+ * around- invocation handler by how you place the statement.  Otherwise, you
+ * can transform the invocation into other(s).
  * <p/>
  * <h3>Pre-invocation Filtering</h3>
  * <pre>
- * public void process( NextInterceptor nextInterceptor, Invocation invocation )
+ * public void delete( NextInterceptor nextInterceptor, Name name )
  * {
  *     System.out.println( "Starting invocation." );
- *     nextInterceptor.process( invocation );
+ *     nextInterceptor.delete( name );
  * }
  * </pre>
  * <p/>
  * <h3>Post-invocation Filtering</h3>
  * <pre>
- * public void process( NextInterceptor nextInterceptor, Invocation invocation )
+ * public void delete( NextInterceptor nextInterceptor, Name name )
  * {
- *     nextInterceptor.process( invocation );
+ *     nextInterceptor.delete( name );
  *     System.out.println( "Invocation ended." );
  * }
  * </pre>
  * <p/>
  * <h3>Around-invocation Filtering</h3>
  * <pre>
- * public void process( NextInterceptor nextInterceptor, Invocation invocation )
+ * public void delete( NextInterceptor nextInterceptor, Name name )
  * {
  *     long startTime = System.currentTimeMillis();
  *     try
  *     {
- *         nextInterceptor.process( invocation );
+ *         nextInterceptor.delete( name );
  *     }
  *     finally
  *     {
@@ -70,21 +83,15 @@
  * }
  * </pre>
  * <p/>
- * <h2>Interceptor Naming Convention</h2>
- * <p/>
- * When you create an implementation of Interceptor, you have to follow the
- * basic class naming convention to avoid others' confusion:
- * <ul>
- *  <li>Class name must be an agent noun or end with <code>Interceptor</code> or
- * <code>Service</code>.</li>
- * </ul>
- * Plus, placing your interceptor implementations into relavent packages like
- * <code>interceptor</code> or ones that reflect its purpose would be a good
- * practice.
- * <p/>
- * <h2>Overriding Default Interceptor Settings</h2>
- * <p/>
- * See {@link StartupConfiguration}.
+ * <h3>Transforming invocations</h3>
+ * <pre>
+ * public void delete( NextInterceptor nextInterceptor, Name name )
+ * {
+ *     // transform deletion into modification.
+ *     Attribute mark = new BasicAttribute( "entryDeleted", "true" );
+ *     nextInterceptor.modify( name, DirContext.REPLACE_ATTRIBUTE, mark );
+ * }
+ * </pre>
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
@@ -93,30 +100,86 @@
 public interface Interceptor
 {
     /**
-     * Intializes this interceptor.  This is invoked by directory
-     * service provider when this intercepter is loaded into interceptor chain.
-     *
-     * @param context the configuration properties for this interceptor
-     * @throws NamingException if failed to initialize this interceptor
+     * Intializes this interceptor.  This is invoked by {@link InterceptorChain}
+     * when this intercepter is loaded into interceptor chain.
      */
-    void init( InterceptorContext context ) throws NamingException;
+    void init( ContextFactoryConfiguration factoryCfg, InterceptorConfiguration cfg ) throws NamingException;
 
 
     /**
-     * Deinitializes this interceptor.  This is invoked by directory
-     * service provider when this intercepter is unloaded from interceptor chain.
+     * Deinitializes this interceptor.  This is invoked by {@link InterceptorChain}
+     * when this intercepter is unloaded from interceptor chain.
      */
     void destroy();
 
-
     /**
-     * Filters a particular invocation.  You can pass control to
-     * <code>nextInterceptor</code> by calling {@link NextInterceptor#process(
-     * org.apache.ldap.server.invocation.Invocation)}
-     *
-     * @param nextInterceptor the next interceptor in the interceptor chain
-     * @param invocation      the invocation to process
-     * @throws NamingException on failures while handling the invocation
+     * Filters {@link ContextPartitionNexus#getRootDSE()} call.
+     */
+    Attributes getRootDSE( NextInterceptor next ) throws NamingException; 
+    /**
+     * Filters {@link ContextPartitionNexus#getMatchedName(Name, boolean)} call.
+     */
+    Name getMatchedName( NextInterceptor next, Name name, boolean normalized ) throws NamingException;
+    /**
+     * Filters {@link ContextPartitionNexus#getSuffix(Name, boolean)} call.
+     */
+    Name getSuffix( NextInterceptor next, Name name, boolean normalized ) throws NamingException;
+    /**
+     * Filters {@link ContextPartitionNexus#listSuffixes(boolean)} call.
+     */
+    Iterator listSuffixes( NextInterceptor next, boolean normalized ) throws NamingException;
+    /**
+     * Filters {@link ContextPartition#delete(Name)} call.
+     */
+    void delete( NextInterceptor next, Name name ) throws NamingException;
+    /**
+     * Filters {@link ContextPartition#add(String, Name, Attributes)} call.
+     */
+    void add( NextInterceptor next, String userProvidedName, Name normalizedName, Attributes entry ) throws NamingException;
+    /**
+     * Filters {@link ContextPartition#modify(Name, int, Attributes)} call.
+     */
+    void modify( NextInterceptor next, Name name, int modOp, Attributes attributes ) throws NamingException;
+    /**
+     * Filters {@link ContextPartition#modify(Name, ModificationItem[])} call.
+     */
+    void modify( NextInterceptor next, Name name, ModificationItem [] items ) throws NamingException;
+    /**
+     * Filters {@link ContextPartition#list(Name)} call.
+     */
+    NamingEnumeration list( NextInterceptor next, Name baseName ) throws NamingException;
+    /**
+     * Filters {@link ContextPartition#search(Name, Map, ExprNode, SearchControls)} call.
+     */
+    NamingEnumeration search( NextInterceptor next, Name baseName, Map environment, ExprNode filter,
+                              SearchControls searchControls ) throws NamingException;
+    /**
+     * Filters {@link ContextPartition#lookup(Name)} call.
+     */
+    Attributes lookup( NextInterceptor next, Name name ) throws NamingException;
+    /**
+     * Filters {@link ContextPartition#lookup(Name, String[])} call.
+     */
+    Attributes lookup( NextInterceptor next, Name dn, String [] attrIds ) throws NamingException;
+    /**
+     * Filters {@link ContextPartition#lookup(Name, String[])} call.
+     */
+    boolean hasEntry( NextInterceptor next, Name name ) throws NamingException;
+    /**
+     * Filters {@link ContextPartition#isSuffix(Name)} call.
+     */
+    boolean isSuffix( NextInterceptor next, Name name ) throws NamingException;
+    /**
+     * Filters {@link ContextPartition#modifyRn(Name, String, boolean)} call.
+     */
+    void modifyRn( NextInterceptor next, Name name, String newRn, boolean deleteOldRn ) throws NamingException;
+    /**
+     * Filters {@link ContextPartition#move(Name, Name)} call.
+     */
+    void move( NextInterceptor next, Name oldName, Name newParentName ) throws NamingException;
+    /**
+     * Filters {@link ContextPartition#move(Name, Name, String, boolean)} call.
      */
-    void process( NextInterceptor nextInterceptor, Invocation invocation ) throws NamingException;
+    void move( NextInterceptor next, Name oldName, Name newParentName, String newRn,
+               boolean deleteOldRn ) throws NamingException;
 }



Mime
View raw message