directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1197618 - in /directory/apacheds/branches/apacheds-osgi: core-api/src/main/java/org/apache/directory/server/core/api/partition/ interceptors/collective/src/main/java/org/apache/directory/server/core/collective/
Date Fri, 04 Nov 2011 16:01:42 GMT
Author: kayyagari
Date: Fri Nov  4 16:01:42 2011
New Revision: 1197618

URL: http://svn.apache.org/viewvc?rev=1197618&view=rev
Log:
o removed the usage of LOOKUP_COLLECTIVE_BYPASS

Modified:
    directory/apacheds/branches/apacheds-osgi/core-api/src/main/java/org/apache/directory/server/core/api/partition/ByPassConstants.java
    directory/apacheds/branches/apacheds-osgi/interceptors/collective/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java

Modified: directory/apacheds/branches/apacheds-osgi/core-api/src/main/java/org/apache/directory/server/core/api/partition/ByPassConstants.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/core-api/src/main/java/org/apache/directory/server/core/api/partition/ByPassConstants.java?rev=1197618&r1=1197617&r2=1197618&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/core-api/src/main/java/org/apache/directory/server/core/api/partition/ByPassConstants.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/core-api/src/main/java/org/apache/directory/server/core/api/partition/ByPassConstants.java
Fri Nov  4 16:01:42 2011
@@ -22,7 +22,6 @@ package org.apache.directory.server.core
 
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashSet;
 
 import org.apache.directory.server.core.api.interceptor.Interceptor;
 
@@ -36,13 +35,6 @@ import org.apache.directory.server.core.
 public class ByPassConstants
 {
     /**
-     * safe to use set of bypass instructions to lookup raw entries while
-     * also avoiding hit on collective attributes {@link Interceptor}: used 
-     * by collective attributes interceptor.
-     */
-    public static final Collection<String> LOOKUP_COLLECTIVE_BYPASS;
-
-    /**
      * Bypass String to use when ALL interceptors should be skipped
      */
     public static final String BYPASS_ALL = "*";
@@ -51,20 +43,4 @@ public class ByPassConstants
      * Bypass String to use when ALL interceptors should be skipped
      */
     public static final Collection<String> BYPASS_ALL_COLLECTION = Collections.singleton(
BYPASS_ALL );
-
-    static
-    {
-        Collection<String> c = new HashSet<String>();
-        c.add( "NormalizationInterceptor" );
-        c.add( "AuthenticationInterceptor" );
-        c.add( "AciAuthorizationInterceptor" );
-        c.add( "DefaultAuthorizationInterceptor" );
-        c.add( "CollectiveAttributeInterceptor" );
-        c.add( "OperationalAttributeInterceptor" );
-        c.add( "SchemaInterceptor" );
-        c.add( "SubentryInterceptor" );
-        c.add( "EventInterceptor" );
-        c.add( "JournalInterceptor" );
-        LOOKUP_COLLECTIVE_BYPASS = Collections.unmodifiableCollection( c );
-    }
 }

Modified: directory/apacheds/branches/apacheds-osgi/interceptors/collective/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/interceptors/collective/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java?rev=1197618&r1=1197617&r2=1197618&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/interceptors/collective/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
(original)
+++ directory/apacheds/branches/apacheds-osgi/interceptors/collective/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
Fri Nov  4 16:01:42 2011
@@ -24,6 +24,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
+import org.apache.directory.server.core.api.CoreSession;
 import org.apache.directory.server.core.api.DirectoryService;
 import org.apache.directory.server.core.api.entry.ClonedServerEntry;
 import org.apache.directory.server.core.api.filtering.EntryFilter;
@@ -406,7 +407,9 @@ public class CollectiveAttributeIntercep
              * time looking up this sub-entry. 
              */
 
-            Entry subentry = opContext.lookup( subentryDn, ByPassConstants.LOOKUP_COLLECTIVE_BYPASS,
SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+            CoreSession session = opContext.getSession();
+            LookupOperationContext lookupContext = new LookupOperationContext( session, subentryDn,
SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+            Entry subentry = session.getDirectoryService().getPartitionNexus().lookup( lookupContext
);
 
             for ( Attribute attribute : subentry.getAttributes() )
             {



Mime
View raw message