Repository: camel Updated Branches: refs/heads/master f396c13b8 -> bb32e1d84
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/bb32e1d8 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bb32e1d8 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bb32e1d8 Branch: refs/heads/master Commit: bb32e1d84080d5822788fc3c7aa895aa28b6a3ad Parents: f396c13 Author: Andrea Cosentino <[email protected]> Authored: Thu May 19 08:46:50 2016 +0200 Committer: Andrea Cosentino <[email protected]> Committed: Thu May 19 08:46: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/bb32e1d8/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); }
