summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/modules/contribution-impl
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-01-13 07:34:35 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-01-13 07:34:35 +0000
commitc953debbe7d1e8785c4c401c1314d9b176281e95 (patch)
tree750ab88cb6ca4aca96aef3aa0a754e899d6fdcf8 /branches/sca-java-1.x/modules/contribution-impl
parent4c39d8c12de316d28abe711557c60ef000014e62 (diff)
Fix for TUSCANT-2763 & TUSCANY-2764
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@734063 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/contribution-impl')
-rw-r--r--branches/sca-java-1.x/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java12
-rw-r--r--branches/sca-java-1.x/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolverTestCase.java4
2 files changed, 10 insertions, 6 deletions
diff --git a/branches/sca-java-1.x/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java b/branches/sca-java-1.x/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java
index 7b8b12ca9d..6471042fed 100644
--- a/branches/sca-java-1.x/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java
+++ b/branches/sca-java-1.x/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java
@@ -55,13 +55,14 @@ import org.apache.tuscany.sca.contribution.service.ContributionService;
import org.apache.tuscany.sca.contribution.service.ExtensibleContributionListener;
import org.apache.tuscany.sca.contribution.service.util.IOHelper;
import org.apache.tuscany.sca.contribution.xml.ContributionMetadataDocumentProcessor;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.definitions.SCADefinitions;
-import org.apache.tuscany.sca.policy.Intent;
-import org.apache.tuscany.sca.policy.IntentAttachPointType;
-import org.apache.tuscany.sca.policy.PolicySet;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
+import org.apache.tuscany.sca.policy.Intent;
+import org.apache.tuscany.sca.policy.IntentAttachPointType;
+import org.apache.tuscany.sca.policy.PolicySet;
/**
* Service interface that manages artifacts contributed to a Tuscany runtime.
@@ -69,6 +70,7 @@ import org.apache.tuscany.sca.monitor.Problem.Severity;
* @version $Rev$ $Date$
*/
public class ContributionServiceImpl implements ContributionService {
+ private ExtensionPointRegistry extensionPoints;
/**
* Repository where contributions are stored. Usually set by injection.
@@ -145,8 +147,10 @@ public class ContributionServiceImpl implements ContributionService {
ContributionFactory contributionFactory,
XMLInputFactory xmlFactory,
List<SCADefinitions> policyDefinitions,
+ ExtensionPointRegistry extensionPoints,
Monitor monitor) {
super();
+ this.extensionPoints = extensionPoints;
this.contributionRepository = repository;
this.packageProcessor = packageProcessor;
this.artifactProcessor = documentProcessor;
@@ -341,7 +345,7 @@ public class ContributionServiceImpl implements ContributionService {
if (modelResolver == null) {
//FIXME Remove this domain resolver, visibility of policy declarations should be handled by
// the contribution import/export mechanism instead of this domainResolver hack.
- modelResolver = new ExtensibleModelResolver(contribution, modelResolvers, modelFactories, policyDefinitionsResolver);
+ modelResolver = new ExtensibleModelResolver(contribution, extensionPoints, modelResolvers, modelFactories, policyDefinitionsResolver);
}
//set contribution initial information
diff --git a/branches/sca-java-1.x/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolverTestCase.java b/branches/sca-java-1.x/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolverTestCase.java
index 01083cc6a6..f66b429d65 100644
--- a/branches/sca-java-1.x/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolverTestCase.java
+++ b/branches/sca-java-1.x/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolverTestCase.java
@@ -40,12 +40,12 @@ public class ExtensibleModelResolverTestCase extends TestCase {
@Override
protected void setUp() throws Exception {
- ModelResolverExtensionPoint resolvers = new DefaultModelResolverExtensionPoint();
+ ModelResolverExtensionPoint resolvers = new DefaultModelResolverExtensionPoint(null);
resolvers.addResolver(Model.class, TestModelResolver.class);
ModelFactoryExtensionPoint factories = new DefaultModelFactoryExtensionPoint();
- resolver = new ExtensibleModelResolver(null, resolvers, factories, null);
+ resolver = new ExtensibleModelResolver(null, null, resolvers, factories, null);
factory = new DefaultContributionFactory();
}