camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [29/33] camel git commit: Camel component docs. The options is now sorted in correct order no need for that in commands
Date Thu, 12 Nov 2015 08:18:40 GMT
Camel component docs. The options is now sorted in correct order no need for that in commands


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

Branch: refs/heads/camel-2.16.x
Commit: 63260e86f9946fbe4e306797cf673812a217d896
Parents: 3ab3a6b
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Nov 12 08:14:12 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Nov 12 09:21:10 2015 +0100

----------------------------------------------------------------------
 .../camel/commands/EipExplainCommand.java       | 25 ----------------
 .../camel/commands/EndpointExplainCommand.java  | 30 ++++----------------
 .../camel/commands/EndpointListCommand.java     | 17 -----------
 3 files changed, 5 insertions(+), 67 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/63260e86/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EipExplainCommand.java
----------------------------------------------------------------------
diff --git a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EipExplainCommand.java
b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EipExplainCommand.java
index fac0012..0c7cf84 100644
--- a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EipExplainCommand.java
+++ b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EipExplainCommand.java
@@ -17,8 +17,6 @@
 package org.apache.camel.commands;
 
 import java.io.PrintStream;
-import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
 import java.util.Map;
 
@@ -50,24 +48,6 @@ public class EipExplainCommand extends AbstractContextCommand {
         // use a basic json parser
         List<Map<String, String>> options = JsonSchemaHelper.parseJsonSchema("properties",
json, true);
 
-        // lets sort the options by name
-        Collections.sort(options, new Comparator<Map<String, String>>() {
-            @Override
-            public int compare(Map<String, String> o1, Map<String, String> o2)
{
-                // sort by kind first (need to -1 as we want path on top), then name
-                String kind1 = o1.get("kind");
-                String kind2 = o2.get("kind");
-                int answer = 0;
-                if (kind1 != null && kind2 != null) {
-                    answer = -1 * kind1.compareTo(kind2);
-                }
-                if (answer == 0) {
-                    answer = o1.get("name").compareTo(o2.get("name"));
-                }
-                return answer;
-            }
-        });
-
         for (Map<String, String> option : options) {
             out.print("Option:        ");
             out.println(option.get("name"));
@@ -86,11 +66,6 @@ public class EipExplainCommand extends AbstractContextCommand {
                 out.print("Java Type:     ");
                 out.println(javaType);
             }
-            String deprecated = option.get("deprecated");
-            if (deprecated != null) {
-                out.print("Deprecated:    ");
-                out.println(deprecated);
-            }
             String value = option.get("value");
             if (value != null) {
                 out.print("Value:         ");

http://git-wip-us.apache.org/repos/asf/camel/blob/63260e86/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointExplainCommand.java
----------------------------------------------------------------------
diff --git a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointExplainCommand.java
b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointExplainCommand.java
index f61e845..aa5a77c 100644
--- a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointExplainCommand.java
+++ b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointExplainCommand.java
@@ -17,8 +17,6 @@
 package org.apache.camel.commands;
 
 import java.io.PrintStream;
-import java.util.Collections;
-import java.util.Comparator;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -80,24 +78,6 @@ public class EndpointExplainCommand extends AbstractContextCommand {
             // use a basic json parser
             List<Map<String, String>> options = JsonSchemaHelper.parseJsonSchema("properties",
json, true);
 
-            // lets sort the options by name
-            Collections.sort(options, new Comparator<Map<String, String>>() {
-                @Override
-                public int compare(Map<String, String> o1, Map<String, String>
o2) {
-                    // sort by kind first (need to -1 as we want path on top), then name
-                    String kind1 = o1.get("kind");
-                    String kind2 = o2.get("kind");
-                    int answer = 0;
-                    if (kind1 != null && kind2 != null) {
-                        answer = -1 * kind1.compareTo(kind2);
-                    }
-                    if (answer == 0) {
-                        answer = o1.get("name").compareTo(o2.get("name"));
-                    }
-                    return answer;
-                }
-            });
-
             for (Map<String, String> option : options) {
                 out.print("Option:        ");
                 out.println(option.get("name"));
@@ -106,6 +86,11 @@ public class EndpointExplainCommand extends AbstractContextCommand {
                     out.print("Kind:          ");
                     out.println(kind);
                 }
+                String group = option.get("group");
+                if (group != null) {
+                    out.print("Group:         ");
+                    out.println(group);
+                }
                 String type = option.get("type");
                 if (type != null) {
                     out.print("Type:          ");
@@ -116,11 +101,6 @@ public class EndpointExplainCommand extends AbstractContextCommand {
                     out.print("Java Type:     ");
                     out.println(javaType);
                 }
-                String deprecated = option.get("deprecated");
-                if (deprecated != null) {
-                    out.print("Deprecated:    ");
-                    out.println(deprecated);
-                }
                 String value = option.get("value");
                 if (value != null) {
                     out.print("Value:         ");

http://git-wip-us.apache.org/repos/asf/camel/blob/63260e86/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointListCommand.java
----------------------------------------------------------------------
diff --git a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointListCommand.java
b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointListCommand.java
index 6d15ffb..80bd6ca 100644
--- a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointListCommand.java
+++ b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointListCommand.java
@@ -18,8 +18,6 @@ package org.apache.camel.commands;
 
 import java.io.PrintStream;
 import java.net.URLDecoder;
-import java.util.Collections;
-import java.util.Comparator;
 import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
@@ -85,19 +83,6 @@ public class EndpointListCommand extends AbstractContextCommand {
                     // use a basic json parser
                     List<Map<String, String>> options = JsonSchemaHelper.parseJsonSchema("properties",
json, true);
 
-                    // lets sort the options by name
-                    Collections.sort(options, new Comparator<Map<String, String>>()
{
-                        @Override
-                        public int compare(Map<String, String> o1, Map<String, String>
o2) {
-                            // sort by kind first (need to -1 as we want path on top), then
name
-                            int answer = -1 * o1.get("kind").compareTo(o2.get("kind"));
-                            if (answer == 0) {
-                                answer = o1.get("name").compareTo(o2.get("name"));
-                            }
-                            return answer;
-                        }
-                    });
-
                     for (Map<String, String> option : options) {
                         String key = option.get("name");
                         String kind = option.get("kind");
@@ -149,8 +134,6 @@ public class EndpointListCommand extends AbstractContextCommand {
             int maxStatusLen = 0;
 
             for (Map<String, String> row : endpoints) {
-                final String name = row.get("camelContextName");
-
                 String uri = row.get("uri");
                 if (decode) {
                     // decode uri so its more human readable


Mime
View raw message