Repository: camel Updated Branches: refs/heads/camel-2.16.x 3fa5e4b5e -> 5e99f0afa
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/5e99f0af Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5e99f0af Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5e99f0af Branch: refs/heads/camel-2.16.x Commit: 5e99f0afa12d4e61b6fb88787f72c9d507a33662 Parents: 3fa5e4b Author: Andrea Cosentino <[email protected]> Authored: Thu May 19 08:46:50 2016 +0200 Committer: Andrea Cosentino <[email protected]> Committed: Thu May 19 08:58:50 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/5e99f0af/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); }
