You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/01/06 19:16:50 UTC

[1/4] camel git commit: Polished

Repository: camel
Updated Branches:
  refs/heads/camel-2.16.x 8c49ea9c8 -> aead21aaa
  refs/heads/master 538876084 -> 3b94e9513


Polished


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

Branch: refs/heads/master
Commit: f8fe69fe2e0e91a86d05815938bc9e60ffaebf91
Parents: 5388760
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Jan 6 19:03:15 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Jan 6 19:03:15 2016 +0100

----------------------------------------------------------------------
 components/camel-script/pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f8fe69fe/components/camel-script/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-script/pom.xml b/components/camel-script/pom.xml
index 432225f..8ceca98 100644
--- a/components/camel-script/pom.xml
+++ b/components/camel-script/pom.xml
@@ -128,8 +128,8 @@
             <plugin>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>
-          		<forkCount>1</forkCount>
-	  		<reuseForks>false</reuseForks>
+                    <forkCount>1</forkCount>
+                    <reuseForks>false</reuseForks>
                 </configuration>
             </plugin>
         </plugins>


[2/4] camel git commit: CAMEL-9488: Camel script - Add missing languages.

Posted by da...@apache.org.
CAMEL-9488: Camel script - Add missing languages.


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

Branch: refs/heads/master
Commit: f56151dc0dd490f3e72fc56f89492d1d4f2e0c14
Parents: f8fe69f
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Jan 6 19:06:17 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Jan 6 19:06:17 2016 +0100

----------------------------------------------------------------------
 .../component/language/LanguageEndpoint.java    |  2 +-
 .../builder/script/JavaScriptLanguage.java      | 46 ++++++++++++++++++
 .../camel/builder/script/PhpLanguage.java       | 46 ++++++++++++++++++
 .../camel/builder/script/PythonLanguage.java    | 46 ++++++++++++++++++
 .../camel/builder/script/RubyLanguage.java      | 46 ++++++++++++++++++
 .../org/apache/camel/language/javaScript        | 18 +++++++
 .../services/org/apache/camel/language/php      | 18 +++++++
 .../services/org/apache/camel/language/python   | 18 +++++++
 .../services/org/apache/camel/language/ruby     | 18 +++++++
 .../LanguageECMAScriptAsJavaScriptTest.java     | 51 --------------------
 10 files changed, 257 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f56151dc/camel-core/src/main/java/org/apache/camel/component/language/LanguageEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/language/LanguageEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/language/LanguageEndpoint.java
index 7afb5f1..d24ce39 100644
--- a/camel-core/src/main/java/org/apache/camel/component/language/LanguageEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/language/LanguageEndpoint.java
@@ -53,7 +53,7 @@ public class LanguageEndpoint extends ResourceEndpoint {
     private Language language;
     private Expression expression;
     private boolean contentResolvedFromResource;
-    @UriPath(enums = "bean,constant,el,exchangeProperty,file,groovy,header,jsonpath,jxpath,mvel,ognl,ref,simple,spel,sql,terser,tokenize,xpath,xquery,xtokenize") @Metadata(required = "true")
+    @UriPath(enums = "bean,constant,el,exchangeProperty,file,groovy,header,javascript,jsonpath,jxpath,mvel,ognl,php,python,ref,ruby,simple,spel,sql,terser,tokenize,xpath,xquery,xtokenize") @Metadata(required = "true")
     private String languageName;
     // resourceUri is optional in the language endpoint
     @UriPath(description = "Path to the resource, or a reference to lookup a bean in the Registry to use as the resource") @Metadata(required = "false")

http://git-wip-us.apache.org/repos/asf/camel/blob/f56151dc/components/camel-script/src/main/java/org/apache/camel/builder/script/JavaScriptLanguage.java
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/java/org/apache/camel/builder/script/JavaScriptLanguage.java b/components/camel-script/src/main/java/org/apache/camel/builder/script/JavaScriptLanguage.java
new file mode 100644
index 0000000..eafbe22
--- /dev/null
+++ b/components/camel-script/src/main/java/org/apache/camel/builder/script/JavaScriptLanguage.java
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.builder.script;
+
+import org.apache.camel.Expression;
+import org.apache.camel.Predicate;
+import org.apache.camel.spi.Language;
+import org.apache.camel.support.LanguageSupport;
+
+public class JavaScriptLanguage extends LanguageSupport {
+
+    @Override
+    public Predicate createPredicate(String predicate) {
+        Language language = getCamelContext().resolveLanguage("js");
+        if (language != null) {
+            return language.createPredicate(predicate);
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    public Expression createExpression(String expression) {
+        Language language = getCamelContext().resolveLanguage("js");
+        if (language != null) {
+            return language.createExpression(expression);
+        } else {
+            return null;
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/f56151dc/components/camel-script/src/main/java/org/apache/camel/builder/script/PhpLanguage.java
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/java/org/apache/camel/builder/script/PhpLanguage.java b/components/camel-script/src/main/java/org/apache/camel/builder/script/PhpLanguage.java
new file mode 100644
index 0000000..be2a5ce
--- /dev/null
+++ b/components/camel-script/src/main/java/org/apache/camel/builder/script/PhpLanguage.java
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.builder.script;
+
+import org.apache.camel.Expression;
+import org.apache.camel.Predicate;
+import org.apache.camel.spi.Language;
+import org.apache.camel.support.LanguageSupport;
+
+public class PhpLanguage extends LanguageSupport {
+
+    @Override
+    public Predicate createPredicate(String predicate) {
+        Language language = getCamelContext().resolveLanguage("php");
+        if (language != null) {
+            return language.createPredicate(predicate);
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    public Expression createExpression(String expression) {
+        Language language = getCamelContext().resolveLanguage("php");
+        if (language != null) {
+            return language.createExpression(expression);
+        } else {
+            return null;
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/f56151dc/components/camel-script/src/main/java/org/apache/camel/builder/script/PythonLanguage.java
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/java/org/apache/camel/builder/script/PythonLanguage.java b/components/camel-script/src/main/java/org/apache/camel/builder/script/PythonLanguage.java
new file mode 100644
index 0000000..9dfb288
--- /dev/null
+++ b/components/camel-script/src/main/java/org/apache/camel/builder/script/PythonLanguage.java
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.builder.script;
+
+import org.apache.camel.Expression;
+import org.apache.camel.Predicate;
+import org.apache.camel.spi.Language;
+import org.apache.camel.support.LanguageSupport;
+
+public class PythonLanguage extends LanguageSupport {
+
+    @Override
+    public Predicate createPredicate(String predicate) {
+        Language language = getCamelContext().resolveLanguage("python");
+        if (language != null) {
+            return language.createPredicate(predicate);
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    public Expression createExpression(String expression) {
+        Language language = getCamelContext().resolveLanguage("python");
+        if (language != null) {
+            return language.createExpression(expression);
+        } else {
+            return null;
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/f56151dc/components/camel-script/src/main/java/org/apache/camel/builder/script/RubyLanguage.java
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/java/org/apache/camel/builder/script/RubyLanguage.java b/components/camel-script/src/main/java/org/apache/camel/builder/script/RubyLanguage.java
new file mode 100644
index 0000000..5f95a88
--- /dev/null
+++ b/components/camel-script/src/main/java/org/apache/camel/builder/script/RubyLanguage.java
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.builder.script;
+
+import org.apache.camel.Expression;
+import org.apache.camel.Predicate;
+import org.apache.camel.spi.Language;
+import org.apache.camel.support.LanguageSupport;
+
+public class RubyLanguage extends LanguageSupport {
+
+    @Override
+    public Predicate createPredicate(String predicate) {
+        Language language = getCamelContext().resolveLanguage("jruby");
+        if (language != null) {
+            return language.createPredicate(predicate);
+        } else {
+            return null;
+        }
+    }
+
+    @Override
+    public Expression createExpression(String expression) {
+        Language language = getCamelContext().resolveLanguage("jruby");
+        if (language != null) {
+            return language.createExpression(expression);
+        } else {
+            return null;
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/f56151dc/components/camel-script/src/main/resources/META-INF/services/org/apache/camel/language/javaScript
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/resources/META-INF/services/org/apache/camel/language/javaScript b/components/camel-script/src/main/resources/META-INF/services/org/apache/camel/language/javaScript
new file mode 100644
index 0000000..8051107
--- /dev/null
+++ b/components/camel-script/src/main/resources/META-INF/services/org/apache/camel/language/javaScript
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+class=org.apache.camel.builder.script.JavaScriptLanguage
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/f56151dc/components/camel-script/src/main/resources/META-INF/services/org/apache/camel/language/php
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/resources/META-INF/services/org/apache/camel/language/php b/components/camel-script/src/main/resources/META-INF/services/org/apache/camel/language/php
new file mode 100644
index 0000000..f708b18
--- /dev/null
+++ b/components/camel-script/src/main/resources/META-INF/services/org/apache/camel/language/php
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+class=org.apache.camel.builder.script.PhpLanguage
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/f56151dc/components/camel-script/src/main/resources/META-INF/services/org/apache/camel/language/python
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/resources/META-INF/services/org/apache/camel/language/python b/components/camel-script/src/main/resources/META-INF/services/org/apache/camel/language/python
new file mode 100644
index 0000000..01db3cb
--- /dev/null
+++ b/components/camel-script/src/main/resources/META-INF/services/org/apache/camel/language/python
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+class=org.apache.camel.builder.script.PythonLanguage
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/f56151dc/components/camel-script/src/main/resources/META-INF/services/org/apache/camel/language/ruby
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/resources/META-INF/services/org/apache/camel/language/ruby b/components/camel-script/src/main/resources/META-INF/services/org/apache/camel/language/ruby
new file mode 100644
index 0000000..0a8efcd
--- /dev/null
+++ b/components/camel-script/src/main/resources/META-INF/services/org/apache/camel/language/ruby
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+class=org.apache.camel.builder.script.RubyLanguage
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/f56151dc/components/camel-script/src/test/java/org/apache/camel/builder/script/LanguageECMAScriptAsJavaScriptTest.java
----------------------------------------------------------------------
diff --git a/components/camel-script/src/test/java/org/apache/camel/builder/script/LanguageECMAScriptAsJavaScriptTest.java b/components/camel-script/src/test/java/org/apache/camel/builder/script/LanguageECMAScriptAsJavaScriptTest.java
deleted file mode 100644
index 0c214ab..0000000
--- a/components/camel-script/src/test/java/org/apache/camel/builder/script/LanguageECMAScriptAsJavaScriptTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.builder.script;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Ignore;
-import org.junit.Test;
-
-/**
- * Tests a routing expression using ECMAScript which will be resolved as java script
- */
-@Ignore("May fail on CI servers")
-public class LanguageECMAScriptAsJavaScriptTest extends CamelTestSupport {
-
-    @Test
-    public void testSendMatchingMessage() throws Exception {
-        MockEndpoint mock = getMockEndpoint("mock:result");
-        mock.expectedBodiesReceived(7, 9);
-
-        sendBody("direct:start", 3);
-        sendBody("direct:start", 4);
-
-        assertMockEndpointsSatisfied();
-    }
-
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            public void configure() throws Exception {
-                from("direct:start")
-                    .to("language:ECMAScript:classpath:myJavascript.js")
-                    .to("mock:result");
-            }
-        };
-    }
-}


[4/4] camel git commit: Component docs

Posted by da...@apache.org.
Component docs


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

Branch: refs/heads/camel-2.16.x
Commit: aead21aaa0f20f00a4ffa5cc31eb570e3eb5cd63
Parents: 8c49ea9
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Jan 6 19:15:14 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Jan 6 19:16:42 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/component/jcr/JcrEndpoint.java |  2 +-
 .../org/apache/camel/component/jcr/JcrConsumerTest.java  | 11 ++---------
 2 files changed, 3 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/aead21aa/components/camel-jcr/src/main/java/org/apache/camel/component/jcr/JcrEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-jcr/src/main/java/org/apache/camel/component/jcr/JcrEndpoint.java b/components/camel-jcr/src/main/java/org/apache/camel/component/jcr/JcrEndpoint.java
index 6a37d78..ca9bb5d 100644
--- a/components/camel-jcr/src/main/java/org/apache/camel/component/jcr/JcrEndpoint.java
+++ b/components/camel-jcr/src/main/java/org/apache/camel/component/jcr/JcrEndpoint.java
@@ -45,7 +45,7 @@ public class JcrEndpoint extends DefaultEndpoint {
 
     @UriPath @Metadata(required = "true")
     private String host;
-    @UriPath @Metadata(required = "true")
+    @UriPath
     private String base;
     @UriParam
     private String username;

http://git-wip-us.apache.org/repos/asf/camel/blob/aead21aa/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConsumerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConsumerTest.java b/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConsumerTest.java
index 01dcb1f..65a8ad0 100644
--- a/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConsumerTest.java
+++ b/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConsumerTest.java
@@ -39,9 +39,6 @@ public class JcrConsumerTest extends JcrRouteTestSupport {
     private static final Logger LOG = LoggerFactory.getLogger(JcrConsumerTest.class);
 
     private String absPath = "/home/test";
-    private int eventTypes = Event.NODE_ADDED;
-    private boolean deep = true;
-    private boolean noLocal;
 
     @Test
     public void testJcrConsumer() throws Exception {
@@ -104,12 +101,8 @@ public class JcrConsumerTest extends JcrRouteTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                String uri = "jcr://user:pass@repository";
-                uri += absPath;
-                uri += "?eventTypes=" + eventTypes;
-                uri += "&deep=" + deep;
-                uri += "&noLocal=" + noLocal;
-                from(uri).to("direct:a");
+                from("jcr://user:pass@repository/home/test?eventTypes=1&deep=true&noLocal=false")
+                        .to("direct:a");
             }
         };
     }


[3/4] camel git commit: Component docs

Posted by da...@apache.org.
Component docs


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

Branch: refs/heads/master
Commit: 3b94e9513575d9e92b43c2dd78e28f4c96f5c98b
Parents: f56151d
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Jan 6 19:15:14 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Jan 6 19:15:14 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/component/jcr/JcrEndpoint.java |  2 +-
 .../org/apache/camel/component/jcr/JcrConsumerTest.java  | 11 ++---------
 2 files changed, 3 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/3b94e951/components/camel-jcr/src/main/java/org/apache/camel/component/jcr/JcrEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-jcr/src/main/java/org/apache/camel/component/jcr/JcrEndpoint.java b/components/camel-jcr/src/main/java/org/apache/camel/component/jcr/JcrEndpoint.java
index c452717..dae6248 100644
--- a/components/camel-jcr/src/main/java/org/apache/camel/component/jcr/JcrEndpoint.java
+++ b/components/camel-jcr/src/main/java/org/apache/camel/component/jcr/JcrEndpoint.java
@@ -45,7 +45,7 @@ public class JcrEndpoint extends DefaultEndpoint {
 
     @UriPath @Metadata(required = "true")
     private String host;
-    @UriPath @Metadata(required = "true")
+    @UriPath
     private String base;
     @UriParam
     private String username;

http://git-wip-us.apache.org/repos/asf/camel/blob/3b94e951/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConsumerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConsumerTest.java b/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConsumerTest.java
index 01dcb1f..65a8ad0 100644
--- a/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConsumerTest.java
+++ b/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConsumerTest.java
@@ -39,9 +39,6 @@ public class JcrConsumerTest extends JcrRouteTestSupport {
     private static final Logger LOG = LoggerFactory.getLogger(JcrConsumerTest.class);
 
     private String absPath = "/home/test";
-    private int eventTypes = Event.NODE_ADDED;
-    private boolean deep = true;
-    private boolean noLocal;
 
     @Test
     public void testJcrConsumer() throws Exception {
@@ -104,12 +101,8 @@ public class JcrConsumerTest extends JcrRouteTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                String uri = "jcr://user:pass@repository";
-                uri += absPath;
-                uri += "?eventTypes=" + eventTypes;
-                uri += "&deep=" + deep;
-                uri += "&noLocal=" + noLocal;
-                from(uri).to("direct:a");
+                from("jcr://user:pass@repository/home/test?eventTypes=1&deep=true&noLocal=false")
+                        .to("direct:a");
             }
         };
     }