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 10:21:58 UTC

svn commit: r961296 - in /tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell: Shell.java jline/TShellCompletor.java

Author: antelder
Date: Wed Jul  7 08:21:57 2010
New Revision: 961296

URL: http://svn.apache.org/viewvc?rev=961296&view=rev
Log:
Remove addToDomainLevelComposite/removeFromDomainLevelComposite as they're the same as start/stop

Modified:
    tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
    tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/jline/TShellCompletor.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=961296&r1=961295&r2=961296&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 08:21:57 2010
@@ -57,9 +57,9 @@ public class Shell {
     private boolean useJline;
     final List<String> history = new ArrayList<String>();
     private NodeFactory factory;
-    public static final String[] COMMANDS = new String[] {"addDeploymentComposite", "addToDomainLevelComposite", "help",
+    public static final String[] COMMANDS = new String[] {"addDeploymentComposite", "help",
                                                    "install", "installed", 
-                                                   "printDomainLevelComposite", "removeFromDomainLevelComposite", 
+                                                   "printDomainLevelComposite", 
                                                    "remove", "start", "status", "stop"};
 
     public static void main(final String[] args) throws Exception {
@@ -86,11 +86,6 @@ public class Shell {
         return true;
     }
 
-    boolean addToDomainLevelComposite(final String uri) throws ContributionReadException, ActivationException, ValidationException {
-        node.addToDomainLevelComposite(uri);
-        return true;
-    }
-
     boolean install(final List<String> toks) throws ContributionReadException, ActivationException, ValidationException {
         boolean runDeployables = !toks.contains("-norun");
         String metaDataURL = null;
@@ -190,11 +185,6 @@ public class Shell {
         return true;
     }
 
-    boolean removeFromDomainLevelComposite(final String uri) throws ContributionReadException, ActivationException, ValidationException {
-        node.removeFromDomainLevelComposite(uri);
-        return true;
-    }
-
     boolean listComposites(final String curi) {
         Contribution c = node.getInstalledContribution(curi);
         for (Artifact a : c.getArtifacts()) {
@@ -283,9 +273,6 @@ public class Shell {
         if (op.equalsIgnoreCase("addDeploymentComposite")) return new Callable<Boolean>() { public Boolean call() throws Exception {
             return addDeploymentComposite(toks.get(1), toks.get(2));
         }};
-        if (op.equalsIgnoreCase("addToDomainLevelComposite")) return new Callable<Boolean>() { public Boolean call() throws Exception {
-            return addToDomainLevelComposite(toks.get(1));
-        }};
         if (op.equalsIgnoreCase("install")) return new Callable<Boolean>() { public Boolean call() throws Exception {
             return install(toks);
         }};
@@ -301,9 +288,6 @@ public class Shell {
         if (op.equalsIgnoreCase("remove")) return new Callable<Boolean>() { public Boolean call() throws Exception {
             return remove(toks.get(1));
         }};
-        if (op.equalsIgnoreCase("removeFromDomainLevelComposite")) return new Callable<Boolean>() { public Boolean call() throws Exception {
-            return removeFromDomainLevelComposite(toks.get(1));
-        }};
         if (op.equalsIgnoreCase("help")) return new Callable<Boolean>() { public Boolean call() {
             return help(toks);
         }};
@@ -381,10 +365,6 @@ public class Shell {
             helpRemove();
         } else if ("addDeploymentComposite".equalsIgnoreCase(command)) {
             helpAddDeploymentComposite();
-        } else if ("addToDomainLevelComposite".equalsIgnoreCase(command)) {
-            helpAddToDomainLevelComposite();
-        } else if ("removeFromDomainLevelComposite".equalsIgnoreCase(command)) {
-            helpRemoveFromDomainLevelComposite();
         } else if ("printDomainLevelComposite".equalsIgnoreCase(command)) {
             helpPrintDomainLevelComposite();
         } else if ("start".equalsIgnoreCase(command)) {
@@ -408,8 +388,6 @@ public class Shell {
         out.println("   installed [<contributionURI>]");
         out.println("   remove <contributionURI>");
         out.println("   addDeploymentComposite <contributionURI> <contentURL>");
-        out.println("   addToDomainLevelComposite <contributionURI/compositeURI>");
-        out.println("   removeFromDomainLevelComposite <contributionURI/compositeURI>");
         out.println("   printDomainLevelComposite");
         out.println("   start <curi> <compositeUri>");
         out.println("   status [<curi> <compositeUri>]");
@@ -486,24 +464,6 @@ public class Shell {
         out.println("      contributionURI - (required) the URI of an installed contribution");
     }
 
-    void helpAddToDomainLevelComposite() {
-        out.println("   addToDomainLevelComposite <contributionURI/compositeURI>");
-        out.println();
-        out.println("   XXX");
-        out.println();
-        out.println("   Arguments:");
-        out.println("      xxx - (required) xxx");
-    }
-
-    void helpRemoveFromDomainLevelComposite() {
-        out.println("   removeFromDomainLevelComposite <contributionURI/compositeURI>");
-        out.println();
-        out.println("   XXX");
-        out.println();
-        out.println("   Arguments:");
-        out.println("      xxx - (required) xxx");
-    }
-
     void helpPrintDomainLevelComposite() {
         out.println("   printDomainLevelComposite");
         out.println();

Modified: tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/jline/TShellCompletor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/jline/TShellCompletor.java?rev=961296&r1=961295&r2=961296&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/jline/TShellCompletor.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/jline/TShellCompletor.java Wed Jul  7 08:21:57 2010
@@ -57,8 +57,6 @@ public class TShellCompletor extends Arg
         completors.put("installed", new Completor[]{commandCompletor, new ICURICompletor(node), new NullCompletor()});    
         completors.put("remove", new Completor[]{commandCompletor, new ICURICompletor(node), new NullCompletor()});    
         completors.put("addDeploymentComposite", new Completor[]{commandCompletor, new ICURICompletor(node), new FileNameCompletor(), new NullCompletor()});    
-        completors.put("addToDomainLevelComposite", new Completor[]{commandCompletor, new ICURICompletor(node), new CompositeURICompletor(node), new NullCompletor()});    
-        completors.put("removeFromDomainLevelComposite", new Completor[]{commandCompletor, new ICURICompletor(node), new CompositeURICompletor(node), new NullCompletor()});    
         completors.put("printDomainLevelComposite", new Completor[]{commandCompletor, new NullCompletor()});    
         completors.put("start", new Completor[]{commandCompletor, new ICURICompletor(node), new CompositeURICompletor(node), new NullCompletor()});    
         completors.put("status", new Completor[]{commandCompletor, new ICURICompletor(node), new CompositeURICompletor(node), new NullCompletor()});