Repository: camel Updated Branches: refs/heads/camel-2.17.x f1746e389 -> 749772bae
CAMEL-9976: camel:rest-show command requires only context name as argument and not route Id Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/749772ba Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/749772ba Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/749772ba Branch: refs/heads/camel-2.17.x Commit: 749772baea13835b677aad0013e988dc25fdb016 Parents: f1746e3 Author: Andrea Cosentino <[email protected]> Authored: Thu May 19 08:46:50 2016 +0200 Committer: Andrea Cosentino <[email protected]> Committed: Thu May 19 08:54:45 2016 +0200 ---------------------------------------------------------------------- .../main/java/org/apache/camel/karaf/commands/RestShow.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/749772ba/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/RestShow.java ---------------------------------------------------------------------- diff --git a/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/RestShow.java b/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/RestShow.java index 686f935..eea0911 100644 --- a/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/RestShow.java +++ b/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/RestShow.java @@ -17,13 +17,17 @@ package org.apache.camel.karaf.commands; import org.apache.camel.commands.RestShowCommand; +import org.apache.felix.gogo.commands.Argument; import org.apache.felix.gogo.commands.Command; @Command(scope = "camel", name = "rest-show", description = "Display the Camel REST definition in XML") -public class RestShow extends AbstractRouteCommand { +public class RestShow extends CamelCommandSupport { + @Argument(index = 0, name = "name", description = "The name of the Camel context", required = true, multiValued = false) + String name; + public Object doExecute() throws Exception { - RestShowCommand command = new RestShowCommand(context); + RestShowCommand command = new RestShowCommand(name); return command.execute(camelController, System.out, System.err); }
