directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1183548 - in /directory/apacheds/trunk: ./ core-integ/ core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/ core-integ/src/test/java/org/apache/directory/server/core/operations/delete/ core-integ/src/test/java/org/apach...
Date Fri, 14 Oct 2011 23:11:00 GMT
Author: elecharny
Date: Fri Oct 14 23:10:59 2011
New Revision: 1183548

URL: http://svn.apache.org/viewvc?rev=1183548&view=rev
Log:
Decoupled the interceptors

Modified:
    directory/apacheds/trunk/core-integ/pom.xml
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/delete/DeletePerfIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java
    directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java
    directory/apacheds/trunk/pom.xml
    directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java

Modified: directory/apacheds/trunk/core-integ/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/pom.xml?rev=1183548&r1=1183547&r2=1183548&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/pom.xml (original)
+++ directory/apacheds/trunk/core-integ/pom.xml Fri Oct 14 23:10:59 2011
@@ -61,6 +61,21 @@
     
     <dependency>
       <groupId>${project.groupId}</groupId>
+      <artifactId>apacheds-core-shared</artifactId>
+    </dependency>
+    
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>apacheds-interceptors-authn</artifactId>
+    </dependency>
+    
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>apacheds-interceptors-hash</artifactId>
+    </dependency>
+    
+    <dependency>
+      <groupId>${project.groupId}</groupId>
       <artifactId>apacheds-i18n</artifactId>
     </dependency>
     

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java?rev=1183548&r1=1183547&r2=1183548&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
Fri Oct 14 23:10:59 2011
@@ -111,11 +111,11 @@ public class PasswordPolicyTest extends 
 
         PpolicyConfigContainer policyContainer = new PpolicyConfigContainer();
         policyContainer.setDefaultPolicy( policyConfig );
-        AuthenticationInterceptor authenticationInterceptor = (AuthenticationInterceptor)getService().getInterceptor(
AuthenticationInterceptor.class.getName() );
+        AuthenticationInterceptor authenticationInterceptor = (AuthenticationInterceptor)getService().getInterceptor(
AuthenticationInterceptor.class.getSimpleName() );
         authenticationInterceptor.setPwdPolicies( policyContainer );
         
         AuthenticationInterceptor authInterceptor = ( AuthenticationInterceptor ) getService()
-        .getInterceptor( AuthenticationInterceptor.class.getName() );
+        .getInterceptor( AuthenticationInterceptor.class.getSimpleName() );
         
         authInterceptor.loadPwdPolicyStateAtributeTypes();
     }

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/delete/DeletePerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/delete/DeletePerfIT.java?rev=1183548&r1=1183547&r2=1183548&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/delete/DeletePerfIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/delete/DeletePerfIT.java
Fri Oct 14 23:10:59 2011
@@ -72,18 +72,34 @@ public class DeletePerfIT extends Abstra
     {
         LdapConnection connection = IntegrationUtils.getAdminConnection( getService() );
 
-        Dn dn = new Dn( "cn=test,dc=example,dc=com" );
-        Entry entry = new DefaultEntry( getService().getSchemaManager(), dn );
+        Dn dn1 = new Dn( "cn=test,dc=example,dc=com" );
+        Entry entry = new DefaultEntry( getService().getSchemaManager(), dn1 );
         entry.add( "ObjectClass", "top", "person" );
         entry.add( "sn", "TEST" );
         entry.add( "cn", "test" );
         
-        connection.add(entry );
+        connection.add( entry );
         
-        // Deletion
-        dn = new Dn( "cn=test,dc=example,dc=com" );
+        Dn dn2 = new Dn( "cn=test1,cn=test,dc=example,dc=com" );
+        Entry entry2 = new DefaultEntry( getService().getSchemaManager(), dn2 );
+        entry2.add( "ObjectClass", "top", "person" );
+        entry2.add( "sn", "TEST1" );
+        entry2.add( "cn", "test1" );
+        
+        connection.add( entry2 );
+
+        Dn dn3 = new Dn( "cn=test2,cn=test,dc=example,dc=com" );
+        Entry entry3 = new DefaultEntry( getService().getSchemaManager(), dn3 );
+        entry3.add( "ObjectClass", "top", "person" );
+        entry3.add( "sn", "TEST2" );
+        entry3.add( "cn", "test2" );
         
-        connection.delete( dn );
+        connection.add( entry3 );
+
+        // Deletion
+        connection.delete( dn3 );
+        connection.delete( dn2 );
+        connection.delete( dn1 );
 
         connection.close();
     }

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java?rev=1183548&r1=1183547&r2=1183548&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java
Fri Oct 14 23:10:59 2011
@@ -53,7 +53,7 @@ public class LookupPerfIT extends Abstra
      * A lookup performance test
      */
     @Test
-    @Ignore("Ignore atm, this is a perf test")
+    //@Ignore("Ignore atm, this is a perf test")
     public void testPerfLookup() throws Exception
     {
         LdapConnection connection = IntegrationUtils.getAdminConnection( getService() );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java?rev=1183548&r1=1183547&r2=1183548&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/sp/LdapClassLoaderIT.java
Fri Oct 14 23:10:59 2011
@@ -36,6 +36,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
+import org.apache.directory.server.core.shared.sp.LdapClassLoader;
 import org.apache.directory.shared.util.Base64;
 import org.junit.Test;
 import org.junit.runner.RunWith;

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java?rev=1183548&r1=1183547&r2=1183548&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java
(original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/bind/SimpleBindRequestTest.java
Fri Oct 14 23:10:59 2011
@@ -37,6 +37,7 @@ import org.apache.directory.server.annot
 import org.apache.directory.server.annotations.CreateTransport;
 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;
@@ -454,7 +455,7 @@ 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
-            getService().getInterceptorChain().addFirst( new BaseInterceptor()
+            Interceptor interceptor = new BaseInterceptor()
             {
                 /**
                  * Wait 1 second before going any further
@@ -473,7 +474,9 @@ public class SimpleBindRequestTest exten
 
                     next.bind( bindContext );
                 }
-            } );
+            };
+            
+            getService().getInterceptorChain().addFirst( interceptor );
 
             // Send another BindRequest
             BindRequest bindRequest = new BindRequestImpl();
@@ -506,7 +509,7 @@ public class SimpleBindRequestTest exten
         }
         finally
         {
-            getService().getInterceptorChain().remove( this.getClass().getName() + "$1" );
+            getService().getInterceptorChain().remove( "" );
         }
     }
 

Modified: directory/apacheds/trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/pom.xml?rev=1183548&r1=1183547&r2=1183548&view=diff
==============================================================================
--- directory/apacheds/trunk/pom.xml (original)
+++ directory/apacheds/trunk/pom.xml Fri Oct 14 23:10:59 2011
@@ -106,8 +106,10 @@
     <module>jdbm-partition</module>
     <module>xdbm-partition</module>
     <module>xdbm-tools</module>
-    <module>core</module>
+    <module>core-shared</module>
     <module>core-api</module>
+    <module>interceptors</module>
+    <module>core</module>
     <module>core-annotations</module>
     <module>server-annotations</module>
     <module>core-jndi</module>
@@ -543,6 +545,12 @@
       
       <dependency>
         <groupId>${project.groupId}</groupId>
+        <artifactId>apacheds-core-shared</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+     
+      <dependency>
+        <groupId>${project.groupId}</groupId>
         <artifactId>apacheds-default-config</artifactId>
         <version>${project.version}</version>
       </dependency>
@@ -559,6 +567,61 @@
         <version>${project.version}</version>
       </dependency>
       
+      <!-- Interceptors --> 
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>apacheds-interceptors-admin</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>apacheds-interceptors-authn</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>apacheds-interceptors-authz</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>apacheds-interceptors-changelog</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>apacheds-interceptors-collective</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>apacheds-interceptors-event</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>apacheds-interceptors-exception</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>apacheds-interceptors-hash</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>apacheds-interceptors-journal</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      
       <dependency>
         <groupId>${project.groupId}</groupId>
         <artifactId>apacheds-interceptor-kerberos</artifactId>
@@ -567,6 +630,49 @@
       
       <dependency>
         <groupId>${project.groupId}</groupId>
+        <artifactId>apacheds-interceptors-logger</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>apacheds-interceptors-normalization</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>apacheds-interceptors-operational</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>apacheds-interceptors-referral</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>apacheds-interceptors-schema</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>apacheds-interceptors-subtree</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>apacheds-interceptors-trigger</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <!-- Interceptors --> 
+
+      <dependency>
+        <groupId>${project.groupId}</groupId>
         <artifactId>apacheds-jdbm</artifactId>
         <version>${project.version}</version>
       </dependency>

Modified: directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java?rev=1183548&r1=1183547&r2=1183548&view=diff
==============================================================================
--- directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java
(original)
+++ directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java
Fri Oct 14 23:10:59 2011
@@ -1313,7 +1313,7 @@ public class ServiceBuilder
             directoryService.setJournal( journal );
         }
         
-        AuthenticationInterceptor authenticationInterceptor = (AuthenticationInterceptor)directoryService.getInterceptor(
AuthenticationInterceptor.class.getName() );
+        AuthenticationInterceptor authenticationInterceptor = (AuthenticationInterceptor)directoryService.getInterceptor(
AuthenticationInterceptor.class.getSimpleName() );
 
         // MaxPDUSize
         directoryService.setMaxPDUSize( directoryServiceBean.getDsMaxPDUSize() );



Mime
View raw message