tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r657881 [1/9] - in /incubator/tuscany/java/sca: modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ modules/assembly-xml/src/main/resources/ modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ modules...
Date Mon, 19 May 2008 17:49:08 GMT
Author: slaws
Date: Mon May 19 10:49:04 2008
New Revision: 657881

URL: http://svn.apache.org/viewvc?rev=657881&view=rev
Log:
TUSCANY-2277, convert validation messages into resource bundles and report via the Monitor. Thanks for the patch Ram. 

Added:
    incubator/tuscany/java/sca/modules/binding-ejb/src/main/resources/binding-ejb-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/binding-jms/src/main/resources/binding-jms-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/binding-ws-xml/src/main/resources/binding-wsxml-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/contribution-impl/src/main/resources/contribution-impl-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/contribution-java/src/main/resources/contribution-java-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/contribution-namespace/src/main/resources/contribution-namespace-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/contribution-resource/src/main/resources/contribution-resource-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/contribution-xml/src/main/resources/contribution-xml-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/data-engine-helper/src/main/resources/dataengine-helper-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/databinding-sdo/src/main/resources/databinding-sdo-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/definitions-xml/src/main/resources/definitions-xml-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/resources/impl-bpel-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/resources/impl-javaxml-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/implementation-osgi/src/main/resources/impl-osgi-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/implementation-resource/src/main/resources/impl-resource-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/implementation-spring/src/main/resources/impl-spring-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/implementation-widget/src/main/resources/impl-widget-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/implementation-xquery/src/main/resources/impl-xquery-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/interface-java-xml/src/main/resources/interface-javaxml-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/resources/interface-wsdlxml-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/policy-security/src/main/resources/policy-security-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/policy-xml/src/main/resources/policy-xml-validation-messages.properties   (with props)
    incubator/tuscany/java/sca/modules/workspace-xml/src/main/resources/workspace-xml-validation-messages.properties   (with props)
Modified:
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeDocumentProcessor.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConfiguredOperationProcessor.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeDocumentProcessor.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeProcessor.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/DefaultBeanModelProcessor.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/resources/assembly-xml-validation-messages.properties
    incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/BuildPolicyTestCase.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadAllTestCase.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadDocumentTestCase.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadTestCase.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ResolvePolicyTestCase.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WireTestCase.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WriteAllTestCase.java
    incubator/tuscany/java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingProcessor.java
    incubator/tuscany/java/sca/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java
    incubator/tuscany/java/sca/modules/binding-sca-xml/src/main/java/org/apache/tuscany/sca/binding/sca/xml/SCABindingProcessor.java
    incubator/tuscany/java/sca/modules/binding-sca-xml/src/test/java/org/apace/tuscany/sca/binding/sca/xml/ReadTestCase.java
    incubator/tuscany/java/sca/modules/binding-sca-xml/src/test/java/org/apace/tuscany/sca/binding/sca/xml/WriteTestCase.java
    incubator/tuscany/java/sca/modules/binding-sca/src/test/java/org/apace/tuscany/sca/binding/sca/SCABindingTestCase.java
    incubator/tuscany/java/sca/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java
    incubator/tuscany/java/sca/modules/binding-ws-xml/src/test/java/org/apache/tuscany/sca/binding/ws/xml/ReadTestCase.java
    incubator/tuscany/java/sca/modules/binding-ws-xml/src/test/java/org/apache/tuscany/sca/binding/ws/xml/WriteTestCase.java
    incubator/tuscany/java/sca/modules/contribution-groovy/src/main/java/org/apache/tuscany/sca/contribution/groovy/GroovyArtifactProcessor.java
    incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionRepositoryImpl.java
    incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java
    incubator/tuscany/java/sca/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/services/ContributionRepositoryTestCase.java
    incubator/tuscany/java/sca/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessor.java
    incubator/tuscany/java/sca/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessor.java
    incubator/tuscany/java/sca/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessorTestCase.java
    incubator/tuscany/java/sca/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessorTestCase.java
    incubator/tuscany/java/sca/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessor.java
    incubator/tuscany/java/sca/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java
    incubator/tuscany/java/sca/modules/contribution-namespace/src/test/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessorTestCase.java
    incubator/tuscany/java/sca/modules/contribution-namespace/src/test/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessorTestCase.java
    incubator/tuscany/java/sca/modules/contribution-resource/src/main/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceExportProcessor.java
    incubator/tuscany/java/sca/modules/contribution-resource/src/main/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceImportProcessor.java
    incubator/tuscany/java/sca/modules/contribution-resource/src/test/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceExportProcessorTestCase.java
    incubator/tuscany/java/sca/modules/contribution-resource/src/test/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceImportProcessorTestCase.java
    incubator/tuscany/java/sca/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionGeneratedMetadataDocumentProcessor.java
    incubator/tuscany/java/sca/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataDocumentProcessor.java
    incubator/tuscany/java/sca/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataProcessor.java
    incubator/tuscany/java/sca/modules/contribution-xml/src/test/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataProcessorTestCase.java
    incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXArtifactProcessorExtensionPoint.java
    incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultURLArtifactProcessorExtensionPoint.java
    incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensiblePackageProcessor.java
    incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXArtifactProcessor.java
    incubator/tuscany/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleURLArtifactProcessor.java
    incubator/tuscany/java/sca/modules/contribution/src/main/resources/contribution-validation-messages.properties
    incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/ReferenceParameterProcessor.java
    incubator/tuscany/java/sca/modules/data-engine-helper/src/main/java/org/apache/tuscany/sca/data/engine/ConnectionInfoArtifactProcessor.java
    incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessor.java
    incubator/tuscany/java/sca/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessorTestCase.java
    incubator/tuscany/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/SCADefinitionsDocumentProcessor.java
    incubator/tuscany/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/SCADefinitionsProcessor.java
    incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/CompositeConfigurationServiceImpl.java
    incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/CompositeGeneratorServiceImpl.java
    incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java
    incubator/tuscany/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/DeployableCompositeCollectionImpl.java
    incubator/tuscany/java/sca/modules/endpoint/src/test/java/org/apace/tuscany/sca/binding/sca/EndpointTestCase.java
    incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-das/src/main/java/org/apache/tuscany/sca/implementation/das/DASImplementationProcessor.java
    incubator/tuscany/java/sca/modules/implementation-das/src/test/java/org/apache/tuscany/sca/implementation/das/DASImplementationProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-data-xml/src/main/java/org/apache/tuscany/sca/implementation/data/DATAImplementationProcessor.java
    incubator/tuscany/java/sca/modules/implementation-data-xml/src/test/java/org/apache/tuscany/sca/implementation/data/DATAImplementationProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-ejb-xml/src/main/java/org/apache/tuscany/sca/implementation/ejb/xml/EJBImplementationProcessor.java
    incubator/tuscany/java/sca/modules/implementation-ejb-xml/src/test/java/org/apache/tuscany/sca/implementation/ejb/xml/ReadTestCase.java
    incubator/tuscany/java/sca/modules/implementation-ejb-xml/src/test/java/org/apache/tuscany/sca/implementation/ejb/xml/WriteTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/sca/implementation/java/xml/ReadTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/sca/implementation/java/xml/WriteTestCase.java
    incubator/tuscany/java/sca/modules/implementation-node-xml/src/main/java/org/apache/tuscany/sca/implementation/node/xml/ConfiguredNodeImplementationProcessor.java
    incubator/tuscany/java/sca/modules/implementation-node-xml/src/main/java/org/apache/tuscany/sca/implementation/node/xml/NodeImplementationProcessor.java
    incubator/tuscany/java/sca/modules/implementation-node-xml/src/test/java/org/apache/tuscany/sca/implementation/node/xml/ReadTestCase.java
    incubator/tuscany/java/sca/modules/implementation-node-xml/src/test/java/org/apache/tuscany/sca/implementation/node/xml/WriteTestCase.java
    incubator/tuscany/java/sca/modules/implementation-osgi/src/main/java/org/apache/tuscany/sca/implementation/osgi/xml/OSGiImplementationProcessor.java
    incubator/tuscany/java/sca/modules/implementation-osgi/src/test/java/org/apache/tuscany/sca/implementation/osgi/xml/OSGiReadImplTestCase.java
    incubator/tuscany/java/sca/modules/implementation-resource/src/main/java/org/apache/tuscany/sca/implementation/resource/impl/ResourceImplementationProcessor.java
    incubator/tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationProcessor.java
    incubator/tuscany/java/sca/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java
    incubator/tuscany/java/sca/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryImplementationProcessor.java
    incubator/tuscany/java/sca/modules/interface-java-xml/src/main/java/org/apache/tuscany/sca/interfacedef/java/xml/JavaInterfaceProcessor.java
    incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/sca/interfacedef/java/xml/ReadTestCase.java
    incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/sca/interfacedef/java/xml/WriteTestCase.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessor.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/XSDDocumentProcessor.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/AbstractWSDLTestCase.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/ReadTestCase.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WriteTestCase.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/XSDDocumentProcessorTestCase.java
    incubator/tuscany/java/sca/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicyProcessor.java
    incubator/tuscany/java/sca/modules/policy-logging/src/test/java/org/apache/tuscany/sca/policy/logging/jdk/PolicyReadTestCase.java
    incubator/tuscany/java/sca/modules/policy-security-ws/src/main/java/org/apache/tuscany/sca/policy/security/ws/Axis2ConfigParamPolicyProcessor.java
    incubator/tuscany/java/sca/modules/policy-security-ws/src/test/java/org/apache/tuscany/sca/policy/security/ws/PolicyReadTestCase.java
    incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authorization/AuthorizationPolicyProcessor.java
    incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/identity/SecurityIdentityPolicyProcessor.java
    incubator/tuscany/java/sca/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicyProcessor.java
    incubator/tuscany/java/sca/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyProcessor.java
    incubator/tuscany/java/sca/modules/policy-transaction/src/test/java/org/apache/tuscany/sca/policy/transaction/PolicyReadTestCase.java
    incubator/tuscany/java/sca/modules/policy-xml-ws/src/main/java/org/apache/tuscany/sca/policy/xml/ws/WSPolicyProcessor.java
    incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/BindingTypeProcessor.java
    incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ImplementationTypeProcessor.java
    incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/IntentAttachPointTypeProcessor.java
    incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyIntentProcessor.java
    incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java
    incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ProfileIntentProcessor.java
    incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/QualifiedIntentProcessor.java
    incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/SimpleIntentProcessor.java
    incubator/tuscany/java/sca/modules/policy-xml/src/test/java/org/apache/tuscany/sca/policy/xml/ReadDocumentTestCase.java
    incubator/tuscany/java/sca/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/processor/impl/ContributionContentProcessor.java
    incubator/tuscany/java/sca/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/processor/impl/ContributionInfoProcessor.java
    incubator/tuscany/java/sca/modules/workspace-xml/src/main/java/org/apache/tuscany/sca/workspace/xml/WorkspaceDocumentProcessor.java
    incubator/tuscany/java/sca/modules/workspace-xml/src/main/java/org/apache/tuscany/sca/workspace/xml/WorkspaceProcessor.java
    incubator/tuscany/java/sca/modules/workspace-xml/src/test/java/org/apache/tuscany/sca/workspace/xml/ContributionWorkspaceProcessorTestCase.java
    incubator/tuscany/java/sca/samples/binding-echo-extension/src/main/java/echo/provider/policy/EchoBindingEncryptionPolicyProcessor.java
    incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/DistributeAndRunComponents.java
    incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/DistributeComponents.java
    incubator/tuscany/java/sca/samples/domain-management/src/main/java/manager/WireComponents.java
    incubator/tuscany/java/sca/samples/implementation-pojo-extension/src/main/java/pojo/impl/POJOImplementationProcessor.java

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java Mon May 19 10:49:04 2008
@@ -126,11 +126,13 @@
     @SuppressWarnings("unchecked")
     public BaseAssemblyProcessor(AssemblyFactory factory,
                                  PolicyFactory policyFactory,
-                                 StAXArtifactProcessor extensionProcessor) {
+                                 StAXArtifactProcessor extensionProcessor,
+                                 Monitor monitor) {
         this.assemblyFactory = factory;
         this.policyFactory = policyFactory;
         this.extensionProcessor = (StAXArtifactProcessor<Object>)extensionProcessor;
         this.policyProcessor = new PolicyAttachPointProcessor(policyFactory);
+        this.monitor = monitor;
         
         //TODO - this constructor should take a monitor too. 
     }
@@ -147,7 +149,35 @@
             Problem problem = new ProblemImpl(this.getClass().getName(), "assembly-xml-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters);
             monitor.problem(problem);
         }
-    }    
+    }
+    
+    /**
+     * Marshals errors into the monitor
+     * 
+     * @param problems
+     * @param message
+     * @param model
+     */
+    protected void error(String message, Object model, Object... messageParameters) {
+    	if (monitor != null) {
+	        Problem problem = new ProblemImpl(this.getClass().getName(), "assembly-xml-validation-messages", Severity.ERROR, model, message, (Object[])messageParameters);
+	        monitor.problem(problem);
+    	}
+    }
+    
+    /**
+     * Marshals exceptions into the monitor
+     * 
+     * @param problems
+     * @param message
+     * @param model
+     */
+    protected void error(String message, Object model, Exception ex) {
+    	if (monitor != null) {
+	        Problem problem = new ProblemImpl(this.getClass().getName(), "assembly-xml-validation-messages", Severity.ERROR, model, message, ex);
+	        monitor.problem(problem);
+    	}
+    }
 
     /**
      * Start an element.
@@ -477,6 +507,7 @@
                     }
                 }
             } catch ( PolicyValidationException e ) {
+            	error("PolicyServiceValidationException", contract, contract.getName(), parentName);
                 throw new ContributionResolveException("PolicyValidation exceptions when processing service/reference '" 
                                                        + contract.getName() + "' in '" + parentName + "'");
             }
@@ -534,7 +565,9 @@
             }
             document = documentBuilderFactory.newDocumentBuilder().newDocument();
         } catch (ParserConfigurationException e) {
-            throw new ContributionReadException(e);
+        	ContributionReadException ce = new ContributionReadException(e);
+        	error("ContributionReadException", documentBuilderFactory, ce);
+            throw ce;
         }
 
         // root element has no namespace and local name "value"

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeDocumentProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeDocumentProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeDocumentProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeDocumentProcessor.java Mon May 19 10:49:04 2008
@@ -30,6 +30,7 @@
 import javax.xml.stream.XMLStreamReader;
 
 import org.apache.tuscany.sca.assembly.ComponentType;
+import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
 import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
@@ -52,8 +53,10 @@
      * @param policyFactory
      * @param registry
      */
-    public ComponentTypeDocumentProcessor(StAXArtifactProcessor staxProcessor, XMLInputFactory inputFactory) {
-        super(null, null, staxProcessor);
+    public ComponentTypeDocumentProcessor(StAXArtifactProcessor staxProcessor, 
+    									  XMLInputFactory inputFactory, 
+    									  Monitor monitor) {
+        super(null, null, staxProcessor, monitor);
         this.inputFactory = inputFactory;
     }
     
@@ -62,8 +65,10 @@
      * @param modelFactories
      * @param staxProcessor
      */
-    public ComponentTypeDocumentProcessor(ModelFactoryExtensionPoint modelFactories, StAXArtifactProcessor staxProcessor) {
-        super(null, null, staxProcessor);
+    public ComponentTypeDocumentProcessor(ModelFactoryExtensionPoint modelFactories, 
+    									  StAXArtifactProcessor staxProcessor,
+    									  Monitor monitor) {
+        super(null, null, staxProcessor, monitor);
         this.inputFactory = modelFactories.getFactory(ValidatingXMLInputFactory.class);
     }
     
@@ -105,9 +110,13 @@
             return componentType;
             
         } catch (XMLStreamException e) {
-            throw new ContributionReadException(e);
+        	ContributionReadException ce = new ContributionReadException(e);
+        	error("ContributionReadException", inputFactory, ce);
+            throw ce;
         } catch (IOException e) {
-            throw new ContributionReadException(e);
+        	ContributionReadException ce = new ContributionReadException(e);
+        	error("ContributionReadException", inputFactory, ce);
+            throw ce;
         } finally {
             try {
                 if (urlStream != null) {

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java Mon May 19 10:49:04 2008
@@ -48,6 +48,7 @@
 import org.apache.tuscany.sca.policy.IntentAttachPoint;
 import org.apache.tuscany.sca.policy.PolicyFactory;
 import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
+import org.apache.tuscany.sca.monitor.Monitor;
 import org.w3c.dom.Document;
 
 /**
@@ -63,8 +64,9 @@
      * @param policyFactory
      * @param registry
      */
-    public ComponentTypeProcessor(AssemblyFactory factory, PolicyFactory policyFactory, StAXArtifactProcessor extensionProcessor) {
-        super(factory, policyFactory, extensionProcessor);
+    public ComponentTypeProcessor(AssemblyFactory factory, PolicyFactory policyFactory, 
+    							  StAXArtifactProcessor extensionProcessor, Monitor monitor) {
+        super(factory, policyFactory, extensionProcessor, monitor);
     }
 
     /**
@@ -73,9 +75,11 @@
      * @param modelFactories
      * @param extensionProcessor
      */
-    public ComponentTypeProcessor(ModelFactoryExtensionPoint modelFactories, StAXArtifactProcessor extensionProcessor) {
+    public ComponentTypeProcessor(ModelFactoryExtensionPoint modelFactories, 
+    							  StAXArtifactProcessor extensionProcessor,
+    							  Monitor monitor) {
         super(modelFactories.getFactory(AssemblyFactory.class),
-              modelFactories.getFactory(PolicyFactory.class), extensionProcessor);
+              modelFactories.getFactory(PolicyFactory.class), extensionProcessor, monitor);
     }
     
     public ComponentType read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java Mon May 19 10:49:04 2008
@@ -36,6 +36,7 @@
 import javax.xml.stream.XMLStreamReader;
 
 import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
 import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
@@ -64,8 +65,9 @@
      * @param policyFactory
      * @param staxProcessor
      */
-    public CompositeDocumentProcessor(StAXArtifactProcessor staxProcessor, XMLInputFactory inputFactory, List scaDefnsSink) {
-        super(null, null, staxProcessor);
+    public CompositeDocumentProcessor(StAXArtifactProcessor staxProcessor, 
+    								  XMLInputFactory inputFactory, List scaDefnsSink, Monitor monitor) {
+        super(null, null, staxProcessor, monitor);
         this.inputFactory = inputFactory;
         this.scaDefnSink = scaDefnsSink;
     }
@@ -75,8 +77,9 @@
      * @param modelFactories
      * @param staxProcessor
      */
-    public CompositeDocumentProcessor(ModelFactoryExtensionPoint modelFactories, StAXArtifactProcessor staxProcessor) {
-        super(null, null, staxProcessor);
+    public CompositeDocumentProcessor(ModelFactoryExtensionPoint modelFactories, 
+    								  StAXArtifactProcessor staxProcessor, Monitor monitor) {
+        super(null, null, staxProcessor, monitor);
         this.inputFactory = modelFactories.getFactory(ValidatingXMLInputFactory.class);
     }
     
@@ -100,7 +103,9 @@
                     scdlStream = connection.getInputStream();
                 }
             } catch ( Exception e ) {
-                throw new ContributionReadException(e);
+            	ContributionReadException ce = new ContributionReadException(e);
+            	error("ContributionReadException", scdlStream, ce);
+                throw ce;
             }
             
             XMLStreamReader reader = inputFactory.createXMLStreamReader(scdlStream);
@@ -134,7 +139,9 @@
             return composite;
             
         } catch (XMLStreamException e) {
-            throw new ContributionReadException(e);
+        	ContributionReadException ce = new ContributionReadException(e);
+        	error("ContributionReadException", inputFactory, ce);
+            throw ce;
         } finally {
             try {
                 if (scdlStream != null) {

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java Mon May 19 10:49:04 2008
@@ -93,7 +93,9 @@
      * @param extensionPoints
      * @param extensionProcessor
      */
-    public CompositeProcessor(ExtensionPointRegistry extensionPoints, StAXArtifactProcessor extensionProcessor) {
+    public CompositeProcessor(ExtensionPointRegistry extensionPoints, 
+    						  StAXArtifactProcessor extensionProcessor,
+    						  Monitor monitor) {
         this(modelFactories(extensionPoints), extensionProcessor, monitor(extensionPoints));
     }
     
@@ -289,7 +291,9 @@
                                 try {
                                     componentProperty.setSourceXPathExpression(xpath.compile(source));
                                 } catch (XPathExpressionException e) {
-                                    throw new ContributionReadException(e);
+                                	ContributionReadException ce = new ContributionReadException(e);
+                                	error("ContributionReadException", xpath, ce);
+                                    throw ce;
                                 }
                             }
                             componentProperty.setFile(getString(reader, FILE));
@@ -406,8 +410,8 @@
                                     contract.setInterfaceContract((InterfaceContract)extension);
                                 } else {
                                     if (name.getNamespaceURI().equals(SCA10_NS)) {
-                                        throw new ContributionReadException(
-                                                                            "Unexpected <interface> element found. It should appear inside a <service> or <reference> element");
+                                    	error("UnexpectedInterfaceElement", extension);
+                                        throw new ContributionReadException("Unexpected <interface> element found. It should appear inside a <service> or <reference> element");
                                     } else {
                                         composite.getExtensions().add(extension);
                                     }
@@ -428,8 +432,8 @@
                                         contract.getBindings().add((Binding)extension);
                                     } else {
                                         if (name.getNamespaceURI().equals(SCA10_NS)) {
-                                            throw new ContributionReadException(
-                                                                                "Unexpected <binding> element found. It should appear inside a <service> or <reference> element");
+                                        	error("UnexpectedBindingElement", extension);
+                                            throw new ContributionReadException("Unexpected <binding> element found. It should appear inside a <service> or <reference> element");
                                         } else {
                                             composite.getExtensions().add(extension);
                                         }
@@ -448,8 +452,8 @@
                                     component.setImplementation((Implementation)extension);
                                 } else {
                                     if (name.getNamespaceURI().equals(SCA10_NS)) {
-                                        throw new ContributionReadException(
-                                                                            "Unexpected <implementation> element found. It should appear inside a <component> element");
+                                    	error("UnexpectedImplementationElement", extension);
+                                        throw new ContributionReadException("Unexpected <implementation> element found. It should appear inside a <component> element");
                                     } else {
                                         composite.getExtensions().add(extension);
                                     }
@@ -908,6 +912,7 @@
                     
                     component.setImplementation(implementation);
                 } catch ( PolicyValidationException e ) {
+                	error("PolicyImplValidationException", resolver, component.getName(), e.getMessage());
                     throw new ContributionResolveException("PolicyValidation exception when processing implementation of component '" 
                                                            + component.getName() + "' due to " + e.getMessage(), e);
                 }

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConfiguredOperationProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConfiguredOperationProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConfiguredOperationProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConfiguredOperationProcessor.java Mon May 19 10:49:04 2008
@@ -1,106 +1,109 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.tuscany.sca.assembly.xml;
-
-import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.assembly.ConfiguredOperation;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.contribution.service.ContributionReadException;
-import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
-import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
-import org.apache.tuscany.sca.policy.PolicyFactory;
-
-/**
- * Processor for dealing with  'operation' elements from composite definitions
- *
- * @version $Rev$ $Date$
- */
-public class ConfiguredOperationProcessor implements StAXArtifactProcessor<ConfiguredOperation>, Constants{
-    
-    private AssemblyFactory assemblyFactory;
-    private PolicyAttachPointProcessor policyProcessor;
-    private PolicyFactory policyFactory;
-    
-    public ConfiguredOperationProcessor(ModelFactoryExtensionPoint modelFactories) {
-        this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
-        this.policyFactory = modelFactories.getFactory(PolicyFactory.class);
-        this.policyProcessor = new PolicyAttachPointProcessor(policyFactory);
-    }
-    
-    public ConfiguredOperation read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
-        ConfiguredOperation  configuredOp = assemblyFactory.createConfiguredOperation();
-        
-        //Read an <operation>
-        configuredOp.setName(reader.getAttributeValue(null, NAME));
-        configuredOp.setContractName(reader.getAttributeValue(null, SERVICE));
-        configuredOp.setUnresolved(true);
-        
-        // Read policies
-        policyProcessor.readPolicies(configuredOp, reader);
-
-        //Skip to end element
-        while (reader.hasNext()) {
-            if (reader.next() == END_ELEMENT && OPERATION_QNAME.equals(reader.getName())) {
-                break;
-            }
-        }
-        
-        return configuredOp;
-    }
-    
-    public void write(ConfiguredOperation configuredOperation, XMLStreamWriter writer)
-        throws ContributionWriteException, XMLStreamException {
-
-        // Write an <operation>
-        policyProcessor.writePolicyPrefixes(configuredOperation, writer);
-        writer.writeStartElement(Constants.SCA10_NS, OPERATION);
-        policyProcessor.writePolicyAttributes(configuredOperation, writer);
-
-        writer.writeAttribute(NAME, configuredOperation.getName());
-        if ( configuredOperation.getContractName() != null ) {
-            writer.writeAttribute(SERVICE, configuredOperation.getContractName());
-        }
-        writer.writeEndElement();
-    }
-    
-    public void resolve(ConfiguredOperation configuredOperation, ModelResolver resolver)
-        throws ContributionResolveException {
-    }
-    
-    public QName getArtifactType() {
-        return OPERATION_QNAME;
-    }
-    
-    public Class<ConfiguredOperation> getModelType() {
-        return ConfiguredOperation.class;
-    }
-
-}
-
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.tuscany.sca.assembly.xml;
+
+import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.tuscany.sca.assembly.AssemblyFactory;
+import org.apache.tuscany.sca.assembly.ConfiguredOperation;
+import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.contribution.service.ContributionReadException;
+import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.policy.PolicyFactory;
+import org.apache.tuscany.sca.monitor.Monitor;
+
+/**
+ * Processor for dealing with  'operation' elements from composite definitions
+ *
+ * @version $Rev$ $Date$
+ */
+public class ConfiguredOperationProcessor implements StAXArtifactProcessor<ConfiguredOperation>, Constants{
+    
+    private AssemblyFactory assemblyFactory;
+    private PolicyAttachPointProcessor policyProcessor;
+    private PolicyFactory policyFactory;
+    private Monitor monitor;
+    
+    public ConfiguredOperationProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+        this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
+        this.policyFactory = modelFactories.getFactory(PolicyFactory.class);
+        this.policyProcessor = new PolicyAttachPointProcessor(policyFactory);
+        this.monitor = monitor;
+    }
+    
+    public ConfiguredOperation read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
+        ConfiguredOperation  configuredOp = assemblyFactory.createConfiguredOperation();
+        
+        //Read an <operation>
+        configuredOp.setName(reader.getAttributeValue(null, NAME));
+        configuredOp.setContractName(reader.getAttributeValue(null, SERVICE));
+        configuredOp.setUnresolved(true);
+        
+        // Read policies
+        policyProcessor.readPolicies(configuredOp, reader);
+
+        //Skip to end element
+        while (reader.hasNext()) {
+            if (reader.next() == END_ELEMENT && OPERATION_QNAME.equals(reader.getName())) {
+                break;
+            }
+        }
+        
+        return configuredOp;
+    }
+    
+    public void write(ConfiguredOperation configuredOperation, XMLStreamWriter writer)
+        throws ContributionWriteException, XMLStreamException {
+
+        // Write an <operation>
+        policyProcessor.writePolicyPrefixes(configuredOperation, writer);
+        writer.writeStartElement(Constants.SCA10_NS, OPERATION);
+        policyProcessor.writePolicyAttributes(configuredOperation, writer);
+
+        writer.writeAttribute(NAME, configuredOperation.getName());
+        if ( configuredOperation.getContractName() != null ) {
+            writer.writeAttribute(SERVICE, configuredOperation.getContractName());
+        }
+        writer.writeEndElement();
+    }
+    
+    public void resolve(ConfiguredOperation configuredOperation, ModelResolver resolver)
+        throws ContributionResolveException {
+    }
+    
+    public QName getArtifactType() {
+        return OPERATION_QNAME;
+    }
+    
+    public Class<ConfiguredOperation> getModelType() {
+        return ConfiguredOperation.class;
+    }
+
+}
+
+

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeDocumentProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeDocumentProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeDocumentProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeDocumentProcessor.java Mon May 19 10:49:04 2008
@@ -38,6 +38,7 @@
 import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
 import org.apache.tuscany.sca.contribution.service.ContributionReadException;
 import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.monitor.Monitor;
 
 /**
  * A contrainingType content handler.
@@ -54,8 +55,10 @@
      * @param policyFactory
      * @param staxProcessor
      */
-    public ConstrainingTypeDocumentProcessor(StAXArtifactProcessor staxProcessor, XMLInputFactory inputFactory) {
-        super(null, null, staxProcessor);
+    public ConstrainingTypeDocumentProcessor(StAXArtifactProcessor staxProcessor, 
+    									     XMLInputFactory inputFactory,
+    									     Monitor monitor) {
+        super(null, null, staxProcessor, monitor);
         this.inputFactory = inputFactory;
     }
 
@@ -64,8 +67,10 @@
      * @param modelFactories
      * @param staxProcessor
      */
-    public ConstrainingTypeDocumentProcessor(ModelFactoryExtensionPoint modelFactories, StAXArtifactProcessor staxProcessor) {
-        super(null, null, staxProcessor);
+    public ConstrainingTypeDocumentProcessor(ModelFactoryExtensionPoint modelFactories, 
+    										 StAXArtifactProcessor staxProcessor,
+    										 Monitor monitor) {
+        super(null, null, staxProcessor, monitor);
         this.inputFactory = modelFactories.getFactory(ValidatingXMLInputFactory.class);
     }
     
@@ -104,9 +109,13 @@
             return constrainingType;
             
         } catch (XMLStreamException e) {
-            throw new ContributionReadException(e);
+        	ContributionReadException ce = new ContributionReadException(e);
+        	error("ContributionReadException", inputFactory, ce);
+            throw ce;
         } catch (IOException e) {
-            throw new ContributionReadException(e);
+        	ContributionReadException ce = new ContributionReadException(e);
+        	error("ContributionReadException", inputFactory, ce);
+            throw ce;
         } finally {
             try {
                 if (urlStream != null) {

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeProcessor.java Mon May 19 10:49:04 2008
@@ -43,6 +43,7 @@
 import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.interfacedef.impl.OperationImpl;
 import org.apache.tuscany.sca.policy.PolicyFactory;
+import org.apache.tuscany.sca.monitor.Monitor;
 import org.w3c.dom.Document;
 
 /**
@@ -58,8 +59,9 @@
      * @param policyFactory
      * @param extensionProcessor
      */
-    public ConstrainingTypeProcessor(AssemblyFactory factory, PolicyFactory policyFactory, StAXArtifactProcessor extensionProcessor) {
-        super(factory, policyFactory, extensionProcessor);
+    public ConstrainingTypeProcessor(AssemblyFactory factory, PolicyFactory policyFactory, 
+    								 StAXArtifactProcessor extensionProcessor, Monitor monitor) {
+        super(factory, policyFactory, extensionProcessor, monitor);
     }
 
     /**
@@ -68,9 +70,11 @@
      * @param modelFactories
      * @param extensionProcessor
      */
-    public ConstrainingTypeProcessor(ModelFactoryExtensionPoint modelFactories, StAXArtifactProcessor extensionProcessor) {
+    public ConstrainingTypeProcessor(ModelFactoryExtensionPoint modelFactories, 
+    								 StAXArtifactProcessor extensionProcessor,
+    								 Monitor monitor) {
         super(modelFactories.getFactory(AssemblyFactory.class),
-              modelFactories.getFactory(PolicyFactory.class), extensionProcessor);
+              modelFactories.getFactory(PolicyFactory.class), extensionProcessor, monitor);
     }
     
     public ConstrainingType read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/DefaultBeanModelProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/DefaultBeanModelProcessor.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/DefaultBeanModelProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/DefaultBeanModelProcessor.java Mon May 19 10:49:04 2008
@@ -36,6 +36,7 @@
 import org.apache.tuscany.sca.assembly.Base;
 import org.apache.tuscany.sca.assembly.ComponentType;
 import org.apache.tuscany.sca.assembly.Implementation;
+import org.apache.tuscany.sca.monitor.Monitor;
 import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
 import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
 import org.apache.tuscany.sca.contribution.service.ContributionReadException;
@@ -62,8 +63,9 @@
                                        PolicyFactory policyFactory,
                                        QName artifactType,
                                        Class<Implementation> modelClass,
-                                       Object modelFactory) {
-        super(assemblyFactory, policyFactory, null);
+                                       Object modelFactory,
+                                       Monitor monitor) {
+        super(assemblyFactory, policyFactory, null, monitor);
         this.artifactType = artifactType;
         this.modelClass = modelClass;
         this.modelFactory = modelFactory;
@@ -164,7 +166,9 @@
             return model;
 
         } catch (Exception e) {
-            throw new ContributionReadException(e);
+        	ContributionReadException ce = new ContributionReadException(e);
+        	error("ContributionReadException", reader, ce);
+            throw ce;
         }
     }
 
@@ -186,7 +190,9 @@
             writeEnd(writer);
 
         } catch (Exception e) {
-            throw new ContributionWriteException(e);
+        	ContributionWriteException ce = new ContributionWriteException(e);
+        	error("ContributionWriteException", writer, ce);
+            throw ce;
         }
     }
 

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/resources/assembly-xml-validation-messages.properties
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/resources/assembly-xml-validation-messages.properties?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/resources/assembly-xml-validation-messages.properties (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/resources/assembly-xml-validation-messages.properties Mon May 19 10:49:04 2008
@@ -19,3 +19,11 @@
 #
 #
 NoCompositeNamespace = No namespace found: Composite = {0}
+UnexpectedInterfaceElement = Unexpected <interface> element found. It should appear inside a <service> or <reference> element.
+UnexpectedBindingElement = Unexpected <binding> element found. It should appear inside a <service> or <reference> element.
+UnexpectedImplementationElement = Unexpected <implementation> element found. It should appear inside a <component> element.
+PolicyImplValidationException = PolicyValidation exception when processing implementation of component {0} due to {1}
+PolicyServiceValidationException = PolicyValidation exceptions when processing service/reference {0} in {1}
+ContributionReadException = ContributionReadException occured due to :
+ContributionWriteException = ContributionWriteException occured due to :
+

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/BuildPolicyTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/BuildPolicyTestCase.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/BuildPolicyTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/BuildPolicyTestCase.java Mon May 19 10:49:04 2008
@@ -1,135 +1,135 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.tuscany.sca.assembly.xml;
-
-import java.net.URI;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.assembly.ConstrainingType;
-import org.apache.tuscany.sca.assembly.OperationsConfigurator;
-import org.apache.tuscany.sca.assembly.SCABindingFactory;
-import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
-import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.DefaultURLArtifactProcessorExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
-import org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
-import org.apache.tuscany.sca.definitions.SCADefinitions;
-import org.apache.tuscany.sca.interfacedef.impl.InterfaceContractMapperImpl;
-import org.apache.tuscany.sca.policy.IntentAttachPoint;
-import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
-
-/**
- * Test reading SCA XML assembly documents.
- * 
- * @version $Rev: 561254 $ $Date: 2007-07-31 13:16:27 +0530 (Tue, 31 Jul 2007) $
- */
-public class BuildPolicyTestCase extends TestCase { 
-    private URLArtifactProcessor<Object> documentProcessor;
-    private URLArtifactProcessor<SCADefinitions> policyDefinitionsProcessor;
-    private ModelResolver resolver; 
-    private CompositeBuilder compositeBuilder;
-    private Composite composite;
-
-    @Override
-    public void setUp() throws Exception {
-        DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
-        ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
-        AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
-        SCABindingFactory scaBindingFactory = new TestSCABindingFactoryImpl();
-        IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
-        List<SCADefinitions> policyDefinitions = new ArrayList<SCADefinitions>();
-        resolver = new DefaultModelResolver();
-        compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, new InterfaceContractMapperImpl(), null);
-        URLArtifactProcessorExtensionPoint documentProcessors = new DefaultURLArtifactProcessorExtensionPoint(extensionPoints);
-        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors);
-        policyDefinitionsProcessor = documentProcessors.getProcessor(SCADefinitions.class);
-        
-        StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
-        staxProcessors.addArtifactProcessor(new TestPolicyProcessor());
-        
-        URL url = getClass().getResource("CalculatorComponent.constrainingType");
-        URI uri = URI.create("CalculatorComponent.constrainingType");
-        ConstrainingType constrainingType = (ConstrainingType)documentProcessor.read(null, uri, url);
-        assertNotNull(constrainingType);
-        resolver.addModel(constrainingType);
-
-        url = getClass().getResource("TestAllPolicyCalculator.composite");
-        uri = URI.create("TestAllCalculator.constrainingType");
-        composite = (Composite)documentProcessor.read(null, uri, url);
-        assertNotNull(composite);
-        
-        url = getClass().getResource("another_test_definitions.xml");
-        uri = URI.create("another_test_definitions.xml");
-        SCADefinitions definitions = (SCADefinitions)policyDefinitionsProcessor.read(null, uri, url);
-        assertNotNull(definitions);
-        policyDefinitions.add(definitions);
-        
-        documentProcessor.resolve(definitions, resolver);
-        documentProcessor.resolve(composite, resolver);
-        
-        compositeBuilder.build(composite);
-    }
-
-    public void testPolicyIntentInheritance() throws Exception {
-        String namespaceUri = "http://test";
-        
-        IntentAttachPoint policiedComposite = (IntentAttachPoint)composite;
-        assertEquals(policiedComposite.getRequiredIntents().size(), 1);
-        assertEquals(policiedComposite.getRequiredIntents().get(0).getName(), new QName(namespaceUri, "tuscanyIntent_1"));
-        
-        //1 defined for composite, 2 defined for the service, 1 defined and 3 inherited for the promoted service (4)
-        assertEquals(composite.getServices().get(0).getRequiredIntents().size(), 7);
-        //1 from the operation defined in this service and 2 from the operation defined in the promoted service 
-        assertEquals(composite.getServices().get(0).getConfiguredOperations().get(0).getRequiredIntents().size(), 5);
-        assertEquals(composite.getServices().get(0).getRequiredIntents().get(3).getName(), new QName(namespaceUri, "tuscanyIntent_3"));
-        //bindings will have only 2 intents since duplications will be cut out
-        assertEquals(((IntentAttachPoint)composite.getServices().get(0).getBindings().get(0)).getRequiredIntents().size(), 3);
-        assertEquals(((OperationsConfigurator)composite.getServices().get(0).getBindings().get(0)).getConfiguredOperations().size(), 1);
-        assertEquals(((OperationsConfigurator)composite.getServices().get(0).getBindings().get(0)).getConfiguredOperations().get(0).getRequiredIntents().size(), 5);
-        
-        assertEquals(composite.getReferences().get(0).getRequiredIntents().size(), 5);
-        assertEquals(composite.getReferences().get(0).getConfiguredOperations().size(), 1);
-        assertEquals(composite.getReferences().get(0).getConfiguredOperations().get(0).getRequiredIntents().size(), 4);
-        assertEquals(composite.getReferences().get(0).getRequiredIntents().get(1).getName(), new QName(namespaceUri, "tuscanyIntent_1"));
-        assertEquals(((IntentAttachPoint)composite.getReferences().get(0).getBindings().get(0)).getRequiredIntents().size(), 3);
-
-        assertEquals(composite.getComponents().get(0).getRequiredIntents().size(), 3);
-        assertEquals(composite.getComponents().get(0).getRequiredIntents().get(2).getName(), new QName(namespaceUri, "tuscanyIntent_1"));
-        assertEquals(composite.getComponents().get(0).getServices().get(0).getRequiredIntents().size(), 4);
-        assertEquals(composite.getComponents().get(0).getServices().get(0).getCallback().getRequiredIntents().size(), 4);
-        assertEquals(composite.getComponents().get(0).getServices().get(0).getConfiguredOperations().get(0).getRequiredIntents().size(), 5);
-        assertEquals(composite.getComponents().get(0).getReferences().get(0).getRequiredIntents().size(), 5);
-        assertEquals(composite.getComponents().get(0).getReferences().get(0).getConfiguredOperations().get(0).getRequiredIntents().size(), 5);
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.tuscany.sca.assembly.xml;
+
+import java.net.URI;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.assembly.AssemblyFactory;
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.assembly.ConstrainingType;
+import org.apache.tuscany.sca.assembly.OperationsConfigurator;
+import org.apache.tuscany.sca.assembly.SCABindingFactory;
+import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
+import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
+import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.contribution.processor.DefaultURLArtifactProcessorExtensionPoint;
+import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
+import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
+import org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
+import org.apache.tuscany.sca.interfacedef.impl.InterfaceContractMapperImpl;
+import org.apache.tuscany.sca.policy.IntentAttachPoint;
+import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
+
+/**
+ * Test reading SCA XML assembly documents.
+ * 
+ * @version $Rev: 561254 $ $Date: 2007-07-31 13:16:27 +0530 (Tue, 31 Jul 2007) $
+ */
+public class BuildPolicyTestCase extends TestCase { 
+    private URLArtifactProcessor<Object> documentProcessor;
+    private URLArtifactProcessor<SCADefinitions> policyDefinitionsProcessor;
+    private ModelResolver resolver; 
+    private CompositeBuilder compositeBuilder;
+    private Composite composite;
+
+    @Override
+    public void setUp() throws Exception {
+        DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
+        ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+        AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
+        SCABindingFactory scaBindingFactory = new TestSCABindingFactoryImpl();
+        IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
+        List<SCADefinitions> policyDefinitions = new ArrayList<SCADefinitions>();
+        resolver = new DefaultModelResolver();
+        compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, new InterfaceContractMapperImpl(), null);
+        URLArtifactProcessorExtensionPoint documentProcessors = new DefaultURLArtifactProcessorExtensionPoint(extensionPoints);
+        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors, null);
+        policyDefinitionsProcessor = documentProcessors.getProcessor(SCADefinitions.class);
+        
+        StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
+        staxProcessors.addArtifactProcessor(new TestPolicyProcessor());
+        
+        URL url = getClass().getResource("CalculatorComponent.constrainingType");
+        URI uri = URI.create("CalculatorComponent.constrainingType");
+        ConstrainingType constrainingType = (ConstrainingType)documentProcessor.read(null, uri, url);
+        assertNotNull(constrainingType);
+        resolver.addModel(constrainingType);
+
+        url = getClass().getResource("TestAllPolicyCalculator.composite");
+        uri = URI.create("TestAllCalculator.constrainingType");
+        composite = (Composite)documentProcessor.read(null, uri, url);
+        assertNotNull(composite);
+        
+        url = getClass().getResource("another_test_definitions.xml");
+        uri = URI.create("another_test_definitions.xml");
+        SCADefinitions definitions = (SCADefinitions)policyDefinitionsProcessor.read(null, uri, url);
+        assertNotNull(definitions);
+        policyDefinitions.add(definitions);
+        
+        documentProcessor.resolve(definitions, resolver);
+        documentProcessor.resolve(composite, resolver);
+        
+        compositeBuilder.build(composite);
+    }
+
+    public void testPolicyIntentInheritance() throws Exception {
+        String namespaceUri = "http://test";
+        
+        IntentAttachPoint policiedComposite = (IntentAttachPoint)composite;
+        assertEquals(policiedComposite.getRequiredIntents().size(), 1);
+        assertEquals(policiedComposite.getRequiredIntents().get(0).getName(), new QName(namespaceUri, "tuscanyIntent_1"));
+        
+        //1 defined for composite, 2 defined for the service, 1 defined and 3 inherited for the promoted service (4)
+        assertEquals(composite.getServices().get(0).getRequiredIntents().size(), 7);
+        //1 from the operation defined in this service and 2 from the operation defined in the promoted service 
+        assertEquals(composite.getServices().get(0).getConfiguredOperations().get(0).getRequiredIntents().size(), 5);
+        assertEquals(composite.getServices().get(0).getRequiredIntents().get(3).getName(), new QName(namespaceUri, "tuscanyIntent_3"));
+        //bindings will have only 2 intents since duplications will be cut out
+        assertEquals(((IntentAttachPoint)composite.getServices().get(0).getBindings().get(0)).getRequiredIntents().size(), 3);
+        assertEquals(((OperationsConfigurator)composite.getServices().get(0).getBindings().get(0)).getConfiguredOperations().size(), 1);
+        assertEquals(((OperationsConfigurator)composite.getServices().get(0).getBindings().get(0)).getConfiguredOperations().get(0).getRequiredIntents().size(), 5);
+        
+        assertEquals(composite.getReferences().get(0).getRequiredIntents().size(), 5);
+        assertEquals(composite.getReferences().get(0).getConfiguredOperations().size(), 1);
+        assertEquals(composite.getReferences().get(0).getConfiguredOperations().get(0).getRequiredIntents().size(), 4);
+        assertEquals(composite.getReferences().get(0).getRequiredIntents().get(1).getName(), new QName(namespaceUri, "tuscanyIntent_1"));
+        assertEquals(((IntentAttachPoint)composite.getReferences().get(0).getBindings().get(0)).getRequiredIntents().size(), 3);
+
+        assertEquals(composite.getComponents().get(0).getRequiredIntents().size(), 3);
+        assertEquals(composite.getComponents().get(0).getRequiredIntents().get(2).getName(), new QName(namespaceUri, "tuscanyIntent_1"));
+        assertEquals(composite.getComponents().get(0).getServices().get(0).getRequiredIntents().size(), 4);
+        assertEquals(composite.getComponents().get(0).getServices().get(0).getCallback().getRequiredIntents().size(), 4);
+        assertEquals(composite.getComponents().get(0).getServices().get(0).getConfiguredOperations().get(0).getRequiredIntents().size(), 5);
+        assertEquals(composite.getComponents().get(0).getReferences().get(0).getRequiredIntents().size(), 5);
+        assertEquals(composite.getComponents().get(0).getReferences().get(0).getConfiguredOperations().get(0).getRequiredIntents().size(), 5);
+    }
+}

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadAllTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadAllTestCase.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadAllTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadAllTestCase.java Mon May 19 10:49:04 2008
@@ -56,7 +56,7 @@
         DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
         StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
         inputFactory = XMLInputFactory.newInstance();
-        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null);
+        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null, null);
     }
 
     public void testReadComposite() throws Exception {

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadDocumentTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadDocumentTestCase.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadDocumentTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadDocumentTestCase.java Mon May 19 10:49:04 2008
@@ -64,11 +64,11 @@
     public void setUp() throws Exception {
         DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
         URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
-        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors); 
+        documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors, null); 
         
         StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
         inputFactory = XMLInputFactory.newInstance();
-        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null);
+        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null, null);
         
         resolver = new DefaultModelResolver();
     }
@@ -124,7 +124,7 @@
         ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint();
         schemas.addSchema(getClass().getClassLoader().getResource("tuscany-sca.xsd").toString());
         XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas, null);
-        CompositeDocumentProcessor compositeDocumentProcessor = new CompositeDocumentProcessor(staxProcessor, validatingInputFactory, null);
+        CompositeDocumentProcessor compositeDocumentProcessor = new CompositeDocumentProcessor(staxProcessor, validatingInputFactory, null, null);
         
         URL url = getClass().getResource("JavaScriptReference.composite");
         URI uri = URI.create("JavaScriptReference.composite");
@@ -160,7 +160,7 @@
         ValidationSchemaExtensionPoint schemas = new DefaultValidationSchemaExtensionPoint();
         schemas.addSchema(getClass().getClassLoader().getResource("tuscany-sca.xsd").toString());
         XMLInputFactory validatingInputFactory = new DefaultValidatingXMLInputFactory(inputFactory, schemas, null);
-        CompositeDocumentProcessor compositeDocumentProcessor = new CompositeDocumentProcessor(staxProcessor, validatingInputFactory, null);
+        CompositeDocumentProcessor compositeDocumentProcessor = new CompositeDocumentProcessor(staxProcessor, validatingInputFactory, null, null);
         
         URL url = getClass().getResource("RMIBindingTest.composite");
         URI uri = URI.create("RMIBindingTest.composite");

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadTestCase.java?rev=657881&r1=657880&r2=657881&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadTestCase.java Mon May 19 10:49:04 2008
@@ -48,7 +48,7 @@
         ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
         inputFactory = XMLInputFactory.newInstance();
         StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
-        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, XMLInputFactory.newInstance(), XMLOutputFactory.newInstance());
+        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, XMLInputFactory.newInstance(), XMLOutputFactory.newInstance(), null);
     }
 
     @Override



Mime
View raw message