hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahue...@apache.org
Subject svn commit: r499965 - in /hivemind/hivemind2/trunk: framework/src/java/org/apache/hivemind/definition/ framework/src/java/org/apache/hivemind/definition/impl/ xml/src/java/org/apache/hivemind/impl/
Date Thu, 25 Jan 2007 20:52:34 GMT
Author: ahuegen
Date: Thu Jan 25 12:52:33 2007
New Revision: 499965

URL: http://svn.apache.org/viewvc?view=rev&rev=499965
Log:
Last setter removed from configurationPointDefinition 

Modified:
    hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/definition/ConfigurationPointDefinition.java
    hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/definition/impl/ConfigurationPointDefinitionImpl.java
    hivemind/hivemind2/trunk/xml/src/java/org/apache/hivemind/impl/XmlExtensionResolver.java
    hivemind/hivemind2/trunk/xml/src/java/org/apache/hivemind/impl/XmlModuleDescriptorProcessor.java

Modified: hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/definition/ConfigurationPointDefinition.java
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/definition/ConfigurationPointDefinition.java?view=diff&rev=499965&r1=499964&r2=499965
==============================================================================
--- hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/definition/ConfigurationPointDefinition.java
(original)
+++ hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/definition/ConfigurationPointDefinition.java
Thu Jan 25 12:52:33 2007
@@ -8,8 +8,6 @@
 {
     public String getConfigurationTypeName();
 
-    public void setConfigurationTypeName(String typeName);
-
     public Occurances getExpectedContributions();
 
     public Collection getContributions();

Modified: hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/definition/impl/ConfigurationPointDefinitionImpl.java
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/definition/impl/ConfigurationPointDefinitionImpl.java?view=diff&rev=499965&r1=499964&r2=499965
==============================================================================
--- hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/definition/impl/ConfigurationPointDefinitionImpl.java
(original)
+++ hivemind/hivemind2/trunk/framework/src/java/org/apache/hivemind/definition/impl/ConfigurationPointDefinitionImpl.java
Thu Jan 25 12:52:33 2007
@@ -48,7 +48,7 @@
     }
 
     /**
-     * @see org.apache.hivemind.definition.ConfigurationPointDefinition#setConfigurationTypeName(java.lang.String)
+     * Set the class name of the configuration.
      */
     public void setConfigurationTypeName(String containerClassName)
     {

Modified: hivemind/hivemind2/trunk/xml/src/java/org/apache/hivemind/impl/XmlExtensionResolver.java
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/xml/src/java/org/apache/hivemind/impl/XmlExtensionResolver.java?view=diff&rev=499965&r1=499964&r2=499965
==============================================================================
--- hivemind/hivemind2/trunk/xml/src/java/org/apache/hivemind/impl/XmlExtensionResolver.java
(original)
+++ hivemind/hivemind2/trunk/xml/src/java/org/apache/hivemind/impl/XmlExtensionResolver.java
Thu Jan 25 12:52:33 2007
@@ -17,6 +17,7 @@
 import org.apache.hivemind.definition.ServicePointDefinition;
 import org.apache.hivemind.definition.UnresolvedExtension;
 import org.apache.hivemind.definition.impl.ConfigurationParserDefinitionImpl;
+import org.apache.hivemind.definition.impl.ConfigurationPointDefinitionImpl;
 import org.apache.hivemind.schema.Schema;
 import org.apache.hivemind.util.IdUtils;
 import org.apache.hivemind.util.UniqueHashMap;
@@ -156,10 +157,15 @@
                 
                 cpd.addParser(parserDef);
                 
-                // For backward compatibility
+                // For backward compatibility change the configuration to Map if the schema
uses a map too
                 if (HashMap.class.getName().equals(schema.getRootElementClassName())
                         || UniqueHashMap.class.getName().equals(schema.getRootElementClassName()))
{
-                    cpd.setConfigurationTypeName(Map.class.getName());
+                    // The schema assignments are mainly used for backward compatibility
so we can 
+                    // expect to deal here with a configuration point from the core or xml
module.
+                    // The cast prevents us from putting the setter into the public api of
the ConfigurationPointDefinition
+                    if (cpd instanceof ConfigurationPointDefinitionImpl) {
+                        ((ConfigurationPointDefinitionImpl) cpd).setConfigurationTypeName(Map.class.getName());
+                    }
                 }
                 
             }

Modified: hivemind/hivemind2/trunk/xml/src/java/org/apache/hivemind/impl/XmlModuleDescriptorProcessor.java
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/xml/src/java/org/apache/hivemind/impl/XmlModuleDescriptorProcessor.java?view=diff&rev=499965&r1=499964&r2=499965
==============================================================================
--- hivemind/hivemind2/trunk/xml/src/java/org/apache/hivemind/impl/XmlModuleDescriptorProcessor.java
(original)
+++ hivemind/hivemind2/trunk/xml/src/java/org/apache/hivemind/impl/XmlModuleDescriptorProcessor.java
Thu Jan 25 12:52:33 2007
@@ -262,6 +262,7 @@
                 // TODO: compare container class name and rootElementClassName
                 if (HashMap.class.getName().equals(cpd.getContributionsSchema().getRootElementClassName())
                     || UniqueHashMap.class.getName().equals(cpd.getContributionsSchema().getRootElementClassName()))
{
+                    
                     configurationPoint.setConfigurationTypeName(Map.class.getName());
                 }
 



Mime
View raw message