summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2008-07-13 08:31:38 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2008-07-13 08:31:38 +0000
commitd28da5e2165c13209957887ecaf2b5296f5a5fd3 (patch)
tree65429b5ed7737c45a147d86eb960da68136c2399 /java/sca
parente4effbc680d0d430530eb5f3318fc6a6a8ab742f (diff)
Add another createSCANode method while TUSCANY-2409 is looked at further
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@676276 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r--java/sca/modules/node2-api/src/main/java/org/apache/tuscany/sca/node/SCANode2Factory.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/java/sca/modules/node2-api/src/main/java/org/apache/tuscany/sca/node/SCANode2Factory.java b/java/sca/modules/node2-api/src/main/java/org/apache/tuscany/sca/node/SCANode2Factory.java
index 35ffbc4024..2283388395 100644
--- a/java/sca/modules/node2-api/src/main/java/org/apache/tuscany/sca/node/SCANode2Factory.java
+++ b/java/sca/modules/node2-api/src/main/java/org/apache/tuscany/sca/node/SCANode2Factory.java
@@ -112,4 +112,21 @@ public abstract class SCANode2Factory {
*/
public abstract SCANode2 createSCANode(String compositeURI, String compositeContent, SCAContribution... contributions);
+ /**
+ * Creates and starts a new SCA node from a single composite with the
+ * contribution being the folder that contains the composite.
+ *
+ * This method provides the equivalent of doing:
+ * <code>
+ * File compositeFile = new File(compositeURI);
+ * File compositeFolder = compositeFile.getParentFile();
+ * SCAContribution contribution = new SCAContribution(compositeFolder.getName(), compositeFolder.toURL().toString());
+ * SCANode2 node = SCANode2Factory.newInstance().createSCANode(compositeFile.getName(), contribution);
+ * node.start();
+ * </code>
+ *
+ * @param compositeURI the URI of the composite to use
+ * @return a new and started SCA node
+ */
+ public abstract SCANode2 createSCANode(String compositeURI);
}