diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-05-09 14:00:59 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-05-09 14:00:59 +0000 |
commit | 65145ace6c12a703bb3a8f9063d338d2703d86f0 (patch) | |
tree | f957508b62db2737a073d555a12f00bd3288e622 /sca-java-2.x/trunk/modules/shell/src | |
parent | 3947e373c50dc536f99547d3d03a224bee34a769 (diff) |
Start looking at support for a Shell command to show the domain level composite, this includes adding info about the running composites to the domain registry and a the new shell command to access it.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1101031 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/shell/src')
-rw-r--r-- | sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java | 25 |
1 files changed, 18 insertions, 7 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 642c7a0051..e9d8068b8a 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 @@ -67,7 +67,7 @@ public class Shell { private Map<String, Node> standaloneNodes = new HashMap<String, Node>();
private Map<String, Node> nodes = new HashMap<String, Node>();
- public static final String[] COMMANDS = new String[] {"bye", "domain", "domains", "help", "install", "installed", "invoke",
+ public static final String[] COMMANDS = new String[] {"bye", "domain", "domains", "domainComposite", "help", "install", "installed", "invoke",
"load", "remove", "run", "save", "services", "start", "started", "stop"};
public static void main(final String[] args) throws Exception {
@@ -135,6 +135,11 @@ public class Shell { return true;
}
+ boolean domainComposite() {
+ System.out.println(getNode().getDomainLevelCompositeAsString());
+ return true;
+ }
+
boolean install(final List<String> toks) throws ContributionReadException, ActivationException, ValidationException {
if (getNode() == null) {
out.println("not in domain, use domain command first");
@@ -531,12 +536,18 @@ public class Shell { return domain(toks.size() > 1 ? toks.get(1) : "");
}
};
- if (op.equalsIgnoreCase("domains"))
- return new Callable<Boolean>() {
- public Boolean call() throws Exception {
- return domains();
- }
- };
+ if (op.equalsIgnoreCase("domains"))
+ return new Callable<Boolean>() {
+ public Boolean call() throws Exception {
+ return domains();
+ }
+ };
+ if (op.equalsIgnoreCase("domainComposite"))
+ return new Callable<Boolean>() {
+ public Boolean call() throws Exception {
+ return domainComposite();
+ }
+ };
if (op.equalsIgnoreCase("install"))
return new Callable<Boolean>() {
public Boolean call() throws Exception {
|