diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2008-11-21 12:16:29 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2008-11-21 12:16:29 +0000 |
commit | 65e3fd65b82c7cd08cfdeee8819f571212b3b1fe (patch) | |
tree | 72142bd4e7fbd9becf3f43d09dde26836562d72f /java/sca/modules/node-api | |
parent | 6a9b9b7586fd7a377d57b5ce0117c664beebff25 (diff) |
Simplify the Node API for a common default case so that creating a Node for simple samples and tests can be:
node = NodeFactory.newInstance().createNode();
instead of:
NodeFactory factory = NodeFactory.newInstance();
String root = ContributionLocationHelper.getContributionLocation("Calculator.composite");
Contribution contribution = new Contribution(root, root);
node = factory.createNode("Calculator.composite", contribution);
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@719565 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/node-api')
-rw-r--r-- | java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java index a9f75fc8be..05ef39f461 100644 --- a/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java +++ b/java/sca/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java @@ -156,6 +156,13 @@ public abstract class NodeFactory { } /** + * Creates a new SCA node using defaults for the contribution location and runnable composite + * + * @return a new SCA node. + */ + public abstract Node createNode(); + + /** * Creates a new SCA node from the configuration URL * * @param configurationURL the URL of the node configuration which is the ATOM feed |