directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r559474 - /directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/SchemaHandler.java
Date Wed, 25 Jul 2007 14:23:42 GMT
Author: pamarcelot
Date: Wed Jul 25 07:23:39 2007
New Revision: 559474

URL: http://svn.apache.org/viewvc?view=rev&rev=559474
Log:
Added the Schema Listeners when notify an Add/Modify/Remove of an AttributeType/ObjectClass/MatchingRule/Syntax.

Modified:
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/SchemaHandler.java

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/SchemaHandler.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/SchemaHandler.java?view=diff&rev=559474&r1=559473&r2=559474
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/SchemaHandler.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/SchemaHandler.java
Wed Jul 25 07:23:39 2007
@@ -887,10 +887,21 @@
      */
     private void notifyAttributeTypeAdded( AttributeTypeImpl at )
     {
+        // SchemaHandler Listeners
         for ( SchemaHandlerListener listener : schemaHandlerListeners )
         {
             listener.attributeTypeAdded( at );
         }
+
+        // Schema Listeners
+        List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( at.getSchema()
) );
+        if ( listeners != null )
+        {
+            for ( Object object : listeners )
+            {
+                ( ( SchemaListener ) object ).attributeTypeAdded( at );
+            }
+        }
     }
 
 
@@ -902,10 +913,21 @@
      */
     private void notifyAttributeTypeModified( AttributeTypeImpl at )
     {
+        // SchemaHandler Listeners
         for ( SchemaHandlerListener listener : schemaHandlerListeners )
         {
             listener.attributeTypeModified( at );
         }
+
+        // Schema Listeners
+        List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( at.getSchema()
) );
+        if ( listeners != null )
+        {
+            for ( Object object : listeners )
+            {
+                ( ( SchemaListener ) object ).attributeTypeModified( at );
+            }
+        }
     }
 
 
@@ -917,10 +939,21 @@
      */
     private void notifyAttributeTypeRemoved( AttributeTypeImpl at )
     {
+        // SchemaHandler Listeners
         for ( SchemaHandlerListener listener : schemaHandlerListeners )
         {
             listener.attributeTypeRemoved( at );
         }
+
+        // Schema Listeners
+        List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( at.getSchema()
) );
+        if ( listeners != null )
+        {
+            for ( Object object : listeners )
+            {
+                ( ( SchemaListener ) object ).attributeTypeRemoved( at );
+            }
+        }
     }
 
 
@@ -932,10 +965,21 @@
      */
     private void notifyObjectClassAdded( ObjectClassImpl oc )
     {
+        // SchemaHandler Listeners
         for ( SchemaHandlerListener listener : schemaHandlerListeners )
         {
             listener.objectClassAdded( oc );
         }
+
+        // Schema Listeners
+        List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( oc.getSchema()
) );
+        if ( listeners != null )
+        {
+            for ( Object object : listeners )
+            {
+                ( ( SchemaListener ) object ).objectClassAdded( oc );
+            }
+        }
     }
 
 
@@ -947,10 +991,21 @@
      */
     private void notifyObjectClassModified( ObjectClassImpl oc )
     {
+        // SchemaHandler Listeners
         for ( SchemaHandlerListener listener : schemaHandlerListeners )
         {
             listener.objectClassModified( oc );
         }
+
+        // Schema Listeners
+        List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( oc.getSchema()
) );
+        if ( listeners != null )
+        {
+            for ( Object object : listeners )
+            {
+                ( ( SchemaListener ) object ).objectClassModified( oc );
+            }
+        }
     }
 
 
@@ -962,10 +1017,21 @@
      */
     private void notifyObjectClassRemoved( ObjectClassImpl oc )
     {
+        // SchemaHandler Listeners
         for ( SchemaHandlerListener listener : schemaHandlerListeners )
         {
             listener.objectClassRemoved( oc );
         }
+
+        // Schema Listeners
+        List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( oc.getSchema()
) );
+        if ( listeners != null )
+        {
+            for ( Object object : listeners )
+            {
+                ( ( SchemaListener ) object ).objectClassModified( oc );
+            }
+        }
     }
 
 
@@ -977,10 +1043,21 @@
      */
     private void notifyMatchingRuleAdded( MatchingRuleImpl mr )
     {
+        // SchemaHandler Listeners
         for ( SchemaHandlerListener listener : schemaHandlerListeners )
         {
             listener.matchingRuleAdded( mr );
         }
+
+        // Schema Listeners
+        List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( mr.getSchema()
) );
+        if ( listeners != null )
+        {
+            for ( Object object : listeners )
+            {
+                ( ( SchemaListener ) object ).matchingRuleAdded( mr );
+            }
+        }
     }
 
 
@@ -992,10 +1069,21 @@
      */
     private void notifyMatchingRuleModified( MatchingRuleImpl mr )
     {
+        // SchemaHandler Listeners
         for ( SchemaHandlerListener listener : schemaHandlerListeners )
         {
             listener.matchingRuleModified( mr );
         }
+
+        // Schema Listeners
+        List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( mr.getSchema()
) );
+        if ( listeners != null )
+        {
+            for ( Object object : listeners )
+            {
+                ( ( SchemaListener ) object ).matchingRuleModified( mr );
+            }
+        }
     }
 
 
@@ -1007,10 +1095,21 @@
      */
     private void notifyMatchingRuleRemoved( MatchingRuleImpl mr )
     {
+        // SchemaHandler Listeners
         for ( SchemaHandlerListener listener : schemaHandlerListeners )
         {
             listener.matchingRuleRemoved( mr );
         }
+
+        // Schema Listeners
+        List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( mr.getSchema()
) );
+        if ( listeners != null )
+        {
+            for ( Object object : listeners )
+            {
+                ( ( SchemaListener ) object ).matchingRuleRemoved( mr );
+            }
+        }
     }
 
 
@@ -1022,10 +1121,21 @@
      */
     private void notifySyntaxRuleAdded( SyntaxImpl syntax )
     {
+        // SchemaHandler Listeners
         for ( SchemaHandlerListener listener : schemaHandlerListeners )
         {
             listener.syntaxAdded( syntax );
         }
+
+        // Schema Listeners
+        List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( syntax.getSchema()
) );
+        if ( listeners != null )
+        {
+            for ( Object object : listeners )
+            {
+                ( ( SchemaListener ) object ).syntaxAdded( syntax );
+            }
+        }
     }
 
 
@@ -1037,10 +1147,21 @@
      */
     private void notifySyntaxRuleModified( SyntaxImpl syntax )
     {
+        // SchemaHandler Listeners
         for ( SchemaHandlerListener listener : schemaHandlerListeners )
         {
             listener.syntaxModified( syntax );
         }
+
+        // Schema Listeners
+        List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( syntax.getSchema()
) );
+        if ( listeners != null )
+        {
+            for ( Object object : listeners )
+            {
+                ( ( SchemaListener ) object ).syntaxModified( syntax );
+            }
+        }
     }
 
 
@@ -1052,9 +1173,20 @@
      */
     private void notifySyntaxRemoved( SyntaxImpl syntax )
     {
+        // SchemaHandler Listeners
         for ( SchemaHandlerListener listener : schemaHandlerListeners )
         {
             listener.syntaxRemoved( syntax );
+        }
+
+        // Schema Listeners
+        List<?> listeners = ( List<?> ) schemaListeners.get( getSchema( syntax.getSchema()
) );
+        if ( listeners != null )
+        {
+            for ( Object object : listeners )
+            {
+                ( ( SchemaListener ) object ).syntaxRemoved( syntax );
+            }
         }
     }
 



Mime
View raw message