camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [09/11] camel git commit: CAMEL-8320: Component doc to include endpoint syntax.
Date Sun, 01 Mar 2015 07:42:36 GMT
CAMEL-8320: Component doc to include endpoint syntax.


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

Branch: refs/heads/master
Commit: 1436a8e744027ae892ac2febbc5f886c7a467cd6
Parents: fc6f5ff
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sat Feb 28 19:36:57 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sat Feb 28 19:36:57 2015 +0100

----------------------------------------------------------------------
 .../src/main/java/__name__Endpoint.java         | 24 ++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/1436a8e7/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/__name__Endpoint.java
----------------------------------------------------------------------
diff --git a/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/__name__Endpoint.java
b/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/__name__Endpoint.java
index 227aeb4..4600a20 100644
--- a/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/__name__Endpoint.java
+++ b/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/__name__Endpoint.java
@@ -20,16 +20,20 @@ import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
 
 /**
  * Represents a ${name} endpoint.
  */
-@UriEndpoint(scheme = "${scheme}", consumerClass = ${name}Consumer.class, label = "${name}")
+@UriEndpoint(scheme = "${scheme}", syntax="${scheme}:name", consumerClass = ${name}Consumer.class,
label = "${name}")
 public class ${name}Endpoint extends DefaultEndpoint {
+    @UriPath @Metadata(required = "true")
+    private String name;
     @UriParam(defaultValue = "10")
-    private int option1 = 10;
+    private int option = 10;
 
     public ${name}Endpoint() {
     }
@@ -53,4 +57,20 @@ public class ${name}Endpoint extends DefaultEndpoint {
     public boolean isSingleton() {
         return true;
     }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setOption(int option) {
+        this.option = option;
+    }
+
+    public int getOption() {
+        return option;
+    }
 }


Mime
View raw message