summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/node-impl/src/main
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-06-24 19:55:13 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-06-24 19:55:13 +0000
commit06afc90e64dd5190157b847476bf743c10d1248a (patch)
tree9a3c00bd1e3bc9dbf6179e1222a4d6b2a4ae48dd /java/sca/modules/node-impl/src/main
parent987c2398eb064bd8cdcb661291c08063f6f529df (diff)
Test to push down the default binding configuration into the URI builders so that the binding uri can be calculated with a user specified default root. If this works out need to update the real CompositeBuilder interface however I notice Raymond has recently added so info to the bindings that makes this easier so will re-work to use that. Also need to add mechanism for bindings to determine their own default base URI when none is specified.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@788159 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/node-impl/src/main')
-rw-r--r--java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java14
1 files changed, 13 insertions, 1 deletions
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 8ce21bc375..66f6f0e090 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
@@ -34,6 +34,7 @@ import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -52,6 +53,7 @@ import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint;
+import org.apache.tuscany.sca.assembly.builder.CompositeBuilderTmp;
import org.apache.tuscany.sca.contribution.Artifact;
import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.ContributionFactory;
@@ -90,6 +92,7 @@ import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.configuration.BindingConfiguration;
import org.apache.tuscany.sca.node.configuration.ContributionConfiguration;
import org.apache.tuscany.sca.node.configuration.DeploymentComposite;
import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
@@ -596,8 +599,17 @@ public class NodeFactoryImpl extends NodeFactory {
}
}
+ // TODO - EPR - create a binding map to pass down into the builders
+ // for use during URI calculation.
+ Map<Class<?>, List<String>> bindingMap = new HashMap<Class<?>, List<String>>();
+ for (BindingConfiguration config : configuration.getBindings()){
+ StAXArtifactProcessor<?> processor = xmlProcessors.getProcessor(config.getBindingType());
+ Class<?> bindingClass = processor.getModelType();
+ bindingMap.put(bindingClass, config.getBaseURIs());
+ }
+
// build the top level composite
- compositeBuilder.build(tempComposite, systemDefinitions, monitor);
+ ((CompositeBuilderTmp)compositeBuilder).build(tempComposite, systemDefinitions, bindingMap, monitor);
analyzeProblems();
endpointReferenceBuilder.build(tempComposite, systemDefinitions, monitor);