You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2017/04/05 10:42:31 UTC
camel git commit: ComponentVerifier: add bean style accessor for Code
and Attribute's name
Repository: camel
Updated Branches:
refs/heads/master f1fa214fd -> 0964c4eeb
ComponentVerifier: add bean style accessor for Code and Attribute's name
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0964c4ee
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0964c4ee
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0964c4ee
Branch: refs/heads/master
Commit: 0964c4eeb0b400e735222099b14b84fa29d60df1
Parents: f1fa214
Author: lburgazzoli <lb...@gmail.com>
Authored: Wed Apr 5 12:41:49 2017 +0200
Committer: lburgazzoli <lb...@gmail.com>
Committed: Wed Apr 5 12:42:18 2017 +0200
----------------------------------------------------------------------
.../org/apache/camel/ComponentVerifier.java | 25 ++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/0964c4ee/camel-core/src/main/java/org/apache/camel/ComponentVerifier.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/ComponentVerifier.java b/camel-core/src/main/java/org/apache/camel/ComponentVerifier.java
index c091492..f9e2574 100644
--- a/camel-core/src/main/java/org/apache/camel/ComponentVerifier.java
+++ b/camel-core/src/main/java/org/apache/camel/ComponentVerifier.java
@@ -116,6 +116,7 @@ public interface ComponentVerifier {
CONNECTIVITY;
private static final Scope[] VALUES = values();
+
/**
* Get an instance of this scope from a string representation
*
@@ -225,7 +226,7 @@ public interface ComponentVerifier {
* own code can be generated by implementing this interface. This is best done via {@link #asCode(String)}
* If possible, the standard codes should be reused
*/
- interface Code {
+ interface Code extends Serializable {
/**
* Name of the code. All uppercase for standard codes, all lower case for custom codes.
* Separator between two words is an underscore.
@@ -233,6 +234,16 @@ public interface ComponentVerifier {
* @return code name
*/
String name();
+
+ /**
+ * Bean style accessor to name.
+ * This is required for framework like Jackson using bean convention for object serialization.
+ *
+ * @return code name
+ */
+ default String getName() {
+ return name();
+ }
}
/**
@@ -299,7 +310,7 @@ public interface ComponentVerifier {
* With respecting to name, the same rules as for {@link Code} apply: Standard attributes are all upper case with _
* as separators, whereas custom attributes are lower case with underscore separators.
*/
- interface Attribute {
+ interface Attribute extends Serializable {
/**
* Name of the attribute. All uppercase for standard attributes and all lower case for custom attributes.
* Separator between words is an underscore.
@@ -307,6 +318,16 @@ public interface ComponentVerifier {
* @return attribute name
*/
String name();
+
+ /**
+ * Bean style accessor to name;
+ * This is required for framework like Jackson using bean convention for object serialization.
+ *
+ * @return attribute name
+ */
+ default String getName() {
+ return name();
+ }
}
/**