hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahue...@apache.org
Subject svn commit: r415201 [1/2] - in /jakarta/hivemind/branches/branch-2-0-annot/xml/src: descriptor/META-INF/ java/org/apache/hivemind/ java/org/apache/hivemind/ant/ java/org/apache/hivemind/impl/ java/org/apache/hivemind/parse/ java/org/apache/hivemind/sch...
Date Sun, 18 Jun 2006 21:52:43 GMT
Author: ahuegen
Date: Sun Jun 18 14:52:39 2006
New Revision: 415201

URL: http://svn.apache.org/viewvc?rev=415201&view=rev
Log: (empty)

Added:
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ServiceImplementationFactory.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/ServiceImplementationFactory.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ServiceImplementationFactoryParameters.java
      - copied, changed from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/ServiceImplementationFactoryParameters.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ServiceInterceptorFactory.java
      - copied, changed from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/ServiceInterceptorFactory.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/ServiceImplementationFactoryParametersImpl.java
      - copied, changed from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/ServiceImplementationFactoryParametersImpl.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/rules/AddToMapRule.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/ant/
      - copied from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/ant/
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/AttributeDefaults.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/AttributeDefaults.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/BadAttributes.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/BadAttributes.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/BadElement.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/BadElement.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/Basics.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/Basics.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/Basics2.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/Basics2.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/BooleanTranslator.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/BooleanTranslator.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/ComplexAttributeName.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/ComplexAttributeName.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/ComplexNameItem.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/ComplexNameItem.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/ConversionParentMethod.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/ConversionParentMethod.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/CustomRule.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/CustomRule.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/CustomRuleFailure.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/CustomRuleFailure.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/DataItem.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/DataItem.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/DuplicateAttribute.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/DuplicateAttribute.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/Empty.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/Empty.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/ExtraAttributeNames.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/ExtraAttributeNames.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/Frobable.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/Frobable.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/InstanceTranslator.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/InstanceTranslator.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/IntTranslator.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/IntTranslator.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/Localized.properties
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/Localized.properties
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/Localized.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/Localized.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/Localized_fr.properties
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/Localized_fr.properties
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/Nested.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/Nested.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/NoSchema.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/NoSchema.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/Null.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/Null.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/ObjectTranslator.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/ObjectTranslator.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/ResourceTranslator.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/ResourceTranslator.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/SetContributingModuleRule.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/SetContributingModuleRule.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/SetParent.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/SetParent.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/Simple.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/Simple.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/Structured.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/Structured.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/Symbols.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/Symbols.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/TestConfigurationPoint.java
      - copied, changed from r413747, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/TestConfigurationPoint.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/TestConversion.java
      - copied unchanged from r413747, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/TestConversion.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/TestUniqueElementAttribute.java
      - copied unchanged from r413747, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/TestUniqueElementAttribute.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/TooFew.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/TooFew.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/TooMany.xml
      - copied, changed from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/TooMany.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/UniqueAttributeBroken.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/UniqueAttributeBroken.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/UniqueAttributeDefinition.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/UniqueAttributeDefinition.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/UnknownContribution.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/UnknownContribution.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/impl/
      - copied from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/impl/
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/parse/
      - copied from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/parse/
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/parse/TestModuleDescriptor.java
      - copied unchanged from r413747, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/parse/TestModuleDescriptor.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/parse/TestToString.java
      - copied unchanged from r413747, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/parse/TestToString.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/ConfigurationTranslator.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/ConfigurationTranslator.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/DatumHolder.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/DatumHolder.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/IntHolder.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/IntHolder.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/InvokeFailure.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/InvokeFailure.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/MappedDatumHolder.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/MappedDatumHolder.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/PrivateObject.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/PrivateObject.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/SetPropertyRule.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/SetPropertyRule.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestBooleanTranslator.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/TestBooleanTranslator.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestConfigurationTranslator.java
      - copied unchanged from r413747, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/TestConfigurationTranslator.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestConvertInitializer.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/TestConvertInitializer.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestEnumerationTranslator.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/TestEnumerationTranslator.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestInstanceTranslator.java
      - copied unchanged from r413747, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/TestInstanceTranslator.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestInvokeParentRule.java
      - copied unchanged from r413747, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/TestInvokeParentRule.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestPushAttributeRule.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/TestPushAttributeRule.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestPushContentRule.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/TestPushContentRule.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestReadAttributeRule.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/TestReadAttributeRule.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestServicePointTranslator.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/TestServicePointTranslator.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestSetModule.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/TestSetModule.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestSetPropertyRule.java
      - copied unchanged from r413747, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/TestSetPropertyRule.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestSmartTranslator.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/TestSmartTranslator.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TruthTeller.java
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/TruthTeller.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/WrongType.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/WrongType.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/impl/
      - copied from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/rules/impl/
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/conditional/
      - copied from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/org/apache/hivemind/conditional/
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/impl/
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/impl/TestInvokeFactoryServiceConstructor.java
      - copied, changed from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/org/apache/hivemind/impl/TestInvokeFactoryServiceConstructor.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/impl/TestSchemaProcessor.java
      - copied, changed from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/org/apache/hivemind/impl/TestSchemaProcessor.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/xml/
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/xml/MissingSubModule.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/MissingSubModule.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/xml/NestedSubmodule.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/NestedSubmodule.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/xml/OuterModule.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/OuterModule.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/xml/Submodule.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/Submodule.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/xml/TestContains.java
      - copied, changed from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/TestContains.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/xml/TestSubModule.java
      - copied, changed from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/TestSubModule.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/xml/XmlTestCase.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/xml/contains.xml
      - copied unchanged from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/contains.xml
Removed:
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ModuleDescriptorProvider.java
Modified:
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/descriptor/META-INF/hivemodule.xml
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ant/ConstructRegistry.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ant/RegistrySerializer.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/ContributionImpl.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/CreateClassServiceConstructor.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/InvokeFactoryInterceptorConstructor.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/InvokeFactoryServiceConstructor.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/SchemaElement.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/SchemaProcessorImpl.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/ServiceInterceptorContributionImpl.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/XmlConfigurationConstructor.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/parse/DescriptorParser.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/parse/DescriptorParser.properties
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/parse/XmlResourceProcessor.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/ElementModel.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/Schema.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/impl/ElementModelImpl.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/impl/SchemaImpl.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/service/impl/BuilderFactory.java
    jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/parse/TestDescriptorParser.java

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/descriptor/META-INF/hivemodule.xml
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/descriptor/META-INF/hivemodule.xml?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/descriptor/META-INF/hivemodule.xml (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/descriptor/META-INF/hivemodule.xml Sun Jun 18 14:52:39 2006
@@ -168,7 +168,7 @@
     
     Used to construct a service from a class name and optional constructor parameters and properties.
       
-    <parameters-schema>
+    <parameters-schema root-element-class="service.impl.BuilderParameter">
       <element name="construct">
         A single construct element identifies the class to instantiate.
        
@@ -183,11 +183,9 @@
         <attribute name="error-log-property">The name of a property to assign the service's ErrorLog to.</attribute>
         
         <rules>
-          <create-object class="service.impl.BuilderParameter"/>
           <read-attribute attribute="class" property="className"/>
           <read-attribute attribute="initialize-method" property="initializeMethod"/>
           <read-attribute attribute="autowire-services" property="autowireServices"/>
-          <invoke-parent method="addElement"/>
           
           <create-object class="service.impl.BuilderMessagesFacet"/>
           <read-attribute attribute="messages-property" property="propertyName"/>

Copied: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ServiceImplementationFactoryParameters.java (from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/ServiceImplementationFactoryParameters.java)
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ServiceImplementationFactoryParameters.java?p2=jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ServiceImplementationFactoryParameters.java&p1=jakarta/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/ServiceImplementationFactoryParameters.java&r1=413141&r2=415201&rev=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/ServiceImplementationFactoryParameters.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ServiceImplementationFactoryParameters.java Sun Jun 18 14:52:39 2006
@@ -14,8 +14,6 @@
 
 package org.apache.hivemind;
 
-import java.util.List;
-
 import org.apache.commons.logging.Log;
 import org.apache.hivemind.internal.Module;
 
@@ -61,7 +59,7 @@
      * The parameters passed to the factory to guide the construction of the service. In most cases,
      * there will only be a single element in the list.
      */
-    public List getParameters();
+    public Object getParameters();
     
     /**
      * Returns the first parameter passed to the factory (since most factories

Copied: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ServiceInterceptorFactory.java (from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/ServiceInterceptorFactory.java)
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ServiceInterceptorFactory.java?p2=jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ServiceInterceptorFactory.java&p1=jakarta/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/ServiceInterceptorFactory.java&r1=413141&r2=415201&rev=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/ServiceInterceptorFactory.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ServiceInterceptorFactory.java Sun Jun 18 14:52:39 2006
@@ -14,8 +14,6 @@
 
 package org.apache.hivemind;
 
-import java.util.List;
-
 import org.apache.hivemind.internal.Module;
 
 /**
@@ -37,5 +35,5 @@
     /**
       * Creates an interceptor and pushes it onto the interceptor stack.
       */
-    public void createInterceptor(InterceptorStack stack, Module invokingModule, List parameters);
+    public void createInterceptor(InterceptorStack stack, Module invokingModule, Object parameters);
 }

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ant/ConstructRegistry.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ant/ConstructRegistry.java?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ant/ConstructRegistry.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ant/ConstructRegistry.java Sun Jun 18 14:52:39 2006
@@ -23,9 +23,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.hivemind.ModuleDescriptorProvider;
 import org.apache.hivemind.Resource;
-import org.apache.hivemind.impl.DefaultClassResolver;
 import org.apache.hivemind.util.FileResource;
 import org.apache.hivemind.util.URLResource;
 import org.apache.tools.ant.BuildException;
@@ -110,17 +108,18 @@
         {
             enqueue(moduleDescriptors);
 
-            ModuleDescriptorProvider provider = null;
+//            ModuleDescriptorProvider provider = null;
 //                new XmlModuleDescriptorProvider( 
 //                    new DefaultClassResolver(), _resourceQueue);
-
-            RegistrySerializer generator = new RegistrySerializer();
-
-            generator.addModuleDescriptorProvider(provider);
-
-            Document result = generator.createRegistryDocument();
-
-            return result;
+//
+//            RegistrySerializer generator = new RegistrySerializer();
+//
+//            generator.addModuleDescriptorProvider(provider);
+//
+//            Document result = generator.createRegistryDocument();
+//
+//            return result;
+            return null;
         }
         catch (Exception ex)
         {

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ant/RegistrySerializer.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ant/RegistrySerializer.java?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ant/RegistrySerializer.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/ant/RegistrySerializer.java Sun Jun 18 14:52:39 2006
@@ -29,7 +29,6 @@
 import org.apache.hivemind.Attribute;
 import org.apache.hivemind.ClassResolver;
 import org.apache.hivemind.ErrorHandler;
-import org.apache.hivemind.ModuleDescriptorProvider;
 import org.apache.hivemind.Occurances;
 import org.apache.hivemind.impl.DefaultClassResolver;
 import org.apache.hivemind.impl.DefaultErrorHandler;
@@ -103,11 +102,6 @@
         _handler = new DefaultErrorHandler();
     }
 
-    public void addModuleDescriptorProvider(ModuleDescriptorProvider provider)
-    {
-        _providers.add(provider);
-    }
-
     public Document createRegistryDocument()
     {
         DocumentBuilder builder = getBuilder();
@@ -120,25 +114,25 @@
 
         for (Iterator i = _providers.iterator(); i.hasNext();)
         {
-            ModuleDescriptorProvider provider = (ModuleDescriptorProvider) i.next();
-
-            processModuleDescriptorProvider(registry, provider);
+//            ModuleDescriptorProvider provider = (ModuleDescriptorProvider) i.next();
+//
+//            processModuleDescriptorProvider(registry, provider);
         }
 
         return _document;
     }
 
-    private void processModuleDescriptorProvider(Element registry, ModuleDescriptorProvider provider)
-    {
-        for (Iterator j = provider.getModuleDescriptors(_handler).iterator(); j.hasNext();)
-        {
-            _md = (ModuleDescriptor) j.next();
-
-            Element module = getModuleElement(_md);
-
-            registry.appendChild(module);
-        }
-    }
+//    private void processModuleDescriptorProvider(Element registry, ModuleDescriptorProvider provider)
+//    {
+//        for (Iterator j = provider.getModuleDescriptors(_handler).iterator(); j.hasNext();)
+//        {
+//            _md = (ModuleDescriptor) j.next();
+//
+//            Element module = getModuleElement(_md);
+//
+//            registry.appendChild(module);
+//        }
+//    }
 
     private Element getModuleElement(ModuleDescriptor md)
     {

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/ContributionImpl.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/ContributionImpl.java?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/ContributionImpl.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/ContributionImpl.java Sun Jun 18 14:52:39 2006
@@ -19,7 +19,9 @@
 import java.util.List;
 
 import org.apache.hivemind.ApplicationRuntimeException;
+import org.apache.hivemind.TranslatorManager;
 import org.apache.hivemind.impl.natures.XmlConfigurationPointNature;
+import org.apache.hivemind.impl.natures.XmlRegistryNature;
 import org.apache.hivemind.internal.ConfigurationPoint;
 import org.apache.hivemind.internal.Contribution;
 import org.apache.hivemind.internal.Module;
@@ -73,11 +75,20 @@
             throw new ApplicationRuntimeException("ConfigurationPoint has no xml nature");
         }
         
-        Schema contributionsSchema = xmlNature.getSchema();
-
         Module contributingModule = configurationPoint.getModule().getModule(_contributingModuleId);
-        SchemaProcessorImpl processor = new SchemaProcessorImpl(configurationPoint.getErrorLog(), contributionsSchema);
-        processor.process(container, getElements(), contributingModule);
+
+        XmlRegistryNature xmlRegistryNature = (XmlRegistryNature) contributingModule.getRegistryNature(XmlRegistryNature.class);
+        TranslatorManager translatorManager = xmlRegistryNature.getTranslationManager();
+
+        Schema contributionsSchema = xmlNature.getSchema();
+        if (contributionsSchema != null) {
+            SchemaProcessorImpl processor = new SchemaProcessorImpl(configurationPoint.getErrorLog(), contributionsSchema);
+            processor.process(container, getElements(), contributingModule, translatorManager);
+        } else {
+            // Expect a list that was created by {@link XmlConfigurationConstructor} for
+            // backward compatibility reasons
+            ((List) container).addAll(getElements());
+        }
 
         // After constructing the result, if the result
         // will be cached, then there's no need to keep

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/CreateClassServiceConstructor.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/CreateClassServiceConstructor.java?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/CreateClassServiceConstructor.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/CreateClassServiceConstructor.java Sun Jun 18 14:52:39 2006
@@ -31,6 +31,16 @@
 
     private String _instanceClassName;
 
+    public CreateClassServiceConstructor()
+    {
+    }
+    
+    public CreateClassServiceConstructor(String contributingModuleId, String instanceClassName)
+    {
+        _contributingModuleId = contributingModuleId;
+        _instanceClassName = instanceClassName;
+    }
+    
     public Object constructCoreServiceImplementation(ServicePoint servicePoint, Module contributingModule)
     {
         return InstanceCreationUtils.createInstance(
@@ -58,5 +68,6 @@
     {
         _instanceClassName = string;
     }
+
 
 }

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/InvokeFactoryInterceptorConstructor.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/InvokeFactoryInterceptorConstructor.java?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/InvokeFactoryInterceptorConstructor.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/InvokeFactoryInterceptorConstructor.java Sun Jun 18 14:52:39 2006
@@ -14,17 +14,20 @@
 
 package org.apache.hivemind.impl;
 
-import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.hivemind.ApplicationRuntimeException;
 import org.apache.hivemind.InterceptorStack;
 import org.apache.hivemind.ServiceInterceptorFactory;
+import org.apache.hivemind.TranslatorManager;
+import org.apache.hivemind.impl.natures.XmlRegistryNature;
 import org.apache.hivemind.impl.natures.XmlServicePointNature;
 import org.apache.hivemind.internal.Module;
 import org.apache.hivemind.internal.ServiceInterceptorConstructor;
 import org.apache.hivemind.internal.ServicePoint;
 import org.apache.hivemind.schema.Schema;
+import org.apache.hivemind.util.Defense;
+import org.apache.hivemind.util.InstanceCreationUtils;
 
 /**
  * Constructs a new interceptor by invoking methods on another service (which implements the
@@ -43,7 +46,7 @@
     private List _parameters;
 
     /** The parameters converted to objects as per the factory's parameter schema. */
-    private List _convertedParameters;
+    private Object _convertedParameters;
     
     public String getName()
     {
@@ -72,18 +75,21 @@
 
             XmlServicePointNature xmlNature = (XmlServicePointNature) factoryPoint.getNature(XmlServicePointNature.class);
             if (xmlNature == null) {
-                // TODO:
+                // TODO annotations: Externalize message
                 throw new ApplicationRuntimeException("ServicePoint has no xml nature");
             }
+            XmlRegistryNature xmlRegistryNature = (XmlRegistryNature) contributingModule.getRegistryNature(XmlRegistryNature.class);
+            TranslatorManager translatorManager = xmlRegistryNature.getTranslationManager();
 
             Schema schema = xmlNature.getParametersSchema();
+            if (schema != null) {
 
-            SchemaProcessorImpl processor = new SchemaProcessorImpl(factoryPoint.getErrorLog(),
-                    schema);
-
-            // TODO annotations: implement more generic parameter container
-            _convertedParameters = new ArrayList();
-            processor.process(_convertedParameters, _parameters, contributingModule);
+                SchemaProcessorImpl processor = new SchemaProcessorImpl(factoryPoint.getErrorLog(),
+                        schema);
+                
+                _convertedParameters = constructParametersContainer(schema.getRootElementClassName(), factoryPoint.getModule());
+                processor.process(_convertedParameters, _parameters, contributingModule, translatorManager);
+            }
         }
     }
 
@@ -111,5 +117,14 @@
     {
         _factoryServiceId = string;
     }
-
+    
+    public Object constructParametersContainer(String containerClassName, Module definingModule)
+    {
+        Defense.notNull(containerClassName, "containerClassName");
+        
+        return InstanceCreationUtils.createInstance(
+                definingModule,
+                containerClassName,
+                getLocation());
+    }
 }

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/InvokeFactoryServiceConstructor.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/InvokeFactoryServiceConstructor.java?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/InvokeFactoryServiceConstructor.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/InvokeFactoryServiceConstructor.java Sun Jun 18 14:52:39 2006
@@ -14,7 +14,6 @@
 
 package org.apache.hivemind.impl;
 
-import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.hivemind.ApplicationRuntimeException;
@@ -22,11 +21,15 @@
 import org.apache.hivemind.Occurances;
 import org.apache.hivemind.ServiceImplementationFactory;
 import org.apache.hivemind.ServiceImplementationFactoryParameters;
+import org.apache.hivemind.TranslatorManager;
+import org.apache.hivemind.impl.natures.XmlRegistryNature;
 import org.apache.hivemind.impl.natures.XmlServicePointNature;
 import org.apache.hivemind.internal.Module;
 import org.apache.hivemind.internal.ServiceImplementationConstructor;
 import org.apache.hivemind.internal.ServicePoint;
 import org.apache.hivemind.schema.Schema;
+import org.apache.hivemind.util.Defense;
+import org.apache.hivemind.util.InstanceCreationUtils;
 
 /**
  * Constructs a new service by invoking methods on another service (which implements the
@@ -48,7 +51,7 @@
     private ServiceImplementationFactory _factory;
 
     /** The parameters converted to objects as per the factory's parameter schema. */
-    private List _convertedParameters;
+    private Object _convertedParameters;
 
     public Object constructCoreServiceImplementation(ServicePoint servicePoint, Module contributingModule)
     {
@@ -77,46 +80,33 @@
         {
             ServicePoint factoryPoint = contributingModule.getServicePoint(_factoryServiceId);
 
+            ErrorLog errorLog = servicePoint.getErrorLog();
+
             XmlServicePointNature xmlNature = (XmlServicePointNature) factoryPoint.getNature(XmlServicePointNature.class);
             if (xmlNature == null) {
-                // TODO:
+                // TODO annotations:
                 throw new ApplicationRuntimeException("ServicePoint has no xml nature");
             }
-            
-            Occurances expected = xmlNature.getParametersCount();
+            XmlRegistryNature xmlRegistryNature = (XmlRegistryNature) contributingModule.getRegistryNature(XmlRegistryNature.class);
+            TranslatorManager translatorManager = xmlRegistryNature.getTranslationManager();
 
             _factory = (ServiceImplementationFactory) factoryPoint
                     .getService(ServiceImplementationFactory.class);
 
             Schema schema = xmlNature.getParametersSchema();
-
-            ErrorLog errorLog = servicePoint.getErrorLog();
-
-            SchemaProcessorImpl processor = new SchemaProcessorImpl(errorLog, schema);
-
-            // TODO: implement more generic parameter container
-            _convertedParameters = new ArrayList();
-            processor.process(_convertedParameters, _parameters, contributingModule);
-
-            checkParameterCounts(errorLog, expected);
+            if (schema != null) {
+                
+                Occurances expected = xmlNature.getParametersCount();
+                checkParameterCounts(errorLog, expected);
+
+                SchemaProcessorImpl processor = new SchemaProcessorImpl(errorLog, schema);
+    
+                _convertedParameters = constructParametersContainer(schema.getRootElementClassName(), factoryPoint.getModule());
+                processor.process(_convertedParameters, _parameters, contributingModule, translatorManager);
+            }
         }
     }
 
-    /**
-     * Checks that the number of parameter elements matches the expected count.
-     */
-    private void checkParameterCounts(ErrorLog log, Occurances expected)
-    {
-        int actual = _convertedParameters.size();
-
-        if (expected.inRange(actual))
-            return;
-
-        String message = ImplMessages.wrongNumberOfParameters(_factoryServiceId, actual, expected);
-
-        log.error(message, getLocation(), null);
-    }
-
     public String getContributingModuleId()
     {
         return _contributingModuleId;
@@ -140,6 +130,31 @@
     public void setFactoryServiceId(String string)
     {
         _factoryServiceId = string;
+    }
+    
+    public Object constructParametersContainer(String containerClassName, Module definingModule)
+    {
+        Defense.notNull(containerClassName, "containerClassName");
+        
+        return InstanceCreationUtils.createInstance(
+                definingModule,
+                containerClassName,
+                getLocation());
+    }
+    
+    /**
+     * Checks that the number of parameter elements matches the expected count.
+     */
+    private void checkParameterCounts(ErrorLog log, Occurances expected)
+    {
+        int actual = _parameters.size();
+
+        if (expected.inRange(actual))
+            return;
+
+        String message = ImplMessages.wrongNumberOfParameters(_factoryServiceId, actual, expected);
+
+        log.error(message, getLocation(), null);
     }
 
 }

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/SchemaElement.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/SchemaElement.java?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/SchemaElement.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/SchemaElement.java Sun Jun 18 14:52:39 2006
@@ -49,8 +49,6 @@
 
     private Set _knownAttributes = new HashSet();
 
-    private String _keyAttribute;
-
     private Map _nestedElements;
 
     /**
@@ -71,7 +69,6 @@
     {
         _processor = processor;
         _model = model;
-        _keyAttribute = model.getKeyAttribute();
 
         List attributeModels = model.getAttributeModels();
         int count = attributeModels.size();
@@ -93,12 +90,6 @@
             if (am.isUnique())
                 _attributeValues.put(name, new HashMap());
 
-            if (name.equals(_keyAttribute))
-            {
-                _requiredAttributes.add(name);
-                _attributeValues.put(name, new HashMap());
-            }
-
             if (am.getDefault() != null)
                 _attributeDefaults.put(am.getName(), am.getDefault());
 
@@ -281,8 +272,4 @@
         return (String) _attributeDefaults.get(attributeName);
     }
 
-    public String getKeyAttribute()
-    {
-        return _keyAttribute;
-    }
 }

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/SchemaProcessorImpl.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/SchemaProcessorImpl.java?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/SchemaProcessorImpl.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/SchemaProcessorImpl.java Sun Jun 18 14:52:39 2006
@@ -22,7 +22,6 @@
 import org.apache.hivemind.Element;
 import org.apache.hivemind.ErrorLog;
 import org.apache.hivemind.TranslatorManager;
-import org.apache.hivemind.impl.natures.XmlRegistryNature;
 import org.apache.hivemind.internal.Module;
 import org.apache.hivemind.schema.ElementModel;
 import org.apache.hivemind.schema.Schema;
@@ -47,6 +46,8 @@
 
     private Module _contributingModule;
     
+    private TranslatorManager _translatorManager;
+    
     /**
      * Map on element name to {@link SchemaElement}.
      */
@@ -155,7 +156,8 @@
      * Processes a single extension.
      * @param container  the configuration container in that the contribution is placed
      */
-    public void process(Object container, List elements, Module contributingModule)
+    public void process(Object container, List elements, Module contributingModule,
+            TranslatorManager translatorManager)
     {
         if (elements == null)
             return;
@@ -170,6 +172,7 @@
         push(container);
 
         _contributingModule = contributingModule;
+        _translatorManager = translatorManager;
 
         int count = elements.size();
 
@@ -252,8 +255,6 @@
 
     public Translator getTranslator(String translator)
     {
-        XmlRegistryNature xmlNature = (XmlRegistryNature) getContributingModule().getRegistryNature(XmlRegistryNature.class);
-        TranslatorManager translatorManager = xmlNature.getTranslationManager();
-        return translatorManager.getTranslator(translator);
+        return _translatorManager.getTranslator(translator);
     }
 }

Copied: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/ServiceImplementationFactoryParametersImpl.java (from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/ServiceImplementationFactoryParametersImpl.java)
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/ServiceImplementationFactoryParametersImpl.java?p2=jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/ServiceImplementationFactoryParametersImpl.java&p1=jakarta/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/ServiceImplementationFactoryParametersImpl.java&r1=413141&r2=415201&rev=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/framework/src/java/org/apache/hivemind/impl/ServiceImplementationFactoryParametersImpl.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/ServiceImplementationFactoryParametersImpl.java Sun Jun 18 14:52:39 2006
@@ -37,14 +37,13 @@
 
     private Module _invokingModule;
 
-    private List _parameters;
+    private Object _parameters;
 
     public ServiceImplementationFactoryParametersImpl(ServicePoint servicePoint,
-            Module invokingModule, List parameters)
+            Module invokingModule, Object parameters)
     {
         Defense.notNull(servicePoint, "servicePoint");
         Defense.notNull(invokingModule, "invokingModule");
-        Defense.notNull(parameters, "parameters");
 
         _servicePoint = servicePoint;
         _invokingModule = invokingModule;
@@ -60,7 +59,7 @@
         ServiceImplementationFactoryParametersImpl p = (ServiceImplementationFactoryParametersImpl) other;
 
         return _servicePoint == p._servicePoint && _invokingModule == p._invokingModule
-                && _parameters.equals(p._parameters);
+                && ((_parameters == null && p._parameters == null) || _parameters.equals(p._parameters));
     }
 
     public String getServiceId()
@@ -88,13 +87,20 @@
         return _invokingModule;
     }
 
-    public List getParameters()
+    public Object getParameters()
     {
         return _parameters;
     }
 
     public Object getFirstParameter()
     {
-        return _parameters.isEmpty() ? null : _parameters.get(0);
+        // For backward compatibility lists are handled specially. The behaviour
+        // of hivemind 1.x is emulated
+        if (_parameters instanceof List) {
+            return ((List) _parameters).isEmpty() ? null : ((List) _parameters).get(0);
+        } else {
+            return _parameters;
+        }
     }
+
 }

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/ServiceInterceptorContributionImpl.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/ServiceInterceptorContributionImpl.java?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/ServiceInterceptorContributionImpl.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/ServiceInterceptorContributionImpl.java Sun Jun 18 14:52:39 2006
@@ -20,6 +20,8 @@
 import org.apache.hivemind.ApplicationRuntimeException;
 import org.apache.hivemind.InterceptorStack;
 import org.apache.hivemind.ServiceInterceptorFactory;
+import org.apache.hivemind.TranslatorManager;
+import org.apache.hivemind.impl.natures.XmlRegistryNature;
 import org.apache.hivemind.impl.natures.XmlServicePointNature;
 import org.apache.hivemind.internal.Module;
 import org.apache.hivemind.internal.ServiceInterceptorContribution;
@@ -112,6 +114,8 @@
                 // TODO:
                 throw new ApplicationRuntimeException("ServicePoint has no xml nature");
             }
+            XmlRegistryNature xmlRegistryNature = (XmlRegistryNature) _contributingModule.getRegistryNature(XmlRegistryNature.class);
+            TranslatorManager translatorManager = xmlRegistryNature.getTranslationManager();
 
             Schema schema = xmlNature.getParametersSchema();
 
@@ -120,7 +124,7 @@
 
             // TODO annotations: implement more generic parameter container
             _convertedParameters = new ArrayList();
-            processor.process(_convertedParameters, _parameters, _contributingModule);
+            processor.process(_convertedParameters, _parameters, _contributingModule, translatorManager);
 
         }
     }

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/XmlConfigurationConstructor.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/XmlConfigurationConstructor.java?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/XmlConfigurationConstructor.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/impl/XmlConfigurationConstructor.java Sun Jun 18 14:52:39 2006
@@ -1,9 +1,10 @@
 package org.apache.hivemind.impl;
 
+import java.util.ArrayList;
+
 import org.apache.hivemind.Location;
 import org.apache.hivemind.internal.ConfigurationConstructor;
 import org.apache.hivemind.internal.Module;
-import org.apache.hivemind.util.Defense;
 import org.apache.hivemind.util.InstanceCreationUtils;
 
 public class XmlConfigurationConstructor implements ConfigurationConstructor
@@ -19,12 +20,18 @@
 
     public Object constructConfigurationContainer(Module contributingModule)
     {
-        Defense.notNull(_containerClassName, "_containerClassName");
-        
-        return InstanceCreationUtils.createInstance(
-                contributingModule,
-                _containerClassName,
-                getLocation());
+        if (_containerClassName == null) {
+            // For Backward compatiblity create an empty list. Contributions
+            // will be added unparsed
+            // TODO annotations: Diese Klasse gar nicht erst erzeugen, sondern
+            // speziellen NOSchemaConstructor
+            return new ArrayList();
+        } else {
+            return InstanceCreationUtils.createInstance(
+                    contributingModule,
+                    _containerClassName,
+                    getLocation());
+        }
     }
 
     public Location getLocation()

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/parse/DescriptorParser.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/parse/DescriptorParser.java?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/parse/DescriptorParser.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/parse/DescriptorParser.java Sun Jun 18 14:52:39 2006
@@ -700,15 +700,6 @@
 
         schema.setAnnotation(peekContent());
 
-        try
-        {
-            schema.validateKeyAttributes();
-        }
-        catch (ApplicationRuntimeException e)
-        {
-            _errorHandler.error(LOG, ParseMessages.invalidElementKeyAttribute(schema.getId(), e), e
-                    .getLocation(), e);
-        }
     }
 
     private void endConversion()
@@ -881,7 +872,6 @@
         checkAttributes();
 
         result.setElementName(getAttribute("name"));
-        result.setKeyAttribute(getAttribute("key-attribute"));
         result.setContentTranslator(getAttribute("content-translator"));
 
         return result;
@@ -893,17 +883,7 @@
 
         SchemaImpl schema = new SchemaImpl(_moduleDescriptor.getModuleId());
 
-        // Get the type of the root element
-        // For backward compatibility, ArrayList is the default
-        String rootElementClassName = getAttribute("root-element-class", ArrayList.class.getName());
-
-        // Qualify the interface name with the defined package name (which will
-        // often implicitly or explicitly match the module id).
-
-        String fullRootElementClassName = IdUtils.qualify(
-                _moduleDescriptor.getPackageName(),
-                rootElementClassName);
-        schema.setRootElementClassName(fullRootElementClassName);
+        processRootElementClassName(schema);
 
         push(elementName, schema, STATE_SCHEMA);
 
@@ -920,10 +900,27 @@
         checkAttributes("schema{embedded}");
     }
 
+    private void processRootElementClassName(SchemaImpl schema)
+    {
+        // Get the type of the root element
+        // For backward compatibility, ArrayList is the default
+        String rootElementClassName = getAttribute("root-element-class", ArrayList.class.getName());
+
+        // Qualify the interface name with the defined package name (which will
+        // often implicitly or explicitly match the module id).
+
+        String fullRootElementClassName = IdUtils.qualify(
+                _moduleDescriptor.getPackageName(),
+                rootElementClassName);
+        schema.setRootElementClassName(fullRootElementClassName);
+    }
+
     private void enterParametersSchema(String elementName)
     {
         ServicePointDescriptor spd = (ServicePointDescriptor) peekObject();
         SchemaImpl schema = new SchemaImpl(_moduleDescriptor.getModuleId());
+        
+        processRootElementClassName(schema);
 
         push(elementName, schema, STATE_SCHEMA);
 
@@ -1072,17 +1069,7 @@
         if (visibility != null)
             schema.setVisibility(visibility);
         
-        // Get the type of the root element
-        // For backward compatibility, ArrayList is the default
-        String rootElementClassName = getAttribute("root-element-class", ArrayList.class.getName());
-
-        // Qualify the interface name with the defined package name (which will
-        // often implicitly or explicitly match the module id).
-
-        String fullRootElementClassName = IdUtils.qualify(
-                _moduleDescriptor.getPackageName(),
-                rootElementClassName);
-        schema.setRootElementClassName(fullRootElementClassName);
+        processRootElementClassName(schema);
 
         _moduleDescriptor.addSchema(schema);
     }

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/parse/DescriptorParser.properties
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/parse/DescriptorParser.properties?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/parse/DescriptorParser.properties (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/parse/DescriptorParser.properties Sun Jun 18 14:52:39 2006
@@ -73,6 +73,8 @@
 required.schema.visibility=false
 required.schema.root-element-class=false
 required.schema{embedded}.root-element-class=false
+required.parameters-schema.root-element-class=false
+
 
 required.set-module.property=true
 

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/parse/XmlResourceProcessor.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/parse/XmlResourceProcessor.java?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/parse/XmlResourceProcessor.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/parse/XmlResourceProcessor.java Sun Jun 18 14:52:39 2006
@@ -37,7 +37,6 @@
  * {@link #processResource(Resource) processing a resource} is a {@link ModuleDescriptor}.
  * 
  * @see org.apache.hivemind.parse.DescriptorParser
- * @see org.apache.hivemind.ModuleDescriptorProvider
  * @since 1.1
  * @author Knut Wannheden
  */

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/ElementModel.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/ElementModel.java?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/ElementModel.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/ElementModel.java Sun Jun 18 14:52:39 2006
@@ -49,15 +49,6 @@
     public AttributeModel getAttributeModel(String name);
 
     /**
-     * Returns the name of the attribute whose value can be used as a key for an instance of an
-     * Element with this ElementModel. This key is usually used to index a configuration
-     * contribution inside a Map.
-     * 
-     * @since 1.1
-     */
-    public String getKeyAttribute();
-
-    /**
      * Returns a List of {@link org.apache.hivemind.schema.Rule}. The List is unmodifiable and
      * won't but null, but could be empty.
      */

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/Schema.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/Schema.java?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/Schema.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/Schema.java Sun Jun 18 14:52:39 2006
@@ -49,15 +49,6 @@
     public List getElementModel();
 
     /**
-     * Returns true if Elements conforming to this Schema can be indexed using a key. For this to be
-     * true every {@link #getElementModel() top-level ElementModel} must define a non-null
-     * {@link ElementModel#getKeyAttribute() key attribute}.
-     * 
-     * @since 1.1
-     */
-    public boolean canInstancesBeKeyed();
-
-    /**
      * Returns true if the schema is visible to the specified module, false otherwise.
      * 
      * @since 1.1

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/impl/ElementModelImpl.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/impl/ElementModelImpl.java?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/impl/ElementModelImpl.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/impl/ElementModelImpl.java Sun Jun 18 14:52:39 2006
@@ -36,8 +36,6 @@
 
     private List _shareableAttributeModels;
 
-    private String _keyAttribute;
-
     private List _rules;
 
     private List _shareableRules;
@@ -91,16 +89,6 @@
         }
 
         return null;
-    }
-
-    public void setKeyAttribute(String keyAttribute)
-    {
-        _keyAttribute = keyAttribute;
-    }
-
-    public String getKeyAttribute()
-    {
-        return _keyAttribute;
     }
 
     public void addRule(Rule rule)

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/impl/SchemaImpl.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/impl/SchemaImpl.java?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/impl/SchemaImpl.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/impl/SchemaImpl.java Sun Jun 18 14:52:39 2006
@@ -16,13 +16,10 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Iterator;
 import java.util.List;
 
-import org.apache.hivemind.ApplicationRuntimeException;
 import org.apache.hivemind.internal.Visibility;
 import org.apache.hivemind.parse.BaseAnnotationHolder;
-import org.apache.hivemind.schema.AttributeModel;
 import org.apache.hivemind.schema.ElementModel;
 import org.apache.hivemind.schema.Schema;
 
@@ -102,50 +99,6 @@
                     .unmodifiableList(_elementModels);
 
         return _shareableElementModels;
-    }
-
-    public boolean canInstancesBeKeyed()
-    {
-        boolean emptyModel = _elementModels == null || _elementModels.isEmpty();
-
-        if (emptyModel)
-            return false;
-
-        for (Iterator i = _elementModels.iterator(); i.hasNext();)
-        {
-            ElementModel model = (ElementModel) i.next();
-
-            if (model.getKeyAttribute() == null)
-                return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Called by the {@link org.apache.hivemind.parse.DescriptorParser} to make sure that key
-     * attributes specified by the top-level elements actually are defined.
-     */
-    public void validateKeyAttributes()
-    {
-        if (_elementModels == null)
-            return;
-
-        for (Iterator i = _elementModels.iterator(); i.hasNext();)
-        {
-            ElementModel em = (ElementModel) i.next();
-
-            String key = em.getKeyAttribute();
-
-            if (key == null)
-                continue;
-
-            AttributeModel keyAm = em.getAttributeModel(key);
-
-            if (keyAm == null)
-                throw new ApplicationRuntimeException("Key attribute \'" + key + "\' of element \'"
-                        + em.getElementName() + "\' never declared.", em.getLocation(), null);
-        }
     }
 
     /**

Added: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/rules/AddToMapRule.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/rules/AddToMapRule.java?rev=415201&view=auto
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/rules/AddToMapRule.java (added)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/rules/AddToMapRule.java Sun Jun 18 14:52:39 2006
@@ -0,0 +1,146 @@
+// Copyright 2004, 2005 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.apache.hivemind.schema.rules;
+
+import java.lang.reflect.Method;
+
+import org.apache.hivemind.ApplicationRuntimeException;
+import org.apache.hivemind.Element;
+import org.apache.hivemind.schema.SchemaProcessor;
+import org.apache.hivemind.util.PropertyUtils;
+
+/**
+ * Rule used to connect a child object to its parent that is a map,
+ * by invoking a method on the parent, 
+ * passing the child and a key that is taken from a childs attribute.
+ * 
+ * @author Achim Huegen
+ */
+public class AddToMapRule extends BaseRule
+{
+    private String _methodName;
+
+    private String _keyAttribute;
+    
+    public AddToMapRule(String keyAttribute)
+    {
+        this("put", keyAttribute);
+    }
+
+    public AddToMapRule(String methodName, String keyAttribute)
+    {
+        _methodName = methodName;
+        _keyAttribute = keyAttribute;
+    }
+
+    /**
+     * Invokes the named method on the parent object (using reflection).
+     */
+    public void begin(SchemaProcessor processor, Element element)
+    {
+        Object parent = processor.peek(1);
+        Object child = processor.peek();
+
+        // Get all parameters from the stack in the order they where pushed on it
+        Object[] parameters = new Object[2];
+        parameters[0] = getKeyValue(child);
+        parameters[1] = child;
+            
+        Class[] parameterTypes = new Class[2];
+        parameterTypes[0] = getKeyType(child);
+        parameterTypes[1] = child.getClass();
+        
+        try
+        {
+            Method m = findMethod(parent, _methodName, parameterTypes);
+
+            m.invoke(parent, parameters);
+        }
+        catch (Exception ex)
+        {
+            throw new ApplicationRuntimeException(RulesMessages.errorInvokingMethod(
+                    _methodName,
+                    parent,
+                    getLocation(),
+                    ex), getLocation(), ex);
+        }
+    }
+
+    public String getMethodName()
+    {
+        return _methodName;
+    }
+
+    public void setMethodName(String string)
+    {
+        _methodName = string;
+    }
+
+    /**
+     * Searches for the *first* public method the has the right name, and takes a single parameter
+     * that is compatible with the parameter type.
+     * 
+     * @throws NoSuchMethodException
+     *             if a method can't be found
+     */
+    private Method findMethod(Object target, String name, Class[] parameterTypes)
+            throws NoSuchMethodException
+    {
+        Method[] methods = target.getClass().getMethods();
+
+        for (int i = 0; i < methods.length; i++)
+        {
+            Method m = methods[i];
+            Class[] actualParameterTypes = m.getParameterTypes();
+
+            if (actualParameterTypes.length != parameterTypes.length)
+                continue;
+
+            if (!m.getName().equals(name))
+                continue;
+
+            for (int j = 0; j < actualParameterTypes.length; j++)
+            {
+                Class actualParameterType = actualParameterTypes[j];
+                Class expectedParameterType = parameterTypes[j];
+                if ((expectedParameterType != null && actualParameterType.isAssignableFrom(expectedParameterType))
+                        || (expectedParameterType == null && !actualParameterType.isPrimitive()))
+                    return m;
+                
+            }
+        }
+
+        throw new NoSuchMethodException(name);
+    }
+
+    /**
+     * @param child
+     * @return the type of the attribute of the child that is used as key
+     */
+    private Class getKeyType(Object child)
+    {
+        return PropertyUtils.getPropertyType(child, _keyAttribute);
+    }
+
+    /**
+     * @param child
+     * @return the value of the attribute of the child that is used as key
+     */
+    private Object getKeyValue(Object child)
+    {
+        return PropertyUtils.read(child, _keyAttribute);
+    }
+
+}

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/service/impl/BuilderFactory.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/service/impl/BuilderFactory.java?rev=415201&r1=415200&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/service/impl/BuilderFactory.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/service/impl/BuilderFactory.java Sun Jun 18 14:52:39 2006
@@ -35,7 +35,7 @@
     public Object createCoreServiceImplementation(
             ServiceImplementationFactoryParameters factoryParameters)
     {
-        BuilderParameter parameter = (BuilderParameter) factoryParameters.getFirstParameter();
+        BuilderParameter parameter = (BuilderParameter) factoryParameters.getParameters();
 
         BuilderFactoryLogic logic = new BuilderFactoryLogic(factoryParameters, parameter);
 

Copied: jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/TestConfigurationPoint.java (from r413747, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/TestConfigurationPoint.java)
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/TestConfigurationPoint.java?p2=jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/TestConfigurationPoint.java&p1=jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/TestConfigurationPoint.java&r1=413747&r2=415201&rev=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/TestConfigurationPoint.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/TestConfigurationPoint.java Sun Jun 18 14:52:39 2006
@@ -14,7 +14,6 @@
 
 package hivemind.test.config;
 
-import hivemind.test.FrameworkTestCase;
 import hivemind.test.config.impl.BooleanHolder;
 import hivemind.test.config.impl.Child;
 import hivemind.test.config.impl.Datum;
@@ -31,15 +30,18 @@
 import org.apache.hivemind.Element;
 import org.apache.hivemind.Registry;
 import org.apache.hivemind.Resource;
+import org.apache.hivemind.definition.RegistryDefinition;
 import org.apache.hivemind.impl.RegistryBuilder;
+import org.apache.hivemind.impl.XmlModuleReader;
 import org.apache.hivemind.util.ClasspathResource;
+import org.apache.hivemind.xml.XmlTestCase;
 
 /**
  * A number of tests related to processing of extension points.
  * 
  * @author Howard Lewis Ship
  */
-public class TestConfigurationPoint extends FrameworkTestCase
+public class TestConfigurationPoint extends XmlTestCase
 {
 
     public void testEmpty() throws Exception
@@ -337,7 +339,7 @@
     public void testTooFew() throws Exception
     {
 
-        interceptLogging(RegistryBuilder.class.getName());
+        interceptLogging(RegistryDefinition.class.getName());
 
         Registry r = buildFrameworkRegistry("TooFew.xml");
 
@@ -349,7 +351,7 @@
 
     public void testTooMany() throws Exception
     {
-        interceptLogging();
+        interceptLogging(RegistryDefinition.class.getName());
 
         Registry r = buildFrameworkRegistry("TooMany.xml");
 
@@ -362,10 +364,10 @@
     {
         Registry r = buildFrameworkRegistry("BadAttributes.xml");
 
-        List l = (List) r.getConfiguration("hivemind.test.config.BadAttributes");
-
         try
         {
+            // TODO annotations: move before try block when config proxies are established again
+            List l = (List) r.getConfiguration("hivemind.test.config.BadAttributes");
             l.size();
 
             unreachable();
@@ -428,19 +430,20 @@
     public void testResourceTranslator() throws Exception
     {
         RegistryBuilder builder = new RegistryBuilder();
+        builder.autoDetectModules();
 
         Resource moduleResource = new ClasspathResource(_resolver,
                 "/hivemind/test/config/ResourceTranslator.xml");
 
-        builder.addModuleDescriptorProvider(new XmlModuleDescriptorProvider(_resolver));
-        builder.addModuleDescriptorProvider(new XmlModuleDescriptorProvider(_resolver,
-                moduleResource));
+        XmlModuleReader reader = new XmlModuleReader(builder.getRegistryDefinition(),
+                _resolver, builder.getErrorHandler());
+        reader.readModule(moduleResource);
 
         Registry r = builder.constructRegistry(Locale.FRENCH);
+        
+        interceptLogging();
 
         List l = (List) r.getConfiguration("hivemind.test.config.ResourceTranslator");
-
-        interceptLogging();
 
         assertEquals(4, l.size());
 

Copied: jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/TooMany.xml (from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/TooMany.xml)
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/TooMany.xml?p2=jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/TooMany.xml&p1=jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/TooMany.xml&r1=413141&r2=415201&rev=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/hivemind/test/config/TooMany.xml (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/config/TooMany.xml Sun Jun 18 14:52:39 2006
@@ -31,6 +31,8 @@
 	</schema>
 	<contribution configuration-id="TooMany">
 		<datum key="key1" value="value1"/>
+	</contribution>
+	<contribution configuration-id="TooMany">
 		<datum key="key2" value="value2"/>
 	</contribution>
 </module>

Modified: jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/parse/TestDescriptorParser.java
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/parse/TestDescriptorParser.java?rev=415201&r1=413141&r2=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/parse/TestDescriptorParser.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/parse/TestDescriptorParser.java Sun Jun 18 14:52:39 2006
@@ -14,8 +14,6 @@
 
 package hivemind.test.parse;
 
-import hivemind.test.FrameworkTestCase;
-
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -50,6 +48,7 @@
 import org.apache.hivemind.schema.rules.ReadContentRule;
 import org.apache.hivemind.schema.rules.SetModuleRule;
 import org.apache.hivemind.schema.rules.SetPropertyRule;
+import org.apache.hivemind.xml.XmlTestCase;
 
 /**
  * Tests for parsing a HiveModule descriptor into a
@@ -58,7 +57,7 @@
  * 
  * @author Howard Lewis Ship
  */
-public class TestDescriptorParser extends FrameworkTestCase
+public class TestDescriptorParser extends XmlTestCase
 {
     private void checkAttributes(Element e, String[] attributes)
     {

Copied: jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/impl/TestInvokeFactoryServiceConstructor.java (from r413141, jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/org/apache/hivemind/impl/TestInvokeFactoryServiceConstructor.java)
URL: http://svn.apache.org/viewvc/jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/impl/TestInvokeFactoryServiceConstructor.java?p2=jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/impl/TestInvokeFactoryServiceConstructor.java&p1=jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/org/apache/hivemind/impl/TestInvokeFactoryServiceConstructor.java&r1=413141&r2=415201&rev=415201&view=diff
==============================================================================
--- jakarta/hivemind/branches/branch-2-0-annot/framework/src/test/org/apache/hivemind/impl/TestInvokeFactoryServiceConstructor.java (original)
+++ jakarta/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/impl/TestInvokeFactoryServiceConstructor.java Sun Jun 18 14:52:39 2006
@@ -14,13 +14,17 @@
 
 package org.apache.hivemind.impl;
 
+import java.util.ArrayList;
 import java.util.Collections;
 
 import org.apache.hivemind.ErrorLog;
 import org.apache.hivemind.Occurances;
 import org.apache.hivemind.ServiceImplementationFactory;
+import org.apache.hivemind.impl.natures.XmlRegistryNature;
+import org.apache.hivemind.impl.natures.XmlServicePointNature;
 import org.apache.hivemind.internal.Module;
 import org.apache.hivemind.internal.ServicePoint;
+import org.apache.hivemind.schema.impl.SchemaImpl;
 import org.apache.hivemind.test.HiveMindTestCase;
 import org.easymock.MockControl;
 
@@ -45,28 +49,47 @@
 
         MockControl pointControl = newControl(ServicePoint.class);
         ServicePoint point = (ServicePoint) pointControl.getMock();
+        
+        SchemaImpl schema = new SchemaImpl("module");
+        schema.setRootElementClassName(ArrayList.class.getName());
+        
+        XmlServicePointNature xmlNature = new XmlServicePointNature();
+        xmlNature.setParametersCount(Occurances.REQUIRED);
+        xmlNature.setParametersSchema(schema);
+        
+        MockControl xmlRegistryNatureControl = newControl(XmlRegistryNature.class);
+        XmlRegistryNature xmlRegistryNature = (XmlRegistryNature) xmlRegistryNatureControl.getMock();
 
         InvokeFactoryServiceConstructor c = new InvokeFactoryServiceConstructor();
 
         ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
 
         // Training !
-
+        
         point.getErrorLog();
         pointControl.setReturnValue(log);
 
+        factoryPoint.getNature(XmlServicePointNature.class);
+        factoryPointControl.setReturnValue(xmlNature);
+       
         module.getServicePoint("foo.bar.Baz");
         moduleControl.setReturnValue(factoryPoint);
-
-        factoryPoint.getParametersCount();
-        factoryPointControl.setReturnValue(Occurances.REQUIRED);
+        
+        module.getRegistryNature(XmlRegistryNature.class);
+        moduleControl.setReturnValue(xmlRegistryNature);
+        
+        module.resolveType(ArrayList.class.getName());
+        moduleControl.setReturnValue(ArrayList.class);
 
         factoryPoint.getService(ServiceImplementationFactory.class);
         factoryPointControl.setReturnValue(factory);
-
-        factoryPoint.getParametersSchema();
-        factoryPointControl.setReturnValue(null);
-
+        
+        factoryPoint.getModule();
+        factoryPointControl.setReturnValue(module);
+
+        xmlRegistryNature.getTranslationManager();
+        xmlRegistryNatureControl.setReturnValue(null);
+        
         String message = ImplMessages
                 .wrongNumberOfParameters("foo.bar.Baz", 0, Occurances.REQUIRED);
 
@@ -78,12 +101,11 @@
 
         replayControls();
 
-        c.setContributingModule(module);
+        c.setContributingModuleId("module");
         c.setFactoryServiceId("foo.bar.Baz");
         c.setParameters(Collections.EMPTY_LIST);
-        c.setServiceExtensionPoint(point);
 
-        assertEquals("THE SERVICE", c.constructCoreServiceImplementation());
+        assertEquals("THE SERVICE", c.constructCoreServiceImplementation(point, module));
 
         verifyControls();
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-cvs-help@jakarta.apache.org


Mime
View raw message