You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2010/07/07 11:25:49 UTC

svn commit: r961319 - /tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java

Author: antelder
Date: Wed Jul  7 09:25:49 2010
New Revision: 961319

URL: http://svn.apache.org/viewvc?rev=961319&view=rev
Log:
Update installed command to show all composites in a contribution with the status command showing the deployed composites

Modified:
    tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java

Modified: tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java?rev=961319&r1=961318&r2=961319&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java Wed Jul  7 09:25:49 2010
@@ -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");