summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/shell/src/main/java/org
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-11 10:28:59 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-11 10:28:59 +0000
commite15a45f69dfd08de632c0262186f46222a59bb9d (patch)
tree804af2fea7c52688703b55c936905106d3d2b2ae /sca-java-2.x/trunk/modules/shell/src/main/java/org
parentc983386e8d1e329f8189edaa7a2435f88408cd9a (diff)
Change the Shell command 'installed' to by default just show the URIs of installed contributions. The plan being to then add 'installed <curi>' 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
Diffstat (limited to 'sca-java-2.x/trunk/modules/shell/src/main/java/org')
-rw-r--r--sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java22
1 files changed, 14 insertions, 8 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 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<String> 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<String> 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);
+ }
}
}
}