You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ka...@apache.org on 2011/11/03 19:45:36 UTC

svn commit: r1197267 - in /directory/apacheds/branches/apacheds-osgi: core-api/src/main/java/org/apache/directory/server/core/api/partition/ interceptors/authz/src/main/java/org/apache/directory/server/core/authz/ interceptors/trigger/src/main/java/org...

Author: kayyagari
Date: Thu Nov  3 18:45:35 2011
New Revision: 1197267

URL: http://svn.apache.org/viewvc?rev=1197267&view=rev
Log:
o removed LOOKUP_EXCLUDING_OPR_ATTRS_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/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
    directory/apacheds/branches/apacheds-osgi/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java
    directory/apacheds/branches/apacheds-osgi/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
    directory/apacheds/branches/apacheds-osgi/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.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=1197267&r1=1197266&r2=1197267&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 Thu Nov  3 18:45:35 2011
@@ -52,11 +52,6 @@ public class ByPassConstants
      */
     public static final Collection<String> GETMATCHEDDN_BYPASS;
 
-    /**
-     * safe to use set of bypass instructions to lookup raw entries excluding operational attributes
-     */
-    public static final Collection<String> LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS;
-    
     public static final Collection<String> GET_ROOT_DSE_BYPASS;
 
     /**
@@ -113,18 +108,6 @@ public class ByPassConstants
 
         c = new HashSet<String>();
         c.add( "NormalizationInterceptor" );
-        c.add( "AuthenticationInterceptor" );
-        c.add( "AciAuthorizationInterceptor" );
-        c.add( "DefaultAuthorizationInterceptor" );
-        c.add( "SchemaInterceptor" );
-        c.add( "SubentryInterceptor" );
-        c.add( "EventInterceptor" );
-        c.add( "TriggerInterceptor" );
-        c.add( "JournalInterceptor" );
-        LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS = Collections.unmodifiableCollection( c );
-                
-        c = new HashSet<String>();
-        c.add( "NormalizationInterceptor" );
         c.add( "ChangeLogInterceptor" );
         c.add( "AciAuthorizationInterceptor" );
         c.add( "DefaultAuthorizationInterceptor" );

Modified: directory/apacheds/branches/apacheds-osgi/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=1197267&r1=1197266&r2=1197267&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-osgi/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java Thu Nov  3 18:45:35 2011
@@ -1076,8 +1076,9 @@ public class AciAuthorizationInterceptor
         // This will certainly be fixed by the SubentryInterceptor,
         // but after this service.
 
-        Entry importedEntry = moveAndRenameContext.lookup( oldDn,
-            ByPassConstants.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+        CoreSession session = moveAndRenameContext.getSession();
+        LookupOperationContext lookupContext = new LookupOperationContext( session, oldDn, SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
+        Entry importedEntry = session.getDirectoryService().getPartitionNexus().lookup( lookupContext );
 
         // As the target entry does not exist yet and so
         // its subentry operational attributes are not there,
@@ -1169,7 +1170,9 @@ public class AciAuthorizationInterceptor
         // will not be valid at the new location.
         // This will certainly be fixed by the SubentryInterceptor,
         // but after this service.
-        Entry importedEntry = moveContext.lookup( oriChildName, ByPassConstants.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+        CoreSession session = moveContext.getSession();
+        LookupOperationContext lookupContext = new LookupOperationContext( session, oriChildName, SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
+        Entry importedEntry = session.getDirectoryService().getPartitionNexus().lookup( lookupContext );
 
         // As the target entry does not exist yet and so
         // its subentry operational attributes are not there,

Modified: directory/apacheds/branches/apacheds-osgi/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java?rev=1197267&r1=1197266&r2=1197267&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java (original)
+++ directory/apacheds/branches/apacheds-osgi/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/DeleteStoredProcedureParameterInjector.java Thu Nov  3 18:45:35 2011
@@ -22,6 +22,8 @@ package org.apache.directory.server.core
 
 import java.util.Map;
 
+import org.apache.directory.server.core.api.CoreSession;
+import org.apache.directory.server.core.api.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.OperationContext;
 import org.apache.directory.server.core.api.partition.ByPassConstants;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
@@ -72,6 +74,9 @@ public class DeleteStoredProcedureParame
          * Using LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS here to exclude operational attributes
          * especially subentry related ones like "triggerExecutionSubentries".
          */
-        return opContext.lookup( deletedEntryName, ByPassConstants.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+        CoreSession session = opContext.getSession();
+        LookupOperationContext lookupContext = new LookupOperationContext( session, deletedEntryName, SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
+
+        return session.getDirectoryService().getPartitionNexus().lookup( lookupContext );
     }
 }

Modified: directory/apacheds/branches/apacheds-osgi/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java?rev=1197267&r1=1197266&r2=1197267&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java (original)
+++ directory/apacheds/branches/apacheds-osgi/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java Thu Nov  3 18:45:35 2011
@@ -24,6 +24,8 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.directory.server.core.api.CoreSession;
+import org.apache.directory.server.core.api.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.core.api.interceptor.context.OperationContext;
 import org.apache.directory.server.core.api.partition.ByPassConstants;
@@ -104,9 +106,12 @@ public class ModifyStoredProcedureParame
     private Entry getEntry( OperationContext opContext ) throws LdapException
     {
         /**
-         * Using LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS here to exclude operational attributes
+         * Exclude operational attributes while doing lookup
          * especially subentry related ones like "triggerExecutionSubentries".
          */
-        return opContext.lookup( modifiedEntryName, ByPassConstants.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+        CoreSession session = opContext.getSession();
+        LookupOperationContext lookupContext = new LookupOperationContext( session, modifiedEntryName, SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
+
+        return session.getDirectoryService().getPartitionNexus().lookup( lookupContext );
     }
 }

Modified: directory/apacheds/branches/apacheds-osgi/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java?rev=1197267&r1=1197266&r2=1197267&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-osgi/interceptors/trigger/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java Thu Nov  3 18:45:35 2011
@@ -441,7 +441,10 @@ public class TriggerInterceptor extends 
         // will not be valid at the new location.
         // This will certainly be fixed by the SubentryInterceptor,
         // but after this service.
-        Entry importedEntry = moveAndRenameContext.lookup( oldDn, ByPassConstants.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+        CoreSession session = moveAndRenameContext.getSession();
+        LookupOperationContext lookupContext = new LookupOperationContext( session, oldDn, SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
+
+        Entry importedEntry = session.getDirectoryService().getPartitionNexus().lookup( lookupContext );
 
         // As the target entry does not exist yet and so
         // its subentry operational attributes are not there,
@@ -513,7 +516,10 @@ public class TriggerInterceptor extends 
         // will not be valid at the new location.
         // This will certainly be fixed by the SubentryInterceptor,
         // but after this service.
-        Entry importedEntry = moveContext.lookup( dn, ByPassConstants.LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+        CoreSession session = moveContext.getSession();
+        LookupOperationContext lookupContext = new LookupOperationContext( session, dn, SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
+
+        Entry importedEntry = session.getDirectoryService().getPartitionNexus().lookup( lookupContext );
 
         // As the target entry does not exist yet and so
         // its subentry operational attributes are not there,