directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1200408 [1/5] - in /directory/apacheds/branches/apacheds-txns: core-api/ core-api/src/main/java/org/apache/directory/server/core/api/ core-api/src/main/java/org/apache/directory/server/core/api/interceptor/ core-api/src/main/java/org/apach...
Date Thu, 10 Nov 2011 16:21:16 GMT
Author: elecharny
Date: Thu Nov 10 16:21:12 2011
New Revision: 1200408

URL: http://svn.apache.org/viewvc?rev=1200408&view=rev
Log:
Merged back trunks into saya's branch

Added:
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/OperationEnum.java
      - copied unchanged from r1200380, directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/OperationEnum.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/authz/support/
      - copied from r1200371, directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/support/
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java
      - copied unchanged from r1200371, directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
      - copied unchanged from r1200371, directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
Removed:
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/partition/ByPassConstants.java
    directory/apacheds/branches/apacheds-txns/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java
Modified:
    directory/apacheds/branches/apacheds-txns/core/   (props changed)
    directory/apacheds/branches/apacheds-txns/core-api/   (props changed)
    directory/apacheds/branches/apacheds-txns/core-api/pom.xml
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/CoreSession.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/DirectoryService.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/LdapCoreSessionConnection.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/OperationManager.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/BaseInterceptor.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/Interceptor.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/InterceptorChain.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/NextInterceptor.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AbstractOperationContext.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/BindOperationContext.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/CompareOperationContext.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/DeleteOperationContext.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/EntryOperationContext.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/GetRootDSEOperationContext.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ListOperationContext.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/LookupOperationContext.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/OperationContext.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/UnbindOperationContext.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/schema/SchemaPartition.java
    directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockCoreSession.java
    directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockDirectoryService.java
    directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockInterceptor.java
    directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockOperation.java
    directory/apacheds/branches/apacheds-txns/core-integ/   (props changed)
    directory/apacheds/branches/apacheds-txns/core-integ/pom.xml
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/authz/AuthorizationServiceAsNonAdminIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java   (props changed)
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/configuration/PartitionConfigurationIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169IT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783IT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791IT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/RootDSEIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/AddReferralIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/CompareReferralIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/DeleteReferralIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/ModifyReferralIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveAndRenameReferralIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/MoveReferralIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/RenameReferralIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/RenameReferralIgnoreIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/SearchReferralIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/delete/DeletePerfIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/getRootDse/GetRootDsePerfIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/hasEntry/hasEntryPerfIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/list/ListPerfIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/resources/AliasSearchIT.ldif
    directory/apacheds/branches/apacheds-txns/core-jndi/   (props changed)
    directory/apacheds/branches/apacheds-txns/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
    directory/apacheds/branches/apacheds-txns/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
    directory/apacheds/branches/apacheds-txns/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java
    directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
    directory/apacheds/branches/apacheds-txns/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
    directory/apacheds/branches/apacheds-txns/interceptors/admin/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/admin/src/main/java/org/apache/directory/server/core/admin/AdministrativePointInterceptor.java
    directory/apacheds/branches/apacheds-txns/interceptors/authn/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
    directory/apacheds/branches/apacheds-txns/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
    directory/apacheds/branches/apacheds-txns/interceptors/authz/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
    directory/apacheds/branches/apacheds-txns/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
    directory/apacheds/branches/apacheds-txns/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
    directory/apacheds/branches/apacheds-txns/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
    directory/apacheds/branches/apacheds-txns/interceptors/changelog/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/changelog/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
    directory/apacheds/branches/apacheds-txns/interceptors/collective/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/collective/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
    directory/apacheds/branches/apacheds-txns/interceptors/event/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/event/src/main/java/org/apache/directory/server/core/event/EventInterceptor.java
    directory/apacheds/branches/apacheds-txns/interceptors/exception/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/exception/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
    directory/apacheds/branches/apacheds-txns/interceptors/journal/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/journal/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java
    directory/apacheds/branches/apacheds-txns/interceptors/logger/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/logger/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java
    directory/apacheds/branches/apacheds-txns/interceptors/normalization/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/normalization/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
    directory/apacheds/branches/apacheds-txns/interceptors/operational/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/operational/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
    directory/apacheds/branches/apacheds-txns/interceptors/referral/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/referral/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
    directory/apacheds/branches/apacheds-txns/interceptors/schema/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
    directory/apacheds/branches/apacheds-txns/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java
    directory/apacheds/branches/apacheds-txns/interceptors/subtree/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/subtree/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
    directory/apacheds/branches/apacheds-txns/interceptors/trigger/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java
    directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java
    directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
    directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
    directory/apacheds/branches/apacheds-txns/ldap-client-test/   (props changed)
    directory/apacheds/branches/apacheds-txns/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java
    directory/apacheds/branches/apacheds-txns/protocol-ldap/   (props changed)
    directory/apacheds/branches/apacheds-txns/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java
    directory/apacheds/branches/apacheds-txns/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/SimpleMechanismHandler.java
    directory/apacheds/branches/apacheds-txns/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java   (props changed)

Propchange: directory/apacheds/branches/apacheds-txns/core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 10 16:21:12 2011
@@ -5,6 +5,6 @@
 /directory/apacheds/branches/apacheds-jdbm/core:1160768-1164072
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/core:1040956-1043765
 /directory/apacheds/branches/milestones/core:1072812-1075328
-/directory/apacheds/trunk/core:1066126-1067785,1068026-1072718,1072800-1075329,1177661-1186968
+/directory/apacheds/trunk/core:1066126-1067785,1068026-1072718,1072800-1075329,1177661-1200383
 /directory/apacheds/trunk/interceptors/core:1183435-1186974
 /directory/studio/trunk/core:1067786-1067997

Propchange: directory/apacheds/branches/apacheds-txns/core-api/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 10 16:21:12 2011
@@ -3,7 +3,8 @@
 /directory/apacheds/branches/apacheds-dnfactory-experiment/core-api:980138-980934
 /directory/apacheds/branches/apacheds-jdbm/core-api:1160768-1164073
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/core-api:1040956-1043765
+/directory/apacheds/branches/apacheds-osgi/core-api:1185681-1199319
 /directory/apacheds/branches/milestones/core-api:1072812-1075328
-/directory/apacheds/trunk/core-api:1066126-1067785,1068026-1072718,1072800-1075329,1177661-1186967
+/directory/apacheds/trunk/core-api:1066126-1067785,1068026-1072718,1072800-1075329,1177661-1200380
 /directory/apacheds/trunk/interceptors/core-api:1183435-1186974
 /directory/studio/trunk/core-api:1067786-1067997

Modified: directory/apacheds/branches/apacheds-txns/core-api/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/pom.xml?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/pom.xml (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/pom.xml Thu Nov 10 16:21:12 2011
@@ -137,6 +137,12 @@
       </plugin>
       <plugin>
         <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestFile>META-INF/MANIFEST.MF</manifestFile>
+            <addMavenDescriptor>false</addMavenDescriptor>
+          </archive>
+        </configuration>
         <executions>
           <execution>
             <id>attach-tests</id>
@@ -148,17 +154,6 @@
       </plugin>
       
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            <manifestFile>META-INF/MANIFEST.MF</manifestFile>
-            <addMavenDescriptor>false</addMavenDescriptor>
-          </archive>
-        </configuration>
-      </plugin>
-      
-      <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
         <inherited>true</inherited>

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/CoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/CoreSession.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/CoreSession.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/CoreSession.java Thu Nov 10 16:21:12 2011
@@ -325,9 +325,24 @@ public interface CoreSession
     void delete( Dn dn, LogChange log ) throws LdapException;
     
     
+    /**
+     * Deletes an entry in the server.
+     *
+     * @param deleteRequest the delete request containing all the informations 
+     * necessary to delete the entry
+     * @throws Exception if there are failures while deleting the entry
+     */
     void delete( DeleteRequest deleteRequest ) throws LdapException;
     
     
+    /**
+     * Deletes an entry in the server. The operation can be logged if requested
+     *
+     * @param deleteRequest the delete request containing all the informations 
+     * necessary to delete the entry
+     * @param log Tells if we should log the deletion in the ChangeLog interceptor
+     * @throws Exception if there are failures while deleting the entry
+     */
     void delete( DeleteRequest deleteRequest, LogChange log ) throws LdapException;
 
     
@@ -796,8 +811,19 @@ public interface CoreSession
     EntryFilteringCursor search( SearchRequest searchRequest ) throws LdapException;
 
 
+    /**
+     * Unbind from the current LdapSession.
+     * 
+     * @throws LdapException If the operation failed
+     */
     void unbind() throws LdapException;
     
     
+    /**
+     * Unbind from the current LdapSession.
+     * 
+     * @param unbindRequest The Unbind requst, potentially containing some controls
+     * @throws LdapException If the operation failed
+     */
     void unbind( UnbindRequest unbindRequest ) throws LdapException;
 }

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/DirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/DirectoryService.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/DirectoryService.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/DirectoryService.java Thu Nov 10 16:21:12 2011
@@ -319,7 +319,6 @@ public interface DirectoryService extend
     void setAllowAnonymousAccess( boolean enableAnonymousAccess );
 
 
-
     /**
      * Returns interceptors in the server.
      *
@@ -329,11 +328,47 @@ public interface DirectoryService extend
 
 
     /**
+     * Returns interceptors in the server.
+     *
+     * @return the interceptors in the server.
+     */
+    List<String> getInterceptors( OperationEnum operation );
+
+
+    /**
      * Sets the interceptors in the server.
      *
      * @param interceptors the interceptors to be used in the server.
      */
     void setInterceptors( List<Interceptor> interceptors );
+    
+    
+    /**
+     * Add an interceptor in the first position in the interceptor list.
+     * @param interceptor The added interceptor
+     */
+    void addFirst( Interceptor interceptor ) throws LdapException;
+    
+    
+    /**
+     * Add an interceptor in the last position in the interceptor list.
+     * @param interceptor The added interceptor
+     */
+    void addLast( Interceptor interceptor ) throws LdapException;
+    
+    /**
+     * Add an interceptor after a given interceptor in the interceptor list.
+     * @param interceptorName The interceptor name to find
+     * @param interceptor The added interceptor
+     */
+    void addAfter( String interceptorName, Interceptor interceptor );
+    
+    
+    /**
+     * Remove an interceptor from the list of interceptors
+     * @param interceptorName The interceptor to remove
+     */
+    void remove( String interceptorName );
 
 
     /**

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/LdapCoreSessionConnection.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/LdapCoreSessionConnection.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/LdapCoreSessionConnection.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/LdapCoreSessionConnection.java Thu Nov 10 16:21:12 2011
@@ -1183,6 +1183,7 @@ public class LdapCoreSessionConnection i
         BindOperationContext bindContext = new BindOperationContext( null );
         bindContext.setCredentials( bindRequest.getCredentials() );
         bindContext.setDn( bindRequest.getName() );
+        bindContext.setInterceptors( directoryService.getInterceptors( OperationEnum.BIND ) );
 
         OperationManager operationManager = directoryService.getOperationManager();
 

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/OperationManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/OperationManager.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/OperationManager.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/OperationManager.java Thu Nov 10 16:21:12 2011
@@ -48,7 +48,20 @@ import org.apache.directory.shared.ldap.
 public interface OperationManager
 {
     /**
-     * TODO document after determining if this method should be here.
+     * Add an entry into the backend, going through the interceptor chain
+     * 
+     * @param addContext The context containing the information to process the addition
+     * @throws LdapException If the addition can't be processed successfully
+     */
+    void add( AddOperationContext addContext ) throws LdapException;
+    
+    
+    /**
+     * Get the RooDSE entry.
+     * 
+     * @param getRootDseContext The getRootDSE() context
+     * @return The rootDSE if found
+     * @throws LdapException If we can't get back the rootDSE entry
      */
     Entry getRootDSE( GetRootDSEOperationContext  getRootDseContext ) throws LdapException;
 
@@ -68,12 +81,6 @@ public interface OperationManager
     /**
      * TODO document after determining if this method should be here.
      */
-    void add( AddOperationContext addContext ) throws LdapException;
-
-
-    /**
-     * TODO document after determining if this method should be here.
-     */
     void modify( ModifyOperationContext modifyContext ) throws LdapException;
 
 

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/BaseInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/BaseInterceptor.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/BaseInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/BaseInterceptor.java Thu Nov 10 16:21:12 2011
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.server.core.api.interceptor;
 
@@ -23,8 +23,6 @@ package org.apache.directory.server.core
 import java.util.HashSet;
 import java.util.Set;
 
-import javax.naming.Context;
-
 import org.apache.directory.server.core.api.DirectoryService;
 import org.apache.directory.server.core.api.LdapPrincipal;
 import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
@@ -43,7 +41,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.UnbindOperationContext;
-import org.apache.directory.server.core.api.invocation.InvocationStack;
+import org.apache.directory.server.core.api.partition.PartitionNexus;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
@@ -60,6 +58,9 @@ import org.apache.directory.shared.ldap.
  */
 public abstract class BaseInterceptor implements Interceptor
 {
+    /** The interceptor's name. Default to the class name */
+    private String name;
+
     /** A reference to the DirectoryService instance */
     protected DirectoryService directoryService;
 
@@ -116,49 +117,202 @@ public abstract class BaseInterceptor im
 
 
     /**
+     * The final interceptor which acts as a proxy in charge to dialog with the nexus partition.
+     */
+    private final Interceptor FINAL_INTERCEPTOR = new Interceptor()
+    {
+        private PartitionNexus nexus;
+
+
+        public String getName()
+        {
+            return "FINAL";
+        }
+
+
+        public void init( DirectoryService directoryService )
+        {
+            this.nexus = directoryService.getPartitionNexus();
+        }
+
+
+        public void destroy()
+        {
+            // unused
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public void add( NextInterceptor next, AddOperationContext addContext ) throws LdapException
+        {
+            nexus.add( addContext );
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public void bind( BindOperationContext bindContext ) throws LdapException
+        {
+            nexus.bind( bindContext );
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public boolean compare( CompareOperationContext compareContext ) throws LdapException
+        {
+            return nexus.compare( compareContext );
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public void delete( DeleteOperationContext deleteContext ) throws LdapException
+        {
+            nexus.delete( deleteContext );
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public Entry getRootDSE( GetRootDSEOperationContext getRootDseContext ) throws LdapException
+        {
+            return nexus.getRootDSE( getRootDseContext );
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public boolean hasEntry( EntryOperationContext hasEntryContext ) throws LdapException
+        {
+            return nexus.hasEntry( hasEntryContext );
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException
+        {
+            return nexus.list( listContext );
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
+        {
+            return nexus.lookup( lookupContext );
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public void modify( NextInterceptor next, ModifyOperationContext modifyContext ) throws LdapException
+        {
+            nexus.modify( modifyContext );
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public void move( NextInterceptor next, MoveOperationContext moveContext ) throws LdapException
+        {
+            nexus.move( moveContext );
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
+        {
+            nexus.moveAndRename( moveAndRenameContext );
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+        {
+            nexus.rename( renameContext );
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public EntryFilteringCursor search( NextInterceptor next, SearchOperationContext searchContext ) throws LdapException
+        {
+            return nexus.search( searchContext );
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public void unbind( UnbindOperationContext unbindContext ) throws LdapException
+        {
+            nexus.unbind( unbindContext );
+        }
+    };
+
+
+    /**
      * default interceptor name is its class, preventing accidental duplication of interceptors by naming
      * instances differently
      * @return (default, class name) interceptor name
      */
     public String getName()
     {
-        return getClass().getSimpleName();
+        return name;
     }
 
 
     /**
-     * TODO delete this since it uses static access
      * Returns {@link LdapPrincipal} of current context.
+     * 
+     * @param opContext TODO
      * @return the authenticated principal
      */
-    public static LdapPrincipal getPrincipal()
+    public static LdapPrincipal getPrincipal( OperationContext opContext )
     {
-        return getContext().getSession().getEffectivePrincipal();
+        return opContext.getSession().getEffectivePrincipal();
     }
 
 
     /**
-     * TODO delete this since it uses static access
-     * Returns the current JNDI {@link Context}.
-     * @return the context on the invocation stack
+     * Creates a new instance.
      */
-    public static OperationContext getContext()
+    protected BaseInterceptor()
     {
-        return InvocationStack.getInstance().peek();
+        name = getClass().getSimpleName();
     }
 
 
     /**
      * Creates a new instance.
      */
-    protected BaseInterceptor()
+    protected BaseInterceptor( String name )
     {
+        this.name = name;
     }
 
 
     /**
      * This method does nothing by default.
-     * @throws Exception 
+     * @throws Exception
      */
     public void init( DirectoryService directoryService ) throws LdapException
     {
@@ -183,6 +337,8 @@ public abstract class BaseInterceptor im
         TRIGGER_EXECUTION_SUBENTRIES_AT = schemaManager
             .getAttributeType( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT );
         UNIQUE_MEMBER_AT = schemaManager.getAttributeType( SchemaConstants.UNIQUE_MEMBER_AT_OID );
+
+        FINAL_INTERCEPTOR.init( directoryService );
     }
 
 
@@ -194,6 +350,28 @@ public abstract class BaseInterceptor im
     }
 
 
+    /**
+     * Computes the next interceptor to call for a given operation. If we find none,
+     * we return the proxy to the nexus.
+     * 
+     * @param operationContext The operation context
+     * @return The next interceptor in the list for this operation
+     */
+    private Interceptor getNextInterceptor( OperationContext operationContext )
+    {
+        String currentInterceptor = operationContext.getNextInterceptor();
+
+        if ( currentInterceptor.equals( "FINAL" ) )
+        {
+            return FINAL_INTERCEPTOR;
+        }
+
+        Interceptor interceptor = directoryService.getInterceptor( currentInterceptor );
+
+        return interceptor;
+    }
+
+
     // ------------------------------------------------------------------------
     // Interceptor's Invoke Method
     // ------------------------------------------------------------------------
@@ -206,52 +384,175 @@ public abstract class BaseInterceptor im
     }
 
 
-    public void delete( NextInterceptor next, DeleteOperationContext deleteContext ) throws LdapException
+    /**
+     * {@inheritDoc}
+     */
+    public void bind( BindOperationContext bindContext ) throws LdapException
     {
-        next.delete( deleteContext );
+        // Do nothing
     }
 
 
-    public Entry getRootDSE( NextInterceptor next, GetRootDSEOperationContext getRootDseContext ) throws LdapException
+    /**
+     * Calls the next interceptor for the bind operation.
+     * 
+     * @param bindContext The context in which we are executing this operation
+     * @throws LdapException If something went wrong
+     */
+    protected final void next( BindOperationContext bindContext ) throws LdapException
     {
-        return next.getRootDSE( getRootDseContext );
+        Interceptor interceptor = getNextInterceptor( bindContext );
+
+        interceptor.bind( bindContext );
     }
 
 
-    public boolean hasEntry( NextInterceptor next, EntryOperationContext hasEntryContext ) throws LdapException
+    public boolean compare( CompareOperationContext compareContext ) throws LdapException
     {
-        return next.hasEntry( hasEntryContext );
+        // Return false in any case
+        return false;
     }
 
 
-    public EntryFilteringCursor list( NextInterceptor next, ListOperationContext listContext ) throws LdapException
+    /**
+     * Calls the next interceptor for the compare operation.
+     * 
+     * @param compareContext The context in which we are executing this operation
+     * @return a boolean indicating if the comparison is successfull
+     * @throws LdapException If something went wrong
+     */
+    protected final boolean next( CompareOperationContext compareContext ) throws LdapException
     {
-        return next.list( listContext );
+        Interceptor interceptor = getNextInterceptor( compareContext );
+
+        return interceptor.compare( compareContext );
     }
 
 
-    public Entry lookup( NextInterceptor next, LookupOperationContext lookupContext ) throws LdapException
+    /**
+     * {@inheritDoc}
+     */
+    public void delete( DeleteOperationContext deleteContext ) throws LdapException
     {
-        return next.lookup( lookupContext );
+        // Do nothing
     }
 
 
-    public void modify( NextInterceptor next, ModifyOperationContext modifyContext ) throws LdapException
+    /**
+     * Calls the next interceptor for the delete operation.
+     * 
+     * @param deleteContext The context in which we are executing this operation
+     * @throws LdapException If something went wrong
+     */
+    protected final void next( DeleteOperationContext deleteContext ) throws LdapException
     {
-        next.modify( modifyContext );
+        Interceptor interceptor = getNextInterceptor( deleteContext );
+
+        interceptor.delete( deleteContext );
     }
 
 
-    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext )
-        throws LdapException
+    /**
+     * {@inheritDoc}
+     */
+    public Entry getRootDSE( GetRootDSEOperationContext getRootDseContext ) throws LdapException
     {
-        next.moveAndRename( moveAndRenameContext );
+        // Nothing to do
+        return null;
     }
 
 
-    public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+    /**
+     * Calls the next interceptor for the getRootDse operation.
+     * 
+     * @param getRootDseContext The context in which we are executing this operation
+     * @return the rootDSE
+     * @throws LdapException If something went wrong
+     */
+    protected final Entry next( GetRootDSEOperationContext getRootDseContext ) throws LdapException
     {
-        next.rename( renameContext );
+        Interceptor interceptor = getNextInterceptor( getRootDseContext );
+
+        return interceptor.getRootDSE( getRootDseContext );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean hasEntry( EntryOperationContext hasEntryContext ) throws LdapException
+    {
+        // Return false in any case
+        return false;
+    }
+
+
+    /**
+     * Calls the next interceptor for the hasEntry operation.
+     * 
+     * @param hasEntryContext The context in which we are executing this operation
+     * @return a boolean indicating if the entry exists on the server
+     * @throws LdapException If something went wrong
+     */
+    protected final boolean next( EntryOperationContext hasEntryContext ) throws LdapException
+    {
+        Interceptor interceptor = getNextInterceptor( hasEntryContext );
+
+        return interceptor.hasEntry( hasEntryContext );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException
+    {
+        return null;
+    }
+
+
+    /**
+     * Calls the next interceptor for the list operation.
+     * 
+     * @param listContext The context in which we are executing this operation
+     * @return the cursor containing the listed entries
+     * @throws LdapException If something went wrong
+     */
+    protected final EntryFilteringCursor next( ListOperationContext listContext ) throws LdapException
+    {
+        Interceptor interceptor = getNextInterceptor( listContext );
+
+        return interceptor.list( listContext );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
+    {
+        return next( lookupContext );
+    }
+
+
+    /**
+     * Calls the next interceptor for the lookup operation.
+     * 
+     * @param lookupContext The context in which we are executing this operation
+     * @return the Entry containing the found entry
+     * @throws LdapException If something went wrong
+     */
+    protected final Entry next( LookupOperationContext lookupContext ) throws LdapException
+    {
+        Interceptor interceptor = getNextInterceptor( lookupContext );
+
+        return interceptor.lookup( lookupContext );
+    }
+
+
+    public void modify( NextInterceptor next, ModifyOperationContext modifyContext ) throws LdapException
+    {
+        next.modify( modifyContext );
     }
 
 
@@ -264,27 +565,43 @@ public abstract class BaseInterceptor im
     }
 
 
-    public EntryFilteringCursor search( NextInterceptor next, SearchOperationContext searchContext )
-        throws LdapException
+    public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
     {
-        return next.search( searchContext );
+        next.moveAndRename( moveAndRenameContext );
     }
 
 
-    public boolean compare( NextInterceptor next, CompareOperationContext compareContext ) throws LdapException
+    public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
     {
-        return next.compare( compareContext );
+        next.rename( renameContext );
     }
 
 
-    public void bind( NextInterceptor next, BindOperationContext bindContext ) throws LdapException
+    public EntryFilteringCursor search( NextInterceptor next, SearchOperationContext searchContext ) throws LdapException
     {
-        next.bind( bindContext );
+        return next.search( searchContext );
     }
 
 
-    public void unbind( NextInterceptor next, UnbindOperationContext unbindContext ) throws LdapException
+    /**
+     * {@inheritDoc}
+     */
+    public void unbind( UnbindOperationContext unbindContext ) throws LdapException
     {
-        next.unbind( unbindContext );
+        // Nothing to do
+    }
+
+
+    /**
+     * Compute the next interceptor for the unbind operation.
+     * 
+     * @param unbindContext The context in which we are executing this operation
+     * @throws LdapException If something went wrong
+     */
+    protected final void next( UnbindOperationContext unbindContext ) throws LdapException
+    {
+        Interceptor interceptor = getNextInterceptor( unbindContext );
+
+        interceptor.unbind( unbindContext );
     }
 }

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/Interceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/Interceptor.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/Interceptor.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/Interceptor.java Thu Nov 10 16:21:12 2011
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.server.core.api.interceptor;
 
@@ -50,7 +50,7 @@ import org.apache.directory.shared.ldap.
  * 
  * 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 
+ * 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).
@@ -114,7 +114,7 @@ public interface Interceptor
     /**
      * Intializes this interceptor.  This is invoked by {@link InterceptorChain}
      * when this intercepter is loaded into interceptor chain.
-     * @throws Exception 
+     * @throws Exception
      */
     void init( DirectoryService directoryService ) throws LdapException;
 
@@ -127,67 +127,65 @@ public interface Interceptor
 
 
     /**
-     * Filters {@link DefaultPartitionNexus#getRootDSE( GetRootDSEOperationContext )} call.
+     * Filters {@link Partition#add( AddOperationContext )} call.
+     * 
+     * @param next The next {@link Interceptor} in the chain
+     * @param addContext The {@link AddOperationContext} instance
+     * @throws LdapException If we had some error while processing the Add operation
      */
-    Entry getRootDSE( NextInterceptor next, GetRootDSEOperationContext getRootDseContext ) throws LdapException;
+    void add( NextInterceptor next, AddOperationContext addContext ) throws LdapException;
 
 
     /**
-     * Filters {@link DefaultPartitionNexus#compare( CompareOperationContext )} call.
+     * Filters {@link Partition#bind( BindOperationContext )} call.
      */
-    boolean compare( NextInterceptor next, CompareOperationContext compareContext ) throws LdapException;
+    void bind( BindOperationContext bindContext ) throws LdapException;
 
 
     /**
-     * Filters {@link Partition#delete( DeleteOperationContext )} call.
+     * Filters {@link DefaultPartitionNexus#compare( CompareOperationContext )} call.
      */
-    void delete( NextInterceptor next, DeleteOperationContext deleteContext ) throws LdapException;
+    boolean compare( CompareOperationContext compareContext ) throws LdapException;
 
 
     /**
-     * Filters {@link Partition#add( AddOperationContext )} call.
-     * 
-     * @param next The next {@link Interceptor} in the chain
-     * @param addContext The {@link AddOperationContext} instance
-     * @throws LdapException If we had some error while processing the Add operation
+     * Filters {@link Partition#delete( DeleteOperationContext )} call.
      */
-    void add( NextInterceptor next, AddOperationContext addContext ) throws LdapException;
+    void delete( DeleteOperationContext deleteContext ) throws LdapException;
 
 
     /**
-     * Filters {@link Partition#modify( ModifyOperationContext )} call.
+     * Filters {@link DefaultPartitionNexus#getRootDSE( GetRootDSEOperationContext )} call.
+     * 
+     * @param getRootDseContext The getRoot() operation context
+     * @return The RootDSE entry, if found
+     * @throws LdapException If we can't get back the RootDSE entry
      */
-    void modify( NextInterceptor next, ModifyOperationContext modifyContext ) throws LdapException;
+    Entry getRootDSE( GetRootDSEOperationContext getRootDseContext ) throws LdapException;
 
 
     /**
-     * Filters {@link Partition#list( ListOperationContext )} call.
+     * Filters {@link Partition#hasEntry( EntryOperationContext )} call.
      */
-    EntryFilteringCursor list( NextInterceptor next, ListOperationContext listContext ) throws LdapException;
+    boolean hasEntry( EntryOperationContext hasEntryContext ) throws LdapException;
 
 
     /**
-     * Filters {@link Partition#search( SearchOperationContext )} call.
+     * Filters {@link Partition#list( ListOperationContext )} call.
      */
-    EntryFilteringCursor search( NextInterceptor next, SearchOperationContext searchContext ) throws LdapException;
+    EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException;
 
 
     /**
      * Filters {@link Partition#lookup( LookupOperationContext )} call.
      */
-    Entry lookup( NextInterceptor next, LookupOperationContext lookupContext ) throws LdapException;
+    Entry lookup( LookupOperationContext lookupContext ) throws LdapException;
 
 
     /**
-     * Filters {@link Partition#hasEntry( EntryOperationContext )} call.
-     */
-    boolean hasEntry( NextInterceptor next, EntryOperationContext hasEntryContext ) throws LdapException;
-
-
-    /**
-     * Filters {@link Partition#rename( RenameOperationContext )} call.
+     * Filters {@link Partition#modify( ModifyOperationContext )} call.
      */
-    void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException;
+    void modify( NextInterceptor next, ModifyOperationContext modifyContext ) throws LdapException;
 
 
     /**
@@ -203,13 +201,19 @@ public interface Interceptor
 
 
     /**
-     * Filters {@link Partition#bind( BindOperationContext )} call.
+     * Filters {@link Partition#rename( RenameOperationContext )} call.
+     */
+    void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException;
+
+
+    /**
+     * Filters {@link Partition#search( SearchOperationContext )} call.
      */
-    void bind( NextInterceptor next, BindOperationContext bindContext ) throws LdapException;
+    EntryFilteringCursor search( NextInterceptor next, SearchOperationContext searchContext ) throws LdapException;
 
 
     /**
      * Filters {@link Partition#unbind( UnbindOperationContext )} call.
      */
-    void unbind( NextInterceptor next, UnbindOperationContext unbindContext ) throws LdapException;
+    void unbind( UnbindOperationContext unbindContext ) throws LdapException;
 }

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/InterceptorChain.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/InterceptorChain.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/InterceptorChain.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/InterceptorChain.java Thu Nov 10 16:21:12 2011
@@ -46,7 +46,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.UnbindOperationContext;
 import org.apache.directory.server.core.api.invocation.InvocationStack;
-import org.apache.directory.server.core.api.partition.ByPassConstants;
 import org.apache.directory.server.core.api.partition.PartitionNexus;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
@@ -92,91 +91,108 @@ public class InterceptorChain
         }
 
 
-        public boolean compare( NextInterceptor next, CompareOperationContext compareContext ) throws LdapException
+        /**
+         * {@inheritDoc}
+         */
+        public void add( NextInterceptor next, AddOperationContext addContext ) throws LdapException
         {
-            return nexus.compare( compareContext );
+            nexus.add( addContext );
         }
 
 
-        public Entry getRootDSE( NextInterceptor next, GetRootDSEOperationContext getRootDseContext )
-            throws LdapException
+        /**
+         * {@inheritDoc}
+         */
+        public void bind( BindOperationContext bindContext ) throws LdapException
         {
-            return nexus.getRootDSE( getRootDseContext );
+            // Do nothing
         }
 
 
-        public void delete( NextInterceptor next, DeleteOperationContext deleteContext ) throws LdapException
+        /**
+         * {@inheritDoc}
+         */
+        public boolean compare( CompareOperationContext compareContext ) throws LdapException
         {
-            nexus.delete( deleteContext );
+            return false;
         }
 
 
-        public void add( NextInterceptor next, AddOperationContext addContext ) throws LdapException
+        /**
+         * {@inheritDoc}
+         */
+        public void delete( DeleteOperationContext deleteContext ) throws LdapException
         {
-            nexus.add( addContext );
+            // Do nothing
         }
 
 
-        public void modify( NextInterceptor next, ModifyOperationContext modifyContext ) throws LdapException
+        /**
+         * {@inheritDoc}
+         */
+        public Entry getRootDSE( GetRootDSEOperationContext getRootDseContext ) throws LdapException
         {
-            nexus.modify( modifyContext );
+            return null;
         }
 
 
-        public EntryFilteringCursor list( NextInterceptor next, ListOperationContext listContext ) throws LdapException
+        /**
+         * {@inheritDoc}
+         */
+        public boolean hasEntry( EntryOperationContext hasEntryContext ) throws LdapException
         {
-            return nexus.list( listContext );
+            return false;
         }
 
 
-        public EntryFilteringCursor search( NextInterceptor next, SearchOperationContext searchContext )
-            throws LdapException
+        /**
+         * {@inheritDoc}
+         */
+        public EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException
         {
-            return nexus.search( searchContext );
+            return null;
         }
 
 
-        public Entry lookup( NextInterceptor next, LookupOperationContext lookupContext )
-            throws LdapException
+        public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
         {
             return nexus.lookup( lookupContext );
         }
 
 
-        public boolean hasEntry( NextInterceptor next, EntryOperationContext hasEntryContext ) throws LdapException
+        public void modify( NextInterceptor next, ModifyOperationContext modifyContext ) throws LdapException
         {
-            return nexus.hasEntry( hasEntryContext );
+            nexus.modify( modifyContext );
         }
 
 
-        public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
+        public void move( NextInterceptor next, MoveOperationContext moveContext ) throws LdapException
         {
-            nexus.rename( renameContext );
+            nexus.move( moveContext );
         }
 
 
-        public void move( NextInterceptor next, MoveOperationContext moveContext ) throws LdapException
+        public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
         {
-            nexus.move( moveContext );
+            nexus.moveAndRename( moveAndRenameContext );
         }
 
 
-        public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext moveAndRenameContext )
-            throws LdapException
+        public void rename( NextInterceptor next, RenameOperationContext renameContext ) throws LdapException
         {
-            nexus.moveAndRename( moveAndRenameContext );
+            nexus.rename( renameContext );
         }
 
 
-        public void bind( NextInterceptor next, BindOperationContext bindContext ) throws LdapException
+        public EntryFilteringCursor search( NextInterceptor next, SearchOperationContext searchContext ) throws LdapException
         {
-            nexus.bind( bindContext );
+            return nexus.search( searchContext );
         }
 
 
-        public void unbind( NextInterceptor next, UnbindOperationContext unbindContext ) throws LdapException
+        public void unbind( UnbindOperationContext unbindContext ) throws LdapException
         {
-            nexus.unbind( unbindContext );
+            // Do nothing
         }
     };
 
@@ -482,11 +498,6 @@ public class InterceptorChain
             return head;
         }
 
-        if ( opContext.isBypassed( ByPassConstants.BYPASS_ALL ) )
-        {
-            return tail;
-        }
-
         Element next = head;
 
         while ( next != tail )
@@ -505,51 +516,6 @@ public class InterceptorChain
     }
 
 
-    public Entry getRootDSE( GetRootDSEOperationContext getRootDseContext ) throws LdapException
-    {
-        Element entry = getStartingEntry();
-        Interceptor head = entry.interceptor;
-        NextInterceptor next = entry.nextInterceptor;
-
-        try
-        {
-            return head.getRootDSE( next, getRootDseContext );
-        }
-        catch ( LdapException le )
-        {
-            throw le;
-        }
-        catch ( Throwable e )
-        {
-            throwInterceptorException( head, e );
-            throw new InternalError(); // Should be unreachable
-        }
-    }
-
-
-    public boolean compare( CompareOperationContext compareContext ) throws LdapException
-    {
-        Element entry = getStartingEntry();
-        Interceptor head = entry.interceptor;
-        NextInterceptor next = entry.nextInterceptor;
-        compareContext.setOriginalEntry( getOriginalEntry( compareContext ) );
-
-        try
-        {
-            return head.compare( next, compareContext );
-        }
-        catch ( LdapException le )
-        {
-            throw le;
-        }
-        catch ( Throwable e )
-        {
-            throwInterceptorException( head, e );
-            throw new InternalError(); // Should be unreachable
-        }
-    }
-
-
     /**
      * Eagerly populates fields of operation contexts so multiple Interceptors
      * in the processing pathway can reuse this value without performing a
@@ -568,7 +534,7 @@ public class InterceptorChain
             // We have to use the admin session here, otherwise we may have
             // trouble reading the entry due to insufficient access rights
             CoreSession adminSession = opContext.getSession().getDirectoryService().getAdminSession();
-            
+
             LookupOperationContext lookupContext = new LookupOperationContext( adminSession, opContext.getDn(), SchemaConstants.ALL_ATTRIBUTES_ARRAY );
             Entry foundEntry = opContext.getSession().getDirectoryService().getPartitionNexus().lookup( lookupContext );
 
@@ -611,28 +577,6 @@ public class InterceptorChain
     }
 
 
-    public void delete( DeleteOperationContext deleteContext ) throws LdapException
-    {
-        Element entry = getStartingEntry();
-        Interceptor head = entry.interceptor;
-        NextInterceptor next = entry.nextInterceptor;
-        eagerlyPopulateFields( deleteContext );
-
-        try
-        {
-            head.delete( next, deleteContext );
-        }
-        catch ( LdapException le )
-        {
-            throw le;
-        }
-        catch ( Throwable e )
-        {
-            throwInterceptorException( head, e );
-        }
-    }
-
-
     public void add( AddOperationContext addContext ) throws LdapException
     {
         Element node = getStartingEntry();
@@ -654,48 +598,6 @@ public class InterceptorChain
     }
 
 
-    public void bind( BindOperationContext bindContext ) throws LdapException
-    {
-        Element node = getStartingEntry();
-        Interceptor head = node.interceptor;
-        NextInterceptor next = node.nextInterceptor;
-
-        try
-        {
-            head.bind( next, bindContext );
-        }
-        catch ( LdapException le )
-        {
-            throw le;
-        }
-        catch ( Throwable e )
-        {
-            throwInterceptorException( head, e );
-        }
-    }
-
-
-    public void unbind( UnbindOperationContext unbindContext ) throws LdapException
-    {
-        Element node = getStartingEntry();
-        Interceptor head = node.interceptor;
-        NextInterceptor next = node.nextInterceptor;
-
-        try
-        {
-            head.unbind( next, unbindContext );
-        }
-        catch ( LdapException le )
-        {
-            throw le;
-        }
-        catch ( Throwable e )
-        {
-            throwInterceptorException( head, e );
-        }
-    }
-
-
     public void modify( ModifyOperationContext modifyContext ) throws LdapException
     {
         Element entry = getStartingEntry();
@@ -718,28 +620,6 @@ public class InterceptorChain
     }
 
 
-    public EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException
-    {
-        Element entry = getStartingEntry();
-        Interceptor head = entry.interceptor;
-        NextInterceptor next = entry.nextInterceptor;
-
-        try
-        {
-            return head.list( next, listContext );
-        }
-        catch ( LdapException le )
-        {
-            throw le;
-        }
-        catch ( Throwable e )
-        {
-            throwInterceptorException( head, e );
-            throw new InternalError(); // Should be unreachable
-        }
-    }
-
-
     public EntryFilteringCursor search( SearchOperationContext searchContext ) throws LdapException
     {
         Element entry = getStartingEntry();
@@ -762,50 +642,6 @@ public class InterceptorChain
     }
 
 
-    public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
-    {
-        Element entry = getStartingEntry();
-        Interceptor head = entry.interceptor;
-        NextInterceptor next = entry.nextInterceptor;
-
-        try
-        {
-            return head.lookup( next, lookupContext );
-        }
-        catch ( LdapException le )
-        {
-            throw le;
-        }
-        catch ( Throwable e )
-        {
-            throwInterceptorException( head, e );
-            throw new InternalError(); // Should be unreachable
-        }
-    }
-
-
-    public boolean hasEntry( EntryOperationContext hasEntryContext ) throws LdapException
-    {
-        Element entry = getStartingEntry();
-        Interceptor head = entry.interceptor;
-        NextInterceptor next = entry.nextInterceptor;
-
-        try
-        {
-            return head.hasEntry( next, hasEntryContext );
-        }
-        catch ( LdapException le )
-        {
-            throw le;
-        }
-        catch ( Throwable e )
-        {
-            throwInterceptorException( head, e );
-            throw new InternalError(); // Should be unreachable
-        }
-    }
-
-
     public void rename( RenameOperationContext renameContext ) throws LdapException
     {
         Element entry = getStartingEntry();
@@ -945,78 +781,6 @@ public class InterceptorChain
                 }
 
 
-                public boolean compare( CompareOperationContext compareContext ) throws LdapException
-                {
-                    Element next = getNextEntry();
-                    Interceptor interceptor = next.interceptor;
-
-                    try
-                    {
-                        //System.out.println( ">>> Entering into " + interceptor.getClass().getSimpleName() + ", compareRequest" );
-                        boolean result = interceptor.compare( next.nextInterceptor, compareContext );
-                        //System.out.println( "<<< Exiting from " + interceptor.getClass().getSimpleName() + ", compareRequest" );
-                        
-                        return result;
-                    }
-                    catch ( LdapException le )
-                    {
-                        throw le;
-                    }
-                    catch ( Throwable e )
-                    {
-                        throwInterceptorException( interceptor, e );
-                        throw new InternalError(); // Should be unreachable
-                    }
-                }
-
-
-                public Entry getRootDSE( GetRootDSEOperationContext getRootDseContext ) throws LdapException
-                {
-                    Element next = getNextEntry();
-                    Interceptor interceptor = next.interceptor;
-
-                    try
-                    {
-                        //System.out.println( ">>> Entering into " + interceptor.getClass().getSimpleName() + ", getRootDSERequest" );
-                        Entry rootDSE = interceptor.getRootDSE( next.nextInterceptor, getRootDseContext );
-                        //System.out.println( "<<< Exiting from " + interceptor.getClass().getSimpleName() + ", getRootDSERequest" );
-                        
-                        return rootDSE;
-                    }
-                    catch ( LdapException le )
-                    {
-                        throw le;
-                    }
-                    catch ( Throwable e )
-                    {
-                        throwInterceptorException( interceptor, e );
-                        throw new InternalError(); // Should be unreachable
-                    }
-                }
-
-
-                public void delete( DeleteOperationContext deleteContext ) throws LdapException
-                {
-                    Element next = getNextEntry();
-                    Interceptor interceptor = next.interceptor;
-
-                    try
-                    {
-                        //System.out.println( ">>> Entering into " + interceptor.getClass().getSimpleName() + ", deleteRequest" );
-                        interceptor.delete( next.nextInterceptor, deleteContext );
-                        //System.out.println( "<<< Exiting from " + interceptor.getClass().getSimpleName() + ", deleteRequest" );
-                    }
-                    catch ( LdapException le )
-                    {
-                        throw le;
-                    }
-                    catch ( Throwable e )
-                    {
-                        throwInterceptorException( interceptor, e );
-                    }
-                }
-
-
                 public void add( AddOperationContext addContext ) throws LdapException
                 {
                     Element next = getNextEntry();
@@ -1061,31 +825,6 @@ public class InterceptorChain
                 }
 
 
-                public EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException
-                {
-                    Element next = getNextEntry();
-                    Interceptor interceptor = next.interceptor;
-
-                    try
-                    {
-                        //System.out.println( ">>> Entering into " + interceptor.getClass().getSimpleName() + ", listRequest" );
-                        EntryFilteringCursor cursor = interceptor.list( next.nextInterceptor, listContext );
-                        //System.out.println( "<<< Exiting from " + interceptor.getClass().getSimpleName() + ", listRequest" );
-                        
-                        return cursor;
-                    }
-                    catch ( LdapException le )
-                    {
-                        throw le;
-                    }
-                    catch ( Throwable e )
-                    {
-                        throwInterceptorException( interceptor, e );
-                        throw new InternalError(); // Should be unreachable
-                    }
-                }
-
-
                 public EntryFilteringCursor search( SearchOperationContext searchContext ) throws LdapException
                 {
                     Element next = getNextEntry();
@@ -1096,58 +835,8 @@ public class InterceptorChain
                         //System.out.println( ">>> Entering into " + interceptor.getClass().getSimpleName() + ", searchRequest" );
                         EntryFilteringCursor cursor =  interceptor.search( next.nextInterceptor, searchContext );
                         //System.out.println( "<<< Exiting from " + interceptor.getClass().getSimpleName() + ", searchRequest" );
-                        
-                        return cursor;
-                    }
-                    catch ( LdapException le )
-                    {
-                        throw le;
-                    }
-                    catch ( Throwable e )
-                    {
-                        throwInterceptorException( interceptor, e );
-                        throw new InternalError(); // Should be unreachable
-                    }
-                }
-
 
-                public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
-                {
-                    Element next = getNextEntry();
-                    Interceptor interceptor = next.interceptor;
-
-                    try
-                    {
-                        //System.out.println( ">>> Entering into " + interceptor.getClass().getSimpleName() + ", lookupRequest" );
-                        Entry entry = interceptor.lookup( next.nextInterceptor, lookupContext );
-                        //System.out.println( "<<< Exiting from " + interceptor.getClass().getSimpleName() + ", lookupRequest" );
-                        
-                        return entry;
-                    }
-                    catch ( LdapException le )
-                    {
-                        throw le;
-                    }
-                    catch ( Throwable e )
-                    {
-                        throwInterceptorException( interceptor, e );
-                        throw new InternalError(); // Should be unreachable
-                    }
-                }
-
-
-                public boolean hasEntry( EntryOperationContext hasEntryContext ) throws LdapException
-                {
-                    Element next = getNextEntry();
-                    Interceptor interceptor = next.interceptor;
-
-                    try
-                    {
-                        //System.out.println( ">>> Entering into " + interceptor.getClass().getSimpleName() + ", hasEntryRequest" );
-                        boolean hasEntry = interceptor.hasEntry( next.nextInterceptor, hasEntryContext );
-                        //System.out.println( "<<< Exiting from " + interceptor.getClass().getSimpleName() + ", hasEntryRequest" );
-                        
-                        return hasEntry;
+                        return cursor;
                     }
                     catch ( LdapException le )
                     {
@@ -1225,50 +914,6 @@ public class InterceptorChain
                         throwInterceptorException( interceptor, e );
                     }
                 }
-
-
-                public void bind( BindOperationContext bindContext ) throws LdapException
-                {
-                    Element next = getNextEntry();
-                    Interceptor interceptor = next.interceptor;
-
-                    try
-                    {
-                        //System.out.println( ">>> Entering into " + interceptor.getClass().getSimpleName() + ", bindRequest" );
-                        interceptor.bind( next.nextInterceptor, bindContext );
-                        //System.out.println( "<<< Exiting from " + interceptor.getClass().getSimpleName() + ", bindRequest" );
-                    }
-                    catch ( LdapException le )
-                    {
-                        throw le;
-                    }
-                    catch ( Throwable e )
-                    {
-                        throwInterceptorException( interceptor, e );
-                    }
-                }
-
-
-                public void unbind( UnbindOperationContext unbindContext ) throws LdapException
-                {
-                    Element next = getNextEntry();
-                    Interceptor interceptor = next.interceptor;
-
-                    try
-                    {
-                        //System.out.println( ">>> Entering into " + interceptor.getClass().getSimpleName() + ", unbindRequest" );
-                        interceptor.unbind( next.nextInterceptor, unbindContext );
-                        //System.out.println( "<<< Exiting from " + interceptor.getClass().getSimpleName() + ", unbindRequest" );
-                    }
-                    catch ( LdapException le )
-                    {
-                        throw le;
-                    }
-                    catch ( Throwable e )
-                    {
-                        throwInterceptorException( interceptor, e );
-                    }
-                }
             };
         }
     }

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/NextInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/NextInterceptor.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/NextInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/NextInterceptor.java Thu Nov 10 16:21:12 2011
@@ -6,36 +6,27 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.server.core.api.interceptor;
 
 
 import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
-import org.apache.directory.server.core.api.interceptor.context.BindOperationContext;
-import org.apache.directory.server.core.api.interceptor.context.CompareOperationContext;
-import org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext;
-import org.apache.directory.server.core.api.interceptor.context.EntryOperationContext;
-import org.apache.directory.server.core.api.interceptor.context.GetRootDSEOperationContext;
-import org.apache.directory.server.core.api.interceptor.context.ListOperationContext;
-import org.apache.directory.server.core.api.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.MoveAndRenameOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.MoveOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.SearchOperationContext;
-import org.apache.directory.server.core.api.interceptor.context.UnbindOperationContext;
-import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 
 
@@ -49,24 +40,6 @@ import org.apache.directory.shared.ldap.
 public interface NextInterceptor
 {
     /**
-     * Calls the next interceptor's {@link Interceptor#compare( NextInterceptor, CompareOperationContext )}.
-     */
-    boolean compare( CompareOperationContext compareContext ) throws LdapException;
-
-
-    /**
-     * Calls the next interceptor's {@link Interceptor#getRootDSE( NextInterceptor, GetRootDSEOperationContext )}.
-     */
-    Entry getRootDSE( GetRootDSEOperationContext getRootDseContext ) throws LdapException;
-
-
-    /**
-     * Calls the next interceptor's {@link Interceptor#delete(NextInterceptor, DeleteOperationContext )}.
-     */
-    void delete( DeleteOperationContext deleteContext ) throws LdapException;
-
-
-    /**
      * Calls the next interceptor's {@link Interceptor#add( NextInterceptor, AddOperationContext )}.
      */
     void add( AddOperationContext addContext ) throws LdapException;
@@ -77,35 +50,6 @@ public interface NextInterceptor
      */
     void modify( ModifyOperationContext modifyContext ) throws LdapException;
 
-    /**
-     * Calls the next interceptor's {@link Interceptor#list( NextInterceptor, ListOperationContext )}.
-     */
-    EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException;
-
-
-    /**
-     * Calls the next interceptor's {@link Interceptor#search( NextInterceptor, SearchOperationContext searchContext )}.
-     */
-    EntryFilteringCursor search( SearchOperationContext searchContext ) throws LdapException;
-
-
-    /**
-     * Calls the next interceptor's {@link Interceptor#lookup( NextInterceptor, LookupOperationContext )}.
-     */
-    Entry lookup( LookupOperationContext lookupContext ) throws LdapException;
-
-
-    /**
-     * Calls the next interceptor's {@link Interceptor#hasEntry( NextInterceptor, EntryOperationContext )}.
-     */
-    boolean hasEntry( EntryOperationContext hasEntryContext ) throws LdapException;
-
-
-    /**
-     * Calls the next interceptor's {@link Interceptor#rename( NextInterceptor, RenameOperationContext )}.
-     */
-    void rename( RenameOperationContext renameContext ) throws LdapException;
-
 
     /**
      * Calls the next interceptor's {@link Interceptor#move( NextInterceptor, MoveOperationContext )}.
@@ -120,12 +64,13 @@ public interface NextInterceptor
 
 
     /**
-     * Calls the next interceptor's {@link Interceptor#bind( NextInterceptor, BindOperationContext )}
+     * Calls the next interceptor's {@link Interceptor#rename( NextInterceptor, RenameOperationContext )}.
      */
-    void bind( BindOperationContext bindContext ) throws LdapException;
+    void rename( RenameOperationContext renameContext ) throws LdapException;
+
 
     /**
-     * Calls the next interceptor's {@link Interceptor#unbind( NextInterceptor, UnbindOperationContext )}
+     * Calls the next interceptor's {@link Interceptor#search( NextInterceptor, SearchOperationContext searchContext )}.
      */
-    void unbind( UnbindOperationContext unbindContext ) throws LdapException;
+    EntryFilteringCursor search( SearchOperationContext searchContext ) throws LdapException;
 }

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AbstractOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AbstractOperationContext.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AbstractOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/AbstractOperationContext.java Thu Nov 10 16:21:12 2011
@@ -28,6 +28,7 @@ import java.util.Map;
 
 import org.apache.directory.server.core.api.CoreSession;
 import org.apache.directory.server.core.api.LdapPrincipal;
+import org.apache.directory.server.core.api.OperationEnum;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.Modification;
@@ -64,7 +65,13 @@ public abstract class AbstractOperationC
     /** the Interceptors bypassed by this operation */
     protected Collection<String> byPassed;
     
-    protected LdapPrincipal authorizedPrincipal;
+    /** The interceptors to call for this operation */
+    protected List<String> interceptors;
+    
+    /** The current interceptor position */
+    protected int currentInterceptor;
+    
+	protected LdapPrincipal authorizedPrincipal;
     
     /** The core session */
     protected CoreSession session;
@@ -83,6 +90,7 @@ public abstract class AbstractOperationC
     public AbstractOperationContext( CoreSession session )
     {
         this.session = session;
+        currentInterceptor = 0;
     }
     
     
@@ -261,6 +269,32 @@ public abstract class AbstractOperationC
     
     
     /**
+     * {@inheritDoc}
+     */
+    public final void setInterceptors( List<String> interceptors )
+    {
+    	this.interceptors = interceptors;
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public final String getNextInterceptor() 
+    {
+    	if ( currentInterceptor == interceptors.size() )
+    	{
+    		return "FINAL";
+    	}
+    	
+		String interceptor = interceptors.get( currentInterceptor );
+		currentInterceptor++;
+		
+		return interceptor;
+	}
+
+
+    /**
      * Sets the set of bypassed Interceptors.
      * 
      * @param byPassed the set of bypassed Interceptors
@@ -298,20 +332,13 @@ public abstract class AbstractOperationC
     {
         opContext.setPreviousOperation( this );
         next = opContext;
-        opContext.setByPassed( byPassed );
         opContext.setAuthorizedPrincipal( authorizedPrincipal );
     }
     
     
-    public boolean hasEntry( Dn dn, Collection<String> byPassed ) throws LdapException
-    {
-        EntryOperationContext hasEntryContext = new EntryOperationContext( session, dn );
-        setup( hasEntryContext );
-        hasEntryContext.setByPassed( byPassed );
-        return session.getDirectoryService().getOperationManager().hasEntry( hasEntryContext );
-    }
-    
-    
+    /**
+     * {@inheritDoc}
+     */
     public void add( Entry entry, Collection<String> byPassed ) throws LdapException
     {
         AddOperationContext addContext = new AddOperationContext( session, entry );
@@ -321,30 +348,27 @@ public abstract class AbstractOperationC
     }
     
     
-    public void delete( Dn dn, Collection<String> byPassed ) throws LdapException
+    /**
+     * {@inheritDoc}
+     */
+    public void delete( Dn dn ) throws LdapException
     {
         DeleteOperationContext deleteContext = new DeleteOperationContext( session, dn );
         setup( deleteContext );
-        deleteContext.setByPassed( byPassed );
         session.getDirectoryService().getOperationManager().delete( deleteContext );
     }
     
     
-    public void modify( Dn dn, List<Modification> mods, Collection<String> byPassed ) throws LdapException
-    {
-        ModifyOperationContext modifyContext = new ModifyOperationContext( session, dn, mods );
-        setup( modifyContext );
-        modifyContext.setByPassed( byPassed );
-        session.getDirectoryService().getOperationManager().modify( modifyContext );
-    }
-    
-    
-    // TODO - need synchronization here and where we update links
-    public LookupOperationContext newLookupContext( Dn dn )
+    /**
+     * {@inheritDoc}
+     */
+    public boolean hasEntry( Dn dn, Collection<String> byPassed ) throws LdapException
     {
-        LookupOperationContext lookupContext = new LookupOperationContext( session, dn );
-        setup( lookupContext );
-        return lookupContext;
+        EntryOperationContext hasEntryContext = new EntryOperationContext( session, dn );
+        setup( hasEntryContext );
+        hasEntryContext.setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.HAS_ENTRY ) );
+        
+        return session.getDirectoryService().getOperationManager().hasEntry( hasEntryContext );
     }
 
 
@@ -375,7 +399,23 @@ public abstract class AbstractOperationC
         return session.getDirectoryService().getOperationManager().lookup( lookupContext );
     }
     
-
+    
+    public void modify( Dn dn, List<Modification> mods, Collection<String> byPassed ) throws LdapException
+    {
+        ModifyOperationContext modifyContext = new ModifyOperationContext( session, dn, mods );
+        setup( modifyContext );
+        modifyContext.setByPassed( byPassed );
+        session.getDirectoryService().getOperationManager().modify( modifyContext );
+    }
+    
+    
+    // TODO - need synchronization here and where we update links
+    public LookupOperationContext newLookupContext( Dn dn )
+    {
+        LookupOperationContext lookupContext = new LookupOperationContext( session, dn );
+        setup( lookupContext );
+        return lookupContext;
+    }
     public LdapPrincipal getEffectivePrincipal()
     {
         if ( authorizedPrincipal != null )



Mime
View raw message