directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r813819 - in /directory/apacheds/branches/apacheds-schema: avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/ core/src/main/java/org/apache/directory/server/core/partition/impl/btree/
Date Fri, 11 Sep 2009 13:16:46 GMT
Author: elecharny
Date: Fri Sep 11 13:16:45 2009
New Revision: 813819

URL: http://svn.apache.org/viewvc?rev=813819&view=rev
Log:
Fixed some pb with the modify operation applied on schema

Modified:
    directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java
    directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java

Modified: directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java?rev=813819&r1=813818&r2=813819&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java
(original)
+++ directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java
Fri Sep 11 13:16:45 2009
@@ -22,6 +22,7 @@
 
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Set;
 
 import org.apache.directory.server.constants.ApacheSchemaConstants;
@@ -44,6 +45,7 @@
 import org.apache.directory.server.xdbm.search.impl.EvaluatorBuilder;
 import org.apache.directory.server.xdbm.search.impl.NoOpOptimizer;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 
@@ -443,12 +445,24 @@
         return store.getProperty( propertyName );
     }
 
-
+    
+    /**
+     * {@inheritDoc}
+     */
     public final void modify( ModifyOperationContext modifyContext ) throws Exception
     {
         store.modify( modifyContext.getDn(), modifyContext.getModItems() );
     }
 
+    
+    /**
+     * {@inheritDoc}
+     */
+    public final void modify( long entryId, List<Modification> modifications ) throws
Exception
+    {
+        store.modify( entryId, modifications );
+    }
+
 
     public final void rename( RenameOperationContext renameContext ) throws Exception
     {

Modified: directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java?rev=813819&r1=813818&r2=813819&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java
(original)
+++ directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java
Fri Sep 11 13:16:45 2009
@@ -1220,7 +1220,13 @@
     public void modify( LdapDN dn, List<Modification> mods ) throws Exception
     {
         Long id = getEntryId( dn.toString() );
-        ServerEntry entry = ( ServerEntry ) master.get( id );
+        modify( id, mods );
+    }
+
+
+    public void modify( long entryId, List<Modification> mods ) throws Exception
+    {
+        ServerEntry entry = ( ServerEntry ) master.get( entryId );
 
         for ( Modification mod : mods )
         {
@@ -1229,15 +1235,15 @@
             switch ( mod.getOperation() )
             {
                 case ADD_ATTRIBUTE:
-                    add( id, entry, attrMods );
+                    add( entryId, entry, attrMods );
                     break;
 
                 case REMOVE_ATTRIBUTE:
-                    remove( id, entry, attrMods );
+                    remove( entryId, entry, attrMods );
                     break;
 
                 case REPLACE_ATTRIBUTE:
-                    replace( id, entry, attrMods );
+                    replace( entryId, entry, attrMods );
                     break;
 
                 default:
@@ -1245,7 +1251,7 @@
             }
         }
 
-        master.put( id, entry );
+        master.put( entryId, entry );
     }
 
 

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?rev=813819&r1=813818&r2=813819&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
Fri Sep 11 13:16:45 2009
@@ -20,11 +20,20 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
+import java.io.File;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.naming.InvalidNameException;
+import javax.naming.directory.SearchControls;
+
 import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 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;
@@ -47,15 +56,6 @@
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.registries.Registries;
 
-import javax.naming.InvalidNameException;
-import javax.naming.directory.SearchControls;
-
-import java.io.File;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
 
 /**
  * An abstract {@link Partition} that uses general BTree operations.
@@ -242,6 +242,9 @@
     // ------------------------------------------------------------------------
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void delete( DeleteOperationContext opContext ) throws Exception
     {
         LdapDN dn = opContext.getDn();



Mime
View raw message