From 65145ace6c12a703bb3a8f9063d338d2703d86f0 Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 9 May 2011 14:00:59 +0000 Subject: 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 --- .../java/org/apache/tuscany/sca/shell/Shell.java | 25 ++++++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'sca-java-2.x/trunk/modules/shell/src/main/java') 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 standaloneNodes = new HashMap(); private Map nodes = new HashMap(); - 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 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() { - public Boolean call() throws Exception { - return domains(); - } - }; + if (op.equalsIgnoreCase("domains")) + return new Callable() { + public Boolean call() throws Exception { + return domains(); + } + }; + if (op.equalsIgnoreCase("domainComposite")) + return new Callable() { + public Boolean call() throws Exception { + return domainComposite(); + } + }; if (op.equalsIgnoreCase("install")) return new Callable() { public Boolean call() throws Exception { -- cgit v1.2.3