From e15a45f69dfd08de632c0262186f46222a59bb9d Mon Sep 17 00:00:00 2001 From: antelder Date: Wed, 11 May 2011 10:28:59 +0000 Subject: Change the Shell command 'installed' to by default just show the URIs of installed contributions. The plan being to then add 'installed ' which will show detail about an installed contribution including its uri, url, dependent cintrubutions, deployables, exports, etc git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1101821 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/tuscany/sca/shell/Shell.java | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'sca-java-2.x/trunk/modules/shell/src') 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 3162833848..76f76f6d1b 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 @@ -218,15 +218,21 @@ public class Shell { } curis = getNode().getInstalledContributionURIs(); } + boolean full = false; for (String curi : curis) { - out.println(curi + " " + getNode().getInstalledContribution(curi).getLocation()); - Contribution c = getNode().getInstalledContribution(curi); - List deployeds = getNode().getStartedCompositeURIs(curi); - for (Artifact a : c.getArtifacts()) { - if (a.getModel() instanceof Composite) { - Composite composite = (Composite)a.getModel(); - String running = deployeds.contains(composite.getURI()) ? "***running***" : ""; - out.println(" " + composite.getURI() + " " + composite.getName() + " " + running); + out.println(" " + curi); + if (full) { + // TODO: add full detail view of contribution showing + // uri, url, dependent cintrubutions, deployables, exports + out.println(curi + " " + getNode().getInstalledContribution(curi).getLocation()); + Contribution c = getNode().getInstalledContribution(curi); + List deployeds = getNode().getStartedCompositeURIs(curi); + for (Artifact a : c.getArtifacts()) { + if (a.getModel() instanceof Composite) { + Composite composite = (Composite)a.getModel(); + String running = deployeds.contains(composite.getURI()) ? "***running***" : ""; + out.println(" " + composite.getURI() + " " + composite.getName() + " " + running); + } } } } -- cgit v1.2.3