summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/shell/src/main/java
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-11-30 08:57:05 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-11-30 08:57:05 +0000
commit83a2ce4071731aaba970d24e339bb9fb4823c363 (patch)
treebb3dee613e8aeb40839047e62c06f5fe3bf23792 /sca-java-2.x/trunk/modules/shell/src/main/java
parent8ca6d8e2aa28ea7712e717c6cb2bdb8832380d87 (diff)
Fix the passing in of an initial contribution url, and add the start of a status command
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1040437 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/shell/src/main/java')
-rw-r--r--sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java30
1 files changed, 26 insertions, 4 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 716bdc1585..1174506613 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
@@ -79,11 +79,10 @@ public class Shell {
if ("-nojline".equals(s)) {
useJline = false;
} else {
- File f = new File(s);
- if (f.exists()) {
- contribution = s;
- } else {
+ if (s.startsWith("uri:") || s.startsWith("properties:")) {
domainURI = s;
+ } else {
+ contribution = s;
}
}
}
@@ -466,6 +465,10 @@ public class Shell {
return true;
}
+ boolean status() {
+ return true;
+ }
+
boolean history() {
for (String l : history)
out.println(l);
@@ -608,6 +611,12 @@ public class Shell {
return started(toks);
}
};
+ if (op.equalsIgnoreCase("status"))
+ return new Callable<Boolean>() {
+ public Boolean call() {
+ return status();
+ }
+ };
if (op.equalsIgnoreCase("history"))
return new Callable<Boolean>() {
public Boolean call() {
@@ -679,6 +688,8 @@ public class Shell {
helpStop();
} else if ("startup".equalsIgnoreCase(command)) {
helpStartUp();
+ } else if ("status".equalsIgnoreCase(command)) {
+ helpStatus();
} else if ("services".equalsIgnoreCase(command)) {
helpServices();
} else if ("bye".equalsIgnoreCase(command)) {
@@ -711,6 +722,7 @@ public class Shell {
out.println(" start <curi> <compositeUri>|<contentURL>");
out.println(" start <name> [<compositeUri>] <contributionURL> [-duris <uri,uri,...>]");
out.println(" started [<curi> [<compositeUri>]]");
+ out.println(" status");
out.println(" stop [<curi> [<compositeUri>]]");
out.println(" bye");
out.println();
@@ -881,6 +893,16 @@ public class Shell {
out.println(" compositeUri - (optional) the URI of a composite");
}
+ void helpStatus() {
+ out.println(" status");
+ out.println();
+ out.println(" Shows the status of the Shell including information on the known domains,");
+ out.println(" installed contributions, and started composites");
+ out.println();
+ out.println(" Arguments:");
+ out.println(" none");
+ }
+
void helpStop() {
out.println(" stop [<curi> [<compositeUri>]]");
out.println(" stop <name>");