directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r658876 - in /directory/apacheds/branches/bigbang/core/src: main/java/org/apache/directory/server/core/ main/java/org/apache/directory/server/core/partition/ main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ test/java/or...
Date Wed, 21 May 2008 21:14:09 GMT
Author: elecharny
Date: Wed May 21 14:14:09 2008
New Revision: 658876

URL: http://svn.apache.org/viewvc?rev=658876&view=rev
Log:
fixing issues with Cursor verses NamingEnumeration usage in Interceptors

Modified:
    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/partition/DefaultPartitionNexus.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.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
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java

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=658876&r1=658875&r2=658876&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 May 21 14:14:09 2008
@@ -1325,7 +1325,7 @@
                 ResultCodeEnum.OTHER );
         }
 
-        Set<Index<Object,ServerEntry>> indexedAttributes = new HashSet<Index<Object,ServerEntry>>();
+        Set<Index<?,ServerEntry>> indexedAttributes = new HashSet<Index<?,ServerEntry>>();
         
         for ( String attributeId : listing.getIndexedAttributes() )
         {

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=658876&r1=658875&r2=658876&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Wed May 21 14:14:09 2008
@@ -28,7 +28,6 @@
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
@@ -405,7 +404,7 @@
             // add all attribute oids of index configs to a hashset
             if ( override instanceof JdbmPartition )
             {
-                Set<Index<Object,ServerEntry>> indices = ( ( JdbmPartition )
override ).getIndexedAttributes();
+                Set<Index<?,ServerEntry>> indices = ( ( JdbmPartition ) override
).getIndexedAttributes();
                 Set<String> indexOids = new HashSet<String>();
                 OidRegistry registry = registries.getOidRegistry();
 
@@ -437,7 +436,7 @@
             system.setSuffix( ServerDNConstants.SYSTEM_DN );
     
             // Add objectClass attribute for the system partition
-            Set<Index<Object,ServerEntry>> indexedAttrs = new HashSet<Index<Object,ServerEntry>>();
+            Set<Index<?,ServerEntry>> indexedAttrs = new HashSet<Index<?,ServerEntry>>();
             indexedAttrs.add( new JdbmIndex( SchemaConstants.OBJECT_CLASS_AT ) );
             ( ( JdbmPartition ) system ).setIndexedAttributes( indexedAttrs );
     

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=658876&r1=658875&r2=658876&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
Wed May 21 14:14:09 2008
@@ -66,7 +66,7 @@
 {
     private JdbmStore<ServerEntry> store;
     private boolean optimizerEnabled = true;
-    private Set<Index<Object,ServerEntry>> indexedAttributes;
+    private Set<Index<?,ServerEntry>> indexedAttributes;
 
     
     // ------------------------------------------------------------------------
@@ -80,7 +80,7 @@
     public JdbmPartition()
     {
         store = new JdbmStore<ServerEntry>();
-        indexedAttributes = new HashSet<Index<Object,ServerEntry>>();
+        indexedAttributes = new HashSet<Index<?,ServerEntry>>();
     }
 
 
@@ -101,13 +101,13 @@
     }
 
 
-    public void setIndexedAttributes( Set<Index<Object,ServerEntry>> indexedAttributes
)
+    public void setIndexedAttributes( Set<Index<?,ServerEntry>> indexedAttributes
)
     {
         this.indexedAttributes = indexedAttributes;
     }
 
 
-    public Set<Index<Object,ServerEntry>> getIndexedAttributes()
+    public Set<Index<?,ServerEntry>> getIndexedAttributes()
     {
         return indexedAttributes;
     }

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=658876&r1=658875&r2=658876&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 May 21 14:14:09 2008
@@ -24,9 +24,9 @@
 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.cursor.Cursor;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.entry.ServerSearchResult;
 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;
@@ -170,25 +170,27 @@
         final int count;
 
 
-        public MockProxy(int count) throws NamingException 
+        public MockProxy(int count) throws Exception 
         {
             super( new DeadContext(), new MockDirectoryService() );
             this.count = count;
         }
 
 
-        public NamingEnumeration<ServerSearchResult> search( SearchOperationContext
opContext )
+        public Cursor<ServerEntry> search( SearchOperationContext opContext )
             throws NamingException
         {
-            //noinspection unchecked
-            return new BogusEnumeration( count );
+            //TODO FixMe
+            //return new BogusEnumeration( count );
+            return null;
         }
 
 
-        public NamingEnumeration<ServerSearchResult> search( SearchOperationContext
opContext, Collection bypass ) throws NamingException
+        public Cursor<ServerEntry> search( SearchOperationContext opContext, Collection
bypass ) throws NamingException
         {
-            //noinspection unchecked
-            return new BogusEnumeration( count );
+            //// TODO FixMe
+            //return new BogusEnumeration( count );
+            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=658876&r1=658875&r2=658876&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 May 21 14:14:09 2008
@@ -91,7 +91,7 @@
     }
 
 
-    public void testNoBypass() throws NamingException
+    public void testNoBypass() throws Exception
     {
         LdapDN dn = new LdapDN( "ou=system" );
         Context ctx = new DeadContext();
@@ -116,7 +116,7 @@
     }
 
 
-    public void testSingleBypass() throws NamingException
+    public void testSingleBypass() throws Exception
     {
         LdapDN dn = new LdapDN( "ou=system" );
         Context ctx = new DeadContext();
@@ -141,7 +141,7 @@
     }
 
 
-    public void testAdjacentDoubleBypass() throws NamingException
+    public void testAdjacentDoubleBypass() throws Exception
     {
         LdapDN dn = new LdapDN( "ou=system" );
         Context ctx = new DeadContext();
@@ -169,7 +169,7 @@
     }
 
 
-    public void testFrontAndBackDoubleBypass() throws NamingException
+    public void testFrontAndBackDoubleBypass() throws Exception
     {
         LdapDN dn = new LdapDN( "ou=system" );
         Context ctx = new DeadContext();
@@ -196,7 +196,7 @@
     }
 
 
-    public void testDoubleBypass() throws NamingException
+    public void testDoubleBypass() throws Exception
     {
         LdapDN dn = new LdapDN( "ou=system" );
         Context ctx = new DeadContext();
@@ -223,7 +223,7 @@
     }
 
 
-    public void testCompleteBypass() throws NamingException
+    public void testCompleteBypass() throws Exception
     {
         LdapDN dn = new LdapDN( "ou=system" );
         Context ctx = new DeadContext();

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java?rev=658876&r1=658875&r2=658876&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/interceptor/MockInterceptor.java
Wed May 21 14:14:09 2008
@@ -21,8 +21,8 @@
 
 
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.cursor.Cursor;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.entry.ServerSearchResult;
 import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
@@ -44,7 +44,6 @@
 import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
-import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import java.util.Iterator;
 
@@ -84,28 +83,28 @@
     }
 
 
-    public ServerEntry getRootDSE( NextInterceptor next, GetRootDSEOperationContext opContext
) throws NamingException
+    public ServerEntry getRootDSE( NextInterceptor next, GetRootDSEOperationContext opContext
) throws Exception
     {
         test.interceptors.add( this );
         return next.getRootDSE( opContext );
     }
 
 
-    public LdapDN getMatchedName ( NextInterceptor next, GetMatchedNameOperationContext opContext
) throws NamingException
+    public LdapDN getMatchedName ( NextInterceptor next, GetMatchedNameOperationContext opContext
) throws Exception
     {
         test.interceptors.add( this );
         return next.getMatchedName( opContext );
     }
 
 
-    public LdapDN getSuffix ( NextInterceptor next, GetSuffixOperationContext opContext )
throws NamingException
+    public LdapDN getSuffix ( NextInterceptor next, GetSuffixOperationContext opContext )
throws Exception
     {
         test.interceptors.add( this );
         return next.getSuffix( opContext );
     }
 
 
-    public Iterator listSuffixes ( NextInterceptor next, ListSuffixOperationContext opContext
) throws NamingException
+    public Iterator listSuffixes ( NextInterceptor next, ListSuffixOperationContext opContext
) throws Exception
     {
         test.interceptors.add( this );
         return next.listSuffixes( opContext );
@@ -113,28 +112,28 @@
 
 
     public void addContextPartition( NextInterceptor next, AddContextPartitionOperationContext
opContext )
-        throws NamingException
+        throws Exception
     {
         test.interceptors.add( this );
         next.addContextPartition( opContext );
     }
 
 
-    public void removeContextPartition( NextInterceptor next, RemoveContextPartitionOperationContext
opContext ) throws NamingException
+    public void removeContextPartition( NextInterceptor next, RemoveContextPartitionOperationContext
opContext ) throws Exception
     {
         test.interceptors.add( this );
         next.removeContextPartition( opContext );
     }
 
 
-    public boolean compare( NextInterceptor next, CompareOperationContext opContext ) throws
NamingException
+    public boolean compare( NextInterceptor next, CompareOperationContext opContext ) throws
Exception
     {
         test.interceptors.add( this );
         return next.compare( opContext );
     }
 
 
-    public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws NamingException
+    public void delete( NextInterceptor next, DeleteOperationContext opContext ) throws Exception
     {
         test.interceptors.add( this );
         next.delete( opContext );
@@ -142,42 +141,42 @@
 
 
     public void add( NextInterceptor next, AddOperationContext opContext )
-        throws NamingException
+        throws Exception
     {
         test.interceptors.add( this );
         next.add( opContext );
     }
 
 
-    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws NamingException
+    public void modify( NextInterceptor next, ModifyOperationContext opContext ) throws Exception
     {
         test.interceptors.add( this );
         next.modify( opContext );
     }
 
 
-    public NamingEnumeration list( NextInterceptor next, ListOperationContext opContext )
throws NamingException
+    public Cursor<ServerEntry> list( NextInterceptor next, ListOperationContext opContext
) throws Exception
     {
         test.interceptors.add( this );
         return next.list( opContext );
     }
 
 
-    public NamingEnumeration<ServerSearchResult> search( NextInterceptor next, SearchOperationContext
opContext ) throws NamingException
+    public Cursor<ServerEntry> search( NextInterceptor next, SearchOperationContext
opContext ) throws Exception
     {
         test.interceptors.add( this );
         return next.search( opContext );
     }
 
 
-    public ServerEntry lookup( NextInterceptor next, LookupOperationContext opContext ) throws
NamingException
+    public ServerEntry lookup( NextInterceptor next, LookupOperationContext opContext ) throws
Exception
     {
         test.interceptors.add( this );
         return next.lookup( opContext );
     }
 
 
-    public boolean hasEntry( NextInterceptor next, EntryOperationContext opContext ) throws
NamingException
+    public boolean hasEntry( NextInterceptor next, EntryOperationContext opContext ) throws
Exception
     {
         test.interceptors.add( this );
         return next.hasEntry( opContext );
@@ -185,14 +184,14 @@
 
 
     public void rename( NextInterceptor next, RenameOperationContext opContext )
-        throws NamingException
+        throws Exception
     {
         test.interceptors.add( this );
         next.rename( opContext );
     }
 
 
-    public void move( NextInterceptor next, MoveOperationContext opContext ) throws NamingException
+    public void move( NextInterceptor next, MoveOperationContext opContext ) throws Exception
     {
         test.interceptors.add( this );
         next.move( opContext );
@@ -200,7 +199,7 @@
 
 
     public void moveAndRename( NextInterceptor next, MoveAndRenameOperationContext opContext
)
-        throws NamingException
+        throws Exception
     {
         test.interceptors.add( this );
         next.moveAndRename( opContext );
@@ -208,14 +207,14 @@
 
 
     public void bind( NextInterceptor next, BindOperationContext opContext )
-    throws NamingException
+    throws Exception
     {
         test.interceptors.add( this );
         next.bind( opContext );
     }
 
 
-    public void unbind( NextInterceptor next, UnbindOperationContext opContext ) throws NamingException
+    public void unbind( NextInterceptor next, UnbindOperationContext opContext ) throws Exception
     {
         test.interceptors.add( this );
         next.unbind( opContext );

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java?rev=658876&r1=658875&r2=658876&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
Wed May 21 14:14:09 2008
@@ -136,7 +136,7 @@
         schemaPartition.setId( "schema" );
         schemaPartition.setCacheSize( 1000 );
 
-        Set<Index> indexedAttributes = new HashSet<Index>();
+        Set<Index<?, ServerEntry>> indexedAttributes = new HashSet<Index<?,
ServerEntry>>();
         for ( String attributeId : extractor.getDbFileListing().getIndexedAttributes() )
         {
             indexedAttributes.add( new JdbmIndex( attributeId ) );
@@ -153,7 +153,7 @@
     }
     
     
-    @Test public void testGetSchemas() throws NamingException
+    @Test public void testGetSchemas() throws Exception
     {
         PartitionSchemaLoader loader = new PartitionSchemaLoader( schemaPartition, registries
);
         Map<String,Schema> schemas = loader.getSchemas();
@@ -272,7 +272,7 @@
     }
     
     
-    @Test public void testGetSchemaNames() throws NamingException
+    @Test public void testGetSchemaNames() throws Exception
     {
         PartitionSchemaLoader loader = new PartitionSchemaLoader( schemaPartition, registries
);
         Set<String> schemaNames = loader.getSchemaNames();



Mime
View raw message