summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/node-api/src/main/java/org
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-01-23 12:44:36 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-01-23 12:44:36 +0000
commitccfacd42bbb46f927e41a95cb8b18efa050c1bf2 (patch)
tree15f70c0a7905bfd2c97eebcdb209492dd6f86669 /sca-java-2.x/trunk/modules/node-api/src/main/java/org
parentaebf3595aa8c640caa365dfdcdb5e3f2c68499d0 (diff)
Add a mehod to create a node with a uri and composite to match the uri only method
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@902397 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/node-api/src/main/java/org')
-rw-r--r--sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java b/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java
index defb607b16..82d0304b78 100644
--- a/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java
+++ b/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java
@@ -301,8 +301,15 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory {
}
public final Node createNode(URI configURI, String... locations) {
+ return createNode(configURI, null, locations);
+ }
+
+ public final Node createNode(URI configURI, String deploymentCompositeURI, String[] locations) {
Contribution[] contributions = getContributions(Arrays.asList(locations));
NodeConfiguration configuration = createConfiguration(contributions);
+ if (deploymentCompositeURI != null && configuration.getContributions().size() > 0) {
+ configuration.getContributions().get(0).addDeploymentComposite(createURI(deploymentCompositeURI));
+ }
configuration.setDomainRegistryURI(configURI.toString());
configuration.setDomainURI(getDomainName(configURI));
return createNode(configuration);