summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-07-05 19:41:33 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-07-05 19:41:33 +0000
commit1a0660d880f0199ebdfb056e0657824f53c7aa0d (patch)
tree38866900749c695a63fa3bba67467b4e28c851d0 /sca-java-2.x/trunk/modules/shell/src/main/java/org/apache
parent067ee7cf4654e9a812865abf71d75735acb03fde (diff)
Add a start command thatdoes the same as addToDomainLevelComposite
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@960668 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/shell/src/main/java/org/apache')
-rw-r--r--sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java b/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
index 75b7a5c4ba..de83eae259 100644
--- a/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
+++ b/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
@@ -58,7 +58,7 @@ public class Shell {
static final String[] COMMANDS = new String[] {"addDeploymentComposite", "addToDomainLevelComposite", "help",
"install", "listDeployedCompostes", "listInstalledContributions",
"printDomainLevelComposite", "removeFromDomainLevelComposite",
- "remove", "status", "stop"};
+ "remove", "start", "status", "stop"};
public static void main(final String[] args) throws Exception {
boolean useJline = !Arrays.asList(args).contains("-nojline");
@@ -179,6 +179,7 @@ public class Shell {
out.println(" listDeployedCompostes <contributionURI>");
out.println(" listInstalledContributions");
out.println(" printDomainLevelComposite");
+ out.println(" start <curi> <compositeUri>");
out.println(" status [<curi> <compositeUri>]");
out.println(" stop [<curi> <compositeUri>]");
out.println();
@@ -202,6 +203,11 @@ public class Shell {
return true;
}
+ boolean start(String curi, String compositeURI) throws ActivationException, ValidationException {
+ node.addToDomainLevelComposite(curi + "/" + compositeURI);
+ return true;
+ }
+
boolean status(final List<String> toks) {
out.println("Domain: " + node.getDomainName());
List<String> ics;
@@ -287,6 +293,9 @@ public class Shell {
if (op.equals("stop")) return new Callable<Boolean>() { public Boolean call() throws Exception {
return stop(toks);
}};
+ if (op.equals("start")) return new Callable<Boolean>() { public Boolean call() throws Exception {
+ return start(toks.get(1), toks.get(2));
+ }};
if (op.equals("status")) return new Callable<Boolean>() { public Boolean call() {
return status(toks);
}};