directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r581292 - /directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/hierarchy/HierarchyManager.java
Date Tue, 02 Oct 2007 16:22:48 GMT
Author: pamarcelot
Date: Tue Oct  2 09:22:46 2007
New Revision: 581292

URL: http://svn.apache.org/viewvc?rev=581292&view=rev
Log:
Fixed an issue when adding an object class.
Added correct behavior when modifying an object class.

Modified:
    directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/hierarchy/HierarchyManager.java

Modified: directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/hierarchy/HierarchyManager.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/hierarchy/HierarchyManager.java?rev=581292&r1=581291&r2=581292&view=diff
==============================================================================
--- directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/hierarchy/HierarchyManager.java
(original)
+++ directory/studio/trunk/studio-schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/hierarchy/HierarchyManager.java
Tue Oct  2 09:22:46 2007
@@ -168,6 +168,7 @@
                 {
                     parentsMap.put( oc, "2.5.6.0" );
                     childrenMap.put( "2.5.6.0", oc );
+                    childrenMap.put( root, oc );
                 }
             }
         }
@@ -365,7 +366,20 @@
      */
     public void objectClassModified( ObjectClassImpl oc )
     {
-        // TODO implement
+        // Removing the object class type
+        List<Object> parents = getParents( oc );
+        if ( parents != null )
+        {
+            for ( Object parent : parents )
+            {
+                childrenMap.remove( parent, oc );
+            }
+
+            parentsMap.remove( oc );
+        }
+
+        // Adding the object class again
+        addObjectClass( oc );
     }
 
 



Mime
View raw message