You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2008/05/03 15:59:02 UTC
svn commit: r653080 - in /incubator/tuscany/java/sca/modules:
definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/SCADefinitionsProcessor.java
policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyIntentProcessor.java
Author: slaws
Date: Sat May 3 06:59:02 2008
New Revision: 653080
URL: http://svn.apache.org/viewvc?rev=653080&view=rev
Log:
Add all top level definitions.xml files to the resolver before the resolve process starts.
Modified:
incubator/tuscany/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/SCADefinitionsProcessor.java
incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyIntentProcessor.java
Modified: incubator/tuscany/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/SCADefinitionsProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/SCADefinitionsProcessor.java?rev=653080&r1=653079&r2=653080&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/SCADefinitionsProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/SCADefinitionsProcessor.java Sat May 3 06:59:02 2008
@@ -163,6 +163,29 @@
}
public void resolve(SCADefinitions scaDefns, ModelResolver resolver) throws ContributionResolveException {
+ // start by adding all of the top level artifacts into the resolver as there
+ // are many cross artifact references in a definitions file and we don't want
+ // to be dependent on the order things appear
+
+ for (Intent policyIntent : scaDefns.getPolicyIntents()) {
+ resolver.addModel(policyIntent);
+ }
+
+ for (PolicySet policySet : scaDefns.getPolicySets()) {
+ resolver.addModel(policySet);
+ }
+
+ for (IntentAttachPointType bindingType : scaDefns.getBindingTypes()) {
+ resolver.addModel(bindingType);
+ }
+
+ for (IntentAttachPointType implType : scaDefns.getImplementationTypes()) {
+ resolver.addModel(implType);
+ }
+
+ // now resolve everything to ensure that any references between
+ // artifacts are satisfied
+
for (int count = 0, size = scaDefns.getPolicyIntents().size(); count < size; count++) {
Intent intent = scaDefns.getPolicyIntents().get(count);
extensionProcessor.resolve(intent, resolver);
Modified: incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyIntentProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyIntentProcessor.java?rev=653080&r1=653079&r2=653080&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyIntentProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyIntentProcessor.java Sat May 3 06:59:02 2008
@@ -276,9 +276,11 @@
resolveContrainedArtifacts(policyIntent, resolver);
+ /* This is too late in the processing
if ( !policyIntent.isUnresolved() ) {
resolver.addModel(policyIntent);
}
+ */
}
public QName getArtifactType() {