directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1200408 [5/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
Modified: directory/apacheds/branches/apacheds-txns/interceptors/subtree/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/subtree/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/subtree/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
(original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/subtree/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
Thu Nov 10 16:21:12 2011
@@ -29,7 +29,6 @@ import javax.naming.directory.SearchCont
 
 import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.constants.ServerDNConstants;
-import org.apache.directory.server.core.shared.DefaultCoreSession;
 import org.apache.directory.server.core.api.CoreSession;
 import org.apache.directory.server.core.api.DirectoryService;
 import org.apache.directory.server.core.api.LdapPrincipal;
@@ -41,6 +40,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext;
 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;
@@ -48,11 +48,11 @@ 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.SearchingOperationContext;
-import org.apache.directory.server.core.api.partition.ByPassConstants;
 import org.apache.directory.server.core.api.partition.PartitionNexus;
 import org.apache.directory.server.core.api.subtree.Subentry;
 import org.apache.directory.server.core.api.subtree.SubentryCache;
 import org.apache.directory.server.core.api.subtree.SubtreeEvaluator;
+import org.apache.directory.server.core.shared.DefaultCoreSession;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.controls.search.subentries.SubentriesDecorator;
 import org.apache.directory.shared.ldap.model.constants.AuthenticationLevel;
@@ -111,7 +111,7 @@ public class SubentryInterceptor extends
 
     /** A reference to the nexus for direct backend operations */
     private PartitionNexus nexus;
-    
+
     /** An enum used for the entries update */
     private enum OperationEnum
     {
@@ -179,10 +179,10 @@ public class SubentryInterceptor extends
 
         SUBENTRY_OPATTRS = new AttributeType[]
             {
-                ACCESS_CONTROL_SUBENTRIES_AT,
-                SUBSCHEMA_SUBENTRY_AT,
-                COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT,
-                TRIGGER_EXECUTION_SUBENTRIES_AT
+            ACCESS_CONTROL_SUBENTRIES_AT,
+            SUBSCHEMA_SUBENTRY_AT,
+            COLLECTIVE_ATTRIBUTE_SUBENTRIES_AT,
+            TRIGGER_EXECUTION_SUBENTRIES_AT
             };
 
         ssParser = new SubtreeSpecificationParser( schemaManager );
@@ -321,7 +321,7 @@ public class SubentryInterceptor extends
         if ( opContext.hasRequestControl( SUBENTRY_CONTROL ) )
         {
             SubentriesDecorator subentriesDecorator = ( SubentriesDecorator ) opContext.getRequestControl(
SUBENTRY_CONTROL );
-            return ( ( Subentries ) subentriesDecorator.getDecorated() ).isVisible();
+            return subentriesDecorator.getDecorated().isVisible();
         }
 
         return false;
@@ -369,7 +369,7 @@ public class SubentryInterceptor extends
                         case REPLACE :
                             modifications = getOperationalModsForReplace( subentryDn, candidate
);
                             break;
-                            */
+                             */
                     }
 
                     LOG.debug( "The entry {} has been evaluated to true for subentry {}",
candidate.getDn(), subentryDn );
@@ -412,7 +412,11 @@ public class SubentryInterceptor extends
      */
     private void checkAdministrativeRole( OperationContext opContext, Dn apDn ) throws LdapException
     {
-        Entry administrationPoint = opContext.lookup( apDn, ByPassConstants.LOOKUP_BYPASS,
SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+        CoreSession session = opContext.getSession();
+        LookupOperationContext lookupContext = new LookupOperationContext( session, apDn
);
+        lookupContext.setAttrsId( SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+
+        Entry administrationPoint = directoryService.getPartitionNexus().lookup( lookupContext
);
 
         // The administrativeRole AT must exist and not be null
         Attribute administrativeRole = administrationPoint.get( ADMINISTRATIVE_ROLE_AT );
@@ -516,7 +520,7 @@ public class SubentryInterceptor extends
          */
         SubentryCache subentryCache = directoryService.getSubentryCache();
         SubtreeEvaluator evaluator = directoryService.getEvaluator();
-        
+
         for ( Dn subentryDn : subentryCache )
         {
             Dn apDn = subentryDn.getParent();
@@ -579,7 +583,7 @@ public class SubentryInterceptor extends
         for ( Modification mod : mods )
         {
             if ( mod.getAttribute().getId().equalsIgnoreCase( SchemaConstants.OBJECT_CLASS_AT
) ||
-                 mod.getAttribute().getId().equalsIgnoreCase( SchemaConstants.OBJECT_CLASS_AT_OID
) )
+                mod.getAttribute().getId().equalsIgnoreCase( SchemaConstants.OBJECT_CLASS_AT_OID
) )
             {
                 switch ( mod.getOperation() )
                 {
@@ -616,8 +620,7 @@ public class SubentryInterceptor extends
      * Update the list of modifications with a modification associated with a specific
      * role, if it's requested.
      */
-    private void getOperationalModForReplace( boolean hasRole, AttributeType attributeType,
Entry entry, Dn oldDn, Dn newDn, List<Modification> modifications ) 
-        throws LdapInvalidAttributeValueException
+    private void getOperationalModForReplace( boolean hasRole, AttributeType attributeType,
Entry entry, Dn oldDn, Dn newDn, List<Modification> modifications ) throws LdapInvalidAttributeValueException
     {
         String oldDnStr = oldDn.getNormName();
         String newDnStr = newDn.getNormName();
@@ -645,8 +648,7 @@ public class SubentryInterceptor extends
      * Get the list of modifications to be applied on an entry to inject the operational
attributes
      * associated with the administrative roles.
      */
-    private List<Modification> getOperationalModsForReplace( Dn oldDn, Dn newDn, Subentry
subentry, Entry entry )
-        throws Exception
+    private List<Modification> getOperationalModsForReplace( Dn oldDn, Dn newDn, Subentry
subentry, Entry entry ) throws Exception
     {
         List<Modification> modifications = new ArrayList<Modification>();
 
@@ -970,7 +972,7 @@ public class SubentryInterceptor extends
     /**
      * {@inheritDoc}
      */
-    public void delete( NextInterceptor next, DeleteOperationContext deleteContext ) throws
LdapException
+    public void delete( DeleteOperationContext deleteContext ) throws LdapException
     {
         Dn dn = deleteContext.getDn();
         Entry entry = deleteContext.getEntry();
@@ -1000,12 +1002,12 @@ public class SubentryInterceptor extends
             directoryService.getSubentryCache().removeSubentry( dn );
 
             // Now delete the subentry itself
-            next.delete( deleteContext );
+            next( deleteContext );
         }
         else
         {
             // TODO : deal with AP removal.
-            next.delete( deleteContext );
+            next( deleteContext );
         }
     }
 
@@ -1013,10 +1015,9 @@ public class SubentryInterceptor extends
     /**
      * {@inheritDoc}
      */
-    public EntryFilteringCursor list( NextInterceptor nextInterceptor, ListOperationContext
listContext )
-        throws LdapException
+    public EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException
     {
-        EntryFilteringCursor cursor = nextInterceptor.list( listContext );
+        EntryFilteringCursor cursor = next( listContext );
 
         if ( !isSubentryVisible( listContext ) )
         {
@@ -1114,7 +1115,7 @@ public class SubentryInterceptor extends
                             getOperationalModsForRemove( dn, candidate ) ) );
                     }
                 }
-                
+
                 subentries.close();
             }
             catch ( Exception e )
@@ -1517,8 +1518,7 @@ public class SubentryInterceptor extends
     /**
      * {@inheritDoc}
      */
-    public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext
searchContext )
-        throws LdapException
+    public EntryFilteringCursor search( NextInterceptor nextInterceptor, SearchOperationContext
searchContext ) throws LdapException
     {
         EntryFilteringCursor cursor = nextInterceptor.search( searchContext );
 

Propchange: directory/apacheds/branches/apacheds-txns/interceptors/trigger/
------------------------------------------------------------------------------
    svn:mergeinfo = /directory/apacheds/trunk/interceptors/trigger:1183435-1200383

Modified: directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java
(original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java
Thu Nov 10 16:21:12 2011
@@ -27,8 +27,9 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.directory.server.core.api.CoreSession;
+import org.apache.directory.server.core.api.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.OperationContext;
-import org.apache.directory.server.core.api.partition.ByPassConstants;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
@@ -111,7 +112,12 @@ public abstract class AbstractStoredProc
         {
             Generic_LDAP_CONTEXT ldapCtxParam = ( Generic_LDAP_CONTEXT ) param;
             Dn ldapCtxName = ldapCtxParam.getCtxName();
-            return opContext.lookup( ldapCtxName, ByPassConstants.LOOKUP_BYPASS, SchemaConstants.ALL_ATTRIBUTES_ARRAY
);
+            
+            CoreSession session = opContext.getSession();
+            LookupOperationContext lookupContext = new LookupOperationContext( session, ldapCtxName
);
+            lookupContext.setAttrsId( SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+            
+            return session.getDirectoryService().getPartitionNexus().lookup( lookupContext
);
         }
     };
 }

Modified: directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java
(original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java
Thu Nov 10 16:21:12 2011
@@ -22,8 +22,9 @@ package org.apache.directory.server.core
 
 import java.util.Map;
 
+import org.apache.directory.server.core.api.CoreSession;
+import org.apache.directory.server.core.api.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.OperationContext;
-import org.apache.directory.server.core.api.partition.ByPassConstants;
 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;
@@ -72,6 +73,9 @@ public class DeleteStoredProcedureParame
          * Using LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS here to exclude operational attributes
          * especially subentry related ones like "triggerExecutionSubentries".
          */
-        return opContext.lookup( deletedEntryName, ByPassConstants.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS,
SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+        CoreSession session = opContext.getSession();
+        LookupOperationContext lookupContext = new LookupOperationContext( session, deletedEntryName,
SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
+
+        return session.getDirectoryService().getPartitionNexus().lookup( lookupContext );
     }
 }

Modified: directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
(original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
Thu Nov 10 16:21:12 2011
@@ -24,9 +24,10 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.directory.server.core.api.CoreSession;
+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.OperationContext;
-import org.apache.directory.server.core.api.partition.ByPassConstants;
 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.entry.Modification;
@@ -104,9 +105,12 @@ public class ModifyStoredProcedureParame
     private Entry getEntry( OperationContext opContext ) throws LdapException
     {
         /**
-         * Using LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS here to exclude operational attributes
+         * Exclude operational attributes while doing lookup
          * especially subentry related ones like "triggerExecutionSubentries".
          */
-        return opContext.lookup( modifiedEntryName, ByPassConstants.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS,
SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+        CoreSession session = opContext.getSession();
+        LookupOperationContext lookupContext = new LookupOperationContext( session, modifiedEntryName,
SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
+
+        return session.getDirectoryService().getPartitionNexus().lookup( lookupContext );
     }
 }

Modified: directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
(original)
+++ directory/apacheds/branches/apacheds-txns/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
Thu Nov 10 16:21:12 2011
@@ -27,19 +27,19 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.directory.server.core.api.CoreSession;
 import org.apache.directory.server.core.api.DirectoryService;
 import org.apache.directory.server.core.api.entry.ClonedServerEntry;
 import org.apache.directory.server.core.api.interceptor.BaseInterceptor;
-import org.apache.directory.server.core.api.interceptor.InterceptorChain;
 import org.apache.directory.server.core.api.interceptor.NextInterceptor;
 import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.DeleteOperationContext;
+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.OperationContext;
 import org.apache.directory.server.core.api.interceptor.context.RenameOperationContext;
-import org.apache.directory.server.core.api.partition.ByPassConstants;
 import org.apache.directory.server.core.api.sp.StoredProcEngine;
 import org.apache.directory.server.core.api.sp.StoredProcEngineConfig;
 import org.apache.directory.server.core.api.sp.StoredProcExecutionManager;
@@ -128,7 +128,11 @@ public class TriggerInterceptor extends 
         {
             Dn parentDn = dn.getParent();
 
-            entry = opContext.lookup( parentDn, ByPassConstants.LOOKUP_BYPASS, SchemaConstants.ALL_ATTRIBUTES_ARRAY
);
+            CoreSession session = opContext.getSession();
+            LookupOperationContext lookupContext = new LookupOperationContext( session, parentDn
);
+            lookupContext.setAttrsId( SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+            
+            entry = directoryService.getPartitionNexus().lookup( lookupContext );
         }
 
         Attribute subentries = entry.get( SchemaConstants.TRIGGER_EXECUTION_SUBENTRIES_AT
);
@@ -289,14 +293,14 @@ public class TriggerInterceptor extends 
     }
 
 
-    public void delete( NextInterceptor next, DeleteOperationContext deleteContext ) throws
LdapException
+    public void delete( DeleteOperationContext deleteContext ) throws LdapException
     {
         Dn name = deleteContext.getDn();
 
         // Bypass trigger handling if the service is disabled.
         if ( !enabled )
         {
-            next.delete( deleteContext );
+            next( deleteContext );
             return;
         }
 
@@ -313,7 +317,7 @@ public class TriggerInterceptor extends 
         Map<ActionTime, List<TriggerSpecification>> triggerMap = getActionTimeMappedTriggerSpecsForOperation(
             triggerSpecs, LdapOperation.DELETE );
 
-        next.delete( deleteContext );
+        next( deleteContext );
 
         triggerSpecCache.subentryDeleted( name, deletedEntry );
 
@@ -436,7 +440,10 @@ public class TriggerInterceptor extends 
         // will not be valid at the new location.
         // This will certainly be fixed by the SubentryInterceptor,
         // but after this service.
-        Entry importedEntry = moveAndRenameContext.lookup( oldDn, ByPassConstants.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS,
SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+        CoreSession session = moveAndRenameContext.getSession();
+        LookupOperationContext lookupContext = new LookupOperationContext( session, oldDn,
SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
+
+        Entry importedEntry = directoryService.getPartitionNexus().lookup( lookupContext
);
 
         // As the target entry does not exist yet and so
         // its subentry operational attributes are not there,
@@ -508,7 +515,10 @@ public class TriggerInterceptor extends 
         // will not be valid at the new location.
         // This will certainly be fixed by the SubentryInterceptor,
         // but after this service.
-        Entry importedEntry = moveContext.lookup( dn, ByPassConstants.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS,
SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+        CoreSession session = moveContext.getSession();
+        LookupOperationContext lookupContext = new LookupOperationContext( session, dn, SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY
);
+
+        Entry importedEntry = directoryService.getPartitionNexus().lookup( lookupContext
);
 
         // As the target entry does not exist yet and so
         // its subentry operational attributes are not there,

Propchange: directory/apacheds/branches/apacheds-txns/ldap-client-test/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 10 16:21:12 2011
@@ -1,3 +1,3 @@
 /directory/apacheds/branches/apacheds-jdbm/ldap-client-test:1160768-1164092
 /directory/apacheds/trunk/interceptors/ldap-client-test:1183435-1186974
-/directory/apacheds/trunk/ldap-client-test:1177661-1186939
+/directory/apacheds/trunk/ldap-client-test:1177661-1200369

Modified: directory/apacheds/branches/apacheds-txns/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java
Thu Nov 10 16:21:12 2011
@@ -38,7 +38,6 @@ import org.apache.directory.server.annot
 import org.apache.directory.server.core.annotations.ApplyLdifs;
 import org.apache.directory.server.core.api.interceptor.BaseInterceptor;
 import org.apache.directory.server.core.api.interceptor.Interceptor;
-import org.apache.directory.server.core.api.interceptor.NextInterceptor;
 import org.apache.directory.server.core.api.interceptor.context.BindOperationContext;
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
@@ -455,12 +454,12 @@ public class SimpleBindRequestTest exten
         {
             // Inject the interceptor that waits 1 second when binding 
             // in order to be able to send a request before we get the response
-            Interceptor interceptor = new BaseInterceptor()
+            Interceptor interceptor = new BaseInterceptor( "test" )
             {
                 /**
                  * Wait 1 second before going any further
                  */
-                public void bind( NextInterceptor next, BindOperationContext bindContext
) throws LdapException
+                public void bind( BindOperationContext bindContext ) throws LdapException
                 {
                     // Wait 1 second
                     try
@@ -472,11 +471,11 @@ public class SimpleBindRequestTest exten
                         // Ok, get out
                     }
 
-                    next.bind( bindContext );
+                    next( bindContext );
                 }
             };
             
-            getService().getInterceptorChain().addFirst( interceptor );
+            getService().addFirst( interceptor );
 
             // Send another BindRequest
             BindRequest bindRequest = new BindRequestImpl();
@@ -509,7 +508,7 @@ public class SimpleBindRequestTest exten
         }
         finally
         {
-            getService().getInterceptorChain().remove( "" );
+            getService().remove( "test" );
         }
     }
 

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

Modified: directory/apacheds/branches/apacheds-txns/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java
(original)
+++ directory/apacheds/branches/apacheds-txns/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java
Thu Nov 10 16:21:12 2011
@@ -29,6 +29,7 @@ import org.apache.commons.lang.exception
 import org.apache.directory.server.core.api.CoreSession;
 import org.apache.directory.server.core.api.DirectoryService;
 import org.apache.directory.server.core.api.LdapPrincipal;
+import org.apache.directory.server.core.api.OperationEnum;
 import org.apache.directory.server.core.api.entry.ClonedServerEntry;
 import org.apache.directory.server.core.api.interceptor.context.BindOperationContext;
 import org.apache.directory.server.i18n.I18n;
@@ -111,6 +112,7 @@ public class BindHandler extends LdapReq
         bindContext.setDn( bindRequest.getName() );
         bindContext.setCredentials( bindRequest.getCredentials() );
         bindContext.setIoSession( ldapSession.getIoSession() );
+        bindContext.setInterceptors( ldapServer.getDirectoryService().getInterceptors( OperationEnum.BIND
) );
 
         // Stores the request controls into the operation context
         LdapProtocolUtils.setRequestControls( bindContext, bindRequest );
@@ -168,6 +170,7 @@ public class BindHandler extends LdapReq
             // opContext.setEntry( principalEntry );
 
             // And call the OperationManager bind operation.
+            bindContext.setInterceptors( getLdapServer().getDirectoryService().getInterceptors(
OperationEnum.BIND ) );
             getLdapServer().getDirectoryService().getOperationManager().bind( bindContext
);
 
             // As a result, store the created session in the Core Session

Modified: directory/apacheds/branches/apacheds-txns/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/SimpleMechanismHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/SimpleMechanismHandler.java?rev=1200408&r1=1200407&r2=1200408&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/SimpleMechanismHandler.java
(original)
+++ directory/apacheds/branches/apacheds-txns/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/SimpleMechanismHandler.java
Thu Nov 10 16:21:12 2011
@@ -24,6 +24,7 @@ import javax.security.sasl.SaslServer;
 
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.directory.server.core.api.CoreSession;
+import org.apache.directory.server.core.api.OperationEnum;
 import org.apache.directory.server.core.api.interceptor.context.BindOperationContext;
 import org.apache.directory.server.ldap.LdapProtocolUtils;
 import org.apache.directory.server.ldap.LdapSession;
@@ -60,6 +61,7 @@ public class SimpleMechanismHandler impl
         // Stores the Dn of the user to check, and its password
         bindContext.setDn( bindRequest.getName() );
         bindContext.setCredentials( bindRequest.getCredentials() );
+        bindContext.setInterceptors( ldapSession.getLdapServer().getDirectoryService().getInterceptors(
OperationEnum.BIND ) );
 
         // Stores the request controls into the operation context
         LdapProtocolUtils.setRequestControls( bindContext, bindRequest );

Propchange: directory/apacheds/branches/apacheds-txns/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 10 16:21:12 2011
@@ -11,5 +11,5 @@
 /directory/apacheds/branches/xdbm-refactoring/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java:945827-946347
 /directory/apacheds/trunk/interceptors/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java:1183435-1186974
 /directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java:498338-580500,1066126-1067785,1068026-1072718,1072800-1075329
-/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java:1177661-1186958
+/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java:1177661-1200369
 /directory/studio/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplConsumer.java:1067786-1067997



Mime
View raw message