From 84dac802aba18060d6b90f5941b00a26c7c008df Mon Sep 17 00:00:00 2001 From: antelder Date: Wed, 7 Jul 2010 08:21:57 +0000 Subject: Remove addToDomainLevelComposite/removeFromDomainLevelComposite as they're the same as start/stop git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@961296 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/tuscany/sca/shell/Shell.java | 44 +--------------------- .../tuscany/sca/shell/jline/TShellCompletor.java | 2 - 2 files changed, 2 insertions(+), 44 deletions(-) (limited to 'sca-java-2.x/trunk/modules/shell/src/main') 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 0662125f18..0b2f55e7ce 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 @@ -57,9 +57,9 @@ public class Shell { private boolean useJline; final List history = new ArrayList(); 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 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() { public Boolean call() throws Exception { return addDeploymentComposite(toks.get(1), toks.get(2)); }}; - if (op.equalsIgnoreCase("addToDomainLevelComposite")) return new Callable() { public Boolean call() throws Exception { - return addToDomainLevelComposite(toks.get(1)); - }}; if (op.equalsIgnoreCase("install")) return new Callable() { public Boolean call() throws Exception { return install(toks); }}; @@ -301,9 +288,6 @@ public class Shell { if (op.equalsIgnoreCase("remove")) return new Callable() { public Boolean call() throws Exception { return remove(toks.get(1)); }}; - if (op.equalsIgnoreCase("removeFromDomainLevelComposite")) return new Callable() { public Boolean call() throws Exception { - return removeFromDomainLevelComposite(toks.get(1)); - }}; if (op.equalsIgnoreCase("help")) return new Callable() { 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 []"); out.println(" remove "); out.println(" addDeploymentComposite "); - out.println(" addToDomainLevelComposite "); - out.println(" removeFromDomainLevelComposite "); out.println(" printDomainLevelComposite"); out.println(" start "); out.println(" status [ ]"); @@ -486,24 +464,6 @@ public class Shell { out.println(" contributionURI - (required) the URI of an installed contribution"); } - void helpAddToDomainLevelComposite() { - out.println(" addToDomainLevelComposite "); - out.println(); - out.println(" XXX"); - out.println(); - out.println(" Arguments:"); - out.println(" xxx - (required) xxx"); - } - - void helpRemoveFromDomainLevelComposite() { - out.println(" removeFromDomainLevelComposite "); - out.println(); - out.println(" XXX"); - out.println(); - out.println(" Arguments:"); - out.println(" xxx - (required) xxx"); - } - void helpPrintDomainLevelComposite() { out.println(" printDomainLevelComposite"); out.println(); diff --git a/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/jline/TShellCompletor.java b/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/jline/TShellCompletor.java index fa333b2e22..a3069ff090 100644 --- a/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/jline/TShellCompletor.java +++ b/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/jline/TShellCompletor.java @@ -57,8 +57,6 @@ public class TShellCompletor extends ArgumentCompletor { 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()}); -- cgit v1.2.3