directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r599217 - in /directory/apacheds/branches/bigbang: core-unit/src/test/java/org/apache/directory/server/core/changelog/ core/src/main/java/org/apache/directory/server/core/ core/src/main/java/org/apache/directory/server/core/changelog/ core/...
Date Thu, 29 Nov 2007 00:13:00 GMT
Author: akarasulu
Date: Wed Nov 28 16:12:58 2007
New Revision: 599217

URL: http://svn.apache.org/viewvc?rev=599217&view=rev
Log:
added tests for the remained of revert operation types

Modified:
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/changelog/DefaultChangeLogITest.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DirectoryService.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java

Modified: directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/changelog/DefaultChangeLogITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/changelog/DefaultChangeLogITest.java?rev=599217&r1=599216&r2=599217&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/changelog/DefaultChangeLogITest.java
(original)
+++ directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/changelog/DefaultChangeLogITest.java
Wed Nov 28 16:12:58 2007
@@ -19,12 +19,29 @@
 package org.apache.directory.server.core.changelog;
 
 
-import org.apache.directory.server.core.unit.AbstractTestCase;
+import junit.framework.TestCase;
+import org.apache.commons.io.FileUtils;
+import org.apache.directory.server.core.DefaultDirectoryService;
+import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.authn.LdapPrincipal;
+import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.message.ModificationItemImpl;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.util.StringTools;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
+import javax.naming.ldap.LdapContext;
+import java.io.File;
+import java.io.IOException;
+import java.util.Arrays;
 
 
 /**
@@ -35,23 +52,109 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class DefaultChangeLogITest extends AbstractTestCase
+public class DefaultChangeLogITest extends TestCase
 {
+    public static final Logger LOG = LoggerFactory.getLogger( DefaultChangeLogITest.class
);
+
+    /** the context root for the system partition */
+    protected LdapContext sysRoot;
+    protected DirectoryService service;
+
+
+    public DefaultChangeLogITest()
+    {
+        this.service = new DefaultDirectoryService();
+    }
+
+
     /**
-     * Can go away once we remove the need for authentication in super class.
+     * Get's the initial context factory for the provider's ou=system context
+     * root.
      *
-     * @see <a href="https://issues.apache.org/jira/browse/DIRSERVER-1105">DIRSERVER-1105<a/>
+     * @see junit.framework.TestCase#setUp()
      */
-    public DefaultChangeLogITest()
+    protected void setUp() throws Exception
     {
-        super( "uid=admin,ou=system", "secret" );
+        super.setUp();
+        service.setShutdownHookEnabled( false );
+        service.getChangeLog().setEnabled( true );
+        doDelete( service.getWorkingDirectory() );
+        service.startup();
+        sysRoot = service.getJndiContext( new LdapPrincipal( new LdapDN(), AuthenticationLevel.SIMPLE
), "ou=system" );
     }
 
 
-    public void setUp() throws Exception
+    /**
+     * Deletes the working directory.
+     *
+     * @param wkdir the working directory to delete
+     * @throws IOException if the working directory cannot be deleted
+     */
+    protected void doDelete( File wkdir ) throws IOException
     {
-        service.getChangeLog().setEnabled( true );
-        super.setUp();
+        if ( wkdir.exists() )
+        {
+            try
+            {
+                FileUtils.deleteDirectory( wkdir );
+            }
+            catch ( IOException e )
+            {
+                LOG.error( "Failed to delete the working directory.", e );
+            }
+        }
+        if ( wkdir.exists() )
+        {
+            throw new IOException( "Failed to delete: " + wkdir );
+        }
+    }
+
+
+    /**
+     * Issues a shutdown request to the server.
+     */
+    protected void shutdown()
+    {
+        try
+        {
+            service.shutdown();
+        }
+        catch ( Exception e )
+        {
+            LOG.error( "Encountered an error while shutting down directory service.", e );
+        }
+        sysRoot = null;
+        Runtime.getRuntime().gc();
+    }
+
+
+    /**
+     * Issues a sync request to the server.
+     */
+    protected void sync()
+    {
+        try
+        {
+            service.sync();
+        }
+        catch ( Exception e )
+        {
+            LOG.warn( "Encountered error while syncing.", e );
+        }
+    }
+
+
+    /**
+     * Sets the system context root to null.
+     *
+     * @see junit.framework.TestCase#tearDown()
+     */
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+        shutdown();
+        service = new DefaultDirectoryService();
+        doDelete( service.getWorkingDirectory() );
     }
 
 
@@ -138,6 +241,140 @@
         service.revert( t0.getRevision() );
         assertNotPresent( sysRoot, "ou=newname" );
         assertNotNull( sysRoot.getAttributes( "ou=oldname" ) );
+    }
+
+
+    public void testRevertModifyOperations() throws NamingException
+    {
+        AttributesImpl attrs = new AttributesImpl( "objectClass", "organizationalUnit", true
);
+        attrs.put( "ou", "test" );
+        sysRoot.createSubcontext( "ou=test", attrs );
+
+        // -------------------------------------------------------------------
+        // Modify ADD Test
+        // -------------------------------------------------------------------
+
+        // tag after the addition before modify ADD
+        Tag t0 = service.getChangeLog().tag();
+        assertNotNull( sysRoot.getAttributes( "ou=test" ) );
+
+        // modify the test entry to add description and test new attr appears
+        sysRoot.modifyAttributes( "ou=test", DirContext.ADD_ATTRIBUTE,
+                new AttributesImpl( "description", "a desc value", true ) );
+        Attributes resusitated = sysRoot.getAttributes( "ou=test" );
+        assertNotNull( resusitated );
+        Attribute description = resusitated.get( "description" );
+        assertNotNull( description );
+        assertEquals( "a desc value", description.get() );
+
+        // now revert and assert that the added entry re-appears
+        service.revert( t0.getRevision() );
+        resusitated = sysRoot.getAttributes( "ou=test" );
+        assertNotNull( resusitated );
+        assertNull( resusitated.get( "description" ) );
+
+        // -------------------------------------------------------------------
+        // Modify REPLACE Test
+        // -------------------------------------------------------------------
+
+        // add the attribute again and make sure it is old value
+        sysRoot.modifyAttributes( "ou=test", DirContext.ADD_ATTRIBUTE,
+                new AttributesImpl( "description", "old value", true ) );
+        resusitated = sysRoot.getAttributes( "ou=test" );
+        assertNotNull( resusitated );
+        description = resusitated.get( "description" );
+        assertNotNull( description );
+        assertEquals( description.get(), "old value" );
+
+        // now tag then replace the value to "new value" and confirm
+        Tag t1 = service.getChangeLog().tag();
+        sysRoot.modifyAttributes( "ou=test", DirContext.REPLACE_ATTRIBUTE,
+                new AttributesImpl( "description", "new value", true ) );
+        resusitated = sysRoot.getAttributes( "ou=test" );
+        assertNotNull( resusitated );
+        description = resusitated.get( "description" );
+        assertNotNull( description );
+        assertEquals( description.get(), "new value" );
+
+        // now revert and assert the old value is now reverted
+        service.revert( t1.getRevision() );
+        resusitated = sysRoot.getAttributes( "ou=test" );
+        assertNotNull( resusitated );
+        description = resusitated.get( "description" );
+        assertNotNull( description );
+        assertEquals( description.get(), "old value" );
+
+
+        // -------------------------------------------------------------------
+        // Modify REMOVE Test
+        // -------------------------------------------------------------------
+
+        Tag t2 = service.getChangeLog().tag();
+        sysRoot.modifyAttributes( "ou=test", DirContext.REMOVE_ATTRIBUTE,
+                new AttributesImpl( "description", "old value", true ) );
+        resusitated = sysRoot.getAttributes( "ou=test" );
+        assertNotNull( resusitated );
+        description = resusitated.get( "description" );
+        assertNull( description );
+
+        // now revert and assert the old value is now reverted
+        service.revert( t2.getRevision() );
+        resusitated = sysRoot.getAttributes( "ou=test" );
+        assertNotNull( resusitated );
+        description = resusitated.get( "description" );
+        assertNotNull( description );
+        assertEquals( description.get(), "old value" );
+
+        // -------------------------------------------------------------------
+        // Modify Multi Operation Test
+        // -------------------------------------------------------------------
+
+        // add a userPassword attribute so we can test replacing it
+        sysRoot.modifyAttributes( "ou=test", DirContext.ADD_ATTRIBUTE,
+                new AttributesImpl( "userPassword", "to be replaced", true ) );
+        assertPassword( sysRoot.getAttributes( "ou=test" ), "to be replaced" );
+
+        ModificationItemImpl[] mods = new ModificationItemImpl[]
+        {
+            new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE,
+                    new AttributeImpl( "description", "old value" ) ),
+            new ModificationItemImpl( DirContext.ADD_ATTRIBUTE,
+                    new AttributeImpl( "seeAlso", "ou=added" ) ),
+            new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE,
+                    new AttributeImpl( "userPassword", "a replaced value" ) )
+        };
+        Tag t3 = service.getChangeLog().tag();
+
+        // now make the modification and check that description is gone,
+        // seeAlso is added, and that the userPassword has been replaced
+        sysRoot.modifyAttributes( "ou=test", mods );
+        resusitated = sysRoot.getAttributes( "ou=test" );
+        assertNotNull( resusitated );
+        description = resusitated.get( "description" );
+        assertNull( description );
+        assertPassword( resusitated, "a replaced value" );
+        Attribute seeAlso = resusitated.get( "seeAlso" );
+        assertNotNull( seeAlso );
+        assertEquals( seeAlso.get(), "ou=added" );
+
+        // now we revert and make sure the old values are as they were
+        service.revert( t3.getRevision() );
+        resusitated = sysRoot.getAttributes( "ou=test" );
+        assertNotNull( resusitated );
+        description = resusitated.get( "description" );
+        assertNotNull( description );
+        assertEquals( description.get(), "old value" );
+        assertPassword( resusitated, "to be replaced" );
+        seeAlso = resusitated.get( "seeAlso" );
+        assertNull( seeAlso );
+    }
+
+
+    private void assertPassword( Attributes entry, String password ) throws NamingException
+    {
+        Attribute userPassword = entry.get( "userPassword" );
+        assertNotNull( userPassword );
+        Arrays.equals( password.getBytes(), ( byte[] ) userPassword.get() );
     }
 
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=599217&r1=599216&r2=599217&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Wed Nov 28 16:12:58 2007
@@ -85,6 +85,7 @@
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
+import javax.naming.ldap.LdapContext;
 import java.io.File;
 import java.io.IOException;
 import java.util.*;
@@ -497,31 +498,31 @@
     }
 
 
-    public DirContext getJndiContext() throws NamingException
+    public LdapContext getJndiContext() throws NamingException
     {
         return this.getJndiContext( null, null, null, AuthenticationLevel.NONE.toString(),
"" );
     }
 
 
-    public DirContext getJndiContext( String dn ) throws NamingException
+    public LdapContext getJndiContext( String dn ) throws NamingException
     {
         return this.getJndiContext( null, null, null, AuthenticationLevel.NONE.toString(),
dn );
     }
 
 
-    public DirContext getJndiContext( LdapPrincipal principal ) throws NamingException
+    public LdapContext getJndiContext( LdapPrincipal principal ) throws NamingException
     {
         return new ServerLdapContext( this, principal, new LdapDN() );
     }
 
 
-    public DirContext getJndiContext( LdapPrincipal principal, String dn ) throws NamingException
+    public LdapContext getJndiContext( LdapPrincipal principal, String dn ) throws NamingException
     {
         return new ServerLdapContext( this, principal, new LdapDN( dn ) );
     }
 
 
-    public synchronized DirContext getJndiContext( LdapDN principalDn, String principal,
byte[] credential,
+    public synchronized LdapContext getJndiContext( LdapDN principalDn, String principal,
byte[] credential,
         String authentication, String rootDN ) throws NamingException
     {
         checkSecuritySettings( principal, credential, authentication );

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DirectoryService.java?rev=599217&r1=599216&r2=599217&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DirectoryService.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/DirectoryService.java
Wed Nov 28 16:12:58 2007
@@ -36,6 +36,7 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.DirContext;
+import javax.naming.ldap.LdapContext;
 import java.io.File;
 import java.util.List;
 import java.util.Set;
@@ -130,7 +131,7 @@
      * @return a JNDI context to the RootDSE
      * @throws NamingException if failed to create a context
      */
-    DirContext getJndiContext() throws NamingException;
+    LdapContext getJndiContext() throws NamingException;
 
 
     /**
@@ -141,7 +142,7 @@
      * @return a JNDI context to the entry at the specified DN
      * @throws NamingException if failed to create a context
      */
-    DirContext getJndiContext( String dn ) throws NamingException;
+    LdapContext getJndiContext( String dn ) throws NamingException;
 
 
     /**
@@ -152,7 +153,7 @@
      * @return a JNDI context to the RootDSE as a specific user
      * @throws NamingException if failed to create a context
      */
-    DirContext getJndiContext( LdapPrincipal principal ) throws NamingException;
+    LdapContext getJndiContext( LdapPrincipal principal ) throws NamingException;
 
 
     /**
@@ -164,7 +165,7 @@
      * @return a JNDI context to the specified entry as a specific user
      * @throws NamingException if failed to create a context
      */
-    DirContext getJndiContext( LdapPrincipal principal, String dn ) throws NamingException;
+    LdapContext getJndiContext( LdapPrincipal principal, String dn ) throws NamingException;
 
 
     /**
@@ -180,7 +181,7 @@
      * @return a JNDI context to the specified entry as a specific user
      * @throws NamingException if failed to create a context
      */
-    DirContext getJndiContext( LdapDN principalDn, String principal, byte[] credential,
+    LdapContext getJndiContext( LdapDN principalDn, String principal, byte[] credential,
         String authentication, String dn ) throws NamingException;
 
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java?rev=599217&r1=599216&r2=599217&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogInterceptor.java
Wed Nov 28 16:12:58 2007
@@ -133,26 +133,30 @@
 
     public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws NamingException
     {
-        next.modify( opContext );
+        Attributes attributes = null;
+        boolean isDelete = AttributeUtils.getAttribute( opContext.getModItems(), entryDeleted
) != null;
 
-        // @TODO: needs big consideration!!!
-        // NOTE: perhaps we need to log this as a system operation that cannot and should
not be reapplied?
-        if ( AttributeUtils.getAttribute( opContext.getModItems(), entryDeleted ) != null
)
+        if ( ! isDelete && changeLog.isEnabled() )
         {
-            LOG.debug( "Bypassing changelog on modify of entryDeleted attribute." );
-            return;
+            // @todo make sure we're not putting in operational attributes that cannot be
user modified
+            Invocation invocation = InvocationStack.getInstance().peek();
+            PartitionNexusProxy proxy = invocation.getProxy();
+            attributes = proxy.lookup( new LookupOperationContext( opContext.getDn() ),
+                    PartitionNexusProxy.LOOKUP_BYPASS );
         }
 
-        if ( ! changeLog.isEnabled() )
+        next.modify( opContext );
+
+        // @TODO: needs big consideration!!!
+        // NOTE: perhaps we need to log this as a system operation that cannot and should
not be reapplied?
+        if ( isDelete || ! changeLog.isEnabled() )
         {
+            if ( isDelete )
+            {
+                LOG.debug( "Bypassing changelog on modify of entryDeleted attribute." );
+            }
             return;
         }
-
-        // @todo make sure we're not putting in operational attributes that cannot be user
modified
-        Invocation invocation = InvocationStack.getInstance().peek();
-        PartitionNexusProxy proxy = invocation.getProxy();
-        Attributes attributes = proxy.lookup( new LookupOperationContext( opContext.getDn()
),
-                PartitionNexusProxy.LOOKUP_BYPASS );
 
         Entry forward = new Entry();
         forward.setChangeType( ChangeType.Modify );

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java?rev=599217&r1=599216&r2=599217&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java
Wed Nov 28 16:12:58 2007
@@ -25,16 +25,19 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.authn.LdapPrincipal;
 import org.apache.directory.server.core.changelog.ChangeLog;
-import org.apache.directory.server.core.schema.SchemaManager;
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.interceptor.InterceptorChain;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.jndi.DeadContext;
 import org.apache.directory.server.core.partition.Partition;
-import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.server.core.partition.PartitionNexus;
+import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.server.core.schema.SchemaManager;
 import org.apache.directory.server.schema.registries.Registries;
-import org.apache.directory.shared.ldap.aci.*;
+import org.apache.directory.shared.ldap.aci.ACITuple;
+import org.apache.directory.shared.ldap.aci.MicroOperation;
+import org.apache.directory.shared.ldap.aci.ProtectedItem;
+import org.apache.directory.shared.ldap.aci.UserClass;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.ldif.Entry;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
@@ -44,8 +47,7 @@
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.SearchResult;
-import javax.naming.directory.DirContext;
-
+import javax.naming.ldap.LdapContext;
 import java.io.File;
 import java.util.*;
 
@@ -264,7 +266,7 @@
         }
 
 
-        public DirContext getJndiContext() throws NamingException
+        public LdapContext getJndiContext() throws NamingException
         {
             return null;
         }
@@ -276,25 +278,25 @@
         }
 
 
-        public DirContext getJndiContext( String baseName ) throws NamingException
+        public LdapContext getJndiContext( String baseName ) throws NamingException
         {
             return null;
         }
 
 
-        public DirContext getJndiContext( LdapPrincipal principal ) throws NamingException
+        public LdapContext getJndiContext( LdapPrincipal principal ) throws NamingException
         {
             return null;
         }
 
 
-        public DirContext getJndiContext( LdapPrincipal principal, String dn ) throws NamingException
+        public LdapContext getJndiContext( LdapPrincipal principal, String dn ) throws NamingException
         {
             return null;
         }
 
 
-        public DirContext getJndiContext( LdapDN principalDn, String principal, byte[] credential,

+        public LdapContext getJndiContext( LdapDN principalDn, String principal, byte[] credential,

             String authentication, String baseName ) throws NamingException
         {
             return null;

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java?rev=599217&r1=599216&r2=599217&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
Wed Nov 28 16:12:58 2007
@@ -24,22 +24,21 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.authn.LdapPrincipal;
 import org.apache.directory.server.core.changelog.ChangeLog;
-import org.apache.directory.server.core.schema.SchemaManager;
 import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
 import org.apache.directory.server.core.invocation.Invocation;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.jndi.DeadContext;
 import org.apache.directory.server.core.partition.Partition;
-import org.apache.directory.server.core.partition.PartitionNexusProxy;
 import org.apache.directory.server.core.partition.PartitionNexus;
+import org.apache.directory.server.core.partition.PartitionNexusProxy;
+import org.apache.directory.server.core.schema.SchemaManager;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.ldif.Entry;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 import javax.naming.Context;
 import javax.naming.NamingException;
-import javax.naming.directory.DirContext;
-
+import javax.naming.ldap.LdapContext;
 import java.io.File;
 import java.util.*;
 
@@ -327,7 +326,7 @@
         }
 
 
-        public DirContext getJndiContext() throws NamingException
+        public LdapContext getJndiContext() throws NamingException
         {
             return null;
         }
@@ -339,25 +338,25 @@
         }
 
 
-        public DirContext getJndiContext( String baseName ) throws NamingException
+        public LdapContext getJndiContext( String baseName ) throws NamingException
         {
             return null;
         }
 
 
-        public DirContext getJndiContext( LdapPrincipal principal ) throws NamingException
+        public LdapContext getJndiContext( LdapPrincipal principal ) throws NamingException
         {
             return null;
         }
 
 
-        public DirContext getJndiContext( LdapPrincipal principal, String dn ) throws NamingException
+        public LdapContext getJndiContext( LdapPrincipal principal, String dn ) throws NamingException
         {
             return null;
         }
 
 
-        public DirContext getJndiContext( LdapDN principalDn, String principal, byte[] credential,

+        public LdapContext getJndiContext( LdapDN principalDn, String principal, byte[] credential,
             String authentication, String baseName ) throws NamingException
         {
             return null;



Mime
View raw message