camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [5/5] camel git commit: CAMEL-7999: Add defaultValue to @UriParam
Date Sun, 09 Nov 2014 10:18:54 GMT
CAMEL-7999: Add defaultValue to @UriParam


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9b61389d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9b61389d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9b61389d

Branch: refs/heads/master
Commit: 9b61389d4e745184629f7793dc9a61957c4d8bc9
Parents: fc15220
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sun Nov 9 11:18:39 2014 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun Nov 9 11:18:39 2014 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/karaf/commands/EndpointExplain.java   | 5 +++++
 .../main/java/org/apache/camel/karaf/commands/EndpointList.java | 4 ++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/9b61389d/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/EndpointExplain.java
----------------------------------------------------------------------
diff --git a/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/EndpointExplain.java
b/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/EndpointExplain.java
index 895083f..40c62c7 100644
--- a/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/EndpointExplain.java
+++ b/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/EndpointExplain.java
@@ -111,6 +111,11 @@ public class EndpointExplain extends CamelCommandSupport {
                     out.print("Value:\t\t");
                     out.println(value);
                 }
+                String defaultValue = option.get("defaultValue");
+                if (defaultValue != null) {
+                    out.print("Default Value:\t");
+                    out.println(defaultValue);
+                }
                 String description = option.get("description");
                 if (description != null) {
                     out.print("Description:\t");

http://git-wip-us.apache.org/repos/asf/camel/blob/9b61389d/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/EndpointList.java
----------------------------------------------------------------------
diff --git a/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/EndpointList.java
b/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/EndpointList.java
index 2ec9d6c..caed7ab 100644
--- a/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/EndpointList.java
+++ b/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/EndpointList.java
@@ -28,6 +28,7 @@ import org.apache.camel.Endpoint;
 import org.apache.camel.ServiceStatus;
 import org.apache.camel.StatefulService;
 import org.apache.camel.util.JsonSchemaHelper;
+import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.URISupport;
 import org.apache.felix.gogo.commands.Argument;
 import org.apache.felix.gogo.commands.Command;
@@ -110,6 +111,9 @@ public class EndpointList extends CamelCommandSupport {
                         String type = option.get("type");
                         String javaType = option.get("javaType");
                         String value = option.get("value");
+                        if (ObjectHelper.isEmpty(value)) {
+                            value = option.get("defaultValue");
+                        }
                         String desc = option.get("description");
                         if (key != null && value != null) {
                             if (first) {


Mime
View raw message