tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r960668 - /tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
Date Mon, 05 Jul 2010 19:41:33 GMT
Author: antelder
Date: Mon Jul  5 19:41:33 2010
New Revision: 960668

URL: http://svn.apache.org/viewvc?rev=960668&view=rev
Log:
Add a start command thatdoes the same as addToDomainLevelComposite

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=960668&r1=960667&r2=960668&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
Mon Jul  5 19:41:33 2010
@@ -58,7 +58,7 @@ public class Shell {
     static final String[] COMMANDS = new String[] {"addDeploymentComposite", "addToDomainLevelComposite",
"help",
                                                    "install", "listDeployedCompostes", "listInstalledContributions",
                                                    "printDomainLevelComposite", "removeFromDomainLevelComposite",

-                                                   "remove", "status", "stop"};
+                                                   "remove", "start", "status", "stop"};
 
     public static void main(final String[] args) throws Exception {
         boolean useJline = !Arrays.asList(args).contains("-nojline");
@@ -179,6 +179,7 @@ public class Shell {
         out.println("   listDeployedCompostes <contributionURI>");
         out.println("   listInstalledContributions");
         out.println("   printDomainLevelComposite");
+        out.println("   start <curi> <compositeUri>");
         out.println("   status [<curi> <compositeUri>]");
         out.println("   stop [<curi> <compositeUri>]");
         out.println();
@@ -202,6 +203,11 @@ public class Shell {
         return true;
     }
 
+    boolean start(String curi, String compositeURI) throws ActivationException, ValidationException
{
+        node.addToDomainLevelComposite(curi + "/" + compositeURI);
+        return true;
+    }
+    
     boolean status(final List<String> toks) {
         out.println("Domain: " + node.getDomainName());
         List<String> ics;
@@ -287,6 +293,9 @@ public class Shell {
         if (op.equals("stop")) return new Callable<Boolean>() { public Boolean call()
throws Exception {
             return stop(toks);
         }};
+        if (op.equals("start")) return new Callable<Boolean>() { public Boolean call()
throws Exception {
+            return start(toks.get(1), toks.get(2));
+        }};
         if (op.equals("status")) return new Callable<Boolean>() { public Boolean call()
{
             return status(toks);
         }};



Mime
View raw message