directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1209069 [1/8] - 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, 01 Dec 2011 13:25:35 GMT
Author: elecharny
Date: Thu Dec  1 13:25:26 2011
New Revision: 1209069

URL: http://svn.apache.org/viewvc?rev=1209069&view=rev
Log:
Merged back trunk into Selcuk's branch

Added:
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/operations/getRootDse/GetRootDseTest.java
      - copied unchanged from r1209047, directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/getRootDse/GetRootDseTest.java
    directory/apacheds/branches/apacheds-txns/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/GetRootDseTest.java
      - copied unchanged from r1209046, directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/GetRootDseTest.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/LdapCoreSessionConnection.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/context/AbstractOperationContext.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/GetRootDseOperationContext.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/HasEntryOperationContext.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/MoveAndRenameOperationContext.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveOperationContext.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/RenameOperationContext.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/SearchOperationContext.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/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/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java
    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/collective/CollectiveAttributeServiceIT.java   (props changed)
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java   (props changed)
    directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
    directory/apacheds/branches/apacheds-txns/core-jndi/   (props changed)
    directory/apacheds/branches/apacheds-txns/core-jndi/pom.xml
    directory/apacheds/branches/apacheds-txns/core-shared/   (props changed)
    directory/apacheds/branches/apacheds-txns/core-shared/pom.xml
    directory/apacheds/branches/apacheds-txns/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java
    directory/apacheds/branches/apacheds-txns/core/pom.xml
    directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/branches/apacheds-txns/interceptors/admin/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/admin/pom.xml
    directory/apacheds/branches/apacheds-txns/interceptors/authn/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/authn/pom.xml
    directory/apacheds/branches/apacheds-txns/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
    directory/apacheds/branches/apacheds-txns/interceptors/authz/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/authz/pom.xml
    directory/apacheds/branches/apacheds-txns/interceptors/changelog/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/changelog/pom.xml
    directory/apacheds/branches/apacheds-txns/interceptors/collective/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/collective/pom.xml
    directory/apacheds/branches/apacheds-txns/interceptors/event/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/event/pom.xml
    directory/apacheds/branches/apacheds-txns/interceptors/exception/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/exception/pom.xml
    directory/apacheds/branches/apacheds-txns/interceptors/journal/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/journal/pom.xml
    directory/apacheds/branches/apacheds-txns/interceptors/normalization/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/normalization/pom.xml
    directory/apacheds/branches/apacheds-txns/interceptors/operational/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/operational/pom.xml
    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/pom.xml
    directory/apacheds/branches/apacheds-txns/interceptors/schema/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/schema/pom.xml
    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/SchemaSubentryManager.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/pom.xml
    directory/apacheds/branches/apacheds-txns/interceptors/trigger/   (props changed)
    directory/apacheds/branches/apacheds-txns/interceptors/trigger/pom.xml
    directory/apacheds/branches/apacheds-txns/jdbm-partition/   (props changed)
    directory/apacheds/branches/apacheds-txns/jdbm-partition/pom.xml
    directory/apacheds/branches/apacheds-txns/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/tree/PartitionTreeTest.java   (props changed)
    directory/apacheds/branches/apacheds-txns/kerberos-test/   (props changed)
    directory/apacheds/branches/apacheds-txns/kerberos-test/src/test/java/org/apache/directory/server/kerberos/kdc/KerberosTcpITest.java
    directory/apacheds/branches/apacheds-txns/kerberos-test/src/test/java/org/apache/directory/server/kerberos/kdc/KerberosUdpITest.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/LdapSSLConnectionTest.java
    directory/apacheds/branches/apacheds-txns/ldif-partition/   (props changed)
    directory/apacheds/branches/apacheds-txns/ldif-partition/pom.xml
    directory/apacheds/branches/apacheds-txns/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/LdifPartitionTest.java
    directory/apacheds/branches/apacheds-txns/protocol-ldap/   (props changed)
    directory/apacheds/branches/apacheds-txns/protocol-ldap/pom.xml
    directory/apacheds/branches/apacheds-txns/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/consumer/ReplicationConsumerImpl.java   (props changed)
    directory/apacheds/branches/apacheds-txns/server-config/   (props changed)
    directory/apacheds/branches/apacheds-txns/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java   (props changed)
    directory/apacheds/branches/apacheds-txns/server-config/src/main/java/org/apache/directory/server/config/beans/InterceptorBean.java
    directory/apacheds/branches/apacheds-txns/server-config/src/main/resources/   (props changed)
    directory/apacheds/branches/apacheds-txns/server-config/src/main/resources/config.ldif
    directory/apacheds/branches/apacheds-txns/server-config/src/test/java/org/apache/directory/server/config/ConfigPartitionReaderTest.java   (props changed)
    directory/apacheds/branches/apacheds-txns/service-builder/   (props changed)
    directory/apacheds/branches/apacheds-txns/service-builder/pom.xml
    directory/apacheds/branches/apacheds-txns/xdbm-partition/   (props changed)
    directory/apacheds/branches/apacheds-txns/xdbm-partition/pom.xml
    directory/apacheds/branches/apacheds-txns/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java

Propchange: directory/apacheds/branches/apacheds-txns/core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  1 13:25:26 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-1201283
+/directory/apacheds/trunk/core:1066126-1067785,1068026-1072718,1072800-1075329,1177661-1209047
 /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 Dec  1 13:25:26 2011
@@ -5,6 +5,6 @@
 /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-1201283
+/directory/apacheds/trunk/core-api:1066126-1067785,1068026-1072718,1072800-1075329,1177661-1209047
 /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=1209069&r1=1209068&r2=1209069&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/pom.xml (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/pom.xml Thu Dec  1 13:25:26 2011
@@ -43,33 +43,23 @@
     </dependency>
 
     <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>apacheds-i18n</artifactId>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
     </dependency>
-
+    
     <dependency>
-      <groupId>${project.groupId}</groupId>
+      <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-core-constants</artifactId>
     </dependency>
     
     <dependency>
-      <groupId>commons-collections</groupId>
-      <artifactId>commons-collections</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>commons-lang</groupId>
-      <artifactId>commons-lang</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>commons-io</groupId>
-      <artifactId>commons-io</artifactId>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-i18n</artifactId>
     </dependency>
     
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
-      <artifactId>shared-ldap-client-api</artifactId>
+      <artifactId>shared-i18n</artifactId>
     </dependency>
     
     <dependency>
@@ -79,18 +69,17 @@
     
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
-      <artifactId>shared-i18n</artifactId>
+      <artifactId>shared-ldap-client-api</artifactId>
     </dependency>
     
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
-      <artifactId>shared-ldap-codec-standalone</artifactId>
-      <scope>provided</scope>
+      <artifactId>shared-ldap-codec-core</artifactId>
     </dependency>
     
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
-      <artifactId>shared-ldap-codec-core</artifactId>
+      <artifactId>shared-ldap-extras-util</artifactId>
     </dependency>
     
     <dependency>
@@ -109,8 +98,8 @@
     </dependency>
     
     <dependency>
-      <groupId>org.apache.directory.shared</groupId>
-      <artifactId>shared-ldap-extras-util</artifactId>
+      <groupId>org.apache.mina</groupId>
+      <artifactId>mina-core</artifactId>
     </dependency>
     
     <dependency>

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=1209069&r1=1209068&r2=1209069&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 Dec  1 13:25:26 2011
@@ -557,7 +557,7 @@ public class LdapCoreSessionConnection i
         }
         catch ( LdapNoPermissionException lnpe )
         {
-            // Special case to deal with insufficient permissions 
+            // Special case to deal with insufficient permissions
             return false;
         }
         catch ( LdapException le )
@@ -570,6 +570,24 @@ public class LdapCoreSessionConnection i
     /**
      * {@inheritDoc}
      */
+    public Entry getRootDse() throws LdapException
+    {
+        return lookup( Dn.ROOT_DSE, SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public Entry getRootDse( String... attributes ) throws LdapException
+    {
+        return lookup( Dn.ROOT_DSE, attributes );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
     public Entry lookup( Dn dn ) throws LdapException
     {
         return _lookup( dn, null );

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=1209069&r1=1209068&r2=1209069&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 Dec  1 13:25:26 2011
@@ -371,7 +371,7 @@ public abstract class BaseInterceptor im
      * @param operationContext The operation context
      * @return The next interceptor in the list for this operation
      */
-    private Interceptor getNextInterceptor( OperationContext operationContext )
+    protected Interceptor getNextInterceptor( OperationContext operationContext )
     {
         String currentInterceptor = operationContext.getNextInterceptor();
 

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=1209069&r1=1209068&r2=1209069&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 Dec  1 13:25:26 2011
@@ -21,17 +21,14 @@ package org.apache.directory.server.core
 
 
 import java.util.Collection;
-import java.util.Collections;
 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.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;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -110,18 +107,27 @@ public abstract class AbstractOperationC
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public CoreSession getSession()
     {
         return session;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void setSession( CoreSession session )
     {
         this.session = session;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     protected void setAuthorizedPrincipal( LdapPrincipal authorizedPrincipal )
     {
         this.authorizedPrincipal = authorizedPrincipal;
@@ -148,48 +154,72 @@ public abstract class AbstractOperationC
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void addRequestControl( Control requestControl )
     {
         requestControls.put( requestControl.getOid(), requestControl );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public Control getRequestControl( String numericOid )
     {
         return requestControls.get( numericOid );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean hasRequestControl( String numericOid )
     {
         return requestControls.containsKey( numericOid );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean hasRequestControls()
     {
         return ! requestControls.isEmpty();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void addResponseControl( Control responseControl )
     {
         responseControls.put( responseControl.getOid(), responseControl );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public Control getResponseControl( String numericOid )
     {
         return responseControls.get( numericOid );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean hasResponseControl( String numericOid )
     {
         return responseControls.containsKey( numericOid );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public Control[] getResponseControls()
     {
         if ( responseControls.isEmpty() )
@@ -201,18 +231,27 @@ public abstract class AbstractOperationC
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean hasResponseControls()
     {
         return ! responseControls.isEmpty();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public int getResponseControlCount()
     {
         return responseControls.size();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void addRequestControls( Control[] requestControls )
     {
         for ( Control c : requestControls )
@@ -222,6 +261,9 @@ public abstract class AbstractOperationC
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void setRequestControls( Map<String, Control> requestControls )
     {
         this.requestControls = requestControls;
@@ -253,22 +295,6 @@ public abstract class AbstractOperationC
 
 
     /**
-     * Gets the set of bypassed Interceptors.
-     *
-     * @return the set of bypassed Interceptors
-     */
-    public Collection<String> getByPassed()
-    {
-        if ( byPassed == null )
-        {
-            return Collections.emptyList();
-        }
-
-        return Collections.unmodifiableCollection( byPassed );
-    }
-
-
-    /**
      * {@inheritDoc}
      */
     public final void setInterceptors( List<String> interceptors )
@@ -292,45 +318,30 @@ public abstract class AbstractOperationC
 
         return interceptor;
     }
-
-
+    
+    
     /**
-     * Sets the set of bypassed Interceptors.
-     * 
-     * @param byPassed the set of bypassed Interceptors
+     * @return The number of the current interceptor in the list
      */
-    public void setByPassed( Collection<String> byPassed )
+    public int getCurrentInterceptor()
     {
-        this.byPassed = byPassed;
+        return currentInterceptor;
     }
-
-
+    
+    
     /**
-     * Checks to see if an Interceptor is bypassed for this operation.
-     *
-     * @param interceptorName the interceptorName of the Interceptor to check for bypass
-     * @return true if the Interceptor should be bypassed, false otherwise
-     */
-    public boolean isBypassed( String interceptorName )
-    {
-        return byPassed != null && byPassed.contains( interceptorName );
-    }
-
-
-    /**
-     * Checks to see if any Interceptors are bypassed by this operation.
-     *
-     * @return true if at least one bypass exists
+     * Sets the current interceptor number to a new value.
+     * 
+     * @param currentInterceptor The new current interceptor value
      */
-    public boolean hasBypass()
+    public void setCurrentInterceptor( int currentInterceptor )
     {
-        return byPassed != null && !byPassed.isEmpty();
+        this.currentInterceptor = currentInterceptor;
     }
 
 
     private void setup( AbstractOperationContext opContext )
     {
-        opContext.setPreviousOperation( this );
         next = opContext;
         opContext.setAuthorizedPrincipal( authorizedPrincipal );
     }
@@ -339,18 +350,6 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
-    public void add( Entry entry, Collection<String> byPassed ) throws LdapException
-    {
-        AddOperationContext addContext = new AddOperationContext( session, entry );
-        setup( addContext );
-        addContext.setByPassed( byPassed );
-        session.getDirectoryService().getOperationManager().add( addContext );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public void delete( Dn dn ) throws LdapException
     {
         DeleteOperationContext deleteContext = new DeleteOperationContext( session, dn );
@@ -362,16 +361,6 @@ public abstract class AbstractOperationC
     /**
      * {@inheritDoc}
      */
-    public boolean hasEntry( Dn dn, Collection<String> byPassed ) throws LdapException
-    {
-        HasEntryOperationContext hasEntryContext = new HasEntryOperationContext( session, dn );
-        setup( hasEntryContext );
-        hasEntryContext.setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.HAS_ENTRY ) );
-
-        return session.getDirectoryService().getOperationManager().hasEntry( hasEntryContext );
-    }
-
-
     public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
     {
         if ( lookupContext != next )
@@ -383,39 +372,22 @@ public abstract class AbstractOperationC
     }
 
 
-    public Entry lookup( Dn dn, Collection<String> byPassed ) throws LdapException
-    {
-        LookupOperationContext lookupContext = newLookupContext( dn );
-        lookupContext.setByPassed( byPassed );
-        return session.getDirectoryService().getOperationManager().lookup( lookupContext );
-    }
-
-
-    public Entry lookup( Dn dn, Collection<String> byPassed, String... attrIds ) throws LdapException
-    {
-        LookupOperationContext lookupContext = newLookupContext( dn );
-        lookupContext.setByPassed( byPassed );
-        lookupContext.setAttrsId( attrIds );
-        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
+    /**
+     * {@inheritDoc}
+     */
     public LookupOperationContext newLookupContext( Dn dn )
     {
         LookupOperationContext lookupContext = new LookupOperationContext( session, dn );
         setup( lookupContext );
+        
         return lookupContext;
     }
+
+    
+    /**
+     * {@inheritDoc}
+     */
     public LdapPrincipal getEffectivePrincipal()
     {
         if ( authorizedPrincipal != null )
@@ -430,60 +402,6 @@ public abstract class AbstractOperationC
     // -----------------------------------------------------------------------
     // OperationContext Linked List Methods
     // -----------------------------------------------------------------------
-
-
-    public boolean isFirstOperation()
-    {
-        return previous == null;
-    }
-
-
-    public OperationContext getFirstOperation()
-    {
-        if ( previous == null )
-        {
-            return this;
-        }
-
-        return previous.getFirstOperation();
-    }
-
-
-    public OperationContext getLastOperation()
-    {
-        if ( next == null )
-        {
-            return this;
-        }
-
-        return next.getLastOperation();
-    }
-
-
-    public OperationContext getNextOperation()
-    {
-        return next;
-    }
-
-
-    protected void setNextOperation( OperationContext next )
-    {
-        this.next = next;
-    }
-
-
-    public OperationContext getPreviousOperation()
-    {
-        return previous;
-    }
-
-
-    protected void setPreviousOperation( OperationContext previous )
-    {
-        this.previous = previous;
-    }
-
-
     /**
      * @param entry the entry to set
      */

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/CompareOperationContext.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/CompareOperationContext.java?rev=1209069&r1=1209068&r2=1209069&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/CompareOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/CompareOperationContext.java Thu Dec  1 13:25:26 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.context;
 
@@ -58,7 +58,11 @@ public class CompareOperationContext ext
     public CompareOperationContext( CoreSession session )
     {
         super( session );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) );
+        }
     }
 
     
@@ -70,7 +74,11 @@ public class CompareOperationContext ext
     public CompareOperationContext( CoreSession session, Dn dn )
     {
         super( session, dn );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) );
+        }
     }
 
     
@@ -83,7 +91,11 @@ public class CompareOperationContext ext
     {
         super( session );
         this.oid = oid;
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) );
+        }
     }
 
     
@@ -96,7 +108,11 @@ public class CompareOperationContext ext
     {
         super( session, dn );
         this.oid = oid;
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) );
+        }
     }
 
     
@@ -110,7 +126,11 @@ public class CompareOperationContext ext
         super( session, dn );
         this.oid = oid;
         this.value = value;
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) );
+        }
     }
 
     
@@ -120,7 +140,11 @@ public class CompareOperationContext ext
         this.oid = compareRequest.getAttributeId();
         this.value = compareRequest.getAssertionValue();
         this.requestControls = compareRequest.getControls();
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.COMPARE ) );
+        }
         
         if ( requestControls.containsKey( ManageDsaIT.OID ) )
         {
@@ -136,7 +160,7 @@ public class CompareOperationContext ext
     /**
      * @return The compared OID
      */
-    public String getOid() 
+    public String getOid()
     {
         return oid;
     }
@@ -146,7 +170,7 @@ public class CompareOperationContext ext
      * Set the compared OID
      * @param oid The compared OID
      */
-    public void setOid( String  oid ) 
+    public void setOid( String  oid )
     {
         this.oid = oid;
     }
@@ -155,7 +179,7 @@ public class CompareOperationContext ext
     /**
      * @return The value to compare
      */
-    public Value<?> getValue() 
+    public Value<?> getValue()
     {
         return value;
     }

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/DeleteOperationContext.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/DeleteOperationContext.java?rev=1209069&r1=1209068&r2=1209069&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/DeleteOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/DeleteOperationContext.java Thu Dec  1 13:25:26 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.context;
 
@@ -43,7 +43,11 @@ public class DeleteOperationContext exte
     public DeleteOperationContext( CoreSession session )
     {
         super( session );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.DELETE ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.DELETE ) );
+        }
     }
     
 
@@ -55,14 +59,23 @@ public class DeleteOperationContext exte
     public DeleteOperationContext( CoreSession session, Dn deleteDn )
     {
         super( session, deleteDn );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.DELETE ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.DELETE ) );
+        }
     }
 
 
     public DeleteOperationContext( CoreSession session, DeleteRequest deleteRequest )
     {
         super( session, deleteRequest.getName() );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.DELETE ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.DELETE ) );
+        }
+        
         requestControls = deleteRequest.getControls();
         
         if ( requestControls.containsKey( ManageDsaIT.OID ) )

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/GetRootDseOperationContext.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/GetRootDseOperationContext.java?rev=1209069&r1=1209068&r2=1209069&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/GetRootDseOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/GetRootDseOperationContext.java Thu Dec  1 13:25:26 2011
@@ -39,7 +39,11 @@ public class GetRootDseOperationContext 
     public GetRootDseOperationContext( CoreSession session )
     {
         super( session );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.GET_ROOT_DSE ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.GET_ROOT_DSE ) );
+        }
     }
     
     
@@ -51,7 +55,11 @@ public class GetRootDseOperationContext 
     public GetRootDseOperationContext( CoreSession session, Dn dn )
     {
         super( session, dn );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.GET_ROOT_DSE ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.GET_ROOT_DSE ) );
+        }
     }
     
     

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/HasEntryOperationContext.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/HasEntryOperationContext.java?rev=1209069&r1=1209068&r2=1209069&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/HasEntryOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/HasEntryOperationContext.java Thu Dec  1 13:25:26 2011
@@ -40,7 +40,11 @@ public class HasEntryOperationContext ex
     public HasEntryOperationContext( CoreSession session )
     {
         super( session );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.HAS_ENTRY ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.HAS_ENTRY ) );
+        }
     }
     
     
@@ -52,7 +56,11 @@ public class HasEntryOperationContext ex
     public HasEntryOperationContext( CoreSession session, Dn entryDn )
     {
         super( session, entryDn );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.HAS_ENTRY ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.HAS_ENTRY ) );
+        }
     }
     
 

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ListOperationContext.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/ListOperationContext.java?rev=1209069&r1=1209068&r2=1209069&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ListOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/ListOperationContext.java Thu Dec  1 13:25:26 2011
@@ -42,7 +42,11 @@ public class ListOperationContext extend
     public ListOperationContext( CoreSession session )
     {
         super( session );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.LIST ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.LIST ) );
+        }
     }
 
 
@@ -54,7 +58,11 @@ public class ListOperationContext extend
     public ListOperationContext( CoreSession session, Dn dn )
     {
         super( session, dn );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.LIST ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.LIST ) );
+        }
     }
 
 
@@ -69,7 +77,11 @@ public class ListOperationContext extend
     public ListOperationContext( CoreSession session, Dn dn, Set<AttributeTypeOptions> returningAttributes )
     {
         super( session, dn, returningAttributes );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.LIST ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.LIST ) );
+        }
     }
 
 

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/LookupOperationContext.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/LookupOperationContext.java?rev=1209069&r1=1209068&r2=1209069&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/LookupOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/LookupOperationContext.java Thu Dec  1 13:25:26 2011
@@ -148,6 +148,7 @@ public class LookupOperationContext exte
         if ( ( attrsId != null ) && ( attrsId.length > 0 ) )
         {
             this.attrsId = new ArrayList<String>( Arrays.asList( attrsId ) );
+            int nbNoAttribute = 0;
 
             // filter out the '+' and '*' and set boolean parameters
             for ( String id : this.attrsId )
@@ -163,11 +164,7 @@ public class LookupOperationContext exte
                 else if ( id.equals( SchemaConstants.NO_ATTRIBUTE ) )
                 {
                     noAttribute = true;
-                    allOperational = null;
-                    allUser = null;
-
-                    // We can stop here
-                    break;
+                    nbNoAttribute++;
                 }
             }
 
@@ -183,7 +180,16 @@ public class LookupOperationContext exte
 
             if ( noAttribute != null )
             {
-                this.attrsId.clear();
+                if ( attrsId.length == nbNoAttribute )
+                {
+                    this.attrsId.clear();
+                }
+                else
+                {
+                    // We have to ignore the 1.1
+                    this.attrsId.remove( SchemaConstants.NO_ATTRIBUTE );
+                    noAttribute = false;
+                }
             }
         }
     }
@@ -262,7 +268,7 @@ public class LookupOperationContext exte
 
 
     /**
-     * @return The flag telling if the "+" attribute has been used
+     * @return The flag telling if the "1.1" attribute has been used
      */
     public boolean hasNoAttribute()
     {

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveAndRenameOperationContext.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/MoveAndRenameOperationContext.java?rev=1209069&r1=1209068&r2=1209069&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveAndRenameOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveAndRenameOperationContext.java Thu Dec  1 13:25:26 2011
@@ -47,7 +47,11 @@ public class MoveAndRenameOperationConte
     public MoveAndRenameOperationContext( CoreSession session )
     {
         super( session );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MOVE_AND_RENAME ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MOVE_AND_RENAME ) );
+        }
     }
 
 
@@ -63,7 +67,11 @@ public class MoveAndRenameOperationConte
     {
         super( session, oldDn, newRdn, delOldRdn );
         this.newSuperiorDn = newSuperiorDn;
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MOVE_AND_RENAME ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MOVE_AND_RENAME ) );
+        }
 
         try
         {
@@ -81,7 +89,11 @@ public class MoveAndRenameOperationConte
         // super sets the newRdn and the delOldRdn members and tests
         super( session, modifyDnRequest );
         this.newSuperiorDn = modifyDnRequest.getNewSuperior();
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MOVE_AND_RENAME ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MOVE_AND_RENAME ) );
+        }
 
         if ( newSuperiorDn == null )
         {

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveOperationContext.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/MoveOperationContext.java?rev=1209069&r1=1209068&r2=1209069&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/MoveOperationContext.java Thu Dec  1 13:25:26 2011
@@ -58,7 +58,11 @@ public class MoveOperationContext extend
     public MoveOperationContext( CoreSession session )
     {
         super( session );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MOVE ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MOVE ) );
+        }
     }
 
 
@@ -71,7 +75,11 @@ public class MoveOperationContext extend
         this.newSuperior = newSuperior;
         oldSuperior = oldDn.getParent();
         rdn = ( oldDn.getRdn().clone() );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MOVE ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MOVE ) );
+        }
 
         try
         {
@@ -88,7 +96,11 @@ public class MoveOperationContext extend
     {
         super( session, modifyDnRequest.getName() );
         this.newSuperior = modifyDnRequest.getNewSuperior();
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MOVE ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.MOVE ) );
+        }
 
         if ( newSuperior == null )
         {

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/OperationContext.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/OperationContext.java?rev=1209069&r1=1209068&r2=1209069&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/OperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/OperationContext.java Thu Dec  1 13:25:26 2011
@@ -6,29 +6,26 @@
  *  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.context;
 
 
-import java.util.Collection;
 import java.util.List;
 
 import org.apache.directory.server.core.api.CoreSession;
 import org.apache.directory.server.core.api.LdapPrincipal;
 import org.apache.directory.server.core.api.entry.ClonedServerEntry;
-import org.apache.directory.server.core.api.interceptor.Interceptor;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -43,54 +40,23 @@ import org.apache.directory.shared.ldap.
 public interface OperationContext
 {
     /**
-     * Checks to see if this operation is the first operation in a chain of 
-     * operations performed on the DirectoryService.  The first operation in  
-     * a sequence of operations, is not a byproduct of another operation 
-     * unlike operations following in the sequence.  The other operations 
-     * following the first, occur as a side effect to complete this first 
-     * operation.
-     * 
-     * @return true if the operation is the first, false otherwise
-     */
-    boolean isFirstOperation();
-    
-    
-    /**
-     * Gets the first, direct operation issued against the DirectoryService.
-     *
-     * @return the first, direct operation issued 
-     */
-    OperationContext getFirstOperation();
-    
-    
-    /**
-     * Gets the previous, operation issued on the DirectoryService.
-     *
-     * @return the previous, operation issued
-     */
-    OperationContext getPreviousOperation();
-    
-    
-    /**
-     * Gets the next, indirect operation issued on the DirectoryService.
-     *
-     * @return the next, indirect operation issued 
+     * @return The number of the current interceptor in the list
      */
-    OperationContext getNextOperation();
+    int getCurrentInterceptor();
     
     
     /**
-     * Gets the last, operation issued on the DirectoryService.
-     *
-     * @return the last, operation issued
+     * Sets the current interceptor number to a new value.
+     * 
+     * @param currentInterceptor The new current interceptor value
      */
-    OperationContext getLastOperation();
+    void setCurrentInterceptor( int currentInterceptor );
 
 
     /**
-     * Gets the effective principal for this operation which may not be the 
+     * Gets the effective principal for this operation which may not be the
      * same as the authenticated principal when the session for this context
-     * has an explicit authorization id, or this operation was applied with 
+     * has an explicit authorization id, or this operation was applied with
      * the proxy authorization control.
      * 
      * @see CoreSession#getAuthenticatedPrincipal()
@@ -117,23 +83,23 @@ public interface OperationContext
     /**
      * Gets the server entry associated with the target Dn of this
      * OperationContext.  The entry associated with the Dn may be altered
-     * during the course of processing an LDAP operation through the 
+     * during the course of processing an LDAP operation through the
      * InterceptorChain.  This place holder is put here to prevent the need
      * for repetitive lookups of the target entry.  Furthermore the returned
      * entry may be altered by any Interceptor in the chain and this is why a
-     * ClonedServerEntry is returned instead of a Entry.  A 
+     * ClonedServerEntry is returned instead of a Entry.  A
      * ClonedServerEntry has an immutable reference to the original state of
      * the target entry.  The original state can be accessed via a call to
-     * {@link ClonedServerEntry#getOriginalEntry()}.  The return value may be 
-     * null in which case any lookup performed to access it may set it to 
+     * {@link ClonedServerEntry#getOriginalEntry()}.  The return value may be
+     * null in which case any lookup performed to access it may set it to
      * prevent the need for subsequent lookups.
      * 
-     * Also note that during the course of handling some operations such as 
+     * Also note that during the course of handling some operations such as
      * those that rename, move or rename and move the entry, may alter the Dn
      * of this entry.  Interceptor implementors should not presume the Dn or
-     * the values contained in this entry are currently what is present in the 
-     * DIT.  The original entry contained in the ClonedServerEntry shoudl be 
-     * used as the definitive source of information about the state of the 
+     * the values contained in this entry are currently what is present in the
+     * DIT.  The original entry contained in the ClonedServerEntry shoudl be
+     * used as the definitive source of information about the state of the
      * entry in the DIT before returning from the Partition subsystem.
      * 
      * @return target entry associated with the Dn of this OperationContext
@@ -158,7 +124,7 @@ public interface OperationContext
     void addResponseControl( Control responseControl );
     
     
-    /** 
+    /**
      * Checks to see if a response control is present on this operation.
      *
      * @param numericOid the numeric OID of the control also known as it's type OID
@@ -179,7 +145,7 @@ public interface OperationContext
     /**
      * Gets all the response controls producted during this operation.
      *
-     * @return an array over all the response controls 
+     * @return an array over all the response controls
      */
     Control[] getResponseControls();
     
@@ -208,7 +174,7 @@ public interface OperationContext
     void addRequestControl( Control requestControl );
     
     
-    /** 
+    /**
      * Checks to see if a request control is present on this request.
      *
      * @param numericOid the numeric OID of the control also known as it's type OID
@@ -249,31 +215,7 @@ public interface OperationContext
     
     
     /**
-     * Checks to see if an Interceptor is bypassed for this operation.
-     *
-     * @param interceptorName the interceptorName of the Interceptor to check for bypass
-     * @return true if the Interceptor should be bypassed, false otherwise
-     */
-    boolean isBypassed( String interceptorName );
-
-
-    /**
-     * Checks to see if any Interceptors are bypassed by this Invocation.
-     *
-     * @return true if at least one bypass exists
-     */
-    boolean hasBypass();
-    
-    
-    /**
-     * Gets the set of bypassed Interceptors.
-     *
-     * @return the set of bypassed Interceptors
-     */
-    Collection<String> getByPassed();
-    
-    /**
-     * Gets the next interceptor in the list of interceptors. The 
+     * Gets the next interceptor in the list of interceptors. The
      * position in the list will be incremented.
      * 
      * @return The next interceptor from the list of interceptors
@@ -290,14 +232,6 @@ public interface OperationContext
     
     
     /**
-     * Sets the set of bypassed Interceptors.
-     * 
-     * @param byPassed the set of bypassed Interceptors
-     */
-    void setByPassed( Collection<String> byPassed );
-    
-    
-    /**
      * Gets the session associated with this operation.
      *
      * @return the session associated with this operation
@@ -308,30 +242,16 @@ public interface OperationContext
     // -----------------------------------------------------------------------
     // Utility Factory Methods to Create New OperationContexts
     // -----------------------------------------------------------------------
-    
-    
     LookupOperationContext newLookupContext( Dn dn );
 
     
-    Entry lookup( Dn dn, Collection<String> byPass ) throws LdapException;
-    
-    
-    Entry lookup( Dn dn, Collection<String> byPass, String... attrIds ) throws LdapException;
-    
-    
     Entry lookup( LookupOperationContext lookupContext ) throws LdapException;
     
     
-    void modify( Dn dn, List<Modification> mods, Collection<String> byPass ) throws LdapException;
-    
-    
-    void add( Entry entry, Collection<String> byPass ) throws LdapException;
-    
-    
     /**
      * Process the delete for inner operations. This is only valid for SubschemaSubentry
      * operations, and will most certainly be removed later.
-     *  
+     * 
      * @param dn
      * @throws LdapException
      */
@@ -339,17 +259,6 @@ public interface OperationContext
 
 
     /**
-     * Checks to see if an entry exists.
-     *
-     * @param dn the distinguished name of the entry to check
-     * @param byPass collection of {@link Interceptor}'s to bypass for this check
-     * @return true if the entry exists, false if it does not
-     * @throws Exception on failure to perform this operation
-     */
-    boolean hasEntry( Dn dn, Collection<String> byPass ) throws LdapException;
-    
-    
-    /**
      * Set the throwReferral flag to true
      */
     void throwReferral();

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/RenameOperationContext.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/RenameOperationContext.java?rev=1209069&r1=1209068&r2=1209069&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/RenameOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/RenameOperationContext.java Thu Dec  1 13:25:26 2011
@@ -55,7 +55,11 @@ public class RenameOperationContext exte
     public RenameOperationContext( CoreSession session )
     {
         super( session );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.RENAME ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.RENAME ) );
+        }
     }
 
 
@@ -71,7 +75,11 @@ public class RenameOperationContext exte
         super( session, oldDn );
         this.newRdn = newRdn;
         this.deleteOldRdn = deleteOldRdn;
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.RENAME ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.RENAME ) );
+        }
     }
 
 
@@ -79,7 +87,11 @@ public class RenameOperationContext exte
     {
         super( session, modifyDnRequest.getName() );
         this.newRdn = modifyDnRequest.getNewRdn();
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.RENAME ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.RENAME ) );
+        }
 
         if ( newRdn == null )
         {

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/SearchOperationContext.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/SearchOperationContext.java?rev=1209069&r1=1209068&r2=1209069&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/SearchOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/SearchOperationContext.java Thu Dec  1 13:25:26 2011
@@ -58,7 +58,11 @@ public class SearchOperationContext exte
     public SearchOperationContext( CoreSession session )
     {
         super( session );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.SEARCH ) );
+        
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.SEARCH ) );
+        }
     }
 
 
@@ -69,7 +73,11 @@ public class SearchOperationContext exte
     public SearchOperationContext( CoreSession session, SearchRequest searchRequest ) throws LdapException
     {
         super( session );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.SEARCH ) );
+        
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.SEARCH ) );
+        }
 
         this.dn = searchRequest.getBase();
         this.filter = searchRequest.getFilter();
@@ -114,7 +122,11 @@ public class SearchOperationContext exte
         timeLimit = searchControls.getTimeLimit();
         sizeLimit = searchControls.getCountLimit();
         typesOnly = searchControls.getReturningObjFlag();
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.SEARCH ) );
+        
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.SEARCH ) );
+        }
 
         if ( searchControls.getReturningAttributes() != null )
         {
@@ -143,7 +155,11 @@ public class SearchOperationContext exte
         super( session, dn, returningAttributes );
         super.setScope( scope );
         this.filter = filter;
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.SEARCH ) );
+        
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.SEARCH ) );
+        }
     }
 
 

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/UnbindOperationContext.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/UnbindOperationContext.java?rev=1209069&r1=1209068&r2=1209069&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/UnbindOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/UnbindOperationContext.java Thu Dec  1 13:25:26 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.context;
 
@@ -40,7 +40,11 @@ public class UnbindOperationContext exte
     public UnbindOperationContext( CoreSession session )
     {
         super( session, session.getEffectivePrincipal().getDn() );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.UNBIND ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.UNBIND ) );
+        }
     }
     
 
@@ -48,7 +52,11 @@ public class UnbindOperationContext exte
     {
         super( session, session.getEffectivePrincipal().getDn() );
         setRequestControls( unbindRequest.getControls() );
-        setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.UNBIND ) );
+
+        if ( session != null )
+        {
+            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.UNBIND ) );
+        }
     }
 
     

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockOperation.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockOperation.java?rev=1209069&r1=1209068&r2=1209069&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockOperation.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockOperation.java Thu Dec  1 13:25:26 2011
@@ -19,7 +19,6 @@
  */
 package org.apache.directory.server.core.api;
 
-import java.util.Collection;
 import java.util.List;
 
 import org.apache.directory.server.core.api.CoreSession;
@@ -32,7 +31,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.interceptor.context.SearchOperationContext;
 import org.apache.directory.shared.ldap.model.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -52,14 +50,7 @@ public class MockOperation implements Op
     }
 
 
-    public EntryFilteringCursor search( SearchOperationContext searchContext )
-        throws LdapException
-    {
-        return new BaseEntryFilteringCursor( new MockCursor( count ), searchContext );
-    }
-
-
-    public EntryFilteringCursor search( SearchOperationContext searchContext, Collection<String> bypass ) throws LdapException
+    public EntryFilteringCursor search( SearchOperationContext searchContext ) throws LdapException
     {
         return new BaseEntryFilteringCursor( new MockCursor( count ), searchContext );
     }
@@ -80,12 +71,6 @@ public class MockOperation implements Op
     }
 
 
-    public Collection<String> getByPassed()
-    {
-        return null;
-    }
-
-
     public Dn getDn()
     {
         return null;
@@ -128,12 +113,6 @@ public class MockOperation implements Op
     }
 
 
-    public boolean hasBypass()
-    {
-        return false;
-    }
-
-
     public boolean hasRequestControl( String numericOid )
     {
         return false;
@@ -158,52 +137,18 @@ public class MockOperation implements Op
     }
 
 
-    public boolean isBypassed( String interceptorName )
-    {
-        return false;
-    }
-
-
-    public boolean isCollateralOperation()
-    {
-        return false;
-    }
-
-
-    public Entry lookup( Dn dn, Collection<String> bypass ) throws LdapException
-    {
-        return null;
-    }
-
-
     public Entry lookup( LookupOperationContext lookupContext ) throws LdapException
     {
         return null;
     }
 
 
-    public Entry lookup( Dn dn, Collection<String> byPass, String... attrIds ) throws LdapException
-    {
-        return null;
-    }
-    
-
     public LookupOperationContext newLookupContext( Dn dn )
     {
         return null;
     }
 
 
-    public void setByPassed( Collection<String> byPassed )
-    {
-    }
-
-
-    public void setCollateralOperation( boolean collateralOperation )
-    {
-    }
-
-
     public void setDn( Dn dn )
     {
     }
@@ -215,57 +160,11 @@ public class MockOperation implements Op
     }
 
 
-    public OperationContext getFirstOperation()
-    {
-        return null;
-    }
-
-
-    public OperationContext getLastOperation()
-    {
-        return null;
-    }
-
-
-    public OperationContext getNextOperation()
-    {
-        return null;
-    }
-
-
-    public OperationContext getPreviousOperation()
-    {
-        return null;
-    }
-
-
-    public boolean isFirstOperation()
-    {
-        return false;
-    }
-
-
-    public void add( Entry entry, Collection<String> bypass ) throws LdapException
-    {
-    }
-
-
     public void delete( Dn dn ) throws LdapException
     {
     }
 
 
-    public void modify( Dn dn, List<Modification> mods, Collection<String> bypass ) throws LdapException
-    {
-    }
-
-
-    public boolean hasEntry( Dn dn, Collection<String> byPass ) throws LdapException
-    {
-        return false;
-    }
-
-
     public ReferralHandlingMode getReferralHandlingMode()
     {
         return null;
@@ -313,15 +212,25 @@ public class MockOperation implements Op
     @Override
     public void setInterceptors( List<String> interceptors )
     {
-        // TODO Auto-generated method stub
-        
     }
 
 
     @Override
     public String getNextInterceptor()
     {
-        // TODO Auto-generated method stub
         return "";
     }
+
+
+    @Override
+    public int getCurrentInterceptor()
+    {
+        return 0;
+    }
+
+
+    @Override
+    public void setCurrentInterceptor( int currentInterceptor )
+    {
+    }
 }

Propchange: directory/apacheds/branches/apacheds-txns/core-integ/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  1 13:25:26 2011
@@ -5,6 +5,6 @@
 /directory/apacheds/branches/apacheds-kerberos-codec-2.0/core-integ:1040956-1043765
 /directory/apacheds/branches/apacheds-osgi/core-integ:1185681-1199322
 /directory/apacheds/branches/milestones/core-integ:1072812-1075328
-/directory/apacheds/trunk/core-integ:1066126-1067785,1068026-1072718,1072800-1075329,1177661-1201283
+/directory/apacheds/trunk/core-integ:1066126-1067785,1068026-1072718,1072800-1075329,1177661-1209047
 /directory/apacheds/trunk/interceptors/core-integ:1183435-1186974
 /directory/studio/trunk/core-integ:1067786-1067997

Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java?rev=1209069&r1=1209068&r2=1209069&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java Thu Dec  1 13:25:26 2011
@@ -25,9 +25,6 @@ import java.util.ArrayList;
 import java.util.List;
 
 import javax.naming.NamingException;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.ModificationItem;
 import javax.naming.ldap.LdapContext;
 import javax.naming.ldap.LdapName;
 
@@ -48,6 +45,9 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultAttribute;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
+import org.apache.directory.shared.ldap.model.entry.DefaultModification;
+import org.apache.directory.shared.ldap.model.entry.Modification;
+import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.ldif.ChangeType;
 import org.apache.directory.shared.ldap.model.ldif.LdifEntry;
@@ -301,25 +301,24 @@ public class IntegrationUtils
 
     public static void enableSchema( DirectoryService service, String schemaName ) throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapConnection connection = getAdminConnection( service );
 
         // now enable the test schema
-        ModificationItem[] mods = new ModificationItem[1];
-        javax.naming.directory.Attribute attr = new BasicAttribute( "m-disabled", "FALSE" );
-        mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
-        schemaRoot.modifyAttributes( "cn=" + schemaName, mods );
+        connection.modify( "cn=" + schemaName + ",ou=schema",
+            new DefaultModification(
+                ModificationOperation.REPLACE_ATTRIBUTE, "m-disabled", "FALSE" ) );
     }
 
 
     public static void disableSchema( DirectoryService service, String schemaName ) throws Exception
     {
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapConnection connection = getAdminConnection( service );
 
         // now enable the test schema
-        ModificationItem[] mods = new ModificationItem[1];
-        javax.naming.directory.Attribute attr = new BasicAttribute( "m-disabled", "TRUE" );
-        mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
-        schemaRoot.modifyAttributes( "cn=" + schemaName, mods );
+        Modification mod = new DefaultModification(
+            ModificationOperation.REPLACE_ATTRIBUTE, "m-disabled", "TRUE" );
+        
+        connection.modify( "cn=" + schemaName + ",ou=schema", mod );
     }
 
 

Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java?rev=1209069&r1=1209068&r2=1209069&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java Thu Dec  1 13:25:26 2011
@@ -502,6 +502,52 @@ public class PasswordPolicyTest extends 
     }
 
     
+    @Test
+    public void testModifyPwdSubentry() throws Exception
+    {
+        LdapConnection connection = getAdminNetworkConnection( getLdapServer() );
+        
+        Dn userDn = new Dn( "cn=ppolicySubentry,ou=system" );
+        String password = "12345";
+        Entry userEntry = new DefaultEntry(
+            userDn.toString(),
+            "ObjectClass: top",
+            "ObjectClass: person",
+            "cn: ppolicySubentry",
+            "sn: ppolicySubentry_sn",
+            "userPassword: " + password,
+            "pwdPolicySubEntry:" + userDn.getName() );
+
+        AddRequest addRequest = new AddRequestImpl();
+        addRequest.setEntry( userEntry );
+        addRequest.addControl( PP_REQ_CTRL );
+
+        AddResponse addResp = connection.add( addRequest );
+        assertEquals( ResultCodeEnum.SUCCESS, addResp.getLdapResult().getResultCode() );
+        
+        userEntry = connection.lookup( userDn, "*", "+" );
+        assertEquals( userDn.getName(), userEntry.get( "pwdPolicySubEntry" ).getString() );
+        
+        ModifyRequest modReq = new ModifyRequestImpl();
+        modReq.setName( userDn );
+        String modSubEntryDn = "cn=policy,ou=system";
+        modReq.replace( "pwdPolicySubEntry", modSubEntryDn );
+        ModifyResponse modResp = connection.modify( modReq );
+        assertEquals( ResultCodeEnum.SUCCESS, modResp.getLdapResult().getResultCode() );
+        
+        userEntry = connection.lookup( userDn, "*", "+" );
+        assertEquals( modSubEntryDn, userEntry.get( "pwdPolicySubEntry" ).getString() );
+        
+        // try to modify the subentry as a non-admin
+        connection = new LdapNetworkConnection( "localhost", getLdapServer().getPort() );
+        connection.bind( userDn.getName(), password );
+        
+        modResp = connection.modify( modReq );
+        modReq.replace( "pwdPolicySubEntry", userDn.getName() );
+        assertEquals( ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS, modResp.getLdapResult().getResultCode() );
+    }
+    
+    
     private PasswordPolicy getPwdRespCtrl( Response resp ) throws Exception
     {
         Control control = resp.getControls().get( PP_REQ_CTRL.getOid() );

Propchange: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec  1 13:25:26 2011
@@ -10,6 +10,6 @@
 /directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:599654-600228
 /directory/apacheds/branches/milestones/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:1072812-1075328
 /directory/apacheds/branches/xdbm-refactoring/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:945827-946347
-/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:1066126-1067785,1068026-1072718,1072800-1075329,1177661-1201283
+/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:1066126-1067785,1068026-1072718,1072800-1075329,1177661-1209047
 /directory/apacheds/trunk/interceptors/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:1183435-1186974
 /directory/studio/trunk/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java:1067786-1067997

Modified: directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java?rev=1209069&r1=1209068&r2=1209069&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java (original)
+++ directory/apacheds/branches/apacheds-txns/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java Thu Dec  1 13:25:26 2011
@@ -37,7 +37,7 @@ public abstract class AbstractMetaSchema
     protected static String workingDir;
 
     @Before
-    public final void init()
+    public void init() throws Exception
     {
         workingDir = getService().getInstanceLayout().getPartitionsDirectory().getAbsolutePath();
     }
@@ -52,7 +52,7 @@ public abstract class AbstractMetaSchema
     {
         StringBuilder sb = new StringBuilder();
 
-        sb.append( workingDir ).append( '/' ).append( getService().getSchemaPartition().getId() ).append( '/' ).append( "ou=schema" );
+        sb.append( workingDir ).append( '/' ).append( getService().getSchemaPartition().getId() );
 
         for ( Rdn rdn : dn )
         {
@@ -74,7 +74,7 @@ public abstract class AbstractMetaSchema
      */
     protected boolean isOnDisk( Dn dn )
     {
-        // donot change the value of getSchemaPath to lowercase
+        // do not change the value of getSchemaPath to lowercase
         // on Linux this gives a wrong path
         String schemaObjectFileName = getSchemaPath( dn );
 
@@ -95,96 +95,4 @@ public abstract class AbstractMetaSchema
     {
         return new Dn( "cn=" + schemaName );
     }
-
-
-    /**
-     * Gets relative Dn to ou=schema.
-     *
-     * @param schemaName the name of the schema
-     * @return the dn of the a schema's attributeType entity container
-     * @throws Exception on failure
-     */
-    protected Dn getAttributeTypeContainer( String schemaName ) throws Exception
-    {
-        return new Dn( "ou=attributeTypes,cn=" + schemaName );
-    }
-
-
-    /**
-     * Get relative Dn to ou=schema for Comparators
-     *
-     * @param schemaName the name of the schema
-     * @return the dn to the ou under which comparators are found for a schema
-     * @throws Exception if there are dn construction issues
-     */
-    protected Dn getComparatorContainer( String schemaName ) throws Exception
-    {
-        return new Dn( "ou=comparators,cn=" + schemaName );
-    }
-
-
-    /**
-     * Get relative Dn to ou=schema for MatchingRules
-     *
-     * @param schemaName the name of the schema
-     * @return the dn to the ou under which MatchingRules are found for a schema
-     * @throws Exception if there are dn construction issues
-     */
-    protected Dn getMatchingRuleContainer( String schemaName ) throws Exception
-    {
-        return new Dn( "ou=matchingRules,cn=" + schemaName );
-    }
-
-
-    /**
-     * Gets relative Dn to ou=schema.
-     *
-     * @param schemaName the name of the schema
-     * @return the dn of the container which contains objectClasses
-     * @throws Exception on error
-     */
-    protected Dn getObjectClassContainer( String schemaName ) throws Exception
-    {
-        return new Dn( "ou=objectClasses,cn=" + schemaName );
-    }
-
-
-
-    /**
-     * Gets relative Dn to ou=schema.
-     *
-     * @param schemaName the name of the schema
-     * @return  the name of the container with normalizer entries in it
-     * @throws Exception on error
-     */
-    protected Dn getNormalizerContainer( String schemaName ) throws Exception
-    {
-        return new Dn( "ou=normalizers,cn=" + schemaName );
-    }
-
-
-    /**
-     * Get relative Dn to ou=schema for Syntaxes
-     *
-     * @param schemaName the name of the schema
-     * @return the dn of the container holding syntaxes for the schema
-     * @throws Exception on dn parse errors
-     */
-    protected Dn getSyntaxContainer( String schemaName ) throws Exception
-    {
-        return new Dn( "ou=syntaxes,cn=" + schemaName );
-    }
-
-
-    /**
-     * Get relative Dn to ou=schema for SyntaxCheckers
-     *
-     * @param schemaName the name of the schema
-     * @return the dn of the container holding syntax checkers for the schema
-     * @throws Exception on dn parse errors
-     */
-    protected Dn getSyntaxCheckerContainer( String schemaName ) throws Exception
-    {
-        return new Dn( "ou=syntaxCheckers,cn=" + schemaName );
-    }
 }



Mime
View raw message