summaryrefslogtreecommitdiffstats
path: root/java/sca/modules
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-08-12 13:34:45 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-08-12 13:34:45 +0000
commit262ad21576300d370897c0d175e5ec2c4521c53b (patch)
tree50d32947bee641bb86f5f9e2f5d61db9b7bb1e29 /java/sca/modules
parente1448e957b13debf895f3001da9f718e9fac3eab (diff)
Feed the monitor through into model resolvers should they wish to use it.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@803502 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeModelResolver.java3
-rw-r--r--java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeModelResolver.java3
-rw-r--r--java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeModelResolver.java3
-rw-r--r--java/sca/modules/binding-sca-runtime/src/test/java/org/apace/tuscany/sca/binding/sca/SCABindingTestCase.java2
-rw-r--r--java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java4
-rw-r--r--java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java2
-rw-r--r--java/sca/modules/contribution-osgi/META-INF/MANIFEST.MF1
-rw-r--r--java/sca/modules/contribution-osgi/pom.xml6
-rw-r--r--java/sca/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/impl/OSGiBundleReferenceModelResolver.java3
-rw-r--r--java/sca/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/impl/OSGiClassReferenceModelResolver.java3
-rw-r--r--java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassLoaderModelResolver.java3
-rw-r--r--java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceModelResolver.java3
-rw-r--r--java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportModelResolver.java3
-rw-r--r--java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessor.java2
-rw-r--r--java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java2
-rw-r--r--java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionInfoProcessor.java4
-rw-r--r--java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/DefaultModelResolver.java3
-rw-r--r--java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolver.java14
-rw-r--r--java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionModelResolver.java3
-rw-r--r--java/sca/modules/contribution/src/test/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceArtifactResolverTestCase.java2
-rw-r--r--java/sca/modules/contribution/src/test/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolverTestCase.java3
-rw-r--r--java/sca/modules/contribution/src/test/java/org/apache/tuscany/sca/contribution/resolver/TestModelResolver.java3
-rw-r--r--java/sca/modules/endpoint/src/test/java/org/apace/tuscany/sca/binding/sca/EndpointTestCase.java2
-rw-r--r--java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/xml/BPELDocumentModelResolver.java2
-rw-r--r--java/sca/modules/implementation-osgi/src/main/java/org/apache/tuscany/sca/implementation/osgi/xml/ServiceDescriptionsModelResolver.java3
-rw-r--r--java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java3
-rw-r--r--java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/AbstractWSDLTestCase.java3
-rw-r--r--java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java5
-rw-r--r--java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/EndpointIntrospector.java8
-rw-r--r--java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java4
-rw-r--r--java/sca/modules/xsd/src/main/java/org/apache/tuscany/sca/xsd/xml/XSDModelResolver.java3
-rw-r--r--java/sca/modules/xsd/src/test/java/org/apache/tuscany/sca/xsd/xml/XSDDocumentProcessorTestCase.java2
32 files changed, 71 insertions, 39 deletions
diff --git a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeModelResolver.java b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeModelResolver.java
index 166bba8757..c2ba7d10e6 100644
--- a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeModelResolver.java
+++ b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeModelResolver.java
@@ -28,6 +28,7 @@ import org.apache.tuscany.sca.contribution.Import;
import org.apache.tuscany.sca.contribution.java.JavaImport;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.monitor.Monitor;
/**
* A Model Resolver for ComponentType models.
@@ -38,7 +39,7 @@ public class ComponentTypeModelResolver implements ModelResolver {
private Contribution contribution;
private Map<String, ComponentType> map = new HashMap<String, ComponentType>();
- public ComponentTypeModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
+ public ComponentTypeModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories, Monitor monitor) {
this.contribution = contribution;
}
diff --git a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeModelResolver.java b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeModelResolver.java
index d077bc63a0..a911020474 100644
--- a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeModelResolver.java
+++ b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeModelResolver.java
@@ -30,6 +30,7 @@ import org.apache.tuscany.sca.contribution.Import;
import org.apache.tuscany.sca.contribution.namespace.NamespaceImport;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.monitor.Monitor;
/**
* A Model Resolver for Composite models.
@@ -41,7 +42,7 @@ public class CompositeModelResolver implements ModelResolver {
private Contribution contribution;
private Map<QName, Composite> map = new HashMap<QName, Composite>();
- public CompositeModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
+ public CompositeModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories, Monitor monitor) {
this.contribution = contribution;
}
diff --git a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeModelResolver.java b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeModelResolver.java
index d73ce5ab66..3fe6553cae 100644
--- a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeModelResolver.java
+++ b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeModelResolver.java
@@ -30,6 +30,7 @@ import org.apache.tuscany.sca.contribution.Import;
import org.apache.tuscany.sca.contribution.namespace.NamespaceImport;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.monitor.Monitor;
/**
* A Model Resolver for ConstrainingType models.
@@ -41,7 +42,7 @@ public class ConstrainingTypeModelResolver implements ModelResolver {
private Contribution contribution;
private Map<QName, ConstrainingType> map = new HashMap<QName, ConstrainingType>();
- public ConstrainingTypeModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
+ public ConstrainingTypeModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories, Monitor monitor) {
this.contribution = contribution;
}
diff --git a/java/sca/modules/binding-sca-runtime/src/test/java/org/apace/tuscany/sca/binding/sca/SCABindingTestCase.java b/java/sca/modules/binding-sca-runtime/src/test/java/org/apace/tuscany/sca/binding/sca/SCABindingTestCase.java
index 8789ba8a56..f9cf78e49d 100644
--- a/java/sca/modules/binding-sca-runtime/src/test/java/org/apace/tuscany/sca/binding/sca/SCABindingTestCase.java
+++ b/java/sca/modules/binding-sca-runtime/src/test/java/org/apace/tuscany/sca/binding/sca/SCABindingTestCase.java
@@ -67,7 +67,7 @@ public class SCABindingTestCase {
StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null, null);
- resolver = new CompositeModelResolver(null, null);
+ resolver = new CompositeModelResolver(null, null, null);
FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
diff --git a/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java b/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java
index 6e3538c47b..8e6dbeac3c 100644
--- a/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java
+++ b/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java
@@ -61,7 +61,7 @@ public class BindingWSDLGeneratorTestCase extends TestCase {
new JAXWSJavaInterfaceProcessor(dataBindings, faultExceptionMapper, null).visitInterface(iface);
new DataBindingJavaInterfaceProcessor(dataBindings).visitInterface(iface);
javaIC.setInterface(iface);
- WSDLInterfaceContract wsdlIC = BindingWSDLGenerator.createWSDLInterfaceContract(javaIC, false, new XSDModelResolver(null, null), dataBindings, wsdlFactory, xsdFactory, documentBuilderFactory, null);
+ WSDLInterfaceContract wsdlIC = BindingWSDLGenerator.createWSDLInterfaceContract(javaIC, false, new XSDModelResolver(null, null, null), dataBindings, wsdlFactory, xsdFactory, documentBuilderFactory, null);
assertNotNull(wsdlIC);
WSDLInterface wsdlInterface = (WSDLInterface)wsdlIC.getInterface();
assertNotNull(wsdlInterface);
@@ -74,7 +74,7 @@ public class BindingWSDLGeneratorTestCase extends TestCase {
new JAXWSJavaInterfaceProcessor(dataBindings, faultExceptionMapper, null).visitInterface(iface2);
new DataBindingJavaInterfaceProcessor(dataBindings).visitInterface(iface2);
javaIC2.setInterface(iface2);
- WSDLInterfaceContract wsdlIC2 = BindingWSDLGenerator.createWSDLInterfaceContract(javaIC2, false, new XSDModelResolver(null, null), dataBindings, wsdlFactory, xsdFactory, documentBuilderFactory, null);
+ WSDLInterfaceContract wsdlIC2 = BindingWSDLGenerator.createWSDLInterfaceContract(javaIC2, false, new XSDModelResolver(null, null, null), dataBindings, wsdlFactory, xsdFactory, documentBuilderFactory, null);
assertNotNull(wsdlIC2);
}
diff --git a/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java b/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java
index cb866f69a0..86141e5fb6 100644
--- a/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java
+++ b/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java
@@ -60,7 +60,7 @@ public class Interface2WSDLGeneratorTestCase {
DocumentBuilderFactory documentBuilderFactory = modelFactories.getFactory(DocumentBuilderFactory.class);
WSDLDefinition wsdlDefinition = wFactory.createWSDLDefinition();
XSDFactory factory = new DefaultXSDFactory();
- Interface2WSDLGenerator generator = new Interface2WSDLGenerator(false, new XSDModelResolver(null, null), dataBindings, factory, documentBuilderFactory, null);
+ Interface2WSDLGenerator generator = new Interface2WSDLGenerator(false, new XSDModelResolver(null, null, null), dataBindings, factory, documentBuilderFactory, null);
Definition definition = generator.generate(iface, wsdlDefinition);
// print the generated WSDL file and inline schemas
diff --git a/java/sca/modules/contribution-osgi/META-INF/MANIFEST.MF b/java/sca/modules/contribution-osgi/META-INF/MANIFEST.MF
index 0f201e78a7..c70f81ea94 100644
--- a/java/sca/modules/contribution-osgi/META-INF/MANIFEST.MF
+++ b/java/sca/modules/contribution-osgi/META-INF/MANIFEST.MF
@@ -16,6 +16,7 @@ Import-Package: org.apache.tuscany.sca.assembly;version="2.0.0",
org.apache.tuscany.sca.contribution.resolver;version="2.0.0",
org.apache.tuscany.sca.contribution.scanner;version="2.0.0",
org.apache.tuscany.sca.core;version="2.0.0",
+ org.apache.tuscany.sca.monitor;version="2.0.0",
org.osgi.framework;version="1.4.0"
Bundle-DocURL: http://www.apache.org/
Export-Package: org.apache.tuscany.sca.contribution.osgi;version="2.0.0"
diff --git a/java/sca/modules/contribution-osgi/pom.xml b/java/sca/modules/contribution-osgi/pom.xml
index 7ec856f3e2..9a914276aa 100644
--- a/java/sca/modules/contribution-osgi/pom.xml
+++ b/java/sca/modules/contribution-osgi/pom.xml
@@ -40,6 +40,12 @@
<artifactId>tuscany-core-spi</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-monitor</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.eclipse</groupId>
diff --git a/java/sca/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/impl/OSGiBundleReferenceModelResolver.java b/java/sca/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/impl/OSGiBundleReferenceModelResolver.java
index e63bbc495f..173ac0832d 100644
--- a/java/sca/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/impl/OSGiBundleReferenceModelResolver.java
+++ b/java/sca/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/impl/OSGiBundleReferenceModelResolver.java
@@ -27,6 +27,7 @@ import org.apache.tuscany.sca.contribution.Import;
import org.apache.tuscany.sca.contribution.osgi.BundleReference;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.monitor.Monitor;
import org.osgi.framework.Bundle;
/**
@@ -40,7 +41,7 @@ public class OSGiBundleReferenceModelResolver implements ModelResolver {
private OSGiBundleProcessor bundleProcessor;
- public OSGiBundleReferenceModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
+ public OSGiBundleReferenceModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories, Monitor monitor) {
this.contribution = contribution;
this.bundleProcessor = new OSGiBundleProcessor();
}
diff --git a/java/sca/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/impl/OSGiClassReferenceModelResolver.java b/java/sca/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/impl/OSGiClassReferenceModelResolver.java
index 4862050084..c3d79b5595 100644
--- a/java/sca/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/impl/OSGiClassReferenceModelResolver.java
+++ b/java/sca/modules/contribution-osgi/src/main/java/org/apache/tuscany/sca/contribution/osgi/impl/OSGiClassReferenceModelResolver.java
@@ -23,6 +23,7 @@ import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.resolver.ClassReference;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.monitor.Monitor;
import org.osgi.framework.Bundle;
/**
@@ -34,7 +35,7 @@ public class OSGiClassReferenceModelResolver implements ModelResolver {
// private Contribution contribution;
private Bundle bundle;
- public OSGiClassReferenceModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
+ public OSGiClassReferenceModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories, Monitor monitor) {
// this.contribution = contribution;
this.bundle = OSGiBundleActivator.findBundle(contribution.getLocation());
}
diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassLoaderModelResolver.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassLoaderModelResolver.java
index 906a5e1542..df313f3635 100644
--- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassLoaderModelResolver.java
+++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassLoaderModelResolver.java
@@ -37,6 +37,7 @@ import org.apache.tuscany.sca.contribution.resolver.DefaultDelegatingModelResolv
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
+import org.apache.tuscany.sca.monitor.Monitor;
/**
* A Model Resolver for ClassReferences.
@@ -66,7 +67,7 @@ public class ClassLoaderModelResolver extends URLClassLoader implements ModelRes
return urls.toArray(new URL[urls.size()]);
}
- public ClassLoaderModelResolver(final Contribution contribution, FactoryExtensionPoint modelFactories) throws IOException {
+ public ClassLoaderModelResolver(final Contribution contribution, FactoryExtensionPoint modelFactories, Monitor monitor) throws IOException {
super(getContributionURLs(contribution), parentClassLoader(contribution));
this.contribution = contribution;
diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceModelResolver.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceModelResolver.java
index 811c5b7010..c023b3dc5b 100644
--- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceModelResolver.java
+++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceModelResolver.java
@@ -31,6 +31,7 @@ import org.apache.tuscany.sca.contribution.resolver.ClassReference;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
+import org.apache.tuscany.sca.monitor.Monitor;
/**
* A Model Resolver for ClassReferences.
@@ -45,7 +46,7 @@ public class ClassReferenceModelResolver implements ModelResolver {
private ModelResolver osgiResolver;
- public ClassReferenceModelResolver(final Contribution contribution, FactoryExtensionPoint modelFactories) {
+ public ClassReferenceModelResolver(final Contribution contribution, FactoryExtensionPoint modelFactories, Monitor monitor) {
this.contribution = contribution;
if (this.contribution != null) {
// Allow privileged access to get ClassLoader. Requires RuntimePermission in security policy.
diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportModelResolver.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportModelResolver.java
index 8d5412f6d7..c1e3f13b77 100644
--- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportModelResolver.java
+++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportModelResolver.java
@@ -22,6 +22,7 @@ package org.apache.tuscany.sca.contribution.java.impl;
import org.apache.tuscany.sca.contribution.java.JavaExport;
import org.apache.tuscany.sca.contribution.resolver.ClassReference;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.monitor.Monitor;
/**
* A model resolver for Java exports.
@@ -33,7 +34,7 @@ public class JavaExportModelResolver implements ModelResolver {
private JavaExport export;
private ModelResolver resolver;
- public JavaExportModelResolver(JavaExport export, ModelResolver resolver) {
+ public JavaExportModelResolver(JavaExport export, ModelResolver resolver, Monitor monitor) {
this.export = export;
this.resolver = resolver;
}
diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessor.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessor.java
index 6decc004a6..73fbea31a0 100644
--- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessor.java
+++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessor.java
@@ -143,6 +143,6 @@ public class JavaExportProcessor implements StAXArtifactProcessor<JavaExport> {
if (javaExport.getPackage() != null)
// Initialize the export resolver
- javaExport.setModelResolver(new JavaExportModelResolver(javaExport, resolver));
+ javaExport.setModelResolver(new JavaExportModelResolver(javaExport, resolver, monitor));
}
}
diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java
index d651393e78..707d8c05c8 100644
--- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java
+++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionContentProcessor.java
@@ -122,7 +122,7 @@ public class ContributionContentProcessor implements ExtendedURLArtifactProcesso
Contribution contribution = contributionFactory.createContribution();
contribution.setURI(contributionURI.toString());
contribution.setLocation(contributionURL.toString());
- ModelResolver modelResolver = new ExtensibleModelResolver(contribution, modelResolvers, modelFactories);
+ ModelResolver modelResolver = new ExtensibleModelResolver(contribution, modelResolvers, modelFactories, monitor);
contribution.setModelResolver(modelResolver);
contribution.setUnresolved(true);
diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionInfoProcessor.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionInfoProcessor.java
index ef435d6aed..eb1946c4b8 100644
--- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionInfoProcessor.java
+++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/impl/ContributionInfoProcessor.java
@@ -66,8 +66,10 @@ public class ContributionInfoProcessor implements URLArtifactProcessor<Contribut
private URLArtifactProcessorExtensionPoint artifactProcessors;
private URLArtifactProcessor<Object> artifactProcessor;
private StAXArtifactProcessor<Object> extensionProcessor;
+ private Monitor monitor;
public ContributionInfoProcessor(ExtensionPointRegistry extensionPoints, StAXArtifactProcessor<Object> extensionProcessor, Monitor monitor) {
+ this.monitor = monitor;
this.modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
this.modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
hackResolvers(modelResolvers);
@@ -100,7 +102,7 @@ public class ContributionInfoProcessor implements URLArtifactProcessor<Contribut
Contribution contribution = contributionFactory.createContribution();
contribution.setURI(contributionURI.toString());
contribution.setLocation(contributionURL.toString());
- ModelResolver modelResolver = new ExtensibleModelResolver(contribution, modelResolvers, modelFactories);
+ ModelResolver modelResolver = new ExtensibleModelResolver(contribution, modelResolvers, modelFactories, monitor);
contribution.setModelResolver(modelResolver);
contribution.setUnresolved(true);
diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/DefaultModelResolver.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/DefaultModelResolver.java
index 1803315e2e..12e5543672 100644
--- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/DefaultModelResolver.java
+++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/DefaultModelResolver.java
@@ -26,6 +26,7 @@ import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.DefaultImport;
import org.apache.tuscany.sca.contribution.Import;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.monitor.Monitor;
/**
* A default implementation of a model resolver based on a map.
@@ -40,7 +41,7 @@ public class DefaultModelResolver implements ModelResolver {
public DefaultModelResolver() {
}
- public DefaultModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
+ public DefaultModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories, Monitor monitor) {
this.contribution = contribution;
}
diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolver.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolver.java
index b48742bcae..1e6c0f7a18 100644
--- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolver.java
+++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolver.java
@@ -25,6 +25,7 @@ import java.util.Map;
import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.monitor.Monitor;
/**
* An implementation of an extensible model resolver which delegates to the
@@ -41,6 +42,7 @@ public class ExtensibleModelResolver implements ModelResolver {
private final Map<Class<?>, ModelResolver> resolversByImplementationClass = new HashMap<Class<?>, ModelResolver>();
private Map<Object, Object> map = new HashMap<Object, Object>();
private Object lastUnresolved;
+ private Monitor monitor;
/**
* Constructs an extensible model resolver
@@ -54,7 +56,8 @@ public class ExtensibleModelResolver implements ModelResolver {
public ExtensibleModelResolver(Contribution contribution,
ModelResolverExtensionPoint resolverExtensions,
FactoryExtensionPoint modelFactories,
- ModelResolver defaultResolver) {
+ ModelResolver defaultResolver,
+ Monitor monitor) {
this.contribution = contribution;
this.resolverExtensions = resolverExtensions;
this.modelFactories = modelFactories;
@@ -62,6 +65,7 @@ public class ExtensibleModelResolver implements ModelResolver {
// but they should be handled by the contribution import/export mechanism instead of this
// defaultResolver hack.
this.defaultResolver = defaultResolver;
+ this.monitor = monitor;
}
/**
@@ -73,10 +77,12 @@ public class ExtensibleModelResolver implements ModelResolver {
*/
public ExtensibleModelResolver(Contribution contribution,
ModelResolverExtensionPoint resolverExtensions,
- FactoryExtensionPoint modelFactories) {
+ FactoryExtensionPoint modelFactories,
+ Monitor monitor) {
this.contribution = contribution;
this.resolverExtensions = resolverExtensions;
this.modelFactories = modelFactories;
+ this.monitor = monitor;
}
/**
@@ -117,10 +123,10 @@ public class ExtensibleModelResolver implements ModelResolver {
try {
Constructor<? extends ModelResolver> constructor =
resolverClass
- .getConstructor(new Class[] {Contribution.class, FactoryExtensionPoint.class});
+ .getConstructor(new Class[] {Contribution.class, FactoryExtensionPoint.class, Monitor.class});
if (constructor != null) {
- resolverInstance = constructor.newInstance(contribution, modelFactories);
+ resolverInstance = constructor.newInstance(contribution, modelFactories, monitor);
resolversByImplementationClass.put(resolverClass, resolverInstance);
resolversByModelType.put(c, resolverInstance);
return resolverInstance;
diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionModelResolver.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionModelResolver.java
index ddc768b61c..91e74edf47 100644
--- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionModelResolver.java
+++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionModelResolver.java
@@ -25,6 +25,7 @@ import java.util.Map;
import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.monitor.Monitor;
/**
* A Model Resolver for Contribution models.
@@ -35,7 +36,7 @@ public class ContributionModelResolver implements ModelResolver {
private Map<String, Contribution> map = new HashMap<String, Contribution>();
- public ContributionModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
+ public ContributionModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories, Monitor monitor) {
}
public void addModel(Object resolved) {
diff --git a/java/sca/modules/contribution/src/test/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceArtifactResolverTestCase.java b/java/sca/modules/contribution/src/test/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceArtifactResolverTestCase.java
index b101c2f1b6..13945eac24 100644
--- a/java/sca/modules/contribution/src/test/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceArtifactResolverTestCase.java
+++ b/java/sca/modules/contribution/src/test/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceArtifactResolverTestCase.java
@@ -46,7 +46,7 @@ public class ClassReferenceArtifactResolverTestCase {
ModelResolverExtensionPoint resolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
resolvers.addResolver(ClassReference.class, ClassReferenceModelResolver.class);
FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
- resolver = new ExtensibleModelResolver(null, resolvers, modelFactories);
+ resolver = new ExtensibleModelResolver(null, resolvers, modelFactories, null);
}
/**
diff --git a/java/sca/modules/contribution/src/test/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolverTestCase.java b/java/sca/modules/contribution/src/test/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolverTestCase.java
index 2422c8fb94..b5cfa6f63d 100644
--- a/java/sca/modules/contribution/src/test/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolverTestCase.java
+++ b/java/sca/modules/contribution/src/test/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolverTestCase.java
@@ -27,6 +27,7 @@ import org.apache.tuscany.sca.contribution.DefaultContributionFactory;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.DefaultFactoryExtensionPoint;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.monitor.Monitor;
import org.junit.Before;
import org.junit.Test;
@@ -48,7 +49,7 @@ public class ExtensibleModelResolverTestCase {
FactoryExtensionPoint factories = new DefaultFactoryExtensionPoint(new DefaultExtensionPointRegistry());
- resolver = new ExtensibleModelResolver(null, resolvers, factories, null);
+ resolver = new ExtensibleModelResolver(null, resolvers, factories, (Monitor)null);
factory = new DefaultContributionFactory();
}
diff --git a/java/sca/modules/contribution/src/test/java/org/apache/tuscany/sca/contribution/resolver/TestModelResolver.java b/java/sca/modules/contribution/src/test/java/org/apache/tuscany/sca/contribution/resolver/TestModelResolver.java
index cd586d3b2c..2782e9b318 100644
--- a/java/sca/modules/contribution/src/test/java/org/apache/tuscany/sca/contribution/resolver/TestModelResolver.java
+++ b/java/sca/modules/contribution/src/test/java/org/apache/tuscany/sca/contribution/resolver/TestModelResolver.java
@@ -24,6 +24,7 @@ import java.util.Map;
import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.monitor.Monitor;
/**
* A test implementation of a model resolver, based on a map.
@@ -34,7 +35,7 @@ public class TestModelResolver implements ModelResolver {
private Map<Object, Object> map = new HashMap<Object, Object>();
- public TestModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
+ public TestModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories, Monitor monitor) {
}
public <T> T resolveModel(Class<T> modelClass, T unresolved) {
diff --git a/java/sca/modules/endpoint/src/test/java/org/apace/tuscany/sca/binding/sca/EndpointTestCase.java b/java/sca/modules/endpoint/src/test/java/org/apace/tuscany/sca/binding/sca/EndpointTestCase.java
index 57733cce6c..41d80c0058 100644
--- a/java/sca/modules/endpoint/src/test/java/org/apace/tuscany/sca/binding/sca/EndpointTestCase.java
+++ b/java/sca/modules/endpoint/src/test/java/org/apace/tuscany/sca/binding/sca/EndpointTestCase.java
@@ -108,7 +108,7 @@ public class EndpointTestCase {
// Get the model resolvers
modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
- modelResolver = new ExtensibleModelResolver(null, modelResolvers, modelFactories);
+ modelResolver = new ExtensibleModelResolver(null, modelResolvers, modelFactories, monitor);
// Create a composite builder
compositeBuilder = extensionPoints.getExtensionPoint(CompositeBuilderExtensionPoint.class).getCompositeBuilder("org.apache.tuscany.sca.assembly.builder.CompositeBuilder");
diff --git a/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/xml/BPELDocumentModelResolver.java b/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/xml/BPELDocumentModelResolver.java
index d56e6099fc..733deece70 100644
--- a/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/xml/BPELDocumentModelResolver.java
+++ b/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/xml/BPELDocumentModelResolver.java
@@ -64,7 +64,7 @@ public class BPELDocumentModelResolver implements ModelResolver {
private Monitor monitor;
- public BPELDocumentModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
+ public BPELDocumentModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories, Monitor monitor) {
this.wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
this.contribution = contribution;
}
diff --git a/java/sca/modules/implementation-osgi/src/main/java/org/apache/tuscany/sca/implementation/osgi/xml/ServiceDescriptionsModelResolver.java b/java/sca/modules/implementation-osgi/src/main/java/org/apache/tuscany/sca/implementation/osgi/xml/ServiceDescriptionsModelResolver.java
index deafe8ccc9..15b31e97f9 100644
--- a/java/sca/modules/implementation-osgi/src/main/java/org/apache/tuscany/sca/implementation/osgi/xml/ServiceDescriptionsModelResolver.java
+++ b/java/sca/modules/implementation-osgi/src/main/java/org/apache/tuscany/sca/implementation/osgi/xml/ServiceDescriptionsModelResolver.java
@@ -24,6 +24,7 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.implementation.osgi.ServiceDescriptions;
import org.apache.tuscany.sca.implementation.osgi.ServiceDescriptionsFactory;
+import org.apache.tuscany.sca.monitor.Monitor;
/**
*
@@ -31,7 +32,7 @@ import org.apache.tuscany.sca.implementation.osgi.ServiceDescriptionsFactory;
public class ServiceDescriptionsModelResolver implements ModelResolver {
private ServiceDescriptions serviceDescriptions;
- public ServiceDescriptionsModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
+ public ServiceDescriptionsModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories, Monitor monitor) {
ServiceDescriptionsFactory factory = modelFactories.getFactory(ServiceDescriptionsFactory.class);
this.serviceDescriptions = factory.createServiceDescriptions();
}
diff --git a/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java b/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java
index 6f6a5a2302..ad05f2b626 100644
--- a/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java
+++ b/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java
@@ -61,6 +61,7 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
+import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.xsd.XSDFactory;
import org.apache.tuscany.sca.xsd.XSDefinition;
import org.w3c.dom.Attr;
@@ -114,7 +115,7 @@ public class WSDLModelResolver implements ModelResolver {
private ContributionFactory contributionFactory;
private XSDFactory xsdFactory;
- public WSDLModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
+ public WSDLModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories, Monitor monitor) {
this.contribution = contribution;
this.wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
diff --git a/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/AbstractWSDLTestCase.java b/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/AbstractWSDLTestCase.java
index d91e206183..bfdc7e9347 100644
--- a/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/AbstractWSDLTestCase.java
+++ b/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/AbstractWSDLTestCase.java
@@ -31,6 +31,7 @@ import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
+import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.xsd.XSDFactory;
import org.junit.Before;
@@ -55,7 +56,7 @@ public abstract class AbstractWSDLTestCase {
ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
Contribution contribution = contributionFactory.createContribution();
ModelResolverExtensionPoint modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
- resolver = new ExtensibleModelResolver(contribution, modelResolvers, modelFactories);
+ resolver = new ExtensibleModelResolver(contribution, modelResolvers, modelFactories, (Monitor)null);
contribution.setModelResolver(resolver);
URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
diff --git a/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java b/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java
index de98befd9b..3c08409718 100644
--- a/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java
+++ b/java/sca/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java
@@ -39,6 +39,7 @@ import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
+import org.apache.tuscany.sca.monitor.Monitor;
import org.junit.Before;
import org.junit.Test;
@@ -64,9 +65,9 @@ public class WSDLTestCase {
contributionFactory = modelFactories.getFactory(ContributionFactory.class);
Contribution contribution = contributionFactory.createContribution();
ModelResolverExtensionPoint modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
- resolver = new ExtensibleModelResolver(contribution, modelResolvers, modelFactories);
+ resolver = new ExtensibleModelResolver(contribution, modelResolvers, modelFactories, (Monitor)null);
contribution.setModelResolver(resolver);
- wsdlResolver = new WSDLModelResolver(contribution, modelFactories);
+ wsdlResolver = new WSDLModelResolver(contribution, modelFactories, null);
}
@Test
diff --git a/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/EndpointIntrospector.java b/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/EndpointIntrospector.java
index 59f8d3c07b..39e7457e2e 100644
--- a/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/EndpointIntrospector.java
+++ b/java/sca/modules/node-impl-osgi/src/main/java/org/apache/tuscany/sca/osgi/service/remoteadmin/impl/EndpointIntrospector.java
@@ -102,6 +102,7 @@ public class EndpointIntrospector {
private XMLOutputFactory xmlOutputFactory;
private JavaInterfaceFactory javaInterfaceFactory;
private StAXArtifactProcessor processor;
+ private Monitor monitor;
/**
* @param intentName
@@ -144,7 +145,6 @@ public class EndpointIntrospector {
registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
UtilityExtensionPoint utilities = this.registry.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = null;
if (monitorFactory != null) {
monitor = monitorFactory.createMonitor();
}
@@ -285,7 +285,7 @@ public class EndpointIntrospector {
contribution.setURI("urn:" + id);
contribution.setLocation(bundle.getEntry("/").toString());
contribution.getDeployables().add(composite);
- ModelResolver modelResolver = new ExtensibleModelResolver(contribution, modelResolvers, factories);
+ ModelResolver modelResolver = new ExtensibleModelResolver(contribution, modelResolvers, factories, monitor);
contribution.setModelResolver(modelResolver);
contribution.setUnresolved(true);
return contribution;
@@ -364,7 +364,7 @@ public class EndpointIntrospector {
contribution.setURI("urn:" + id);
contribution.setLocation(bundle.getEntry("/").toString());
contribution.getDeployables().add(composite);
- ModelResolver modelResolver = new ExtensibleModelResolver(contribution, modelResolvers, factories);
+ ModelResolver modelResolver = new ExtensibleModelResolver(contribution, modelResolvers, factories, monitor);
contribution.setModelResolver(modelResolver);
contribution.setUnresolved(true);
return contribution;
@@ -412,7 +412,7 @@ public class EndpointIntrospector {
contribution.setURI("urn:" + id);
contribution.setLocation(bundle.getEntry("/").toString());
contribution.getDeployables().add(composite);
- ModelResolver modelResolver = new ExtensibleModelResolver(contribution, modelResolvers, factories);
+ ModelResolver modelResolver = new ExtensibleModelResolver(contribution, modelResolvers, factories, monitor);
contribution.setModelResolver(modelResolver);
contribution.setUnresolved(true);
return contribution;
diff --git a/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java
index db0c44ad39..9f2303a93f 100644
--- a/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java
+++ b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java
@@ -444,7 +444,7 @@ public class NodeFactoryImpl extends NodeFactory {
systemContribution = contributionFactory.createContribution();
systemContribution.setURI("http://tuscany.apache.org/SystemContribution");
systemContribution.setLocation("http://tuscany.apache.org/SystemContribution");
- ModelResolver modelResolver = new ExtensibleModelResolver(systemContribution, modelResolvers, modelFactories);
+ ModelResolver modelResolver = new ExtensibleModelResolver(systemContribution, modelResolvers, modelFactories, monitor);
systemContribution.setModelResolver(modelResolver);
systemContribution.setUnresolved(true);
@@ -505,7 +505,7 @@ public class NodeFactoryImpl extends NodeFactory {
monitor.popContext();
}
- ExtensibleModelResolver modelResolver = new ExtensibleModelResolver(new Contributions(contributions), modelResolvers, modelFactories);
+ ExtensibleModelResolver modelResolver = new ExtensibleModelResolver(new Contributions(contributions), modelResolvers, modelFactories, monitor);
// now resolve and add the system contribution
contributionProcessor.resolve(systemContribution, modelResolver);
diff --git a/java/sca/modules/xsd/src/main/java/org/apache/tuscany/sca/xsd/xml/XSDModelResolver.java b/java/sca/modules/xsd/src/main/java/org/apache/tuscany/sca/xsd/xml/XSDModelResolver.java
index 8a99ffb922..15e4277f10 100644
--- a/java/sca/modules/xsd/src/main/java/org/apache/tuscany/sca/xsd/xml/XSDModelResolver.java
+++ b/java/sca/modules/xsd/src/main/java/org/apache/tuscany/sca/xsd/xml/XSDModelResolver.java
@@ -38,6 +38,7 @@ import org.apache.tuscany.sca.contribution.namespace.NamespaceImport;
import org.apache.tuscany.sca.contribution.processor.ContributionRuntimeException;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.xsd.DefaultXSDFactory;
import org.apache.tuscany.sca.xsd.XSDFactory;
import org.apache.tuscany.sca.xsd.XSDefinition;
@@ -60,7 +61,7 @@ public class XSDModelResolver implements ModelResolver {
private Map<String, List<XSDefinition>> map = new HashMap<String, List<XSDefinition>>();
private XmlSchemaCollection schemaCollection;
- public XSDModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
+ public XSDModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories, Monitor monitor) {
this.contribution = contribution;
this.schemaCollection = new XmlSchemaCollection();
schemaCollection.setSchemaResolver(new URIResolverImpl(contribution));
diff --git a/java/sca/modules/xsd/src/test/java/org/apache/tuscany/sca/xsd/xml/XSDDocumentProcessorTestCase.java b/java/sca/modules/xsd/src/test/java/org/apache/tuscany/sca/xsd/xml/XSDDocumentProcessorTestCase.java
index 3862973eca..3b57589072 100644
--- a/java/sca/modules/xsd/src/test/java/org/apache/tuscany/sca/xsd/xml/XSDDocumentProcessorTestCase.java
+++ b/java/sca/modules/xsd/src/test/java/org/apache/tuscany/sca/xsd/xml/XSDDocumentProcessorTestCase.java
@@ -60,7 +60,7 @@ public class XSDDocumentProcessorTestCase {
FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
contributionFactory = modelFactories.getFactory(ContributionFactory.class);
Contribution contribution = contributionFactory.createContribution();
- resolver = new XSDModelResolver(contribution, modelFactories);
+ resolver = new XSDModelResolver(contribution, modelFactories, null);
}
@Test