camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/9] camel git commit: Camel docs - Add missing option
Date Sun, 03 Jan 2016 14:28:23 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.16.x 9248691dc -> 671246577
  refs/heads/master e49eb8f4e -> effc3f294


Camel docs - Add missing option


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

Branch: refs/heads/master
Commit: f630a8725564caa916b6c676914d357de07866bc
Parents: e49eb8f
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sun Jan 3 14:04:04 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun Jan 3 14:04:04 2016 +0100

----------------------------------------------------------------------
 .../apache/camel/component/timer/TimerComponent.java |  1 +
 .../apache/camel/component/timer/TimerEndpoint.java  | 15 ++++++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f630a872/camel-core/src/main/java/org/apache/camel/component/timer/TimerComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/timer/TimerComponent.java
b/camel-core/src/main/java/org/apache/camel/component/timer/TimerComponent.java
index 567bc40..cb6fca5 100644
--- a/camel-core/src/main/java/org/apache/camel/component/timer/TimerComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/timer/TimerComponent.java
@@ -108,6 +108,7 @@ public class TimerComponent extends UriEndpointComponent {
             }
             Date date = sdf.parse(time);
             answer.setTime(date);
+            answer.setPattern(pattern);
         }
 
         setProperties(answer, parameters);

http://git-wip-us.apache.org/repos/asf/camel/blob/f630a872/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
b/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
index 4b0c6b4..8d63aa2 100644
--- a/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/timer/TimerEndpoint.java
@@ -53,9 +53,11 @@ public class TimerEndpoint extends DefaultEndpoint implements MultipleConsumersS
     private boolean fixedRate;
     @UriParam(defaultValue = "true", label = "advanced")
     private boolean daemon = true;
-    @UriParam(label = "advanced")
+    @UriParam(label = "advanced", javaType = "java.lang.String")
     private Date time;
     @UriParam(label = "advanced")
+    private String pattern;
+    @UriParam(label = "advanced")
     private Timer timer;
 
     public TimerEndpoint() {
@@ -208,6 +210,17 @@ public class TimerEndpoint extends DefaultEndpoint implements MultipleConsumersS
         this.time = time;
     }
 
+    public String getPattern() {
+        return pattern;
+    }
+
+    /**
+     * Allows you to specify a custom Date pattern to use for setting the time option using
URI syntax.
+     */
+    public void setPattern(String pattern) {
+        this.pattern = pattern;
+    }
+
     public Timer getTimer(TimerConsumer consumer) {
         if (timer != null) {
             // use custom timer


Mime
View raw message