You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2011/11/03 17:19:53 UTC
svn commit: r1197199 -
/directory/apacheds/branches/apacheds-osgi/core-api/src/main/java/org/apache/directory/server/core/api/schema/SchemaPartition.java
Author: elecharny
Date: Thu Nov 3 16:19:53 2011
New Revision: 1197199
URL: http://svn.apache.org/viewvc?rev=1197199&view=rev
Log:
Removed the Lookup bypass, replaced it with a direct call to nexus.lookup()
Modified:
directory/apacheds/branches/apacheds-osgi/core-api/src/main/java/org/apache/directory/server/core/api/schema/SchemaPartition.java
Modified: directory/apacheds/branches/apacheds-osgi/core-api/src/main/java/org/apache/directory/server/core/api/schema/SchemaPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-osgi/core-api/src/main/java/org/apache/directory/server/core/api/schema/SchemaPartition.java?rev=1197199&r1=1197198&r2=1197199&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-osgi/core-api/src/main/java/org/apache/directory/server/core/api/schema/SchemaPartition.java (original)
+++ directory/apacheds/branches/apacheds-osgi/core-api/src/main/java/org/apache/directory/server/core/api/schema/SchemaPartition.java Thu Nov 3 16:19:53 2011
@@ -24,6 +24,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.directory.server.constants.ApacheSchemaConstants;
+import org.apache.directory.server.core.api.CoreSession;
import org.apache.directory.server.core.api.filtering.EntryFilteringCursor;
import org.apache.directory.server.core.api.interceptor.context.AddOperationContext;
import org.apache.directory.server.core.api.interceptor.context.BindOperationContext;
@@ -361,7 +362,10 @@ public final class SchemaPartition exten
public void move( MoveOperationContext moveContext ) throws LdapException
{
boolean cascade = moveContext.hasRequestControl( Cascade.OID );
- Entry entry = moveContext.lookup( moveContext.getDn(), ByPassConstants.LOOKUP_BYPASS, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+
+ CoreSession session = moveContext.getSession();
+ LookupOperationContext lookupContext = new LookupOperationContext( session, moveContext.getDn(), SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+ Entry entry = session.getDirectoryService().getPartitionNexus().lookup( lookupContext );
synchronizer.move( moveContext, entry, cascade );
wrapped.move( moveContext );
updateSchemaModificationAttributes( moveContext );
@@ -374,7 +378,9 @@ public final class SchemaPartition exten
public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws LdapException
{
boolean cascade = moveAndRenameContext.hasRequestControl( Cascade.OID );
- Entry entry = moveAndRenameContext.lookup( moveAndRenameContext.getDn(), ByPassConstants.LOOKUP_BYPASS, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+ CoreSession session = moveAndRenameContext.getSession();
+ LookupOperationContext lookupContext = new LookupOperationContext( session, moveAndRenameContext.getDn(), SchemaConstants.ALL_ATTRIBUTES_ARRAY );
+ Entry entry = session.getDirectoryService().getPartitionNexus().lookup( lookupContext );
synchronizer.moveAndRename( moveAndRenameContext, entry, cascade );
wrapped.moveAndRename( moveAndRenameContext );
updateSchemaModificationAttributes( moveAndRenameContext );