You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2005/09/10 07:43:04 UTC

svn commit: r279954 - in /directory/apacheds/trunk: core/src/main/java/org/apache/ldap/server/collective/ core/src/main/java/org/apache/ldap/server/configuration/ core/src/main/schema/ main/

Author: akarasulu
Date: Fri Sep  9 22:42:58 2005
New Revision: 279954

URL: http://svn.apache.org/viewcvs?rev=279954&view=rev
Log:
changes ...

 o added empty interceptor for collective attribute injection
 o interceptor is integrated by default on startup
 o interceptor configuration also added to server.xml for main


Added:
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/collective/
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/collective/CollectiveAttributeService.java   (with props)
Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java
    directory/apacheds/trunk/core/src/main/schema/collective.schema   (props changed)
    directory/apacheds/trunk/main/server.xml

Added: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/collective/CollectiveAttributeService.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/collective/CollectiveAttributeService.java?rev=279954&view=auto
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/collective/CollectiveAttributeService.java (added)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/collective/CollectiveAttributeService.java Fri Sep  9 22:42:58 2005
@@ -0,0 +1,75 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed 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.
+ *
+ */
+package org.apache.ldap.server.collective;
+
+
+import org.apache.ldap.server.interceptor.BaseInterceptor;
+import org.apache.ldap.server.interceptor.NextInterceptor;
+import org.apache.ldap.server.jndi.ContextFactoryConfiguration;
+import org.apache.ldap.server.configuration.InterceptorConfiguration;
+import org.apache.ldap.common.filter.ExprNode;
+
+import javax.naming.NamingException;
+import javax.naming.NamingEnumeration;
+import javax.naming.Name;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.SearchControls;
+import java.util.Map;
+
+
+/**
+ * An interceptor based service dealing with collective attribute
+ * management.  This service intercepts read operations on entries to
+ * inject collective attribute value pairs into the response based on
+ * the entires inclusion within collectiveAttributeSpecificAreas and
+ * collectiveAttributeInnerAreas.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class CollectiveAttributeService extends BaseInterceptor
+{
+    public void init( ContextFactoryConfiguration factoryCfg, InterceptorConfiguration cfg ) throws NamingException
+    {
+        super.init( factoryCfg, cfg );
+    }
+
+
+    public NamingEnumeration list( NextInterceptor next, Name base ) throws NamingException
+    {
+        return super.list( next, base );
+    }
+
+
+    public Attributes lookup( NextInterceptor next, Name dn, String[] attrIds ) throws NamingException
+    {
+        return super.lookup( next, dn, attrIds );
+    }
+
+
+    public Attributes lookup( NextInterceptor next, Name name ) throws NamingException
+    {
+        return super.lookup( next, name );
+    }
+
+
+    public NamingEnumeration search( NextInterceptor next, Name base, Map env, ExprNode filter,
+                                     SearchControls searchCtls ) throws NamingException
+    {
+        return super.search( next, base, env, filter, searchCtls );
+    }
+}

Propchange: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/collective/CollectiveAttributeService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java?rev=279954&r1=279953&r2=279954&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java Fri Sep  9 22:42:58 2005
@@ -36,13 +36,7 @@
 import org.apache.ldap.server.normalization.NormalizationService;
 import org.apache.ldap.server.operational.OperationalAttributeService;
 import org.apache.ldap.server.schema.SchemaService;
-import org.apache.ldap.server.schema.bootstrap.ApacheSchema;
-import org.apache.ldap.server.schema.bootstrap.BootstrapSchema;
-import org.apache.ldap.server.schema.bootstrap.CoreSchema;
-import org.apache.ldap.server.schema.bootstrap.CosineSchema;
-import org.apache.ldap.server.schema.bootstrap.InetorgpersonSchema;
-import org.apache.ldap.server.schema.bootstrap.JavaSchema;
-import org.apache.ldap.server.schema.bootstrap.SystemSchema;
+import org.apache.ldap.server.schema.bootstrap.*;
 import org.apache.ldap.server.subtree.SubentryService;
 import org.apache.ldap.server.event.EventService;
 
@@ -123,7 +117,8 @@
         set.add( new InetorgpersonSchema() );        
         set.add( new JavaSchema() );        
         set.add( new SystemSchema() );
-        
+        set.add( new CollectiveSchema() );
+
         setBootstrapSchemas( set );
     }
 
@@ -165,6 +160,11 @@
 
         interceptorCfg = new MutableInterceptorConfiguration();
         interceptorCfg.setName( "operationalAttributeService" );
+        interceptorCfg.setInterceptor( new OperationalAttributeService() );
+        list.add( interceptorCfg );
+
+        interceptorCfg = new MutableInterceptorConfiguration();
+        interceptorCfg.setName( "collectiveAttributeService" );
         interceptorCfg.setInterceptor( new OperationalAttributeService() );
         list.add( interceptorCfg );
 

Propchange: directory/apacheds/trunk/core/src/main/schema/collective.schema
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: directory/apacheds/trunk/main/server.xml
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/main/server.xml?rev=279954&r1=279953&r2=279954&view=diff
==============================================================================
--- directory/apacheds/trunk/main/server.xml (original)
+++ directory/apacheds/trunk/main/server.xml Fri Sep  9 22:42:58 2005
@@ -86,6 +86,12 @@
           </property>
         </bean>
         <bean class="org.apache.ldap.server.configuration.MutableInterceptorConfiguration">
+          <property name="name"><value>collectiveAttributeService</value></property>
+          <property name="interceptor">
+            <bean class="org.apache.ldap.server.collective.CollectiveAttributeService" />
+          </property>
+        </bean>
+        <bean class="org.apache.ldap.server.configuration.MutableInterceptorConfiguration">
           <property name="name"><value>eventService</value></property>
           <property name="interceptor">
             <bean class="org.apache.ldap.server.event.EventService" />