summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-07-07 09:25:49 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-07-07 09:25:49 +0000
commit43581b0d383083350dcbf58cba22875916ff6731 (patch)
tree0d920f731b2e14f7bdd9d01fd5611c9ac63ab71c
parent1308d8c6b20b2f1b0d51b40e6e3a278f59a964f2 (diff)
Update installed command to show all composites in a contribution with the status command showing the deployed composites
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@961319 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java33
1 files changed, 16 insertions, 17 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 dc4b790a49..c94a2f19fe 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
@@ -139,17 +139,25 @@ public class Shell {
for (String curi : curis) {
out.println(curi + " " + node.getInstalledContribution(curi).getLocation());
Contribution c = node.getInstalledContribution(curi);
- for (String dcuri : node.getDeployedCompostes(curi)) {
- for (Artifact a : c.getArtifacts()) {
- if (dcuri.equals(a.getURI())) {
- out.println(" " + dcuri + " " + ((Composite)a.getModel()).getName());
- break;
- }
+ for (Artifact a : c.getArtifacts()) {
+ if (a.getModel() instanceof Composite) {
+ Composite composite = (Composite) a.getModel();
+ out.println(" " + composite.getURI() + " " + composite.getName());
}
}
}
return true;
}
+ boolean listComposites(final String curi) {
+ Contribution c = node.getInstalledContribution(curi);
+ for (Artifact a : c.getArtifacts()) {
+ if (a.getModel() instanceof Composite) {
+ out.println(((Composite)a.getModel()).getName());
+ }
+ }
+ return true;
+ }
+
private String getDefaultURI(String contributionURL) {
int lastDot = contributionURL.lastIndexOf('.');
@@ -186,16 +194,6 @@ public class Shell {
return true;
}
- boolean listComposites(final String curi) {
- Contribution c = node.getInstalledContribution(curi);
- for (Artifact a : c.getArtifacts()) {
- if (a.getModel() instanceof Composite) {
- out.println(((Composite)a.getModel()).getName());
- }
- }
- return true;
- }
-
public boolean stop(List<String> toks) throws ActivationException {
if (toks == null || toks.size() < 2) {
node.stop();
@@ -449,7 +447,8 @@ public class Shell {
out.println(" installed [<contributionURI>]");
out.println();
out.println(" Shows information about the contributions installed on this node,");
- out.println(" including the contribution URI and location along with the URI and QName of any deployed composites");
+ out.println(" including the contribution URI and location along with the URI");
+ out.println(" and QName of any composites within the contribution");
out.println();
out.println(" Arguments:");
out.println(" contributionURI - (optional) the URI of an installed contribution");