directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r895264 - in /directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core: annotations/CreateDS.java factory/DSAnnotationProcessor.java
Date Sat, 02 Jan 2010 19:04:57 GMT
Author: kayyagari
Date: Sat Jan  2 19:04:56 2010
New Revision: 895264

URL: http://svn.apache.org/viewvc?rev=895264&view=rev
Log:
added support for including additional interceptors in the DirectoryService

Modified:
    directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java
    directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java

Modified: directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java?rev=895264&r1=895263&r2=895264&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core/annotations/CreateDS.java
Sat Jan  2 19:04:56 2010
@@ -52,4 +52,7 @@
     
     /** The list of partitions to create */
     CreatePartition[] partitions() default {};
+    
+    /** additional interceptors */
+    Class<?>[] additionalInterceptors() default {};
 }

Modified: directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java?rev=895264&r1=895263&r2=895264&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
Sat Jan  2 19:04:56 2010
@@ -33,6 +33,7 @@
 import org.apache.directory.server.core.annotations.CreatePartition;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
@@ -71,6 +72,14 @@
             service.setAllowAnonymousAccess( dsBuilder.allowAnonAccess() );
             service.getChangeLog().setEnabled( dsBuilder.enableChangeLog() );
             
+            List<Interceptor> interceptorList = service.getInterceptors();
+            for( Class<?> interceptorClass : dsBuilder.additionalInterceptors() )
+            {
+                interceptorList.add( ( Interceptor ) interceptorClass.newInstance() );
+            }
+            
+            service.setInterceptors( interceptorList );
+            
             dsf.init( dsBuilder.name() );
             
             // Process the Partition, if any.



Mime
View raw message