directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1145690 - in /directory/apacheds/trunk: core-api/src/main/java/org/apache/directory/server/core/partition/ core-api/src/main/java/org/apache/directory/server/core/schema/ ldif-partition/src/main/java/org/apache/directory/server/core/partit...
Date Tue, 12 Jul 2011 17:37:39 GMT
Author: elecharny
Date: Tue Jul 12 17:37:39 2011
New Revision: 1145690

URL: http://svn.apache.org/viewvc?rev=1145690&view=rev
Log:
o Removed the useless NullPartition
o Removed the useless @override annotations
o Removed the useless abstract method from AbstractBTreePartition

Removed:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/NullPartition.java
Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
    directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/AbstractLdifPartition.java
    directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
    directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
    directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ReadOnlyConfigurationPartition.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java?rev=1145690&r1=1145689&r2=1145690&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
Tue Jul 12 17:37:39 2011
@@ -41,7 +41,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
 import org.apache.directory.server.core.partition.AbstractPartition;
 import org.apache.directory.server.core.partition.ByPassConstants;
-import org.apache.directory.server.core.partition.NullPartition;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.schema.registries.synchronizers.RegistrySynchronizerAdaptor;
 import org.apache.directory.server.i18n.I18n;
@@ -109,7 +108,7 @@ public final class SchemaPartition exten
     private static final String ID = "schema";
 
     /** the wrapped Partition */
-    private Partition wrapped = new NullPartition();
+    private Partition wrapped;
 
     /** registry synchronizer adaptor */
     private RegistrySynchronizerAdaptor synchronizer;
@@ -221,13 +220,6 @@ public final class SchemaPartition exten
             wrapped.initialize();
 
             synchronizer = new RegistrySynchronizerAdaptor( schemaManager );
-
-            if ( wrapped instanceof NullPartition )
-            {
-                LOG.warn( "BYPASSING CRITICAL SCHEMA PROCESSING CODE DURING HEAVY DEV.  "
-                    + "PLEASE REMOVE THIS CONDITION BY USING A VALID SCHEMA PARTITION!!!"
);
-                return;
-            }
         }
         catch ( Exception e )
         {

Modified: directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/AbstractLdifPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/AbstractLdifPartition.java?rev=1145690&r1=1145689&r2=1145690&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/AbstractLdifPartition.java
(original)
+++ directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/AbstractLdifPartition.java
Tue Jul 12 17:37:39 2011
@@ -93,7 +93,6 @@ public abstract class AbstractLdifPartit
     /**
      * {@inheritDoc}
      */
-    @Override
     public void addIndexOn( Index<?, Entry, Long> index ) throws Exception
     {
         wrappedPartition.addIndexOn( index );
@@ -103,7 +102,6 @@ public abstract class AbstractLdifPartit
     /**
      * {@inheritDoc}
      */
-    @Override
     public int count() throws Exception
     {
         return wrappedPartition.count();
@@ -123,7 +121,6 @@ public abstract class AbstractLdifPartit
     /**
      * {@inheritDoc}
      */
-    @Override
     public Index<String, Entry, Long> getAliasIndex()
     {
         return wrappedPartition.getAliasIndex();
@@ -143,7 +140,6 @@ public abstract class AbstractLdifPartit
     /**
      * {@inheritDoc}
      */
-    @Override
     public Dn getEntryDn( Long id ) throws Exception
     {
         return wrappedPartition.getEntryDn( id );
@@ -163,7 +159,6 @@ public abstract class AbstractLdifPartit
     /**
      * {@inheritDoc}
      */
-    @Override
     public Index<Long, Entry, Long> getOneAliasIndex()
     {
         return wrappedPartition.getOneAliasIndex();
@@ -173,7 +168,6 @@ public abstract class AbstractLdifPartit
     /**
      * {@inheritDoc}
      */
-    @Override
     public Index<Long, Entry, Long> getOneLevelIndex()
     {
         return wrappedPartition.getOneLevelIndex();
@@ -183,7 +177,6 @@ public abstract class AbstractLdifPartit
     /**
      * {@inheritDoc}
      */
-    @Override
     public Index<String, Entry, Long> getPresenceIndex()
     {
         return wrappedPartition.getPresenceIndex();
@@ -193,7 +186,6 @@ public abstract class AbstractLdifPartit
     /**
      * {@inheritDoc}
      */
-    @Override
     public Index<Long, Entry, Long> getSubAliasIndex()
     {
         return wrappedPartition.getSubAliasIndex();
@@ -203,7 +195,6 @@ public abstract class AbstractLdifPartit
     /**
      * {@inheritDoc}
      */
-    @Override
     public Index<Long, Entry, Long> getSubLevelIndex()
     {
         return wrappedPartition.getSubLevelIndex();
@@ -213,7 +204,6 @@ public abstract class AbstractLdifPartit
     /**
      * {@inheritDoc}
      */
-    @Override
     public Index<?, Entry, Long> getSystemIndex( AttributeType attributeType ) throws
Exception
     {
         return wrappedPartition.getSystemIndex( attributeType );
@@ -223,7 +213,6 @@ public abstract class AbstractLdifPartit
     /**
      * {@inheritDoc}
      */
-    @Override
     public Iterator<String> getSystemIndices()
     {
         return wrappedPartition.getSystemIndices();
@@ -233,7 +222,6 @@ public abstract class AbstractLdifPartit
     /**
      * {@inheritDoc}
      */
-    @Override
     public Index<?, Entry, Long> getUserIndex( AttributeType attributeType ) throws
Exception
     {
         return wrappedPartition.getUserIndex( attributeType );
@@ -243,7 +231,6 @@ public abstract class AbstractLdifPartit
     /**
      * {@inheritDoc}
      */
-    @Override
     public Iterator<String> getUserIndices()
     {
         return wrappedPartition.getUserIndices();
@@ -253,7 +240,6 @@ public abstract class AbstractLdifPartit
     /**
      * {@inheritDoc}
      */
-    @Override
     public boolean hasSystemIndexOn( AttributeType attributeType ) throws Exception
     {
         return wrappedPartition.hasSystemIndexOn( attributeType );
@@ -263,7 +249,6 @@ public abstract class AbstractLdifPartit
     /**
      * {@inheritDoc}
      */
-    @Override
     public boolean hasUserIndexOn( AttributeType attributeType ) throws Exception
     {
         return wrappedPartition.hasUserIndexOn( attributeType );

Modified: directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java?rev=1145690&r1=1145689&r2=1145690&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
(original)
+++ directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
Tue Jul 12 17:37:39 2011
@@ -229,7 +229,6 @@ public class LdifPartition extends Abstr
     /**
      * {@inheritDoc}
      */
-    @Override
     public void add( AddOperationContext addContext ) throws LdapException
     {
         wrappedPartition.add( addContext );
@@ -282,7 +281,6 @@ public class LdifPartition extends Abstr
     /**
      * {@inheritDoc}
      */
-    @Override
     public void modify( ModifyOperationContext modifyContext ) throws LdapException
     {
         Long id = getEntryId( modifyContext.getDn() );
@@ -313,7 +311,6 @@ public class LdifPartition extends Abstr
     /**
      * {@inheritDoc}
      */
-    @Override
     public void move( MoveOperationContext moveContext ) throws LdapException
     {
         Dn oldDn = moveContext.getDn();
@@ -331,7 +328,6 @@ public class LdifPartition extends Abstr
     /**
      * {@inheritDoc}
      */
-    @Override
     public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws
LdapException
     {
         Dn oldDn = moveAndRenameContext.getDn();
@@ -350,7 +346,6 @@ public class LdifPartition extends Abstr
     /**
      * {@inheritDoc}
      */
-    @Override
     public void rename( RenameOperationContext renameContext ) throws LdapException
     {
         Dn oldDn = renameContext.getDn();

Modified: directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java?rev=1145690&r1=1145689&r2=1145690&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
(original)
+++ directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
Tue Jul 12 17:37:39 2011
@@ -182,7 +182,6 @@ public class SingleFileLdifPartition ext
     }
 
 
-    @Override
     public void add( AddOperationContext addContext ) throws LdapException
     {
         synchronized ( lock )
@@ -205,7 +204,6 @@ public class SingleFileLdifPartition ext
     }
 
 
-    @Override
     public void modify( ModifyOperationContext modifyContext ) throws LdapException
     {
         synchronized ( lock )
@@ -217,7 +215,6 @@ public class SingleFileLdifPartition ext
     }
 
 
-    @Override
     public void rename( RenameOperationContext renameContext ) throws LdapException
     {
         synchronized ( lock )
@@ -229,7 +226,6 @@ public class SingleFileLdifPartition ext
     }
 
 
-    @Override
     public void move( MoveOperationContext moveContext ) throws LdapException
     {
         synchronized ( lock )
@@ -241,7 +237,6 @@ public class SingleFileLdifPartition ext
     }
 
 
-    @Override
     public void moveAndRename( MoveAndRenameOperationContext opContext ) throws LdapException
     {
         synchronized ( lock )

Modified: directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ReadOnlyConfigurationPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ReadOnlyConfigurationPartition.java?rev=1145690&r1=1145689&r2=1145690&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ReadOnlyConfigurationPartition.java
(original)
+++ directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ReadOnlyConfigurationPartition.java
Tue Jul 12 17:37:39 2011
@@ -32,7 +32,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
 import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
 import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
-import org.apache.directory.server.core.partition.impl.avl.AvlPartition;
 import org.apache.directory.server.core.partition.ldif.AbstractLdifPartition;
 import org.apache.directory.server.xdbm.impl.avl.AvlStore;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
@@ -77,7 +76,6 @@ public class ReadOnlyConfigurationPartit
     protected void doInit() throws InvalidNameException, Exception
     {
         // Initializing the wrapped partition
-        setWrappedPartition( new AvlPartition() );
         setId( "config" );
         setSuffix( new Dn( "ou=config" ) );
         wrappedPartition.setSchemaManager( schemaManager );

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java?rev=1145690&r1=1145689&r2=1145690&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
Tue Jul 12 17:37:39 2011
@@ -30,15 +30,10 @@ import javax.naming.directory.SearchCont
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.BaseEntryFilteringCursor;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
-import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
 import org.apache.directory.server.core.interceptor.context.ListOperationContext;
 import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
-import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
-import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
-import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
-import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.partition.AbstractPartition;
 import org.apache.directory.server.core.partition.Partition;
@@ -194,6 +189,29 @@ public abstract class AbstractBTreeParti
         this.id = id;
     }
 
+    public abstract ID getEntryId( Dn dn ) throws LdapException;
+    
+    public abstract int getChildCount( ID id ) throws LdapException;
+
+    public abstract void delete( ID id ) throws LdapException;
+
+    public abstract IndexCursor<ID, Entry, ID> list( ID id ) throws LdapException;
+
+    public abstract Entry lookup( ID id ) throws LdapException;
+
+    public abstract Dn getEntryDn( ID id ) throws Exception;
+
+    public abstract boolean hasUserIndexOn( AttributeType attributeType ) throws Exception;
+
+    public abstract Index<?, Entry, ID> getSystemIndex( AttributeType attributeType
) throws Exception;
+
+    public abstract Index<?, Entry, ID> getUserIndex( AttributeType attributeType )
throws Exception;
+
+    public abstract boolean hasSystemIndexOn( AttributeType attributeType ) throws Exception;
+
+    public abstract Iterator<String> getUserIndices();
+
+    public abstract Iterator<String> getSystemIndices();
 
     // -----------------------------------------------------------------------
     // E N D   C O N F I G U R A T I O N   M E T H O D S
@@ -245,12 +263,6 @@ public abstract class AbstractBTreeParti
     }
 
 
-    public abstract void add( AddOperationContext addContext ) throws LdapException;
-
-
-    public abstract void modify( ModifyOperationContext modifyContext ) throws LdapException;
-
-
     public EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException
     {
         return new BaseEntryFilteringCursor( new ServerEntryCursorAdaptor<ID>( this,
list( getEntryId( listContext
@@ -374,84 +386,9 @@ public abstract class AbstractBTreeParti
     }
 
 
-    public abstract void rename( RenameOperationContext renameContext ) throws LdapException;
-
-
-    public abstract void move( MoveOperationContext moveContext ) throws LdapException;
-
-
-    public abstract void moveAndRename( MoveAndRenameOperationContext opContext ) throws
LdapException;
-
-
-    public abstract void sync() throws Exception;
-
-
-    ////////////////////
-    // public abstract methods
-
     // ------------------------------------------------------------------------
     // Index Operations
     // ------------------------------------------------------------------------
-
-    public abstract void addIndexOn( Index<?, Entry, ID> index ) throws Exception;
-
-
-    public abstract boolean hasUserIndexOn( AttributeType attributeType ) throws Exception;
-
-
-    public abstract boolean hasSystemIndexOn( AttributeType attributeType ) throws Exception;
-
-
-    public abstract Index<String, Entry, ID> getPresenceIndex();
-
-
-    /**
-     * Gets the Index mapping the primary keys of parents to the
-     * primary keys of their children.
-     *
-     * @return the one level Index
-     */
-    public abstract Index<ID, Entry, ID> getOneLevelIndex();
-
-
-    /**
-     * Gets the Index mapping the primary keys of ancestors to the
-     * primary keys of their descendants.
-     *
-     * @return the sub tree level Index
-     */
-    public abstract Index<ID, Entry, ID> getSubLevelIndex();
-
-
-    /**
-     * Gets the alias index mapping parent entries with scope expanding aliases
-     * children one level below them; this system index is used to dereference
-     * aliases on one/single level scoped searches.
-     *
-     * @return the one alias index
-     */
-    public abstract Index<ID, Entry, ID> getOneAliasIndex();
-
-
-    /**
-     * Gets the alias index mapping relative entries with scope expanding
-     * alias descendents; this system index is used to dereference aliases on
-     * subtree scoped searches.
-     *
-     * @return the sub alias index
-     */
-    public abstract Index<ID, Entry, ID> getSubAliasIndex();
-
-
-    /**
-     * Gets the system index defined on the ALIAS_ATTRIBUTE which for LDAP would
-     * be the aliasedObjectName and for X.500 would be aliasedEntryName.
-     *
-     * @return the index on the ALIAS_ATTRIBUTE
-     */
-    public abstract Index<String, Entry, ID> getAliasIndex();
-
-
     /**
      * {@inheritDoc}
      */
@@ -473,45 +410,4 @@ public abstract class AbstractBTreeParti
     {
         return suffix;
     }
-
-
-    public abstract Index<?, Entry, ID> getUserIndex( AttributeType attributeType )
throws Exception;
-
-
-    public abstract Index<?, Entry, ID> getSystemIndex( AttributeType attributeType
) throws Exception;
-
-
-    public abstract ID getEntryId( Dn dn ) throws LdapException;
-
-
-    public abstract Dn getEntryDn( ID id ) throws Exception;
-
-
-    public abstract Entry lookup( ID id ) throws LdapException;
-
-
-    public abstract void delete( ID id ) throws LdapException;
-
-
-    public abstract IndexCursor<ID, Entry, ID> list( ID id ) throws LdapException;
-
-
-    public abstract int getChildCount( ID id ) throws LdapException;
-
-
-    public abstract Iterator<String> getUserIndices();
-
-
-    public abstract Iterator<String> getSystemIndices();
-
-
-    /**
-     * Gets the count of the total number of entries in the database.
-     *
-     * TODO shouldn't this be a BigInteger instead of an int?
-     *
-     * @return the number of entries in the database
-     * @throws Exception if there is a failure to read the count
-     */
-    public abstract int count() throws Exception;
 }



Mime
View raw message