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 2007/04/06 18:53:44 UTC
svn commit: r526227 - in
/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis:
operation/OperationFactory.java operation/support/EntryUtil.java
service/ReplicationService.java
Author: elecharny
Date: Fri Apr 6 09:53:43 2007
New Revision: 526227
URL: http://svn.apache.org/viewvc?view=rev&rev=526227
Log:
Modified the hasEntry class to take an EntryServiceContext argument
Removed the useless SuffixServiceContext
Modified:
directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java
directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java
directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java
Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java?view=diff&rev=526227&r1=526226&r2=526227
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java (original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java Fri Apr 6 09:53:43 2007
@@ -33,6 +33,7 @@
import javax.naming.directory.SearchResult;
import org.apache.directory.server.core.DirectoryServiceConfiguration;
+import org.apache.directory.server.core.interceptor.context.EntryServiceContext;
import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
import org.apache.directory.server.core.partition.PartitionNexus;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
@@ -324,7 +325,7 @@
*/
private void checkBeforeAdd( LdapDN newEntryName ) throws NamingException
{
- if ( nexus.hasEntry( newEntryName ) )
+ if ( nexus.hasEntry( new EntryServiceContext( newEntryName ) ) )
{
Attributes entry = nexus.lookup( new LookupServiceContext( newEntryName ) );
Attribute deleted = entry.get( Constants.ENTRY_DELETED );
Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java?view=diff&rev=526227&r1=526226&r2=526227
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java (original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/operation/support/EntryUtil.java Fri Apr 6 09:53:43 2007
@@ -25,6 +25,7 @@
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
+import org.apache.directory.server.core.interceptor.context.EntryServiceContext;
import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
import org.apache.directory.server.core.partition.PartitionNexus;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
@@ -94,7 +95,7 @@
{
try
{
- if ( nexus.hasEntry( name ) )
+ if ( nexus.hasEntry( new EntryServiceContext( name ) ) )
{
return;
}
Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java?view=diff&rev=526227&r1=526226&r2=526227
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java (original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationService.java Fri Apr 6 09:53:43 2007
@@ -56,6 +56,7 @@
import org.apache.directory.server.core.interceptor.BaseInterceptor;
import org.apache.directory.server.core.interceptor.Interceptor;
import org.apache.directory.server.core.interceptor.NextInterceptor;
+import org.apache.directory.server.core.interceptor.context.EntryServiceContext;
import org.apache.directory.server.core.interceptor.context.LookupServiceContext;
import org.apache.directory.server.core.interceptor.context.ServiceContext;
import org.apache.directory.server.core.invocation.InvocationStack;
@@ -419,10 +420,10 @@
}
- public boolean hasEntry( NextInterceptor nextInterceptor, LdapDN name ) throws NamingException
+ public boolean hasEntry( NextInterceptor nextInterceptor, ServiceContext entryContext ) throws NamingException
{
// Ask others first.
- boolean hasEntry = nextInterceptor.hasEntry( name );
+ boolean hasEntry = nextInterceptor.hasEntry( entryContext );
// If the entry exists,
if ( hasEntry )
@@ -430,7 +431,7 @@
// Check DELETED attribute.
try
{
- Attributes entry = nextInterceptor.lookup( new LookupServiceContext( name ) );
+ Attributes entry = nextInterceptor.lookup( new LookupServiceContext( ((EntryServiceContext)entryContext).getEntryDn() ) );
hasEntry = !isDeleted( entry );
}
catch ( NameNotFoundException e )