camel git commit: Add JSonArry test case

2016-07-13 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/eventbus 9aafe35f3 -> 9f5ea33c4


Add JSonArry test case


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

Branch: refs/heads/eventbus
Commit: 9f5ea33c4709923f72a830fa708b60f3a43a8dfe
Parents: 9aafe35
Author: Charles Moulliard 
Authored: Thu Jul 14 07:24:14 2016 +0200
Committer: Charles Moulliard 
Committed: Thu Jul 14 07:24:14 2016 +0200

--
 .../camel/component/vertx/VertxRouteTest.java   | 23 
 1 file changed, 23 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/9f5ea33c/components/camel-vertx/src/test/java/org/apache/camel/component/vertx/VertxRouteTest.java
--
diff --git 
a/components/camel-vertx/src/test/java/org/apache/camel/component/vertx/VertxRouteTest.java
 
b/components/camel-vertx/src/test/java/org/apache/camel/component/vertx/VertxRouteTest.java
index 1a331ab..6688f65 100644
--- 
a/components/camel-vertx/src/test/java/org/apache/camel/component/vertx/VertxRouteTest.java
+++ 
b/components/camel-vertx/src/test/java/org/apache/camel/component/vertx/VertxRouteTest.java
@@ -18,6 +18,8 @@ package org.apache.camel.component.vertx;
 
 import java.util.List;
 
+import io.vertx.core.json.JsonArray;
+import io.vertx.core.json.JsonObject;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
@@ -35,6 +37,8 @@ public class VertxRouteTest extends VertxBaseTestSupport {
 protected MockEndpoint resultEndpoint;
 protected String body1 = "{\"id\":1,\"description\":\"Message One\"}";
 protected String body2 = "{\"id\":2,\"description\":\"Message Two\"}";
+protected JsonArray body;
+protected String result = "[{\"foo\":\"bar\"}]";
 
 @Test
 public void testVertxMessages() throws Exception {
@@ -52,6 +56,25 @@ public class VertxRouteTest extends VertxBaseTestSupport {
 }
 }
 
+@Test
+public void testVertxWithJSonArray() throws Exception {
+resultEndpoint = context.getEndpoint(resultUri, MockEndpoint.class);
+resultEndpoint.expectedBodiesReceived(result);
+
+body = new JsonArray();
+JsonObject obj = new JsonObject().put("foo", "bar");
+body.add(obj);
+
+template.sendBody(startUri, body);
+
+resultEndpoint.assertIsSatisfied();
+
+List list = resultEndpoint.getReceivedExchanges();
+for (Exchange exchange : list) {
+log.info("Received exchange: " + exchange + " headers: " + 
exchange.getIn().getHeaders());
+}
+}
+
 protected RouteBuilder createRouteBuilder() throws Exception {
 return new RouteBuilder() {
 public void configure() throws Exception {



camel git commit: CAMEL-9895. Add a default password to access the SSH server

2016-04-21 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master e06e2af36 -> 3d9bca95c


CAMEL-9895. Add a default password to access the SSH server


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

Branch: refs/heads/master
Commit: 3d9bca95c0ffa32f8dd132e4832514b14da39ad5
Parents: e06e2af
Author: Charles Moulliard 
Authored: Thu Apr 21 08:57:20 2016 +0200
Committer: Charles Moulliard 
Committed: Thu Apr 21 08:57:20 2016 +0200

--
 examples/camel-example-spring-boot/README.md  | 2 +-
 .../camel-example-spring-boot/src/main/resources/application.yml  | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/3d9bca95/examples/camel-example-spring-boot/README.md
--
diff --git a/examples/camel-example-spring-boot/README.md 
b/examples/camel-example-spring-boot/README.md
index 4e99f46..d18fb2c 100644
--- a/examples/camel-example-spring-boot/README.md
+++ b/examples/camel-example-spring-boot/README.md
@@ -41,7 +41,7 @@ You can SSH into the JVM using
 
 ssh -p 2000 user@localhost
 
-And then use the generated password that spring-boot logged when it was 
staring.
+And then use `password` when the server will prompt to encode the password.
 
 
 ### Documentation

http://git-wip-us.apache.org/repos/asf/camel/blob/3d9bca95/examples/camel-example-spring-boot/src/main/resources/application.yml
--
diff --git 
a/examples/camel-example-spring-boot/src/main/resources/application.yml 
b/examples/camel-example-spring-boot/src/main/resources/application.yml
index ad9d16c..59fc3f5 100644
--- a/examples/camel-example-spring-boot/src/main/resources/application.yml
+++ b/examples/camel-example-spring-boot/src/main/resources/application.yml
@@ -15,4 +15,5 @@
 ## limitations under the License.
 ## 
 
-spring.main.sources: org.apache.camel.example.spring.boot.MySpringBootRouter
\ No newline at end of file
+spring.main.sources: org.apache.camel.example.spring.boot.MySpringBootRouter
+shell.auth.simple.user.password: password



camel git commit: CAMEL-9272. Add appid param as the user key is required since 9/10/2015 to access the openweathermap service

2015-10-29 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master 6cefe5eeb -> a7c8c5c97


CAMEL-9272. Add appid param as the user key is required since 9/10/2015 to 
access the openweathermap service


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

Branch: refs/heads/master
Commit: a7c8c5c971dfa293ff0cd9ba39284aaf24a69fa4
Parents: 6cefe5e
Author: Charles Moulliard 
Authored: Thu Oct 29 17:52:28 2015 +0100
Committer: Charles Moulliard 
Committed: Thu Oct 29 17:52:28 2015 +0100

--
 .../component/weather/WeatherConfiguration.java | 20 +++-
 .../CurrentWeatherMadridProducerTest.java   |  4 +++-
 2 files changed, 22 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/a7c8c5c9/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java
--
diff --git 
a/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java
 
b/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java
index c77f5f1..e0c87d6 100644
--- 
a/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java
+++ 
b/components/camel-weather/src/main/java/org/apache/camel/component/weather/WeatherConfiguration.java
@@ -52,6 +52,8 @@ public class WeatherConfiguration {
 private WeatherUnits units = METRIC;
 @UriParam
 private String headerName;
+@UriParam
+private String appid;
 
 public WeatherConfiguration(WeatherComponent component) {
 this.component = notNull(component, "component");
@@ -155,6 +157,18 @@ public class WeatherConfiguration {
 public void setLon(String lon) {
 this.lon = lon;
 }
+
+/**
+ * APPID ID used to authenticate the user connected to the API Server
+ */
+public void setAppid(String appid) {
+this.appid = appid;
+}
+
+public String getAppid() {
+return appid;
+}
+
 
 public String getQuery() throws Exception {
 return getQuery(getLocation());
@@ -171,7 +185,7 @@ public class WeatherConfiguration {
 // assuming the location is a town or country
 location = "q=" + location;
 }
-
+
 if (isEmpty(getPeriod())) {
 answer += "weather?" + location;
 } else {
@@ -188,6 +202,10 @@ public class WeatherConfiguration {
 answer += "=" + getMode().name().toLowerCase();
 }
 
+if (getAppid() != null) {
+answer += "=" + getAppid();
+}
+
 return answer;
 }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/a7c8c5c9/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherMadridProducerTest.java
--
diff --git 
a/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherMadridProducerTest.java
 
b/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherMadridProducerTest.java
index 9592513..61b7dc6 100644
--- 
a/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherMadridProducerTest.java
+++ 
b/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherMadridProducerTest.java
@@ -86,8 +86,10 @@ public class CurrentWeatherMadridProducerTest extends 
BaseWeatherConsumerTest {
 return new RouteBuilder() {
 @Override
 public void configure() throws Exception {
+
+/* The Camel Route uses the apache-camel appid to access the 
openweathermap service */
 from("direct:start")
-.to("weather:foo?location=Madrid,Spain")
+
.to("weather:foo?location=Madrid,Spain=9162755b2efa555823cfe0451d7fff38")
 .to("mock:result");
 }
 };



camel git commit: Add Test for HTTP Options method

2015-09-14 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master 044ccbe8e -> 85ea4306c


Add Test for HTTP Options method


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

Branch: refs/heads/master
Commit: 85ea4306cace7ed1e32bef609189142685fe9720
Parents: 044ccbe
Author: Charles Moulliard 
Authored: Mon Sep 14 20:46:15 2015 +0200
Committer: Charles Moulliard 
Committed: Mon Sep 14 20:46:15 2015 +0200

--
 .../http/NettyHttpRestOptionsAllowTest.java | 59 
 1 file changed, 59 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/85ea4306/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpRestOptionsAllowTest.java
--
diff --git 
a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpRestOptionsAllowTest.java
 
b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpRestOptionsAllowTest.java
new file mode 100644
index 000..29d14dd
--- /dev/null
+++ 
b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpRestOptionsAllowTest.java
@@ -0,0 +1,59 @@
+/**
+ * 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.component.netty4.http;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.http.common.HttpMethods;
+import org.junit.Test;
+
+import static org.apache.camel.Exchange.HTTP_METHOD;
+import static org.apache.camel.Exchange.HTTP_RESPONSE_CODE;
+
+public class NettyHttpRestOptionsAllowTest extends BaseNettyTest {
+
+static final String ALLOW_METHODS = 
"GET,HEAD,POST,PUT,DELETE,TRACE,OPTIONS,CONNECT,PATCH";
+
+@Test
+public void shouldGetAllowMethods() throws Exception {
+Exchange response = 
template.request("netty4-http:http://localhost:{{port}}/myapp;, new Processor() 
{
+@Override
+public void process(Exchange exchange) throws Exception {
+exchange.getIn().setHeader(Exchange.HTTP_METHOD, 
HttpMethods.OPTIONS);
+exchange.getIn().setBody("");
+}
+});
+String body = response.getOut().getBody(String.class);
+String allowHeader = (String) response.getOut().getHeader("Allow");
+int code = (int) response.getOut().getHeader(HTTP_RESPONSE_CODE);
+assertEquals(ALLOW_METHODS, allowHeader);
+assertEquals(200, code);
+assertEquals("", body);
+}
+
+@Override
+protected RouteBuilder createRouteBuilder() throws Exception {
+return new RouteBuilder() {
+@Override
+public void configure() throws Exception {
+
from("netty4-http:http://0.0.0.0:{{port}}/myapp;).setBody().constant("options");
+}
+};
+}
+
+}



camel git commit: CAMEL-9129. Add OptionsVerbDefinition. Extend Rest & VerbDefintion to include OPTIONS. Create unit test

2015-09-13 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master 1300aa625 -> 36fdb1e5a


CAMEL-9129. Add OptionsVerbDefinition. Extend Rest & VerbDefintion to include 
OPTIONS. Create unit test


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

Branch: refs/heads/master
Commit: 36fdb1e5af8bdc1dd610f7cb9c3f58cebf2cb3c6
Parents: 1300aa6
Author: Charles Moulliard 
Authored: Sun Sep 13 17:57:34 2015 +0200
Committer: Charles Moulliard 
Committed: Sun Sep 13 18:01:49 2015 +0200

--
 .../camel/model/rest/OptionsVerbDefinition.java | 33 +
 .../apache/camel/model/rest/RestDefinition.java | 10 +++
 .../apache/camel/model/rest/VerbDefinition.java |  2 +
 .../component/rest/FromRestOptionsTest.java | 77 
 4 files changed, 122 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/36fdb1e5/camel-core/src/main/java/org/apache/camel/model/rest/OptionsVerbDefinition.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/rest/OptionsVerbDefinition.java
 
b/camel-core/src/main/java/org/apache/camel/model/rest/OptionsVerbDefinition.java
new file mode 100644
index 000..11a121c
--- /dev/null
+++ 
b/camel-core/src/main/java/org/apache/camel/model/rest/OptionsVerbDefinition.java
@@ -0,0 +1,33 @@
+/**
+ * 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.model.rest;
+
+import org.apache.camel.spi.Metadata;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * Rest OPTIONS command
+ */
+@Metadata(label = "rest")
+@XmlRootElement(name = "options")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class OptionsVerbDefinition extends VerbDefinition {
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/36fdb1e5/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java 
b/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java
index 1af77fc..4c5c044 100644
--- a/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java
@@ -213,6 +213,14 @@ public class RestDefinition extends 
OptionalIdentifiedDefinition
 return addVerb("head", uri);
 }
 
+public RestDefinition options() {
+return addVerb("options", null);
+}
+
+public RestDefinition options(String uri) {
+return addVerb("options", uri);
+}
+
 public RestDefinition verb(String verb) {
 return addVerb(verb, null);
 }
@@ -480,6 +488,8 @@ public class RestDefinition extends 
OptionalIdentifiedDefinition
 answer = new HeadVerbDefinition();
 } else if ("put".equals(verb)) {
 answer = new PutVerbDefinition();
+} else if ("options".equals(verb)) {
+answer = new OptionsVerbDefinition();
 } else {
 answer = new VerbDefinition();
 answer.setMethod(verb);

http://git-wip-us.apache.org/repos/asf/camel/blob/36fdb1e5/camel-core/src/main/java/org/apache/camel/model/rest/VerbDefinition.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/rest/VerbDefinition.java 
b/camel-core/src/main/java/org/apache/camel/model/rest/VerbDefinition.java
index 90a32ce..7e119c5 100644
--- a/camel-core/src/main/java/org/apache/camel/model/rest/VerbDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/rest/VerbDefinition.java
@@ -369,6 +369,8 @@ public class VerbDefinition extends 
OptionalIdentifiedDefinition
  

camel git commit: Add deps required to debug test classes

2015-09-13 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master dcd4d378d -> 15fd04d35


Add deps required to debug test classes


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

Branch: refs/heads/master
Commit: 15fd04d358eb713e449f10170173fcba7cbdcf7d
Parents: dcd4d37
Author: Charles Moulliard 
Authored: Sun Sep 13 17:01:15 2015 +0200
Committer: Charles Moulliard 
Committed: Sun Sep 13 17:01:15 2015 +0200

--
 components/camel-swagger/pom.xml | 10 ++
 1 file changed, 10 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/15fd04d3/components/camel-swagger/pom.xml
--
diff --git a/components/camel-swagger/pom.xml b/components/camel-swagger/pom.xml
index 1225ec2..4689c1e 100644
--- a/components/camel-swagger/pom.xml
+++ b/components/camel-swagger/pom.xml
@@ -87,6 +87,16 @@
   test
 
 
+  org.apache.camel
+  camel-http-common
+  test
+
+
+  org.apache.camel
+  camel-jetty-common
+  test
+
+
   junit
   junit
   test



camel git commit: CAMEL-9057. Add missing scala deps to resolve the issue

2015-08-05 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master bc7312202 - 3f8df7fca


CAMEL-9057. Add missing scala deps to resolve the issue


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

Branch: refs/heads/master
Commit: 3f8df7fcae229a038b773cf5e72e27ea7e8aa0f3
Parents: bc73122
Author: Charles Moulliard cmoulli...@apache.org
Authored: Wed Aug 5 18:28:37 2015 +0200
Committer: Charles Moulliard cmoulli...@apache.org
Committed: Wed Aug 5 18:28:37 2015 +0200

--
 examples/camel-example-servlet-rest-tomcat/pom.xml | 17 +
 1 file changed, 17 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/3f8df7fc/examples/camel-example-servlet-rest-tomcat/pom.xml
--
diff --git a/examples/camel-example-servlet-rest-tomcat/pom.xml 
b/examples/camel-example-servlet-rest-tomcat/pom.xml
index 0ca773b..aea9ab9 100755
--- a/examples/camel-example-servlet-rest-tomcat/pom.xml
+++ b/examples/camel-example-servlet-rest-tomcat/pom.xml
@@ -32,6 +32,7 @@
 
 properties
 swagger-ui.version2.0.24/swagger-ui.version
+scala.version2.11.7/scala.version
 logback-version1.1.3/logback-version
 
swagger.urlhttps://github.com/swagger-api/swagger-ui/archive/v${swagger-ui.version}/swagger.url
 destDirtarget/swagger-ui/destDir
@@ -62,6 +63,22 @@
 groupIdorg.apache.camel/groupId
 artifactIdcamel-swagger/artifactId
 /dependency
+!-- Add scala deps to resolve issue 
https://issues.apache.org/jira/browse/CAMEL-9057  --
+dependency
+groupIdorg.scala-lang/groupId
+artifactIdscala-library/artifactId
+version${scala.version}/version
+/dependency
+dependency
+groupIdorg.scala-lang/groupId
+artifactIdscala-compiler/artifactId
+version${scala.version}/version
+/dependency
+dependency
+groupIdorg.scala-lang/groupId
+artifactIdscala-reflect/artifactId
+version${scala.version}/version
+/dependency
 
 !-- use for json binding --
 dependency



camel git commit: CAMEL-8326: Add execution phase to the maven-felix-plugin to allow to run the project using mvn camel:run and not mvn install camel:run, remove test scope of the dep camel-test-bluep

2015-02-10 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master ed7302336 - c7cb9d3f0


CAMEL-8326: Add execution phase to the maven-felix-plugin to allow to run the 
project using mvn camel:run and not mvn install camel:run, remove test scope of 
the dep camel-test-blueprint otherwise the deps needed by POJOsr weren't added 
to the classpath


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

Branch: refs/heads/master
Commit: c7cb9d3f022c6fb6d685f2d83b3e4dacb725fd08
Parents: ed73023
Author: Charles Moulliard cmoulli...@apache.org
Authored: Tue Feb 10 15:10:17 2015 +0100
Committer: Charles Moulliard cmoulli...@apache.org
Committed: Tue Feb 10 15:10:17 2015 +0100

--
 .../main/resources/archetype-resources/pom.xml  | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/c7cb9d3f/tooling/archetypes/camel-archetype-blueprint/src/main/resources/archetype-resources/pom.xml
--
diff --git 
a/tooling/archetypes/camel-archetype-blueprint/src/main/resources/archetype-resources/pom.xml
 
b/tooling/archetypes/camel-archetype-blueprint/src/main/resources/archetype-resources/pom.xml
index 44f86aa..d8528af 100644
--- 
a/tooling/archetypes/camel-archetype-blueprint/src/main/resources/archetype-resources/pom.xml
+++ 
b/tooling/archetypes/camel-archetype-blueprint/src/main/resources/archetype-resources/pom.xml
@@ -24,8 +24,7 @@
   packagingbundle/packaging
   version${version}/version
 
-  nameA Camel Blueprint Route/name
-  urlhttp://www.myorganization.org/url
+  nameCamel Blueprint Route/name
 
   properties
 project.build.sourceEncodingUTF-8/project.build.sourceEncoding
@@ -56,22 +55,16 @@
   version${slf4j-version}/version
 /dependency
 dependency
-  groupIdorg.slf4j/groupId
-  artifactIdjcl-over-slf4j/artifactId
-  version${slf4j-version}/version
-/dependency
-dependency
   groupIdlog4j/groupId
   artifactIdlog4j/artifactId
   version${log4j-version}/version
 /dependency
 
-!-- testing --
+!-- Testing  Camel Plugin --
 dependency
   groupIdorg.apache.camel/groupId
   artifactIdcamel-test-blueprint/artifactId
   version${camel-version}/version
-  scopetest/scope
 /dependency
   /dependencies
 
@@ -103,6 +96,15 @@
 artifactIdmaven-bundle-plugin/artifactId
 version${maven-bundle-plugin-version}/version
 extensionstrue/extensions
+executions
+  execution
+   idbundle-manifest/id
+   phaseprocess-classes/phase
+   goals
+   goalmanifest/goal
+   /goals
+  /execution
+/executions
 configuration
   instructions
 Bundle-SymbolicName${artifactId}/Bundle-SymbolicName



[03/10] camel git commit: CAMEL-8066: Refactor project to avoid to include swagger-ui resources into src/main/webapp

2014-11-24 Thread cmoulliard
http://git-wip-us.apache.org/repos/asf/camel/blob/db32eb92/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/shred/content.js
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/shred/content.js
 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/shred/content.js
deleted file mode 100644
index b8051fe..000
--- 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/shred/content.js
+++ /dev/null
@@ -1,193 +0,0 @@
-
-// The purpose of the `Content` object is to abstract away the data conversions
-// to and from raw content entities as strings. For example, you want to be 
able
-// to pass in a Javascript object and have it be automatically converted into a
-// JSON string if the `content-type` is set to a JSON-based media type.
-// Conversely, you want to be able to transparently get back a Javascript 
object
-// in the response if the `content-type` is a JSON-based media-type.
-
-// One limitation of the current implementation is that it [assumes the 
`charset` is UTF-8](https://github.com/spire-io/shred/issues/5).
-
-// The `Content` constructor takes an options object, which *must* have either 
a
-// `body` or `data` property and *may* have a `type` property indicating the
-// media type. If there is no `type` attribute, a default will be inferred.
-var Content = function(options) {
-  this.body = options.body;
-  this.data = options.data;
-  this.type = options.type;
-};
-
-Content.prototype = {
-  // Treat `toString()` as asking for the `content.body`. That is, the raw 
content entity.
-  //
-  // toString: function() { return this.body; }
-  //
-  // Commented out, but I've forgotten why. :/
-};
-
-
-// `Content` objects have the following attributes:
-Object.defineProperties(Content.prototype,{
-  
-// - **type**. Typically accessed as `content.type`, reflects the 
`content-type`
-//   header associated with the request or response. If not passed as an 
options
-//   to the constructor or set explicitly, it will infer the type the `data`
-//   attribute, if possible, and, failing that, will default to `text/plain`.
-  type: {
-get: function() {
-  if (this._type) {
-return this._type;
-  } else {
-if (this._data) {
-  switch(typeof this._data) {
-case string: return text/plain;
-case object: return application/json;
-  }
-}
-  }
-  return text/plain;
-},
-set: function(value) {
-  this._type = value;
-  return this;
-},
-enumerable: true
-  },
-
-// - **data**. Typically accessed as `content.data`, reflects the content 
entity
-//   converted into Javascript data. This can be a string, if the `type` is, 
say,
-//   `text/plain`, but can also be a Javascript object. The conversion applied 
is
-//   based on the `processor` attribute. The `data` attribute can also be set
-//   directly, in which case the conversion will be done the other way, to 
infer
-//   the `body` attribute.
-  data: {
-get: function() {
-  if (this._body) {
-return this.processor.parser(this._body);
-  } else {
-return this._data;
-  }
-},
-set: function(data) {
-  if (this._bodydata) Errors.setDataWithBody(this);
-  this._data = data;
-  return this;
-},
-enumerable: true
-  },
-
-// - **body**. Typically accessed as `content.body`, reflects the content 
entity
-//   as a UTF-8 string. It is the mirror of the `data` attribute. If you set 
the
-//   `data` attribute, the `body` attribute will be inferred and vice-versa. If
-//   you attempt to set both, an exception is raised.
-  body: {
-get: function() {
-  if (this._data) {
-return this.processor.stringify(this._data);
-  } else {
-return this._body.toString();
-  }
-},
-set: function(body) {
-  if (this._databody) Errors.setBodyWithData(this);
-  this._body = body;
-  return this;
-},
-enumerable: true
-  },
-
-// - **processor**. The functions that will be used to convert to/from `data` 
and
-//   `body` attributes. You can add processors. The two that are built-in are 
for
-//   `text/plain`, which is basically an identity transformation and
-//   `application/json` and other JSON-based media types (including custom 
media
-//   types with `+json`). You can add your own processors. See below.
-  processor: {
-get: function() {
-  var processor = Content.processors[this.type];
-  if (processor) {
-return processor;
-  } else {
-// Return the first processor that matches any part of the
-// content type. ex: application/vnd.foobar.baz+json will match json.
-var main = this.type.split(;)[0];
-var parts = main.split(/\+|\//);
-for (var i=0, l=parts.length; i  l; i++) {
-  processor = Content.processors[parts[i]]
-}
-return 

[10/10] camel git commit: CAMEL-8066: Refactor project to avoid to include swagger-ui resources into src/main/webapp

2014-11-24 Thread cmoulliard
CAMEL-8066: Refactor project to avoid to include swagger-ui resources into 
src/main/webapp


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

Branch: refs/heads/master
Commit: db32eb92a73fb97b6d4f5885c3996bc380fe8044
Parents: ba8eb42
Author: Charles Moulliard cmoulli...@apache.org
Authored: Mon Nov 24 18:54:58 2014 +0100
Committer: Charles Moulliard cmoulli...@apache.org
Committed: Mon Nov 24 18:54:58 2014 +0100

--
 .../camel-example-servlet-rest-tomcat/pom.xml   |  274 +-
 .../src/main/webapp/META-INF/LICENSE.txt|  203 ++
 .../src/main/webapp/META-INF/NOTICE.txt |   11 +
 .../src/main/webapp/WEB-INF/web.xml |4 +
 .../src/main/webapp/css/foundation.min.css  |1 -
 .../src/main/webapp/css/normalize.css   |  427 ---
 .../src/main/webapp/css/reset.css   |  125 -
 .../src/main/webapp/css/screen.css  | 1224 
 .../src/main/webapp/home.html   |  102 +
 .../src/main/webapp/images/explorer_icons.png   |  Bin 5763 - 0 bytes
 .../src/main/webapp/images/logo_small.png   |  Bin 770 - 0 bytes
 .../src/main/webapp/images/pet_store_api.png|  Bin 824 - 0 bytes
 .../src/main/webapp/images/throbber.gif |  Bin 9257 - 0 bytes
 .../src/main/webapp/images/wordnik_api.png  |  Bin 980 - 0 bytes
 .../src/main/webapp/index.html  |  101 -
 .../src/main/webapp/js/vendor/modernizr.js  |8 -
 .../src/main/webapp/lib/backbone-min.js |   38 -
 .../src/main/webapp/lib/handlebars-1.0.0.js | 2278 ---
 .../src/main/webapp/lib/highlight.7.3.pack.js   |1 -
 .../src/main/webapp/lib/jquery-1.8.0.min.js |2 -
 .../src/main/webapp/lib/jquery.ba-bbq.min.js|   18 -
 .../src/main/webapp/lib/jquery.slideto.min.js   |1 -
 .../src/main/webapp/lib/jquery.wiggle.min.js|8 -
 .../src/main/webapp/lib/shred.bundle.js | 2765 --
 .../src/main/webapp/lib/shred/content.js|  193 --
 .../src/main/webapp/lib/swagger-oauth.js|  211 --
 .../src/main/webapp/lib/swagger.js  | 1653 ---
 .../src/main/webapp/lib/underscore-min.js   |   32 -
 .../src/main/webapp/o2c.html|   15 -
 .../src/main/webapp/swagger-ui.js   | 2324 ---
 .../src/main/webapp/swagger-ui.min.js   |1 -
 .../src/main/webapp/swagger.html|   88 -
 32 files changed, 507 insertions(+), 11601 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/db32eb92/examples/camel-example-servlet-rest-tomcat/pom.xml
--
diff --git a/examples/camel-example-servlet-rest-tomcat/pom.xml 
b/examples/camel-example-servlet-rest-tomcat/pom.xml
index 10f964b..a6b0cd6 100755
--- a/examples/camel-example-servlet-rest-tomcat/pom.xml
+++ b/examples/camel-example-servlet-rest-tomcat/pom.xml
@@ -15,92 +15,192 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 --
-project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;
-
-  modelVersion4.0.0/modelVersion
-
-  parent
-groupIdorg.apache.camel/groupId
-artifactIdexamples/artifactId
-version2.15-SNAPSHOT/version
-  /parent
-
-  artifactIdcamel-example-servlet-rest-tomcat/artifactId
-  nameCamel :: Example :: Servlet REST Tomcat/name
-  descriptionAn example using Servlet REST with Apache Tomcat/description
-  packagingwar/packaging
-
-  dependencies
-
-!-- camel --
-dependency
-  groupIdorg.apache.camel/groupId
-  artifactIdcamel-core/artifactId
-/dependency
-dependency
-  groupIdorg.apache.camel/groupId
-  artifactIdcamel-spring/artifactId
-/dependency
-dependency
-  groupIdorg.apache.camel/groupId
-  artifactIdcamel-servlet/artifactId
-/dependency
-dependency
-  groupIdorg.apache.camel/groupId
-  artifactIdcamel-metrics/artifactId
-/dependency
-
-!-- swagger api --
-dependency
-  groupIdorg.apache.camel/groupId
-  artifactIdcamel-swagger/artifactId
-/dependency
-
-!-- use for json binding --
-dependency
-  groupIdorg.apache.camel/groupId
-  artifactIdcamel-jackson/artifactId
-/dependency
-
-!-- we need spring web --
-dependency
-  groupIdorg.springframework/groupId
-  artifactIdspring-web/artifactId
-/dependency
-
-!-- logging --
-dependency
-  groupIdlog4j/groupId
-  artifactIdlog4j/artifactId
- 

[07/10] camel git commit: CAMEL-8066: Refactor project to avoid to include swagger-ui resources into src/main/webapp

2014-11-24 Thread cmoulliard
http://git-wip-us.apache.org/repos/asf/camel/blob/db32eb92/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/handlebars-1.0.0.js
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/handlebars-1.0.0.js
 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/handlebars-1.0.0.js
deleted file mode 100644
index c70f09d..000
--- 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/handlebars-1.0.0.js
+++ /dev/null
@@ -1,2278 +0,0 @@
-/*
-
-Copyright (C) 2011 by Yehuda Katz
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the Software), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-*/
-
-// lib/handlebars/browser-prefix.js
-var Handlebars = {};
-
-(function(Handlebars, undefined) {
-;
-// lib/handlebars/base.js
-
-Handlebars.VERSION = 1.0.0;
-Handlebars.COMPILER_REVISION = 4;
-
-Handlebars.REVISION_CHANGES = {
-  1: '= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
-  2: '== 1.0.0-rc.3',
-  3: '== 1.0.0-rc.4',
-  4: '= 1.0.0'
-};
-
-Handlebars.helpers  = {};
-Handlebars.partials = {};
-
-var toString = Object.prototype.toString,
-functionType = '[object Function]',
-objectType = '[object Object]';
-
-Handlebars.registerHelper = function(name, fn, inverse) {
-  if (toString.call(name) === objectType) {
-if (inverse || fn) { throw new Handlebars.Exception('Arg not supported 
with multiple helpers'); }
-Handlebars.Utils.extend(this.helpers, name);
-  } else {
-if (inverse) { fn.not = inverse; }
-this.helpers[name] = fn;
-  }
-};
-
-Handlebars.registerPartial = function(name, str) {
-  if (toString.call(name) === objectType) {
-Handlebars.Utils.extend(this.partials,  name);
-  } else {
-this.partials[name] = str;
-  }
-};
-
-Handlebars.registerHelper('helperMissing', function(arg) {
-  if(arguments.length === 2) {
-return undefined;
-  } else {
-throw new Error(Missing helper: ' + arg + ');
-  }
-});
-
-Handlebars.registerHelper('blockHelperMissing', function(context, options) {
-  var inverse = options.inverse || function() {}, fn = options.fn;
-
-  var type = toString.call(context);
-
-  if(type === functionType) { context = context.call(this); }
-
-  if(context === true) {
-return fn(this);
-  } else if(context === false || context == null) {
-return inverse(this);
-  } else if(type === [object Array]) {
-if(context.length  0) {
-  return Handlebars.helpers.each(context, options);
-} else {
-  return inverse(this);
-}
-  } else {
-return fn(context);
-  }
-});
-
-Handlebars.K = function() {};
-
-Handlebars.createFrame = Object.create || function(object) {
-  Handlebars.K.prototype = object;
-  var obj = new Handlebars.K();
-  Handlebars.K.prototype = null;
-  return obj;
-};
-
-Handlebars.logger = {
-  DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3,
-
-  methodMap: {0: 'debug', 1: 'info', 2: 'warn', 3: 'error'},
-
-  // can be overridden in the host environment
-  log: function(level, obj) {
-if (Handlebars.logger.level = level) {
-  var method = Handlebars.logger.methodMap[level];
-  if (typeof console !== 'undefined'  console[method]) {
-console[method].call(console, obj);
-  }
-}
-  }
-};
-
-Handlebars.log = function(level, obj) { Handlebars.logger.log(level, obj); };
-
-Handlebars.registerHelper('each', function(context, options) {
-  var fn = options.fn, inverse = options.inverse;
-  var i = 0, ret = , data;
-
-  var type = toString.call(context);
-  if(type === functionType) { context = context.call(this); }
-
-  if (options.data) {
-data = Handlebars.createFrame(options.data);
-  }
-
-  if(context  typeof context === 'object') {
-if(context instanceof Array){
-  for(var j = context.length; ij; i++) {
-if (data) { data.index = i; }
-ret = ret + fn(context[i], { data: data });
-  }
-} else {
-  for(var key in context) {
-if(context.hasOwnProperty(key)) {
-  if(data) { data.key = key; }
-   

[04/10] camel git commit: CAMEL-8066: Refactor project to avoid to include swagger-ui resources into src/main/webapp

2014-11-24 Thread cmoulliard
http://git-wip-us.apache.org/repos/asf/camel/blob/db32eb92/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/shred.bundle.js
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/shred.bundle.js
 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/shred.bundle.js
deleted file mode 100644
index 74d0816..000
--- 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/shred.bundle.js
+++ /dev/null
@@ -1,2765 +0,0 @@
-var require = function (file, cwd) {
-var resolved = require.resolve(file, cwd || '/');
-var mod = require.modules[resolved];
-if (!mod) throw new Error(
-'Failed to resolve module ' + file + ', tried ' + resolved
-);
-var res = mod._cached ? mod._cached : mod();
-return res;
-}
-
-require.paths = [];
-require.modules = {};
-require.extensions = [.js,.coffee];
-
-require._core = {
-'assert': true,
-'events': true,
-'fs': true,
-'path': true,
-'vm': true
-};
-
-require.resolve = (function () {
-return function (x, cwd) {
-if (!cwd) cwd = '/';
-
-if (require._core[x]) return x;
-var path = require.modules.path();
-var y = cwd || '.';
-
-if (x.match(/^(?:\.\.?\/|\/)/)) {
-var m = loadAsFileSync(path.resolve(y, x))
-|| loadAsDirectorySync(path.resolve(y, x));
-if (m) return m;
-}
-
-var n = loadNodeModulesSync(x, y);
-if (n) return n;
-
-throw new Error(Cannot find module ' + x + ');
-
-function loadAsFileSync (x) {
-if (require.modules[x]) {
-return x;
-}
-
-for (var i = 0; i  require.extensions.length; i++) {
-var ext = require.extensions[i];
-if (require.modules[x + ext]) return x + ext;
-}
-}
-
-function loadAsDirectorySync (x) {
-x = x.replace(/\/+$/, '');
-var pkgfile = x + '/package.json';
-if (require.modules[pkgfile]) {
-var pkg = require.modules[pkgfile]();
-var b = pkg.browserify;
-if (typeof b === 'object'  b.main) {
-var m = loadAsFileSync(path.resolve(x, b.main));
-if (m) return m;
-}
-else if (typeof b === 'string') {
-var m = loadAsFileSync(path.resolve(x, b));
-if (m) return m;
-}
-else if (pkg.main) {
-var m = loadAsFileSync(path.resolve(x, pkg.main));
-if (m) return m;
-}
-}
-
-return loadAsFileSync(x + '/index');
-}
-
-function loadNodeModulesSync (x, start) {
-var dirs = nodeModulesPathsSync(start);
-for (var i = 0; i  dirs.length; i++) {
-var dir = dirs[i];
-var m = loadAsFileSync(dir + '/' + x);
-if (m) return m;
-var n = loadAsDirectorySync(dir + '/' + x);
-if (n) return n;
-}
-
-var m = loadAsFileSync(x);
-if (m) return m;
-}
-
-function nodeModulesPathsSync (start) {
-var parts;
-if (start === '/') parts = [ '' ];
-else parts = path.normalize(start).split('/');
-
-var dirs = [];
-for (var i = parts.length - 1; i = 0; i--) {
-if (parts[i] === 'node_modules') continue;
-var dir = parts.slice(0, i + 1).join('/') + '/node_modules';
-dirs.push(dir);
-}
-
-return dirs;
-}
-};
-})();
-
-require.alias = function (from, to) {
-var path = require.modules.path();
-var res = null;
-try {
-res = require.resolve(from + '/package.json', '/');
-}
-catch (err) {
-res = require.resolve(from, '/');
-}
-var basedir = path.dirname(res);
-
-var keys = (Object.keys || function (obj) {
-var res = [];
-for (var key in obj) res.push(key)
-return res;
-})(require.modules);
-
-for (var i = 0; i  keys.length; i++) {
-var key = keys[i];
-if (key.slice(0, basedir.length + 1) === basedir + '/') {
-var f = key.slice(basedir.length);
-require.modules[to + f] = require.modules[basedir + f];
-}
-else if (key === basedir) {
-require.modules[to] = require.modules[basedir];
-}
-}
-};
-
-require.define = function (filename, fn) {
-var dirname = require._core[filename]
-? ''
-: require.modules.path().dirname(filename)
-;
-
-var require_ = function (file) {
-

[09/10] camel git commit: CAMEL-8066: Refactor project to avoid to include swagger-ui resources into src/main/webapp

2014-11-24 Thread cmoulliard
http://git-wip-us.apache.org/repos/asf/camel/blob/db32eb92/examples/camel-example-servlet-rest-tomcat/src/main/webapp/css/normalize.css
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/css/normalize.css 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/css/normalize.css
deleted file mode 100644
index 458eea1..000
--- 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/css/normalize.css
+++ /dev/null
@@ -1,427 +0,0 @@
-/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
-
-/**
- * 1. Set default font family to sans-serif.
- * 2. Prevent iOS text size adjust after orientation change, without disabling
- *user zoom.
- */
-
-html {
-  font-family: sans-serif; /* 1 */
-  -ms-text-size-adjust: 100%; /* 2 */
-  -webkit-text-size-adjust: 100%; /* 2 */
-}
-
-/**
- * Remove default margin.
- */
-
-body {
-  margin: 0;
-}
-
-/* HTML5 display definitions
-   == 
*/
-
-/**
- * Correct `block` display not defined for any HTML5 element in IE 8/9.
- * Correct `block` display not defined for `details` or `summary` in IE 10/11
- * and Firefox.
- * Correct `block` display not defined for `main` in IE 11.
- */
-
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-main,
-menu,
-nav,
-section,
-summary {
-  display: block;
-}
-
-/**
- * 1. Correct `inline-block` display not defined in IE 8/9.
- * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
- */
-
-audio,
-canvas,
-progress,
-video {
-  display: inline-block; /* 1 */
-  vertical-align: baseline; /* 2 */
-}
-
-/**
- * Prevent modern browsers from displaying `audio` without controls.
- * Remove excess height in iOS 5 devices.
- */
-
-audio:not([controls]) {
-  display: none;
-  height: 0;
-}
-
-/**
- * Address `[hidden]` styling not present in IE 8/9/10.
- * Hide the `template` element in IE 8/9/11, Safari, and Firefox  22.
- */
-
-[hidden],
-template {
-  display: none;
-}
-
-/* Links
-   == 
*/
-
-/**
- * Remove the gray background color from active links in IE 10.
- */
-
-a {
-  background-color: transparent;
-}
-
-/**
- * Improve readability when focused and also mouse hovered in all browsers.
- */
-
-a:active,
-a:hover {
-  outline: 0;
-}
-
-/* Text-level semantics
-   == 
*/
-
-/**
- * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
- */
-
-abbr[title] {
-  border-bottom: 1px dotted;
-}
-
-/**
- * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
- */
-
-b,
-strong {
-  font-weight: bold;
-}
-
-/**
- * Address styling not present in Safari and Chrome.
- */
-
-dfn {
-  font-style: italic;
-}
-
-/**
- * Address variable `h1` font-size and margin within `section` and `article`
- * contexts in Firefox 4+, Safari, and Chrome.
- */
-
-h1 {
-  font-size: 2em;
-  margin: 0.67em 0;
-}
-
-/**
- * Address styling not present in IE 8/9.
- */
-
-mark {
-  background: #ff0;
-  color: #000;
-}
-
-/**
- * Address inconsistent and variable font size in all browsers.
- */
-
-small {
-  font-size: 80%;
-}
-
-/**
- * Prevent `sub` and `sup` affecting `line-height` in all browsers.
- */
-
-sub,
-sup {
-  font-size: 75%;
-  line-height: 0;
-  position: relative;
-  vertical-align: baseline;
-}
-
-sup {
-  top: -0.5em;
-}
-
-sub {
-  bottom: -0.25em;
-}
-
-/* Embedded content
-   == 
*/
-
-/**
- * Remove border when inside `a` element in IE 8/9/10.
- */
-
-img {
-  border: 0;
-}
-
-/**
- * Correct overflow not hidden in IE 9/10/11.
- */
-
-svg:not(:root) {
-  overflow: hidden;
-}
-
-/* Grouping content
-   == 
*/
-
-/**
- * Address margin not present in IE 8/9 and Safari.
- */
-
-figure {
-  margin: 1em 40px;
-}
-
-/**
- * Address differences between Firefox and other browsers.
- */
-
-hr {
-  -moz-box-sizing: content-box;
-  box-sizing: content-box;
-  height: 0;
-}
-
-/**
- * Contain overflow in all browsers.
- */
-
-pre {
-  overflow: auto;
-}
-
-/**
- * Address odd `em`-unit font size rendering in all browsers.
- */
-
-code,
-kbd,
-pre,
-samp {
-  font-family: monospace, monospace;
-  font-size: 1em;
-}
-
-/* Forms
-   == 
*/
-
-/**
- * Known limitation: by default, Chrome and Safari on OS X allow very limited
- * styling of `select`, unless a `border` property is set.
- */
-
-/**
- * 1. Correct color not being inherited.
- *Known issue: affects color of disabled elements.
- * 2. Correct font properties not being inherited.
- * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
- */
-
-button,
-input,
-optgroup,
-select,

[05/10] camel git commit: CAMEL-8066: Refactor project to avoid to include swagger-ui resources into src/main/webapp

2014-11-24 Thread cmoulliard
http://git-wip-us.apache.org/repos/asf/camel/blob/db32eb92/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery.ba-bbq.min.js
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery.ba-bbq.min.js
 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery.ba-bbq.min.js
deleted file mode 100644
index bcbf248..000
--- 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery.ba-bbq.min.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * jQuery BBQ: Back Button  Query Library - v1.2.1 - 2/17/2010
- * http://benalman.com/projects/jquery-bbq-plugin/
- * 
- * Copyright (c) 2010 Cowboy Ben Alman
- * Dual licensed under the MIT and GPL licenses.
- * http://benalman.com/about/license/
- */
-(function($,p){var 
i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d=hashchange,A=querystring,D=fragment,y=elemUrlAttr,g=location,k=href,t=src,x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function
 E(F){return typeof F===string}function B(G){var F=m.call(arguments,1);return 
function(){return G.apply(this,F.concat(m.call(arguments)))}}function 
n(F){return F.replace(/^[^#]*#?(.*)$/,$1)}function o(F){return 
F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,$1)}function f(H,M,F,I,G){var 
O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||;if(G===2E(I)){L=I.replace(H?w:x,)}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?#:L||!K[1]??:)+L+J}else{O=M(F!==i?F:p[g][k])}return
 O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||;var 
F=$.map(G.split(),encodeURIComponent);h=new RegExp(F.join(|),g)};c.no
 Escape(,/);$.deparam=l=function(I,F){var 
H={},G={true:!0,false:!1,null:null};$.each(I.replace(/\+/g, 
).split(),function(L,Q){var 
K=Q.split(=),P=r(K[0]),J,O=H,M=0,R=P.split(][),N=R.length-1;if(/\[/.test(R[0])/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,);R=R.shift().split([).concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J!isNaN(J)?+J:J===undefined?i:G[J]!==i?G[J]:J}if(N){for(;M=N;M++){P=R[M]===?O.length:R[M];O=O[P]=MN?O[P]||(R[M+1]isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=Jelse{if(P){H[P]=F?i:}}});return
 H};function z(H,F,G){if(F===i||typeof 
F===boolean){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,):F}return 
l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return 
$.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:action,link:k,script:t});j=$[y];function
 s(I,G,H,F){if(!E(H)typeof H!==object){F=H;H=G;G=i}return 
this.each(function(){var L=$(this)
 
,J=G||j()[(this.nodeName||).toLowerCase()]||,K=JL.attr(J)||;L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)/^#/.test(I)F===i){F=2}var
 
H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?:#)};b.getState=u=function(F,G){return
 F===i||typeof F===boolean?v(F):v(G)[F]};b.removeState=function(F){var 
G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete 
G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var 
I=J[D]=c();J.getState=function(K,L){return K===i||typeof 
K===boolean?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return
 G}else{H=F.handler;F.handler=G}}})})(jQuery,this);
-/*
- * jQuery hashchange event - v1.2 - 2/11/2010
- * http://benalman.com/projects/jquery-hashchange-plugin/
- * 
- * Copyright (c) 2010 Cowboy Ben Alman
- * Dual licensed under the MIT and GPL licenses.
- * http://benalman.com/about/license/
- */
-(function($,i,b){var 
j,k=$.event.special,c=location,d=hashchange,l=href,f=$.browser,g=document.documentMode,h=f.msie(g===b||g8),e=on+d
 in i!h;function a(m){m=m||i[c][l];return 
m.replace(/^[^#]*#?(.*)$/,$1)}$[d+Delay]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return
 false}$(j.start)},teardown:function(){if(e){return 
false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function 
p(){o=q=function(s){return s};if(h){n=$('iframe 
src=javascript:0/').hide().insertAfter(body)[0].contentWindow;q=function(){return
 a(n.document[c][l])};o=function(u,s){if(u!==s){var 
t=n.document;t.open().close();t[c].hash=#+u}};o(a())}}m.start=function(){if(r){return}var
 t=a();o||p();(function s(){var 
v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,)+#+u}}r=setTimeout(s,$[d+Delay])})()};m.stop=function(){if(!n){rclearTimeout(r);r=0}};return
 m})()})(jQuery,this);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/db32eb92/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery.slideto.min.js
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery.slideto.min.js
 

[06/10] camel git commit: CAMEL-8066: Refactor project to avoid to include swagger-ui resources into src/main/webapp

2014-11-24 Thread cmoulliard
http://git-wip-us.apache.org/repos/asf/camel/blob/db32eb92/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery-1.8.0.min.js
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery-1.8.0.min.js
 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery-1.8.0.min.js
deleted file mode 100644
index f121291..000
--- 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery-1.8.0.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! jQuery v@1.8.0 jquery.com | jquery.org/license */
-(function(a,b){function G(a){var b=F[a]={};return 
p.each(a.split(s),function(a,c){b[c]=!0}),b}function 
J(a,c,d){if(d===ba.nodeType===1){var 
e=data-+c.replace(I,-$1).toLowerCase();d=a.getAttribute(e);if(typeof 
d==string){try{d=d===true?!0:d===false?!1:d===null?null:+d+===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else
 d=b}return d}function K(a){var b;for(b in 
a){if(b===datap.isEmptyObject(a[b]))continue;if(b!==toJSON)return!1}return!0}function
 ba(){return!1}function bb(){return!0}function 
bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do 
a=a[b];while(aa.nodeType!==1);return a}function 
bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var 
e=!!b.call(a,d,a);return e===c});if(b.nodeType)return 
p.grep(a,function(a,d){return a===b===c});if(typeof b==string){var 
d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return 
p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(
 a,b)=0===c})}function bk(a){var 
b=bl.split(|),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return
 c}function bC(a,b){return 
a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function
 bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var 
c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete 
g.handle,g.events={};for(c in 
h)for(d=0,e=h[c].length;de;d++)p.event.add(b,c,h[c][d])}g.data(g.data=p.extend({},g.data))}function
 bE(a,b){var 
c;if(b.nodeType!==1)return;b.clearAttributesb.clearAttributes(),b.mergeAttributesb.mergeAttributes(a),c=b.nodeName.toLowerCase(),c===object?(b.parentNode(b.outerHTML=a.outerHTML),p.support.html5Clonea.innerHTML!p.trim(b.innerHTML)(b.innerHTML=a.innerHTML)):c===inputbv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value(b.value=a.value)):c===option?b.selected=a.defaultSelected:c===input||c===textarea?b.defaultValue=a.defaultValue:c===scri
 ptb.text!==a.text(b.text=a.text),b.removeAttribute(p.expando)}function 
bF(a){return typeof 
a.getElementsByTagName!=undefined?a.getElementsByTagName(*):typeof 
a.querySelectorAll!=undefined?a.querySelectorAll(*):[]}function 
bG(a){bv.test(a.type)(a.defaultChecked=a.checked)}function bX(a,b){if(b in 
a)return b;var 
c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bV.length;while(e--){b=bV[e]+c;if(b
 in a)return b}return d}function bY(a,b){return 
a=b||a,p.css(a,display)===none||!p.contains(a.ownerDocument,a)}function 
bZ(a,b){var 
c,d,e=[],f=0,g=a.length;for(;fg;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,olddisplay),b?(!e[f]c.style.display===none(c.style.display=),c.style.display===bY(c)(e[f]=p._data(c,olddisplay,cb(c.nodeName:(d=bH(c,display),!e[f]d!==nonep._data(c,olddisplay,d))}for(f=0;fg;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display===none||c.style.display===)c.style.display=b?e[f]||:none}return
 a}function b$(a,b,c){
 var d=bO.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||px):b}function 
b_(a,b,c,d){var 
e=c===(d?border:content)?4:b===width?1:0,f=0;for(;e4;e+=2)c===margin(f+=p.css(a,c+bU[e],!0)),d?(c===content(f-=parseFloat(bH(a,padding+bU[e]))||0),c!==margin(f-=parseFloat(bH(a,border+bU[e]+Width))||0)):(f+=parseFloat(bH(a,padding+bU[e]))||0,c!==padding(f+=parseFloat(bH(a,border+bU[e]+Width))||0));return
 f}function ca(a,b,c){var 
d=b===width?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizingp.css(a,boxSizing)===border-box;if(d=0){d=bH(a,b);if(d0||d==null)d=a.style[b];if(bP.test(d))return
 d;e=f(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return 
d+b_(a,b,c||(f?border:content),e)+px}function cb(a){if(bR[a])return 
bR[a];var 
b=p(+a+).appendTo(e.body),c=b.css(display);b.remove();if(c===none||c===){bI=e.body.appendChild(bI||p.extend(e.createElement(iframe),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createEle
 ment)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write(!doctype 
htmlhtmlbody),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,display),e.body.removeChild(bI)}return
 bR[a]=c,c}function ch(a,b,c,d){var 
e;if(p.isArray(b))p.each(b,function(b,e){c||cd.test(a)?d(a,e):ch(a+[+(typeof 
e==object?b:)+],e,c,d)});else if(!cp.type(b)===object)for(e in 
b)ch(a+[+e+],b[e],c,d);else d(a,b)}function cy(a){return 
function(b,c){typeof b!=string(c=b,b=*);var 

[02/10] camel git commit: CAMEL-8066: Refactor project to avoid to include swagger-ui resources into src/main/webapp

2014-11-24 Thread cmoulliard
http://git-wip-us.apache.org/repos/asf/camel/blob/db32eb92/examples/camel-example-servlet-rest-tomcat/src/main/webapp/swagger-ui.js
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/swagger-ui.js 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/swagger-ui.js
deleted file mode 100644
index f2409ef..000
--- a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/swagger-ui.js
+++ /dev/null
@@ -1,2324 +0,0 @@
-// swagger-ui.js
-// version 2.0.23
-$(function() {
-
-   // Helper function for vertically aligning DOM elements
-   // http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/
-   $.fn.vAlign = function() {
-   return this.each(function(i){
-   var ah = $(this).height();
-   var ph = $(this).parent().height();
-   var mh = (ph - ah) / 2;
-   $(this).css('margin-top', mh);
-   });
-   };
-
-   $.fn.stretchFormtasticInputWidthToParent = function() {
-   return this.each(function(i){
-   var p_width = $(this).closest(form).innerWidth();
-   var p_padding = 
parseInt($(this).closest(form).css('padding-left') ,10) + 
parseInt($(this).closest(form).css('padding-right'), 10);
-   var this_padding = parseInt($(this).css('padding-left'), 10) + 
parseInt($(this).css('padding-right'), 10);
-   $(this).css('width', p_width - p_padding - this_padding);
-   });
-   };
-
-   $('form.formtastic li.string input, form.formtastic 
textarea').stretchFormtasticInputWidthToParent();
-
-   // Vertically center these paragraphs
-   // Parent may need a min-height for this to work..
-   $('ul.downplayed li div.content p').vAlign();
-
-   // When a sandbox form is submitted..
-   $(form.sandbox).submit(function(){
-
-   var error_free = true;
-
-   // Cycle through the forms required inputs
-   $(this).find(input.required).each(function() {
-
-   // Remove any existing error styles from the input
-   $(this).removeClass('error');
-
-   // Tack the error style on if the input is empty..
-   if ($(this).val() == '') {
-   $(this).addClass('error');
-   $(this).wiggle();
-   error_free = false;
-   }
-
-   });
-
-   return error_free;
-   });
-
-});
-
-function clippyCopiedCallback(a) {
-  $('#api_key_copied').fadeIn().delay(1000).fadeOut();
-
-  // var b = $(#clippy_tooltip_ + a);
-  // b.length != 0  (b.attr(title, copied!).trigger(tipsy.reload), 
setTimeout(function() {
-  //   b.attr(title, copy to clipboard)
-  // },
-  // 500))
-}
-
-// Logging function that accounts for browsers that don't have window.console
-log = function(){
-  log.history = log.history || [];
-  log.history.push(arguments);
-  if(this.console){
-console.log( Array.prototype.slice.call(arguments)[0] );
-  }
-};
-
-// Handle browsers that do console incorrectly (IE9 and below, see 
http://stackoverflow.com/a/5539378/7913)
-if (Function.prototype.bind  console  typeof console.log == object) {
-[
-  log,info,warn,error,assert,dir,clear,profile,profileEnd
-].forEach(function (method) {
-console[method] = this.bind(console[method], console);
-}, Function.prototype.call);
-}
-
-var Docs = {
-
-   shebang: function() {
-
-   // If shebang has an operation nickname in it..
-   // e.g. /docs/#!/words/get_search
-   var fragments = $.param.fragment().split('/');
-   fragments.shift(); // get rid of the bang
-
-   switch (fragments.length) {
-   case 1:
-   // Expand all operations for the resource and 
scroll to it
-   log('shebang resource:' + fragments[0]);
-   var dom_id = 'resource_' + fragments[0];
-
-   
Docs.expandEndpointListForResource(fragments[0]);
-   $(#+dom_id).slideto({highlight: false});
-   break;
-   case 2:
-   // Refer to the endpoint DOM element, e.g. 
#words_get_search
-   log('shebang endpoint: ' + fragments.join('_'));
-
-// Expand Resource
-Docs.expandEndpointListForResource(fragments[0]);
-$(#+dom_id).slideto({highlight: false});
-
-// Expand operation
-   var li_dom_id = fragments.join('_');
-   var li_content_dom_id = li_dom_id + _content;
-
-log(li_dom_id  + li_dom_id);
-log(li_content_dom_id  + li_content_dom_id);
-
-   

[01/10] camel git commit: CAMEL-8066: Refactor project to avoid to include swagger-ui resources into src/main/webapp

2014-11-24 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master ba8eb427c - db32eb92a


http://git-wip-us.apache.org/repos/asf/camel/blob/db32eb92/examples/camel-example-servlet-rest-tomcat/src/main/webapp/swagger-ui.min.js
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/swagger-ui.min.js 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/swagger-ui.min.js
deleted file mode 100644
index 2548153..000
--- 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/swagger-ui.min.js
+++ /dev/null
@@ -1 +0,0 @@
-$(function(){$.fn.vAlign=function(){return this.each(function(c){var 
a=$(this).height();var d=$(this).parent().height();var 
b=(d-a)/2;$(this).css(margin-top,b)})};$.fn.stretchFormtasticInputWidthToParent=function(){return
 this.each(function(b){var d=$(this).closest(form).innerWidth();var 
c=parseInt($(this).closest(form).css(padding-left),10)+parseInt($(this).closest(form).css(padding-right),10);var
 
a=parseInt($(this).css(padding-left),10)+parseInt($(this).css(padding-right),10);$(this).css(width,d-c-a)})};$(form.formtastic
 li.string input, form.formtastic 
textarea).stretchFormtasticInputWidthToParent();$(ul.downplayed li 
div.content p).vAlign();$(form.sandbox).submit(function(){var 
a=true;$(this).find(input.required).each(function(){$(this).removeClass(error);if($(this).val()==){$(this).addClass(error);$(this).wiggle();a=false}});return
 a})});function 
clippyCopiedCallback(b){$(#api_key_copied).fadeIn().delay(1000).fadeOut()}log=function(){log.histor
 
y=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments)[0])}};if(Function.prototype.bindconsoletypeof
 
console.log==object){[log,info,warn,error,assert,dir,clear,profile,profileEnd].forEach(function(a){console[a]=this.bind(console[a],console)},Function.prototype.call)}var
 Docs={shebang:function(){var 
b=$.param.fragment().split(/);b.shift();switch(b.length){case 1:log(shebang 
resource:+b[0]);var 
d=resource_+b[0];Docs.expandEndpointListForResource(b[0]);$(#+d).slideto({highlight:false});break;case
 2:log(shebang endpoint: 
+b.join(_));Docs.expandEndpointListForResource(b[0]);$(#+d).slideto({highlight:false});var
 c=b.join(_);var a=c+_content;log(li_dom_id +c);log(li_content_dom_id 
+a);Docs.expandOperation($(#+a));$(#+c).slideto({highlight:false});break}},toggleEndpointListForResource:function(b){var
 a=$(li#resource_+Docs.escapeResourceName(b)+ 
ul.endpoints);if(a.is(:visible)){D
 
ocs.collapseEndpointListForResource(b)}else{Docs.expandEndpointListForResource(b)}},expandEndpointListForResource:function(b){var
 b=Docs.escapeResourceName(b);if(b==){$(.resource 
ul.endpoints).slideDown();return}$(li#resource_+b).addClass(active);var 
a=$(li#resource_+b+ 
ul.endpoints);a.slideDown()},collapseEndpointListForResource:function(b){var 
b=Docs.escapeResourceName(b);$(li#resource_+b).removeClass(active);var 
a=$(li#resource_+b+ 
ul.endpoints);a.slideUp()},expandOperationsForResource:function(a){Docs.expandEndpointListForResource(a);if(a==){$(.resource
 ul.endpoints li.operation 
div.content).slideDown();return}$(li#resource_+Docs.escapeResourceName(a)+ 
li.operation 
div.content).each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(a){Docs.expandEndpointListForResource(a);$(li#resource_+Docs.escapeResourceName(a)+
 li.operation 
div.content).each(function(){Docs.collapseOperation($(this))})},escapeResourceName:functi
 on(a){return 
a.replace(/[!#$%'()*+,.\/:;=?@\[\\\]\^`{|}~]/g,\\$)},expandOperation:function(a){a.slideDown()},collapseOperation:function(a){a.slideUp()}};(function(){var
 
b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,=
 1.0.0];f=this.merge(f,g.helpers);j=j||{};var 
i=,c,h=function,m=this;function e(r,q){var o=,p;o+=\n  
;p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+=\n;return
 o}function d(r,q){var o=,p;o+='\n option value=';p=(typeof 
r===h?r.apply(r):r);if(p||p===0){o+=p}o+='';p=(typeof 
r===h?r.apply(r):r);if(p||p===0){o+=p}o+=/option\n;return 
o}function n(p,o){return'\n  option 
value=application/jsonapplication/json/option\n'}i+='label 
for=contentType/label\nselect 
name=contentType\n';c=f[if].call(l,l.produces,{hash:{},inverse:m.program(4,n,j),fn:m.program(1,e,j),data:j});if(c||c===0){i+=c}i+=\n/select
 \n;return i})})();(function(){var 
 b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.main=b(function(g,m,f,l,k){this.compilerInfo=[4,=
  1.0.0];f=this.merge(f,g.helpers);k=k||{};var 
 i=,c,h=function,j=this.escapeExpression,p=this;function e(v,u){var 
 r=,t,s;r+='\ndiv 
 class=info_title'+j(((t=((t=v.info),t==null||t===false?t:t.title)),typeof 
 t===h?t.apply(v):t))+'/div\ndiv 
 

[08/10] camel git commit: CAMEL-8066: Refactor project to avoid to include swagger-ui resources into src/main/webapp

2014-11-24 Thread cmoulliard
http://git-wip-us.apache.org/repos/asf/camel/blob/db32eb92/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/backbone-min.js
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/backbone-min.js
 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/backbone-min.js
deleted file mode 100644
index c1c0d4f..000
--- 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/backbone-min.js
+++ /dev/null
@@ -1,38 +0,0 @@
-// Backbone.js 0.9.2
-
-// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
-// Backbone may be freely distributed under the MIT license.
-// For all details and documentation:
-// http://backbonejs.org
-(function(){var 
l=this,y=l.Backbone,z=Array.prototype.slice,A=Array.prototype.splice,g;g=undefined!==typeof
 exports?exports:l.Backbone={};g.VERSION=0.9.2;var 
f=l._;!fundefined!==typeof require(f=require(underscore));var 
i=l.jQuery||l.Zepto||l.ender;g.setDomLibrary=function(a){i=a};g.noConflict=function(){l.Backbone=y;return
 this};g.emulateHTTP=!1;g.emulateJSON=!1;var 
p=/\s+/,k=g.Events={on:function(a,b,c){var d,e,f,g,j;if(!b)return 
this;a=a.split(p);for(d=this._callbacks||(this._callbacks=
-{});e=a.shift();)f=(j=d[e])?j.tail:{},f.next=g={},f.context=c,f.callback=b,d[e]={tail:g,next:j?j.next:f};return
 this},off:function(a,b,c){var 
d,e,h,g,j,q;if(e=this._callbacks){if(!a!b!c)return delete 
this._callbacks,this;for(a=a?a.split(p):f.keys(e);d=a.shift();)if(h=e[d],delete 
e[d],h(b||c))for(g=h.tail;(h=h.next)!==g;)if(j=h.callback,q=h.context,bj!==b||cq!==c)this.on(d,j,q);return
 this}},trigger:function(a){var b,c,d,e,f,g;if(!(d=this._callbacks))return 
this;f=d.all;a=a.split(p);for(g=
-z.call(arguments,1);b=a.shift();){if(c=d[b])for(e=c.tail;(c=c.next)!==e;)c.callback.apply(c.context||this,g);if(c=f){e=c.tail;for(b=[b].concat(g);(c=c.next)!==e;)c.callback.apply(c.context||this,b)}}return
 this}};k.bind=k.on;k.unbind=k.off;var o=g.Model=function(a,b){var 
c;a||(a={});bb.parse(a=this.parse(a));if(c=n(this,defaults))a=f.extend({},c,a);bb.collection(this.collection=b.collection);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId(c);this.changed={};this._silent=
-{};this._pending={};this.set(a,{silent:!0});this.changed={};this._silent={};this._pending={};this._previousAttributes=f.clone(this.attributes);this.initialize.apply(this,arguments)};f.extend(o.prototype,k,{changed:null,_silent:null,_pending:null,idAttribute:id,initialize:function(){},toJSON:function(){return
 f.clone(this.attributes)},get:function(a){return 
this.attributes[a]},escape:function(a){var 
b;if(b=this._escapedAttributes[a])return b;b=this.get(a);return 
this._escapedAttributes[a]=f.escape(null==
-b?:+b)},has:function(a){return null!=this.get(a)},set:function(a,b,c){var 
d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c||(c={});if(!d)return 
this;d instanceof o(d=d.attributes);if(c.unset)for(e in d)d[e]=void 
0;if(!this._validate(d,c))return!1;this.idAttribute in 
d(this.id=d[this.idAttribute]);var 
b=c.changes={},h=this.attributes,g=this._escapedAttributes,j=this._previousAttributes||{};for(e
 in d){a=d[e];if(!f.isEqual(h[e],a)||c.unsetf.has(h,e))delete 
g[e],(c.silent?this._silent:
-b)[e]=!0;c.unset?delete 
h[e]:h[e]=a;!f.isEqual(j[e],a)||f.has(h,e)!=f.has(j,e)?(this.changed[e]=a,c.silent||(this._pending[e]=!0)):(delete
 this.changed[e],delete this._pending[e])}c.silent||this.change(c);return 
this},unset:function(a,b){(b||(b={})).unset=!0;return 
this.set(a,null,b)},clear:function(a){(a||(a={})).unset=!0;return 
this.set(f.clone(this.attributes),a)},fetch:function(a){var 
a=a?f.clone(a):{},b=this,c=a.success;a.success=function(d,e,f){if(!b.set(b.parse(d,f),a))return!1;cc(b,d)};
-a.error=g.wrapError(a.error,b,a);return(this.sync||g.sync).call(this,read,this,a)},save:function(a,b,c){var
 
d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c=c?f.clone(c):{};if(c.wait){if(!this._validate(d,c))return!1;e=f.clone(this.attributes)}a=f.extend({},c,{silent:!0});if(d!this.set(d,c.wait?a:c))return!1;var
 h=this,i=c.success;c.success=function(a,b,e){b=h.parse(a,e);if(c.wait){delete 
c.wait;b=f.extend(d||{},b)}if(!h.set(b,c))return 
false;i?i(h,a):h.trigger(sync,h,a,c)};c.error=g.wrapError(c.error,
-h,c);b=this.isNew()?create:update;b=(this.sync||g.sync).call(this,b,this,c);c.waitthis.set(e,a);return
 b},destroy:function(a){var 
a=a?f.clone(a):{},b=this,c=a.success,d=function(){b.trigger(destroy,b,b.collection,a)};if(this.isNew())return
 
d(),!1;a.success=function(e){a.waitd();c?c(b,e):b.trigger(sync,b,e,a)};a.error=g.wrapError(a.error,b,a);var
 e=(this.sync||g.sync).call(this,delete,this,a);a.wait||d();return 
e},url:function(){var a=n(this,urlRoot)||n(this.collection,url)||t();
-return 
this.isNew()?a:a+(/==a.charAt(a.length-1)?:/)+encodeURIComponent(this.id)},parse:function(a){return
 a},clone:function(){return new 
this.constructor(this.attributes)},isNew:function(){return 

[04/12] camel git commit: CAMEL-8066: Add swagger ui

2014-11-21 Thread cmoulliard
http://git-wip-us.apache.org/repos/asf/camel/blob/bf077620/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/shred.bundle.js
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/shred.bundle.js
 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/shred.bundle.js
new file mode 100644
index 000..74d0816
--- /dev/null
+++ 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/shred.bundle.js
@@ -0,0 +1,2765 @@
+var require = function (file, cwd) {
+var resolved = require.resolve(file, cwd || '/');
+var mod = require.modules[resolved];
+if (!mod) throw new Error(
+'Failed to resolve module ' + file + ', tried ' + resolved
+);
+var res = mod._cached ? mod._cached : mod();
+return res;
+}
+
+require.paths = [];
+require.modules = {};
+require.extensions = [.js,.coffee];
+
+require._core = {
+'assert': true,
+'events': true,
+'fs': true,
+'path': true,
+'vm': true
+};
+
+require.resolve = (function () {
+return function (x, cwd) {
+if (!cwd) cwd = '/';
+
+if (require._core[x]) return x;
+var path = require.modules.path();
+var y = cwd || '.';
+
+if (x.match(/^(?:\.\.?\/|\/)/)) {
+var m = loadAsFileSync(path.resolve(y, x))
+|| loadAsDirectorySync(path.resolve(y, x));
+if (m) return m;
+}
+
+var n = loadNodeModulesSync(x, y);
+if (n) return n;
+
+throw new Error(Cannot find module ' + x + ');
+
+function loadAsFileSync (x) {
+if (require.modules[x]) {
+return x;
+}
+
+for (var i = 0; i  require.extensions.length; i++) {
+var ext = require.extensions[i];
+if (require.modules[x + ext]) return x + ext;
+}
+}
+
+function loadAsDirectorySync (x) {
+x = x.replace(/\/+$/, '');
+var pkgfile = x + '/package.json';
+if (require.modules[pkgfile]) {
+var pkg = require.modules[pkgfile]();
+var b = pkg.browserify;
+if (typeof b === 'object'  b.main) {
+var m = loadAsFileSync(path.resolve(x, b.main));
+if (m) return m;
+}
+else if (typeof b === 'string') {
+var m = loadAsFileSync(path.resolve(x, b));
+if (m) return m;
+}
+else if (pkg.main) {
+var m = loadAsFileSync(path.resolve(x, pkg.main));
+if (m) return m;
+}
+}
+
+return loadAsFileSync(x + '/index');
+}
+
+function loadNodeModulesSync (x, start) {
+var dirs = nodeModulesPathsSync(start);
+for (var i = 0; i  dirs.length; i++) {
+var dir = dirs[i];
+var m = loadAsFileSync(dir + '/' + x);
+if (m) return m;
+var n = loadAsDirectorySync(dir + '/' + x);
+if (n) return n;
+}
+
+var m = loadAsFileSync(x);
+if (m) return m;
+}
+
+function nodeModulesPathsSync (start) {
+var parts;
+if (start === '/') parts = [ '' ];
+else parts = path.normalize(start).split('/');
+
+var dirs = [];
+for (var i = parts.length - 1; i = 0; i--) {
+if (parts[i] === 'node_modules') continue;
+var dir = parts.slice(0, i + 1).join('/') + '/node_modules';
+dirs.push(dir);
+}
+
+return dirs;
+}
+};
+})();
+
+require.alias = function (from, to) {
+var path = require.modules.path();
+var res = null;
+try {
+res = require.resolve(from + '/package.json', '/');
+}
+catch (err) {
+res = require.resolve(from, '/');
+}
+var basedir = path.dirname(res);
+
+var keys = (Object.keys || function (obj) {
+var res = [];
+for (var key in obj) res.push(key)
+return res;
+})(require.modules);
+
+for (var i = 0; i  keys.length; i++) {
+var key = keys[i];
+if (key.slice(0, basedir.length + 1) === basedir + '/') {
+var f = key.slice(basedir.length);
+require.modules[to + f] = require.modules[basedir + f];
+}
+else if (key === basedir) {
+require.modules[to] = require.modules[basedir];
+}
+}
+};
+
+require.define = function (filename, fn) {
+var dirname = require._core[filename]
+? ''
+: require.modules.path().dirname(filename)
+;
+
+var require_ = function (file) {
+return 

[09/12] camel git commit: CAMEL-8066: Add swagger ui

2014-11-21 Thread cmoulliard
CAMEL-8066: Add swagger ui


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

Branch: refs/heads/master
Commit: bf07762000c671320fa26c0713aef68b6b60c656
Parents: 4857480
Author: Charles Moulliard cmoulli...@apache.org
Authored: Fri Nov 21 10:19:30 2014 +0100
Committer: Charles Moulliard cmoulli...@apache.org
Committed: Fri Nov 21 10:19:30 2014 +0100

--
 .../src/main/webapp/css/pure-min.css|   11 +
 .../src/main/webapp/css/reset.css   |  125 +
 .../src/main/webapp/css/screen.css  | 1224 
 .../src/main/webapp/images/explorer_icons.png   |  Bin 0 - 5763 bytes
 .../src/main/webapp/images/logo_small.png   |  Bin 0 - 770 bytes
 .../src/main/webapp/images/pet_store_api.png|  Bin 0 - 824 bytes
 .../src/main/webapp/images/throbber.gif |  Bin 0 - 9257 bytes
 .../src/main/webapp/images/wordnik_api.png  |  Bin 0 - 980 bytes
 .../src/main/webapp/index.html  |  101 +-
 .../src/main/webapp/lib/backbone-min.js |   38 +
 .../src/main/webapp/lib/handlebars-1.0.0.js | 2278 +++
 .../src/main/webapp/lib/highlight.7.3.pack.js   |1 +
 .../src/main/webapp/lib/jquery-1.8.0.min.js |2 +
 .../src/main/webapp/lib/jquery.ba-bbq.min.js|   18 +
 .../src/main/webapp/lib/jquery.slideto.min.js   |1 +
 .../src/main/webapp/lib/jquery.wiggle.min.js|8 +
 .../src/main/webapp/lib/shred.bundle.js | 2765 ++
 .../src/main/webapp/lib/shred/content.js|  193 ++
 .../src/main/webapp/lib/swagger-oauth.js|  211 ++
 .../src/main/webapp/lib/swagger.js  | 1653 +++
 .../src/main/webapp/lib/underscore-min.js   |   32 +
 .../src/main/webapp/o2c.html|   15 +
 .../src/main/webapp/swagger-ui.js   | 2324 +++
 .../src/main/webapp/swagger-ui.min.js   |1 +
 .../src/main/webapp/swagger.html|   88 +
 25 files changed, 11047 insertions(+), 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/bf077620/examples/camel-example-servlet-rest-tomcat/src/main/webapp/css/pure-min.css
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/css/pure-min.css 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/css/pure-min.css
new file mode 100755
index 000..14497d9
--- /dev/null
+++ 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/css/pure-min.css
@@ -0,0 +1,11 @@
+/*!
+Pure v0.5.0
+Copyright 2014 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+https://github.com/yui/pure/blob/master/LICENSE.md
+*/
+/*!
+normalize.css v1.1.3 | MIT License | git.io/normalize
+Copyright (c) Nicolas Gallagher and Jonathan Neal
+*/
+/*! normalize.css v1.1.3 | MIT License | git.io/normalize 
*/article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}html,button,input,select,textarea{font-family:sans-serif}body{margin:0}a:focus{outline:thin
 dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 
0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em;margin:1em 
0}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 
0}h6{font-size:.67em;margin:2.33em 0}abbr[title]{border-bottom:1px 
dotted}b,strong{font-weight:700}blockquote{margin:1em 
40px}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}p,pre{margin:1em
 0}code,kbd,pre,samp{font-family:monospace,serif;_font-family:'courier 
new',monos
 
pace;font-size:1em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:before,q:after{content:'';content:none}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,menu,ol,ul{margin:1em
 0}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ul,nav 
ol{list-style:none;list-style-image:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure{margin:0}form{margin:0}fieldset{border:1px
 solid silver;margin:0 2px;padding:.35em .625em 
.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,select{text-transform:none}button,html
 

[01/12] camel git commit: CAMEL-8066: Add swagger ui

2014-11-21 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master 18f5bf453 - 3d50c8539


http://git-wip-us.apache.org/repos/asf/camel/blob/bf077620/examples/camel-example-servlet-rest-tomcat/src/main/webapp/swagger-ui.min.js
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/swagger-ui.min.js 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/swagger-ui.min.js
new file mode 100644
index 000..2548153
--- /dev/null
+++ 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/swagger-ui.min.js
@@ -0,0 +1 @@
+$(function(){$.fn.vAlign=function(){return this.each(function(c){var 
a=$(this).height();var d=$(this).parent().height();var 
b=(d-a)/2;$(this).css(margin-top,b)})};$.fn.stretchFormtasticInputWidthToParent=function(){return
 this.each(function(b){var d=$(this).closest(form).innerWidth();var 
c=parseInt($(this).closest(form).css(padding-left),10)+parseInt($(this).closest(form).css(padding-right),10);var
 
a=parseInt($(this).css(padding-left),10)+parseInt($(this).css(padding-right),10);$(this).css(width,d-c-a)})};$(form.formtastic
 li.string input, form.formtastic 
textarea).stretchFormtasticInputWidthToParent();$(ul.downplayed li 
div.content p).vAlign();$(form.sandbox).submit(function(){var 
a=true;$(this).find(input.required).each(function(){$(this).removeClass(error);if($(this).val()==){$(this).addClass(error);$(this).wiggle();a=false}});return
 a})});function 
clippyCopiedCallback(b){$(#api_key_copied).fadeIn().delay(1000).fadeOut()}log=function(){log.histor
 
y=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments)[0])}};if(Function.prototype.bindconsoletypeof
 
console.log==object){[log,info,warn,error,assert,dir,clear,profile,profileEnd].forEach(function(a){console[a]=this.bind(console[a],console)},Function.prototype.call)}var
 Docs={shebang:function(){var 
b=$.param.fragment().split(/);b.shift();switch(b.length){case 1:log(shebang 
resource:+b[0]);var 
d=resource_+b[0];Docs.expandEndpointListForResource(b[0]);$(#+d).slideto({highlight:false});break;case
 2:log(shebang endpoint: 
+b.join(_));Docs.expandEndpointListForResource(b[0]);$(#+d).slideto({highlight:false});var
 c=b.join(_);var a=c+_content;log(li_dom_id +c);log(li_content_dom_id 
+a);Docs.expandOperation($(#+a));$(#+c).slideto({highlight:false});break}},toggleEndpointListForResource:function(b){var
 a=$(li#resource_+Docs.escapeResourceName(b)+ 
ul.endpoints);if(a.is(:visible)){D
 
ocs.collapseEndpointListForResource(b)}else{Docs.expandEndpointListForResource(b)}},expandEndpointListForResource:function(b){var
 b=Docs.escapeResourceName(b);if(b==){$(.resource 
ul.endpoints).slideDown();return}$(li#resource_+b).addClass(active);var 
a=$(li#resource_+b+ 
ul.endpoints);a.slideDown()},collapseEndpointListForResource:function(b){var 
b=Docs.escapeResourceName(b);$(li#resource_+b).removeClass(active);var 
a=$(li#resource_+b+ 
ul.endpoints);a.slideUp()},expandOperationsForResource:function(a){Docs.expandEndpointListForResource(a);if(a==){$(.resource
 ul.endpoints li.operation 
div.content).slideDown();return}$(li#resource_+Docs.escapeResourceName(a)+ 
li.operation 
div.content).each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(a){Docs.expandEndpointListForResource(a);$(li#resource_+Docs.escapeResourceName(a)+
 li.operation 
div.content).each(function(){Docs.collapseOperation($(this))})},escapeResourceName:functi
 on(a){return 
a.replace(/[!#$%'()*+,.\/:;=?@\[\\\]\^`{|}~]/g,\\$)},expandOperation:function(a){a.slideDown()},collapseOperation:function(a){a.slideUp()}};(function(){var
 
b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.content_type=b(function(g,l,f,k,j){this.compilerInfo=[4,=
 1.0.0];f=this.merge(f,g.helpers);j=j||{};var 
i=,c,h=function,m=this;function e(r,q){var o=,p;o+=\n  
;p=f.each.call(r,r.produces,{hash:{},inverse:m.noop,fn:m.program(2,d,q),data:q});if(p||p===0){o+=p}o+=\n;return
 o}function d(r,q){var o=,p;o+='\n option value=';p=(typeof 
r===h?r.apply(r):r);if(p||p===0){o+=p}o+='';p=(typeof 
r===h?r.apply(r):r);if(p||p===0){o+=p}o+=/option\n;return 
o}function n(p,o){return'\n  option 
value=application/jsonapplication/json/option\n'}i+='label 
for=contentType/label\nselect 
name=contentType\n';c=f[if].call(l,l.produces,{hash:{},inverse:m.program(4,n,j),fn:m.program(1,e,j),data:j});if(c||c===0){i+=c}i+=\n/select
 \n;return i})})();(function(){var 
 b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.main=b(function(g,m,f,l,k){this.compilerInfo=[4,=
  1.0.0];f=this.merge(f,g.helpers);k=k||{};var 
 i=,c,h=function,j=this.escapeExpression,p=this;function e(v,u){var 
 r=,t,s;r+='\ndiv 
 class=info_title'+j(((t=((t=v.info),t==null||t===false?t:t.title)),typeof 
 t===h?t.apply(v):t))+'/div\ndiv 
 class=info_description';s=((t=((t=v.info),t==null||t===false?t:t.description)),typeof
  

[03/12] camel git commit: CAMEL-8066: Add swagger ui

2014-11-21 Thread cmoulliard
http://git-wip-us.apache.org/repos/asf/camel/blob/bf077620/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/shred/content.js
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/shred/content.js
 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/shred/content.js
new file mode 100644
index 000..b8051fe
--- /dev/null
+++ 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/shred/content.js
@@ -0,0 +1,193 @@
+
+// The purpose of the `Content` object is to abstract away the data conversions
+// to and from raw content entities as strings. For example, you want to be 
able
+// to pass in a Javascript object and have it be automatically converted into a
+// JSON string if the `content-type` is set to a JSON-based media type.
+// Conversely, you want to be able to transparently get back a Javascript 
object
+// in the response if the `content-type` is a JSON-based media-type.
+
+// One limitation of the current implementation is that it [assumes the 
`charset` is UTF-8](https://github.com/spire-io/shred/issues/5).
+
+// The `Content` constructor takes an options object, which *must* have either 
a
+// `body` or `data` property and *may* have a `type` property indicating the
+// media type. If there is no `type` attribute, a default will be inferred.
+var Content = function(options) {
+  this.body = options.body;
+  this.data = options.data;
+  this.type = options.type;
+};
+
+Content.prototype = {
+  // Treat `toString()` as asking for the `content.body`. That is, the raw 
content entity.
+  //
+  // toString: function() { return this.body; }
+  //
+  // Commented out, but I've forgotten why. :/
+};
+
+
+// `Content` objects have the following attributes:
+Object.defineProperties(Content.prototype,{
+  
+// - **type**. Typically accessed as `content.type`, reflects the 
`content-type`
+//   header associated with the request or response. If not passed as an 
options
+//   to the constructor or set explicitly, it will infer the type the `data`
+//   attribute, if possible, and, failing that, will default to `text/plain`.
+  type: {
+get: function() {
+  if (this._type) {
+return this._type;
+  } else {
+if (this._data) {
+  switch(typeof this._data) {
+case string: return text/plain;
+case object: return application/json;
+  }
+}
+  }
+  return text/plain;
+},
+set: function(value) {
+  this._type = value;
+  return this;
+},
+enumerable: true
+  },
+
+// - **data**. Typically accessed as `content.data`, reflects the content 
entity
+//   converted into Javascript data. This can be a string, if the `type` is, 
say,
+//   `text/plain`, but can also be a Javascript object. The conversion applied 
is
+//   based on the `processor` attribute. The `data` attribute can also be set
+//   directly, in which case the conversion will be done the other way, to 
infer
+//   the `body` attribute.
+  data: {
+get: function() {
+  if (this._body) {
+return this.processor.parser(this._body);
+  } else {
+return this._data;
+  }
+},
+set: function(data) {
+  if (this._bodydata) Errors.setDataWithBody(this);
+  this._data = data;
+  return this;
+},
+enumerable: true
+  },
+
+// - **body**. Typically accessed as `content.body`, reflects the content 
entity
+//   as a UTF-8 string. It is the mirror of the `data` attribute. If you set 
the
+//   `data` attribute, the `body` attribute will be inferred and vice-versa. If
+//   you attempt to set both, an exception is raised.
+  body: {
+get: function() {
+  if (this._data) {
+return this.processor.stringify(this._data);
+  } else {
+return this._body.toString();
+  }
+},
+set: function(body) {
+  if (this._databody) Errors.setBodyWithData(this);
+  this._body = body;
+  return this;
+},
+enumerable: true
+  },
+
+// - **processor**. The functions that will be used to convert to/from `data` 
and
+//   `body` attributes. You can add processors. The two that are built-in are 
for
+//   `text/plain`, which is basically an identity transformation and
+//   `application/json` and other JSON-based media types (including custom 
media
+//   types with `+json`). You can add your own processors. See below.
+  processor: {
+get: function() {
+  var processor = Content.processors[this.type];
+  if (processor) {
+return processor;
+  } else {
+// Return the first processor that matches any part of the
+// content type. ex: application/vnd.foobar.baz+json will match json.
+var main = this.type.split(;)[0];
+var parts = main.split(/\+|\//);
+for (var i=0, l=parts.length; i  l; i++) {
+  processor = Content.processors[parts[i]]
+}
+return 

[06/12] camel git commit: CAMEL-8066: Add swagger ui

2014-11-21 Thread cmoulliard
http://git-wip-us.apache.org/repos/asf/camel/blob/bf077620/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery-1.8.0.min.js
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery-1.8.0.min.js
 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery-1.8.0.min.js
new file mode 100644
index 000..f121291
--- /dev/null
+++ 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery-1.8.0.min.js
@@ -0,0 +1,2 @@
+/*! jQuery v@1.8.0 jquery.com | jquery.org/license */
+(function(a,b){function G(a){var b=F[a]={};return 
p.each(a.split(s),function(a,c){b[c]=!0}),b}function 
J(a,c,d){if(d===ba.nodeType===1){var 
e=data-+c.replace(I,-$1).toLowerCase();d=a.getAttribute(e);if(typeof 
d==string){try{d=d===true?!0:d===false?!1:d===null?null:+d+===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else
 d=b}return d}function K(a){var b;for(b in 
a){if(b===datap.isEmptyObject(a[b]))continue;if(b!==toJSON)return!1}return!0}function
 ba(){return!1}function bb(){return!0}function 
bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do 
a=a[b];while(aa.nodeType!==1);return a}function 
bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var 
e=!!b.call(a,d,a);return e===c});if(b.nodeType)return 
p.grep(a,function(a,d){return a===b===c});if(typeof b==string){var 
d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return 
p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(
 a,b)=0===c})}function bk(a){var 
b=bl.split(|),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return
 c}function bC(a,b){return 
a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function
 bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var 
c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete 
g.handle,g.events={};for(c in 
h)for(d=0,e=h[c].length;de;d++)p.event.add(b,c,h[c][d])}g.data(g.data=p.extend({},g.data))}function
 bE(a,b){var 
c;if(b.nodeType!==1)return;b.clearAttributesb.clearAttributes(),b.mergeAttributesb.mergeAttributes(a),c=b.nodeName.toLowerCase(),c===object?(b.parentNode(b.outerHTML=a.outerHTML),p.support.html5Clonea.innerHTML!p.trim(b.innerHTML)(b.innerHTML=a.innerHTML)):c===inputbv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value(b.value=a.value)):c===option?b.selected=a.defaultSelected:c===input||c===textarea?b.defaultValue=a.defaultValue:c===scri
 ptb.text!==a.text(b.text=a.text),b.removeAttribute(p.expando)}function 
bF(a){return typeof 
a.getElementsByTagName!=undefined?a.getElementsByTagName(*):typeof 
a.querySelectorAll!=undefined?a.querySelectorAll(*):[]}function 
bG(a){bv.test(a.type)(a.defaultChecked=a.checked)}function bX(a,b){if(b in 
a)return b;var 
c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bV.length;while(e--){b=bV[e]+c;if(b
 in a)return b}return d}function bY(a,b){return 
a=b||a,p.css(a,display)===none||!p.contains(a.ownerDocument,a)}function 
bZ(a,b){var 
c,d,e=[],f=0,g=a.length;for(;fg;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,olddisplay),b?(!e[f]c.style.display===none(c.style.display=),c.style.display===bY(c)(e[f]=p._data(c,olddisplay,cb(c.nodeName:(d=bH(c,display),!e[f]d!==nonep._data(c,olddisplay,d))}for(f=0;fg;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display===none||c.style.display===)c.style.display=b?e[f]||:none}return
 a}function b$(a,b,c){
 var d=bO.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||px):b}function 
b_(a,b,c,d){var 
e=c===(d?border:content)?4:b===width?1:0,f=0;for(;e4;e+=2)c===margin(f+=p.css(a,c+bU[e],!0)),d?(c===content(f-=parseFloat(bH(a,padding+bU[e]))||0),c!==margin(f-=parseFloat(bH(a,border+bU[e]+Width))||0)):(f+=parseFloat(bH(a,padding+bU[e]))||0,c!==padding(f+=parseFloat(bH(a,border+bU[e]+Width))||0));return
 f}function ca(a,b,c){var 
d=b===width?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizingp.css(a,boxSizing)===border-box;if(d=0){d=bH(a,b);if(d0||d==null)d=a.style[b];if(bP.test(d))return
 d;e=f(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return 
d+b_(a,b,c||(f?border:content),e)+px}function cb(a){if(bR[a])return 
bR[a];var 
b=p(+a+).appendTo(e.body),c=b.css(display);b.remove();if(c===none||c===){bI=e.body.appendChild(bI||p.extend(e.createElement(iframe),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createEle
 ment)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write(!doctype 
htmlhtmlbody),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,display),e.body.removeChild(bI)}return
 bR[a]=c,c}function ch(a,b,c,d){var 
e;if(p.isArray(b))p.each(b,function(b,e){c||cd.test(a)?d(a,e):ch(a+[+(typeof 
e==object?b:)+],e,c,d)});else if(!cp.type(b)===object)for(e in 
b)ch(a+[+e+],b[e],c,d);else d(a,b)}function cy(a){return 
function(b,c){typeof b!=string(c=b,b=*);var 

[05/12] camel git commit: CAMEL-8066: Add swagger ui

2014-11-21 Thread cmoulliard
http://git-wip-us.apache.org/repos/asf/camel/blob/bf077620/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery.ba-bbq.min.js
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery.ba-bbq.min.js
 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery.ba-bbq.min.js
new file mode 100644
index 000..bcbf248
--- /dev/null
+++ 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery.ba-bbq.min.js
@@ -0,0 +1,18 @@
+/*
+ * jQuery BBQ: Back Button  Query Library - v1.2.1 - 2/17/2010
+ * http://benalman.com/projects/jquery-bbq-plugin/
+ * 
+ * Copyright (c) 2010 Cowboy Ben Alman
+ * Dual licensed under the MIT and GPL licenses.
+ * http://benalman.com/about/license/
+ */
+(function($,p){var 
i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d=hashchange,A=querystring,D=fragment,y=elemUrlAttr,g=location,k=href,t=src,x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function
 E(F){return typeof F===string}function B(G){var F=m.call(arguments,1);return 
function(){return G.apply(this,F.concat(m.call(arguments)))}}function 
n(F){return F.replace(/^[^#]*#?(.*)$/,$1)}function o(F){return 
F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,$1)}function f(H,M,F,I,G){var 
O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||;if(G===2E(I)){L=I.replace(H?w:x,)}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?#:L||!K[1]??:)+L+J}else{O=M(F!==i?F:p[g][k])}return
 O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||;var 
F=$.map(G.split(),encodeURIComponent);h=new RegExp(F.join(|),g)};c.no
 Escape(,/);$.deparam=l=function(I,F){var 
H={},G={true:!0,false:!1,null:null};$.each(I.replace(/\+/g, 
).split(),function(L,Q){var 
K=Q.split(=),P=r(K[0]),J,O=H,M=0,R=P.split(][),N=R.length-1;if(/\[/.test(R[0])/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,);R=R.shift().split([).concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J!isNaN(J)?+J:J===undefined?i:G[J]!==i?G[J]:J}if(N){for(;M=N;M++){P=R[M]===?O.length:R[M];O=O[P]=MN?O[P]||(R[M+1]isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=Jelse{if(P){H[P]=F?i:}}});return
 H};function z(H,F,G){if(F===i||typeof 
F===boolean){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,):F}return 
l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return 
$.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:action,link:k,script:t});j=$[y];function
 s(I,G,H,F){if(!E(H)typeof H!==object){F=H;H=G;G=i}return 
this.each(function(){var L=$(this)
 
,J=G||j()[(this.nodeName||).toLowerCase()]||,K=JL.attr(J)||;L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)/^#/.test(I)F===i){F=2}var
 
H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?:#)};b.getState=u=function(F,G){return
 F===i||typeof F===boolean?v(F):v(G)[F]};b.removeState=function(F){var 
G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete 
G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var 
I=J[D]=c();J.getState=function(K,L){return K===i||typeof 
K===boolean?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return
 G}else{H=F.handler;F.handler=G}}})})(jQuery,this);
+/*
+ * jQuery hashchange event - v1.2 - 2/11/2010
+ * http://benalman.com/projects/jquery-hashchange-plugin/
+ * 
+ * Copyright (c) 2010 Cowboy Ben Alman
+ * Dual licensed under the MIT and GPL licenses.
+ * http://benalman.com/about/license/
+ */
+(function($,i,b){var 
j,k=$.event.special,c=location,d=hashchange,l=href,f=$.browser,g=document.documentMode,h=f.msie(g===b||g8),e=on+d
 in i!h;function a(m){m=m||i[c][l];return 
m.replace(/^[^#]*#?(.*)$/,$1)}$[d+Delay]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return
 false}$(j.start)},teardown:function(){if(e){return 
false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function 
p(){o=q=function(s){return s};if(h){n=$('iframe 
src=javascript:0/').hide().insertAfter(body)[0].contentWindow;q=function(){return
 a(n.document[c][l])};o=function(u,s){if(u!==s){var 
t=n.document;t.open().close();t[c].hash=#+u}};o(a())}}m.start=function(){if(r){return}var
 t=a();o||p();(function s(){var 
v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,)+#+u}}r=setTimeout(s,$[d+Delay])})()};m.stop=function(){if(!n){rclearTimeout(r);r=0}};return
 m})()})(jQuery,this);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/bf077620/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery.slideto.min.js
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/jquery.slideto.min.js
 

[11/12] camel git commit: Use foundation css instead of pure.css

2014-11-21 Thread cmoulliard
http://git-wip-us.apache.org/repos/asf/camel/blob/3d50c853/examples/camel-example-servlet-rest-tomcat/src/main/webapp/js/vendor/modernizr.js
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/js/vendor/modernizr.js
 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/js/vendor/modernizr.js
new file mode 100644
index 000..54dbd54
--- /dev/null
+++ 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/js/vendor/modernizr.js
@@ -0,0 +1,8 @@
+/*!
+ * Modernizr v2.8.3
+ * www.modernizr.com
+ *
+ * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton
+ * Available under the BSD and MIT licenses: www.modernizr.com/license/
+ */
+window.Modernizr=function(a,b,c){function d(a){t.cssText=a}function 
e(a,b){return d(x.join(a+;)+(b||))}function f(a,b){return typeof 
a===b}function g(a,b){return!!~(+a).indexOf(b)}function h(a,b){for(var d in 
a){var e=a[d];if(!g(e,-)t[e]!==c)returnpfx==b?e:!0}return!1}function 
i(a,b,d){for(var e in a){var g=b[a[e]];if(g!==c)return 
d===!1?a[e]:f(g,function)?g.bind(d||b):g}return!1}function j(a,b,c){var 
d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+ +z.join(d+ )+d).split( 
);return f(b,string)||f(b,undefined)?h(e,b):(e=(a+ +A.join(d+ 
)+d).split( ),i(e,b,c))}function k(){o.input=function(c){for(var 
d=0,e=c.length;ed;d++)E[c[d]]=!!(c[d]in u);return 
E.list(E.list=!(!b.createElement(datalist)||!a.HTMLDataListElement)),E}(autocomplete
 autofocus list placeholder max min multiple pattern required step.split( 
)),o.inputtypes=function(a){for(var 
d,e,f,g=0,h=a.length;hg;g++)u.setAttribute(type,e=a[g]),d=text!==u.type,d(u.value=v,u.style.cssText=positi
 
on:absolute;visibility:hidden;,/^range$/.test(e)u.style.WebkitAppearance!==c?(q.appendChild(u),f=b.defaultView,d=f.getComputedStyletextfield!==f.getComputedStyle(u,null).WebkitAppearance0!==u.offsetHeight,q.removeChild(u)):/^(search|tel)$/.test(e)||(d=/^(url|email)$/.test(e)?u.checkValidityu.checkValidity()===!1:u.value!=v)),D[a[g]]=!!d;return
 D}(search tel url email datetime date month week time datetime-local number 
range color.split( ))}var 
l,m,n=2.8.3,o={},p=!0,q=b.documentElement,r=modernizr,s=b.createElement(r),t=s.style,u=b.createElement(input),v=:),w={}.toString,x=
 -webkit- -moz- -o- -ms- .split( ),y=Webkit Moz O ms,z=y.split( 
),A=y.toLowerCase().split( 
),B={svg:http://www.w3.org/2000/svg},C={},D={},E={},F=[],G=F.slice,H=function(a,c,d,e){var
 
f,g,h,i,j=b.createElement(div),k=b.body,l=k||b.createElement(body);if(parseInt(d,10))for(;d--;)h=b.createElement(div),h.id=e?e[d]:r+(d+1),j.appendChild(h);return
 f=[#173;,'style id=s',r,''
 
,a,/style].join(),j.id=r,(k?j:l).innerHTML+=f,l.appendChild(j),k||(l.style.background=,l.style.overflow=hidden,i=q.style.overflow,q.style.overflow=hidden,q.appendChild(l)),g=c(j,a),k?j.parentNode.removeChild(j):(l.parentNode.removeChild(l),q.style.overflow=i),!!g},I=function(b){var
 c=a.matchMedia||a.msMatchMedia;if(c)return c(b)c(b).matches||!1;var d;return 
H(@media +b+ { #+r+ { position: absolute; } 
},function(b){d=absolute==(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).position}),d},J=function(){function
 a(a,e){e=e||b.createElement(d[a]||div),a=on+a;var g=a in e;return 
g||(e.setAttribute||(e=b.createElement(div)),e.setAttributee.removeAttribute(e.setAttribute(a,),g=f(e[a],function),f(e[a],undefined)||(e[a]=c),e.removeAttribute(a))),e=null,g}var
 
d={select:input,change:input,submit:form,reset:form,error:img,load:img,abort:img};return
 
a}(),K={}.hasOwnProperty;m=f(K,undefined)||f(K.call,undefined)?function(a,b){ret
 urn b in af(a.constructor.prototype[b],undefined)}:function(a,b){return 
K.call(a,b)},Function.prototype.bind||(Function.prototype.bind=function(a){var 
b=this;if(function!=typeof b)throw new TypeError;var 
c=G.call(arguments,1),d=function(){if(this instanceof d){var 
e=function(){};e.prototype=b.prototype;var f=new 
e,g=b.apply(f,c.concat(G.call(arguments)));return Object(g)===g?g:f}return 
b.apply(a,c.concat(G.call(arguments)))};return d}),C.flexbox=function(){return 
j(flexWrap)},C.flexboxlegacy=function(){return 
j(boxDirection)},C.canvas=function(){var 
a=b.createElement(canvas);return!(!a.getContext||!a.getContext(2d))},C.canvastext=function(){return!(!o.canvas||!f(b.createElement(canvas).getContext(2d).fillText,function))},C.webgl=function(){return!!a.WebGLRenderingContext},C.touch=function(){var
 c;returnontouchstartin a||a.DocumentTouchb instanceof 
DocumentTouch?c=!0:H([@media 
(,x.join(touch-enabled),(),r,),{#modernizr{top:9px;position:absolute}}].join
 
(),function(a){c=9===a.offsetTop}),c},C.geolocation=function(){returngeolocationin
 
navigator},C.postmessage=function(){return!!a.postMessage},C.websqldatabase=function(){return!!a.openDatabase},C.indexedDB=function(){return!!j(indexedDB,a)},C.hashchange=function(){return
 

[12/12] camel git commit: Use foundation css instead of pure.css

2014-11-21 Thread cmoulliard
Use foundation css instead of pure.css


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

Branch: refs/heads/master
Commit: 3d50c8539972fd36eb81e8d144687819678b3fcb
Parents: f74c12d
Author: Charles Moulliard cmoulli...@apache.org
Authored: Fri Nov 21 11:42:36 2014 +0100
Committer: Charles Moulliard cmoulli...@apache.org
Committed: Fri Nov 21 11:42:36 2014 +0100

--
 .../src/main/webapp/css/foundation.min.css  |   1 +
 .../src/main/webapp/css/normalize.css   | 427 +++
 .../src/main/webapp/css/pure-min.css|  11 -
 .../src/main/webapp/index.html  |  19 +-
 .../src/main/webapp/js/vendor/modernizr.js  |   8 +
 5 files changed, 448 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/3d50c853/examples/camel-example-servlet-rest-tomcat/src/main/webapp/css/foundation.min.css
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/css/foundation.min.css
 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/css/foundation.min.css
new file mode 100644
index 000..ba2251c
--- /dev/null
+++ 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/css/foundation.min.css
@@ -0,0 +1 @@
+meta.foundation-version{font-family:/5.4.7/}meta.foundation-mq-small{font-family:/only
 screen/;width:0em}meta.foundation-mq-medium{font-family:/only screen and 
(min-width:40.063em)/;width:40.063em}meta.foundation-mq-large{font-family:/only
 screen and 
(min-width:64.063em)/;width:64.063em}meta.foundation-mq-xlarge{font-family:/only
 screen and 
(min-width:90.063em)/;width:90.063em}meta.foundation-mq-xxlarge{font-family:/only
 screen and 
(min-width:120.063em)/;width:120.063em}meta.foundation-data-attribute-namespace{font-family:false}html,body{height:100%}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html,body{font-size:100%}body{background:#fff;color:#222;padding:0;margin:0;font-family:Helvetica
 
Neue,Helvetica,Roboto,Arial,sans-serif;font-weight:normal;font-style:normal;line-height:1.5;position:relative;cursor:auto}a:hover{cursor:pointer}img{max-width:100%;height:auto}img{-ms-interpolation-mode:bicubic}#map_canvas
 img,#map
 _canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas 
object{max-width:none !important}.left{float:left !important}.right{float:right 
!important}.clearfix:before,.clearfix:after{content: 
;display:table}.clearfix:after{clear:both}.hide{display:none 
!important;visibility:hidden}.invisible{visibility:hidden}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img{display:inline-block;vertical-align:middle}textarea{height:auto;min-height:50px}select{width:100%}.row{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em}.row:before,.row:after{content:
 
;display:table}.row:after{clear:both}.row.collapse.column,.row.collapse.columns{padding-left:0;padding-right:0}.row.collapse
 .row{margin-left:0;margin-right:0}.row 
.row{width:auto;margin-left:-0.9375em;margin-right:-0.9375em;margin-top:0;margin-bottom:0;max-width:none}.row
 .row:before,.row .row:after{content: ;display:table}.row .row:after{cle
 ar:both}.row .row.collapse{width:auto;margin:0;max-width:none}.row 
.row.collapse:before,.row .row.collapse:after{content: ;display:table}.row 
.row.collapse:after{clear:both}.column,.columns{padding-left:0.9375em;padding-right:0.9375em;width:100%;float:left}[class*=column]+[class*=column]:last-child{float:right}[class*=column]+[class*=column].end{float:left}@media
 only 
screen{.small-push-0{position:relative;left:0%;right:auto}.small-pull-0{position:relative;right:0%;left:auto}.small-push-1{position:relative;left:8.3%;right:auto}.small-pull-1{position:relative;right:8.3%;left:auto}.small-push-2{position:relative;left:16.7%;right:auto}.small-pull-2{position:relative;right:16.7%;left:auto}.small-push-3{position:relative;left:25%;right:auto}.small-pull-3{position:relative;right:25%;left:auto}.small-push-4{position:relative;left:33.3%;right:auto}.small-pull-4{position:relative;right:33.3%;left:auto}.small-push-5{position:relative;left:41.7%;right:auto
 

[02/12] camel git commit: CAMEL-8066: Add swagger ui

2014-11-21 Thread cmoulliard
http://git-wip-us.apache.org/repos/asf/camel/blob/bf077620/examples/camel-example-servlet-rest-tomcat/src/main/webapp/swagger-ui.js
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/swagger-ui.js 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/swagger-ui.js
new file mode 100644
index 000..f2409ef
--- /dev/null
+++ b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/swagger-ui.js
@@ -0,0 +1,2324 @@
+// swagger-ui.js
+// version 2.0.23
+$(function() {
+
+   // Helper function for vertically aligning DOM elements
+   // http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/
+   $.fn.vAlign = function() {
+   return this.each(function(i){
+   var ah = $(this).height();
+   var ph = $(this).parent().height();
+   var mh = (ph - ah) / 2;
+   $(this).css('margin-top', mh);
+   });
+   };
+
+   $.fn.stretchFormtasticInputWidthToParent = function() {
+   return this.each(function(i){
+   var p_width = $(this).closest(form).innerWidth();
+   var p_padding = 
parseInt($(this).closest(form).css('padding-left') ,10) + 
parseInt($(this).closest(form).css('padding-right'), 10);
+   var this_padding = parseInt($(this).css('padding-left'), 10) + 
parseInt($(this).css('padding-right'), 10);
+   $(this).css('width', p_width - p_padding - this_padding);
+   });
+   };
+
+   $('form.formtastic li.string input, form.formtastic 
textarea').stretchFormtasticInputWidthToParent();
+
+   // Vertically center these paragraphs
+   // Parent may need a min-height for this to work..
+   $('ul.downplayed li div.content p').vAlign();
+
+   // When a sandbox form is submitted..
+   $(form.sandbox).submit(function(){
+
+   var error_free = true;
+
+   // Cycle through the forms required inputs
+   $(this).find(input.required).each(function() {
+
+   // Remove any existing error styles from the input
+   $(this).removeClass('error');
+
+   // Tack the error style on if the input is empty..
+   if ($(this).val() == '') {
+   $(this).addClass('error');
+   $(this).wiggle();
+   error_free = false;
+   }
+
+   });
+
+   return error_free;
+   });
+
+});
+
+function clippyCopiedCallback(a) {
+  $('#api_key_copied').fadeIn().delay(1000).fadeOut();
+
+  // var b = $(#clippy_tooltip_ + a);
+  // b.length != 0  (b.attr(title, copied!).trigger(tipsy.reload), 
setTimeout(function() {
+  //   b.attr(title, copy to clipboard)
+  // },
+  // 500))
+}
+
+// Logging function that accounts for browsers that don't have window.console
+log = function(){
+  log.history = log.history || [];
+  log.history.push(arguments);
+  if(this.console){
+console.log( Array.prototype.slice.call(arguments)[0] );
+  }
+};
+
+// Handle browsers that do console incorrectly (IE9 and below, see 
http://stackoverflow.com/a/5539378/7913)
+if (Function.prototype.bind  console  typeof console.log == object) {
+[
+  log,info,warn,error,assert,dir,clear,profile,profileEnd
+].forEach(function (method) {
+console[method] = this.bind(console[method], console);
+}, Function.prototype.call);
+}
+
+var Docs = {
+
+   shebang: function() {
+
+   // If shebang has an operation nickname in it..
+   // e.g. /docs/#!/words/get_search
+   var fragments = $.param.fragment().split('/');
+   fragments.shift(); // get rid of the bang
+
+   switch (fragments.length) {
+   case 1:
+   // Expand all operations for the resource and 
scroll to it
+   log('shebang resource:' + fragments[0]);
+   var dom_id = 'resource_' + fragments[0];
+
+   
Docs.expandEndpointListForResource(fragments[0]);
+   $(#+dom_id).slideto({highlight: false});
+   break;
+   case 2:
+   // Refer to the endpoint DOM element, e.g. 
#words_get_search
+   log('shebang endpoint: ' + fragments.join('_'));
+
+// Expand Resource
+Docs.expandEndpointListForResource(fragments[0]);
+$(#+dom_id).slideto({highlight: false});
+
+// Expand operation
+   var li_dom_id = fragments.join('_');
+   var li_content_dom_id = li_dom_id + _content;
+
+log(li_dom_id  + li_dom_id);
+log(li_content_dom_id  + li_content_dom_id);
+
+   

[08/12] camel git commit: CAMEL-8066: Add swagger ui

2014-11-21 Thread cmoulliard
http://git-wip-us.apache.org/repos/asf/camel/blob/bf077620/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/backbone-min.js
--
diff --git 
a/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/backbone-min.js
 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/backbone-min.js
new file mode 100644
index 000..c1c0d4f
--- /dev/null
+++ 
b/examples/camel-example-servlet-rest-tomcat/src/main/webapp/lib/backbone-min.js
@@ -0,0 +1,38 @@
+// Backbone.js 0.9.2
+
+// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
+// Backbone may be freely distributed under the MIT license.
+// For all details and documentation:
+// http://backbonejs.org
+(function(){var 
l=this,y=l.Backbone,z=Array.prototype.slice,A=Array.prototype.splice,g;g=undefined!==typeof
 exports?exports:l.Backbone={};g.VERSION=0.9.2;var 
f=l._;!fundefined!==typeof require(f=require(underscore));var 
i=l.jQuery||l.Zepto||l.ender;g.setDomLibrary=function(a){i=a};g.noConflict=function(){l.Backbone=y;return
 this};g.emulateHTTP=!1;g.emulateJSON=!1;var 
p=/\s+/,k=g.Events={on:function(a,b,c){var d,e,f,g,j;if(!b)return 
this;a=a.split(p);for(d=this._callbacks||(this._callbacks=
+{});e=a.shift();)f=(j=d[e])?j.tail:{},f.next=g={},f.context=c,f.callback=b,d[e]={tail:g,next:j?j.next:f};return
 this},off:function(a,b,c){var 
d,e,h,g,j,q;if(e=this._callbacks){if(!a!b!c)return delete 
this._callbacks,this;for(a=a?a.split(p):f.keys(e);d=a.shift();)if(h=e[d],delete 
e[d],h(b||c))for(g=h.tail;(h=h.next)!==g;)if(j=h.callback,q=h.context,bj!==b||cq!==c)this.on(d,j,q);return
 this}},trigger:function(a){var b,c,d,e,f,g;if(!(d=this._callbacks))return 
this;f=d.all;a=a.split(p);for(g=
+z.call(arguments,1);b=a.shift();){if(c=d[b])for(e=c.tail;(c=c.next)!==e;)c.callback.apply(c.context||this,g);if(c=f){e=c.tail;for(b=[b].concat(g);(c=c.next)!==e;)c.callback.apply(c.context||this,b)}}return
 this}};k.bind=k.on;k.unbind=k.off;var o=g.Model=function(a,b){var 
c;a||(a={});bb.parse(a=this.parse(a));if(c=n(this,defaults))a=f.extend({},c,a);bb.collection(this.collection=b.collection);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId(c);this.changed={};this._silent=
+{};this._pending={};this.set(a,{silent:!0});this.changed={};this._silent={};this._pending={};this._previousAttributes=f.clone(this.attributes);this.initialize.apply(this,arguments)};f.extend(o.prototype,k,{changed:null,_silent:null,_pending:null,idAttribute:id,initialize:function(){},toJSON:function(){return
 f.clone(this.attributes)},get:function(a){return 
this.attributes[a]},escape:function(a){var 
b;if(b=this._escapedAttributes[a])return b;b=this.get(a);return 
this._escapedAttributes[a]=f.escape(null==
+b?:+b)},has:function(a){return null!=this.get(a)},set:function(a,b,c){var 
d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c||(c={});if(!d)return 
this;d instanceof o(d=d.attributes);if(c.unset)for(e in d)d[e]=void 
0;if(!this._validate(d,c))return!1;this.idAttribute in 
d(this.id=d[this.idAttribute]);var 
b=c.changes={},h=this.attributes,g=this._escapedAttributes,j=this._previousAttributes||{};for(e
 in d){a=d[e];if(!f.isEqual(h[e],a)||c.unsetf.has(h,e))delete 
g[e],(c.silent?this._silent:
+b)[e]=!0;c.unset?delete 
h[e]:h[e]=a;!f.isEqual(j[e],a)||f.has(h,e)!=f.has(j,e)?(this.changed[e]=a,c.silent||(this._pending[e]=!0)):(delete
 this.changed[e],delete this._pending[e])}c.silent||this.change(c);return 
this},unset:function(a,b){(b||(b={})).unset=!0;return 
this.set(a,null,b)},clear:function(a){(a||(a={})).unset=!0;return 
this.set(f.clone(this.attributes),a)},fetch:function(a){var 
a=a?f.clone(a):{},b=this,c=a.success;a.success=function(d,e,f){if(!b.set(b.parse(d,f),a))return!1;cc(b,d)};
+a.error=g.wrapError(a.error,b,a);return(this.sync||g.sync).call(this,read,this,a)},save:function(a,b,c){var
 
d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c=c?f.clone(c):{};if(c.wait){if(!this._validate(d,c))return!1;e=f.clone(this.attributes)}a=f.extend({},c,{silent:!0});if(d!this.set(d,c.wait?a:c))return!1;var
 h=this,i=c.success;c.success=function(a,b,e){b=h.parse(a,e);if(c.wait){delete 
c.wait;b=f.extend(d||{},b)}if(!h.set(b,c))return 
false;i?i(h,a):h.trigger(sync,h,a,c)};c.error=g.wrapError(c.error,
+h,c);b=this.isNew()?create:update;b=(this.sync||g.sync).call(this,b,this,c);c.waitthis.set(e,a);return
 b},destroy:function(a){var 
a=a?f.clone(a):{},b=this,c=a.success,d=function(){b.trigger(destroy,b,b.collection,a)};if(this.isNew())return
 
d(),!1;a.success=function(e){a.waitd();c?c(b,e):b.trigger(sync,b,e,a)};a.error=g.wrapError(a.error,b,a);var
 e=(this.sync||g.sync).call(this,delete,this,a);a.wait||d();return 
e},url:function(){var a=n(this,urlRoot)||n(this.collection,url)||t();
+return 
this.isNew()?a:a+(/==a.charAt(a.length-1)?:/)+encodeURIComponent(this.id)},parse:function(a){return
 a},clone:function(){return new 
this.constructor(this.attributes)},isNew:function(){return 

[10/12] camel git commit: Include improvement : https://issues.apache.org/jira/browse/CAMEL-8066

2014-11-21 Thread cmoulliard
Include improvement : https://issues.apache.org/jira/browse/CAMEL-8066


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

Branch: refs/heads/master
Commit: f74c12d2777deb66b5a660ec47abeb5a840e541e
Parents: bf07762 18f5bf4
Author: Charles Moulliard cmoulli...@apache.org
Authored: Fri Nov 21 10:21:07 2014 +0100
Committer: Charles Moulliard cmoulli...@apache.org
Committed: Fri Nov 21 10:21:07 2014 +0100

--
 apache-camel/pom.xml|  18 +-
 .../src/main/descriptors/common-bin.xml |   4 +
 .../main/java/org/apache/camel/Exchange.java|  19 +
 .../management/mbean/CamelOpenMBeanTypes.java   |   8 +-
 .../mbean/ManagedCamelContextMBean.java |   2 +-
 .../camel/builder/ErrorHandlerBuilder.java  |   1 +
 .../camel/builder/ErrorHandlerBuilderRef.java   |  12 +
 .../builder/ErrorHandlerBuilderSupport.java |  25 +
 .../apache/camel/builder/ProcessorBuilder.java  |  32 +
 .../camel/component/ResourceEndpoint.java   |  13 +-
 .../camel/component/bean/BeanEndpoint.java  |   2 +-
 .../component/beanclass/ClassEndpoint.java  |   2 +-
 .../component/binding/BindingEndpoint.java  |   2 +-
 .../camel/component/browse/BrowseEndpoint.java  |   2 +-
 .../controlbus/ControlBusEndpoint.java  |   2 +-
 .../dataformat/DataFormatEndpoint.java  |   2 +-
 .../component/dataset/DataSetEndpoint.java  |   2 +-
 .../camel/component/direct/DirectEndpoint.java  |   2 +-
 .../component/directvm/DirectVmEndpoint.java|   2 +-
 .../camel/component/file/FileEndpoint.java  |   2 +-
 .../component/language/LanguageEndpoint.java|   2 +-
 .../apache/camel/component/log/LogEndpoint.java |   2 +-
 .../camel/component/mock/MockEndpoint.java  |   2 +-
 .../apache/camel/component/ref/RefEndpoint.java |   2 +-
 .../camel/component/rest/RestEndpoint.java  |   2 +-
 .../camel/component/seda/SedaEndpoint.java  |   2 +-
 .../camel/component/stub/StubEndpoint.java  |   2 +-
 .../camel/component/test/TestEndpoint.java  |   2 +-
 .../camel/component/timer/TimerEndpoint.java|   2 +-
 .../component/validator/ValidatorEndpoint.java  |   2 +-
 .../apache/camel/component/vm/VmEndpoint.java   |   2 +-
 .../camel/component/xslt/XsltEndpoint.java  |   4 +-
 .../camel/impl/CamelContextTrackerRegistry.java |  62 ++
 .../apache/camel/impl/DefaultCamelContext.java  |  23 +-
 .../camel/impl/DefaultCamelContextRegistry.java | 133 
 .../org/apache/camel/impl/DefaultEndpoint.java  |  14 +-
 .../org/apache/camel/impl/DefaultExchange.java  |  34 ++
 .../main/java/org/apache/camel/main/Main.java   |   9 +-
 .../management/mbean/ManagedCamelContext.java   |  12 +-
 .../apache/camel/model/MarshalDefinition.java   |   6 +
 .../apache/camel/model/ProcessorDefinition.java |  27 +
 .../camel/model/RemovePropertiesDefinition.java | 106 
 .../apache/camel/model/UnmarshalDefinition.java |   6 +
 .../model/dataformat/DataFormatsDefinition.java |   3 +
 .../dataformat/UniVocityAbstractDataFormat.java | 260 
 .../dataformat/UniVocityCsvDataFormat.java  |  96 +++
 .../UniVocityFixedWidthDataFormat.java  |  94 +++
 .../camel/model/dataformat/UniVocityHeader.java |  51 ++
 .../dataformat/UniVocityTsvDataFormat.java  |  56 ++
 .../apache/camel/spi/CamelContextRegistry.java  |  99 ---
 .../apache/camel/spi/CamelContextTracker.java   |  41 ++
 .../apache/camel/model/dataformat/jaxb.index|   4 +
 .../resources/org/apache/camel/model/jaxb.index |   1 +
 .../builder/ErrorHandlerBuilderRefTest.java |  87 +++
 .../camel/impl/CamelContextTrackerTest.java |  71 +++
 .../apache/camel/impl/DefaultExchangeTest.java  |  70 +++
 .../RemovePropertiesWithExclusionTest.java  |  85 +++
 .../RemovePropertiesWithoutExclusionTest.java   |  79 +++
 .../camel/spi/CamelContextRegistryTest.java |  72 ---
 components/camel-bam/pom.xml|   3 +-
 .../component/beanstalk/BeanstalkCommand.java   |  25 +
 .../component/beanstalk/BeanstalkComponent.java |   2 +-
 .../component/beanstalk/BeanstalkConsumer.java  |  12 +-
 .../component/beanstalk/BeanstalkEndpoint.java  |  64 +-
 .../camel/component/beanstalk/EndpointTest.java |   8 +-
 .../camel/component/beanstalk/Helper.java   |   2 +-
 .../camel/component/beanstalk/ProducerTest.java |  22 +-
 components/camel-box/pom.xml|   3 +-
 components/camel-cxf-transport/pom.xml  |   3 +-
 components/camel-cxf/pom.xml|   3 +-
 .../component/cxf/CxfDispatchMessageBeans.xml   |   2 -
 .../component/cxf/CxfDispatchPayloadBeans.xml   |   2 -
 components/camel-facebook/pom.xml   |   6 +-
 .../component/file/remote/FtpEndpoint.java  |   2 +-
 

[1/2] git commit: CAMEL-7924. Add missing package to OSGI Metadata

2014-10-17 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master 08b491d9d - ef38a4bb3


CAMEL-7924. Add missing package to OSGI Metadata


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

Branch: refs/heads/master
Commit: c684ea63e67715adaf78641a02bb182ea81fc574
Parents: 130317a
Author: Charles Moulliard ch0...@gmail.com
Authored: Fri Oct 17 10:09:17 2014 +0200
Committer: Charles Moulliard ch0...@gmail.com
Committed: Fri Oct 17 10:09:17 2014 +0200

--
 components/camel-groovy/pom.xml | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/c684ea63/components/camel-groovy/pom.xml
--
diff --git a/components/camel-groovy/pom.xml b/components/camel-groovy/pom.xml
index bf813ac..92d3886 100644
--- a/components/camel-groovy/pom.xml
+++ b/components/camel-groovy/pom.xml
@@ -30,6 +30,13 @@
   descriptionCamel Groovy support/description
 
   properties
+  camel.osgi.import.pkg
+  !org.apache.camel.component.groovy.*,
+  org.codehaus.groovy.runtime.callsite,
+  org.apache.camel.*;${camel.osgi.import.camel.version},
+  ${camel.osgi.import.defaults},
+  *
+  /camel.osgi.import.pkg
  
camel.osgi.export.pkgorg.apache.camel.language.groovy.*,org.apache.camel.groovy.*/camel.osgi.export.pkg
  
camel.osgi.export.serviceorg.apache.camel.spi.LanguageResolver;language=groovy/camel.osgi.export.service
   /properties



[2/2] git commit: Add fix for CAMEL-7924

2014-10-17 Thread cmoulliard
Add fix for CAMEL-7924


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

Branch: refs/heads/master
Commit: ef38a4bb3efb62b6ee23f6e0581ce7df5d588c19
Parents: c684ea6 08b491d
Author: Charles Moulliard cmoulli...@apache.org
Authored: Fri Oct 17 10:26:34 2014 +0200
Committer: Charles Moulliard cmoulli...@apache.org
Committed: Fri Oct 17 10:26:34 2014 +0200

--
 .../camel/core/osgi/OsgiServiceRegistry.java|  5 +++
 .../camel/component/mqtt/MQTTConsumer.java  |  3 ++
 .../camel/component/mqtt/MQTTEndpoint.java  | 47 +---
 .../camel/component/mqtt/MQTTProducer.java  |  9 
 .../camel/component/netty/NettyProducer.java| 13 +-
 5 files changed, 49 insertions(+), 28 deletions(-)
--




git commit: CAMEL-7924. Add missing package to OSGI Metadata

2014-10-17 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/camel-2.12.x 28de1922e - 31311abbb


CAMEL-7924. Add missing package to OSGI Metadata


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

Branch: refs/heads/camel-2.12.x
Commit: 31311abbb6f1e479c7759f00a97367508bd2d08a
Parents: 28de192
Author: Charles Moulliard ch0...@gmail.com
Authored: Fri Oct 17 10:09:17 2014 +0200
Committer: Charles Moulliard cmoulli...@apache.org
Committed: Fri Oct 17 10:34:23 2014 +0200

--
 components/camel-groovy/pom.xml | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/31311abb/components/camel-groovy/pom.xml
--
diff --git a/components/camel-groovy/pom.xml b/components/camel-groovy/pom.xml
index 8448f7f..47ef6aa 100644
--- a/components/camel-groovy/pom.xml
+++ b/components/camel-groovy/pom.xml
@@ -30,6 +30,13 @@
   descriptionCamel Groovy support/description
 
   properties
+  camel.osgi.import.pkg
+  !org.apache.camel.component.groovy.*,
+  org.codehaus.groovy.runtime.callsite,
+  org.apache.camel.*;${camel.osgi.import.camel.version},
+  ${camel.osgi.import.defaults},
+  *
+  /camel.osgi.import.pkg
  
camel.osgi.export.pkgorg.apache.camel.language.groovy.*,org.apache.camel.groovy.*/camel.osgi.export.pkg
  
camel.osgi.export.serviceorg.apache.camel.spi.LanguageResolver;language=groovy/camel.osgi.export.service
   /properties



Git Push Summary

2014-10-17 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/remotes/origin/camel-2.12.x [created] 31311abbb


[46/50] git commit: fixed a CS error

2014-10-17 Thread cmoulliard
fixed a CS error


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: f424d824314afb00bdb92bcb9b597b30b5e3393a
Parents: 217c81c
Author: Christian Mueller cmuel...@apache.org
Authored: Thu Oct 16 08:59:41 2014 +0200
Committer: Christian Mueller cmuel...@apache.org
Committed: Thu Oct 16 08:59:41 2014 +0200

--
 .../java/org/apache/camel/component/timer/TimerEndpoint.java | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/f424d824/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 89c170e..bc39989 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
@@ -64,6 +64,10 @@ public class TimerEndpoint extends DefaultEndpoint 
implements MultipleConsumersS
 this.timerName = timerName;
 }
 
+protected TimerEndpoint(String endpointUri, Component component) {
+super(endpointUri, component);
+}
+
 @Override
 public TimerComponent getComponent() {
 return (TimerComponent) super.getComponent();
@@ -192,10 +196,6 @@ public class TimerEndpoint extends DefaultEndpoint 
implements MultipleConsumersS
 return getStatus().name();
 }
 
-protected TimerEndpoint(String endpointUri, Component component) {
-super(endpointUri, component);
-}
-
 public Timer getTimer(TimerConsumer consumer) {
 if (timer != null) {
 // use custom timer



[13/50] git commit: CAMEL-7836: Fixed potential ConcurrentModificationException when calling getRoutes.

2014-10-17 Thread cmoulliard
CAMEL-7836: Fixed potential ConcurrentModificationException when calling 
getRoutes.


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 64aa22d6f52408678955685549cd66fb29735aba
Parents: ee02b82
Author: Claus Ibsen davscl...@apache.org
Authored: Sun Sep 21 11:23:03 2014 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Sun Sep 21 11:23:42 2014 +0200

--
 .../src/main/java/org/apache/camel/impl/DefaultCamelContext.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/64aa22d6/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java 
b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
index d84d20b..9ade095 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
@@ -644,7 +644,7 @@ public class DefaultCamelContext extends ServiceSupport 
implements ModelCamelCon
 return routeStartupOrder;
 }
 
-public ListRoute getRoutes() {
+public synchronized ListRoute getRoutes() {
 // lets return a copy of the collection as objects are removed later 
when services are stopped
 if (routes.isEmpty()) {
 return Collections.emptyList();



[28/50] git commit: Case when uri has fragment and does not have query

2014-10-17 Thread cmoulliard
Case when uri has fragment and does not have query


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 66803bcc6e0c789a0f309bc769daf520a6e2ec91
Parents: 229890c
Author: Vitaly Lavrov lav...@osinka.ru
Authored: Mon Sep 8 21:11:02 2014 +0400
Committer: Claus Ibsen davscl...@apache.org
Committed: Mon Sep 29 08:32:37 2014 +0200

--
 .../src/main/java/org/apache/camel/util/URISupport.java   | 3 +++
 .../src/test/java/org/apache/camel/util/URISupportTest.java   | 7 +++
 2 files changed, 10 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/66803bcc/camel-core/src/main/java/org/apache/camel/util/URISupport.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/util/URISupport.java 
b/camel-core/src/main/java/org/apache/camel/util/URISupport.java
index 0f37a2c..607f859 100644
--- a/camel-core/src/main/java/org/apache/camel/util/URISupport.java
+++ b/camel-core/src/main/java/org/apache/camel/util/URISupport.java
@@ -321,6 +321,9 @@ public final class URISupport {
 // assemble string as new uri and replace parameters with the query 
instead
 String s = uri.toString();
 String before = ObjectHelper.before(s, ?);
+if (before == null) {
+before = ObjectHelper.before(s, #);
+}
 if (before != null) {
 s = before;
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/66803bcc/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java
--
diff --git a/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java 
b/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java
index 0e6f1b1..cdefcec 100644
--- a/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java
+++ b/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java
@@ -155,6 +155,13 @@ public class URISupportTest extends ContextTestSupport {
 assertEquals(smtp://localhost#fragmentOne, resultUri.toString());
 }
 
+public void testCreateURIWithQueryHasOneFragmentAndQueryParameter() throws 
Exception {
+URI uri = new URI(smtp://localhost#fragmentOne);
+URI resultUri = URISupport.createURIWithQuery(uri, 
utm_campaign=launch);
+assertNotNull(resultUri);
+assertEquals(smtp://localhost?utm_campaign=launch#fragmentOne, 
resultUri.toString());
+}
+
 public void testNormalizeEndpointWithEqualSignInParameter() throws 
Exception {
 String out = 
URISupport.normalizeUri(jms:queue:foo?selector=somekey='somevalue'foo=bar);
 assertNotNull(out);



[14/50] git commit: CAMEL-7842 Avoid using InputStreamEntity for byte[] input

2014-10-17 Thread cmoulliard
CAMEL-7842 Avoid using InputStreamEntity for byte[] input


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 978011461d929f96b185449c70fd8418baf7c786
Parents: 64aa22d
Author: Willem Jiang willem.ji...@gmail.com
Authored: Sun Sep 21 20:11:59 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Sun Sep 21 20:50:19 2014 +0800

--
 .../org/apache/camel/component/http4/HttpEntityConverter.java | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/97801146/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEntityConverter.java
--
diff --git 
a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEntityConverter.java
 
b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEntityConverter.java
index e88ceb5..8236da8 100644
--- 
a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEntityConverter.java
+++ 
b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpEntityConverter.java
@@ -25,6 +25,8 @@ import org.apache.camel.Exchange;
 import org.apache.camel.util.ExchangeHelper;
 import org.apache.camel.util.GZIPHelper;
 import org.apache.http.HttpEntity;
+import org.apache.http.entity.AbstractHttpEntity;
+import org.apache.http.entity.ByteArrayEntity;
 import org.apache.http.entity.InputStreamEntity;
 
 /**
@@ -77,14 +79,15 @@ public final class HttpEntityConverter {
 }
 
 private static HttpEntity asHttpEntity(byte[] data, Exchange exchange) 
throws Exception {
-InputStreamEntity entity;
+AbstractHttpEntity entity;
 if (exchange != null  
!exchange.getProperty(Exchange.SKIP_GZIP_ENCODING, Boolean.FALSE, 
Boolean.class)) {
 String contentEncoding = 
exchange.getIn().getHeader(Exchange.CONTENT_ENCODING, String.class);
 InputStream stream = GZIPHelper.compressGzip(contentEncoding, 
data);
 entity = new InputStreamEntity(stream, stream instanceof 
ByteArrayInputStream
 ? stream.available() != 0 ? stream.available() : -1 : -1);
 } else {
-entity = new InputStreamEntity(new ByteArrayInputStream(data), 
data.length);
+// create the Repeatable HttpEntity
+entity = new ByteArrayEntity(data);
 }
 if (exchange != null) {
 String contentEncoding = 
exchange.getIn().getHeader(Exchange.CONTENT_ENCODING, String.class);



[24/50] git commit: CAMEL-7855: Fixed resuming JMS consumer to work if the route has never been initialized before.

2014-10-17 Thread cmoulliard
CAMEL-7855: Fixed resuming JMS consumer to work if the route has never been 
initialized before.


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 5c331211e22691eb3c3fe74746a90542b9a1326d
Parents: b840c4d
Author: Claus Ibsen davscl...@apache.org
Authored: Sat Sep 27 13:55:53 2014 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Sat Sep 27 14:15:48 2014 +0200

--
 .../apache/camel/component/jms/JmsConsumer.java |  9 +-
 .../jms/issues/JmsLifecycleIssueTest.java   | 93 
 2 files changed, 100 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/5c331211/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConsumer.java
--
diff --git 
a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConsumer.java
 
b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConsumer.java
index 87f39fa..5d66555 100644
--- 
a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConsumer.java
+++ 
b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConsumer.java
@@ -230,8 +230,13 @@ public class JmsConsumer extends DefaultConsumer 
implements SuspendableService {
 
 @Override
 protected void doResume() throws Exception {
-if (listenerContainer != null) {
-startListenerContainer();
+// we may not have been started before, and now the end user calls 
resume, so lets handle that and start it first
+if (!initialized) {
+doStart();
+} else {
+if (listenerContainer != null) {
+startListenerContainer();
+}
 }
 }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/5c331211/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsLifecycleIssueTest.java
--
diff --git 
a/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsLifecycleIssueTest.java
 
b/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsLifecycleIssueTest.java
new file mode 100644
index 000..32fb137
--- /dev/null
+++ 
b/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsLifecycleIssueTest.java
@@ -0,0 +1,93 @@
+/**
+ * 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.component.jms.issues;
+
+import javax.jms.ConnectionFactory;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ServiceStatus;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.jms.CamelJmsTestHelper;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+import static org.apache.camel.ServiceStatus.Started;
+import static org.apache.camel.ServiceStatus.Stopped;
+import static 
org.apache.camel.component.jms.JmsComponent.jmsComponentAutoAcknowledge;
+
+public class JmsLifecycleIssueTest extends CamelTestSupport {
+
+public static final String ROUTE_ID = simpleRoute;
+public static final String ENDPOINT_URI = activemq:processOrder;
+
+@Test
+public void routeThatIsStoppedAndThenResumedAcceptsMessage() throws 
Exception {
+assertThatRouteIs(Stopped);
+
+context.resumeRoute(ROUTE_ID);
+
+assertRouteWorks();
+}
+
+@Test
+public void routeThatIsStoppedSuspendedAndThenResumedAcceptsMessage() 
throws Exception {
+assertThatRouteIs(Stopped);
+
+context.suspendRoute(ROUTE_ID);
+context.resumeRoute(ROUTE_ID);
+
+assertRouteWorks();
+}
+
+private void assertThatRouteIs(ServiceStatus expectedStatus) {
+assertEquals(expectedStatus, context.getRouteStatus(ROUTE_ID));
+}
+
+private void 

[21/50] git commit: CAMEL-7856 Added igoreDeleteMethodMessageBody option to CxfRsEndpoint

2014-10-17 Thread cmoulliard
CAMEL-7856 Added igoreDeleteMethodMessageBody option to CxfRsEndpoint

Conflicts:

components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 3a5497afcb533f083cb726f57c0153b44e7f52ed
Parents: 55c5c4b
Author: Willem Jiang willem.ji...@gmail.com
Authored: Fri Sep 26 15:02:27 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Fri Sep 26 15:08:56 2014 +0800

--
 .../component/cxf/jaxrs/CxfRsEndpoint.java  | 85 +++-
 .../component/cxf/jaxrs/CxfRsProducer.java  | 17 ++--
 .../component/cxf/jaxrs/CxfRsSpringRouter.xml   |  7 +-
 3 files changed, 61 insertions(+), 48 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/3a5497af/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
--
diff --git 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
index d3e29c2..b4b63a1 100644
--- 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
+++ 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
@@ -51,7 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class CxfRsEndpoint extends DefaultEndpoint implements 
HeaderFilterStrategyAware, Service {
-
+
 public enum BindingStyle {
 /**
  * iOnly available for consumers./i
@@ -60,7 +60,7 @@ public class CxfRsEndpoint extends DefaultEndpoint implements 
HeaderFilterStrate
  * It also also adds more flexibility and simplicity to the response 
mapping.
  */
 SimpleConsumer,
-
+
 /**
  * This is the traditional binding style, which simply dumps the 
{@link org.apache.cxf.message.MessageContentsList} coming in from the CXF stack
  * onto the IN message body. The user is then responsible for 
processing it according to the contract defined by the JAX-RS method signature.
@@ -77,9 +77,9 @@ public class CxfRsEndpoint extends DefaultEndpoint implements 
HeaderFilterStrate
 private static final Logger LOG = 
LoggerFactory.getLogger(CxfRsEndpoint.class);
 
 protected Bus bus;
-
+
 protected ListObject entityProviders = new LinkedListObject();
-
+
 protected ListString schemaLocations;
 
 private MapString, String parameters;
@@ -87,6 +87,7 @@ public class CxfRsEndpoint extends DefaultEndpoint implements 
HeaderFilterStrate
 private HeaderFilterStrategy headerFilterStrategy;
 private CxfRsBinding binding;
 private boolean httpClientAPI = true;
+private boolean ignoreDeleteMethodMessageBody;
 private String address;
 private boolean throwExceptionOnFailure = true;
 private int maxClientCacheSize = 10;
@@ -94,13 +95,13 @@ public class CxfRsEndpoint extends DefaultEndpoint 
implements HeaderFilterStrate
 private int loggingSizeLimit;
 private boolean skipFaultLogging;
 private BindingStyle bindingStyle = BindingStyle.Default;
-   
+
 private boolean isSetDefaultBus;
-
+
 private ListFeature features = new 
ModCountCopyOnWriteArrayListFeature();
 private InterceptorHolder interceptorHolder = new InterceptorHolder();
 private MapString, Object properties;
-   
+
 
 @Deprecated
 public CxfRsEndpoint(String endpointUri, CamelContext camelContext) {
@@ -171,7 +172,7 @@ public class CxfRsEndpoint extends DefaultEndpoint 
implements HeaderFilterStrate
 public CxfRsBinding getBinding() {
 return binding;
 }
-
+
 public boolean isSkipFaultLogging() {
 return skipFaultLogging;
 }
@@ -179,7 +180,7 @@ public class CxfRsEndpoint extends DefaultEndpoint 
implements HeaderFilterStrate
 public void setSkipFaultLogging(boolean skipFaultLogging) {
 this.skipFaultLogging = skipFaultLogging;
 }
-
+
 protected void checkBeanType(Object object, Class? clazz) {
 if (!clazz.isAssignableFrom(object.getClass())) {
 throw new IllegalArgumentException(The configure bean is not the 
instance of  + clazz.getName());
@@ -215,7 +216,7 @@ public class CxfRsEndpoint extends DefaultEndpoint 
implements HeaderFilterStrate
 setupCommonFactoryProperties(cfb);
 cfb.setThreadSafe(true);
 }
-
+
 protected void setupCommonFactoryProperties(AbstractJAXRSFactoryBean 
factory) {
   

[07/50] git commit: downgrade jruby from 1.7.15 to 1.7.13 as the later ones are not valid OSGI bundles

2014-10-17 Thread cmoulliard
downgrade jruby from 1.7.15 to 1.7.13 as the later ones are not valid OSGI 
bundles


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 543e3a5fb37ec71bcd277599febffb2535a086c6
Parents: e5d9899
Author: cmueller cmuel...@apache.org
Authored: Sun Sep 14 13:09:49 2014 +0200
Committer: cmueller cmuel...@apache.org
Committed: Sun Sep 14 13:13:46 2014 +0200

--
 parent/pom.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/543e3a5f/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index ebfe0b3..42338d6 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -237,7 +237,8 @@
 jodatime2-bundle-version2.3/jodatime2-bundle-version
 josql-bundle-version1.5_5/josql-bundle-version
 josql-version1.5/josql-version
-jruby-version1.7.15/jruby-version
+!-- jruby-core 1.7.14 and 1.7.15 are not valid OSGI bundles: see 
https://github.com/jruby/jruby/issues/1971 --
+jruby-version1.7.13/jruby-version
 jsendnsca-version1.3.1/jsendnsca-version
 jsmpp-version2.1.0_4/jsmpp-version
 jsch-version0.1.50/jsch-version



[04/50] git commit: CAMEL-7798 Exchange formatter configured on Log Component may lead to incoherent results.

2014-10-17 Thread cmoulliard
CAMEL-7798 Exchange formatter configured on Log Component may lead to 
incoherent results.

Conflicts:

camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: d91dfb39b51b4b76aa610770de6eb731ba78f5d4
Parents: 59e467d
Author: Raul Kripalani ra...@apache.org
Authored: Wed Sep 10 13:43:33 2014 +0100
Committer: Raul Kripalani ra...@apache.org
Committed: Wed Sep 10 14:41:24 2014 +0100

--
 .../camel/component/log/LogComponent.java   | 23 
 .../log/CustomExchangeFormatterTest.java| 62 
 .../component/log/TestExchangeFormatter.java| 42 +
 .../log/custom-exchange-formatter-context.xml   | 36 
 4 files changed, 151 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/d91dfb39/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java 
b/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java
index 1e9e18b..4fc838a 100644
--- a/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/log/LogComponent.java
@@ -70,6 +70,7 @@ public class LogComponent extends UriEndpointComponent {
 } else {
 camelLogger = new CamelLogger(providedLogger, level, 
endpoint.getMarker());
 }
+
 Processor logger;
 if (endpoint.getGroupSize() != null) {
 logger = new ThroughputLogger(camelLogger, 
endpoint.getGroupSize());
@@ -78,18 +79,16 @@ public class LogComponent extends UriEndpointComponent {
 Long groupDelay = endpoint.getGroupDelay();
 logger = new ThroughputLogger(camelLogger, this.getCamelContext(), 
endpoint.getGroupInterval(), groupDelay, groupActiveOnly);
 } else {
-// first, try to use the user-specified formatter (or the one 
picked up from the Registry and transferred to
-// the property by a previous endpoint initialisation); if null, 
try to pick it up from the Registry now
-ExchangeFormatter localFormatter = exchangeFormatter;
-if (localFormatter == null) {
-localFormatter = 
getCamelContext().getRegistry().lookupByNameAndType(logFormatter, 
ExchangeFormatter.class);
-if (localFormatter != null) {
-exchangeFormatter = localFormatter;
-setProperties(exchangeFormatter, parameters);
-}
-}
-// if no formatter is available in the Registry, create a local 
one of the default type, for a single use
-if (localFormatter == null) {
+// first, try to pick up the ExchangeFormatter from the registry
+ExchangeFormatter localFormatter = 
getCamelContext().getRegistry().lookupByNameAndType(logFormatter, 
ExchangeFormatter.class);
+if (localFormatter != null) {
+setProperties(localFormatter, parameters);
+} else if (localFormatter == null  exchangeFormatter != null) {
+// do not set properties, the exchangeFormatter is explicitly 
set, thefore the 
+// user would have set its properties explicitly too
+localFormatter = exchangeFormatter;
+} else {
+// if no formatter is available in the Registry, create a 
local one of the default type, for a single use
 localFormatter = new DefaultExchangeFormatter();
 setProperties(localFormatter, parameters);
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d91dfb39/components/camel-spring/src/test/java/org/apache/camel/component/log/CustomExchangeFormatterTest.java
--
diff --git 
a/components/camel-spring/src/test/java/org/apache/camel/component/log/CustomExchangeFormatterTest.java
 
b/components/camel-spring/src/test/java/org/apache/camel/component/log/CustomExchangeFormatterTest.java
new file mode 100644
index 000..4d6a15a
--- /dev/null
+++ 
b/components/camel-spring/src/test/java/org/apache/camel/component/log/CustomExchangeFormatterTest.java
@@ -0,0 +1,62 @@
+/**
+ * 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 

[25/50] git commit: Camel 2.13.x - upgraded to CXF 2.7.12.

2014-10-17 Thread cmoulliard
Camel 2.13.x - upgraded to CXF 2.7.12.


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 234df76517b32395404a311a26ebb1b6dcb670a0
Parents: 5c33121
Author: Claus Ibsen davscl...@apache.org
Authored: Sat Sep 27 14:25:42 2014 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Sat Sep 27 14:25:42 2014 +0200

--
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/234df765/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index 42338d6..75cd7bf 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -107,7 +107,7 @@
 commons-vfs2-version2.0/commons-vfs2-version
 concurrentlinkedhashmap.version1.4/concurrentlinkedhashmap.version
 cobertura-maven-plugin-version2.5.2/cobertura-maven-plugin-version
-cxf-version2.7.11/cxf-version
+cxf-version2.7.12/cxf-version
 cxf-version-range[2.6,4.0)/cxf-version-range
 cxf-xjc-utils-version2.7.0/cxf-xjc-utils-version
 deltaspike-version0.7/deltaspike-version



[15/50] git commit: CAMEL-7839 Fixed the issue that Xpath is not namespace aware in choice

2014-10-17 Thread cmoulliard
CAMEL-7839 Fixed the issue that Xpath is not namespace aware in choice


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 61867a06054b57d8e6b218d78cec0c9e4ed8c8ea
Parents: 9780114
Author: Willem Jiang willem.ji...@gmail.com
Authored: Mon Sep 22 15:05:59 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Mon Sep 22 15:08:24 2014 +0800

--
 .../camel/model/ProcessorDefinitionHelper.java  |  3 ++
 .../model/ProcessorDefinitionHelperTest.java|  6 ++-
 ...erWithNamespaceOnImportRouteContextTest.java | 38 +++
 .../xpathChoiceWithNamespaceOnRouteContext.xml  | 32 
 ...eWithNamespaceOnRouteContextRouteContext.xml | 39 
 5 files changed, 116 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/61867a06/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinitionHelper.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinitionHelper.java
 
b/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinitionHelper.java
index 2ae283b..a46502f 100644
--- 
a/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinitionHelper.java
+++ 
b/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinitionHelper.java
@@ -210,6 +210,9 @@ public final class ProcessorDefinitionHelper {
 if (out instanceof ChoiceDefinition) {
 ChoiceDefinition choice = (ChoiceDefinition) out;
 for (WhenDefinition when : choice.getWhenClauses()) {
+if (type.isInstance(when)) {
+found.add((T)when);   
+}
 ListProcessorDefinition? children = when.getOutputs();
 doFindType(children, type, found);
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/61867a06/camel-core/src/test/java/org/apache/camel/model/ProcessorDefinitionHelperTest.java
--
diff --git 
a/camel-core/src/test/java/org/apache/camel/model/ProcessorDefinitionHelperTest.java
 
b/camel-core/src/test/java/org/apache/camel/model/ProcessorDefinitionHelperTest.java
index 4aa1d7e..8aa7b0c 100644
--- 
a/camel-core/src/test/java/org/apache/camel/model/ProcessorDefinitionHelperTest.java
+++ 
b/camel-core/src/test/java/org/apache/camel/model/ProcessorDefinitionHelperTest.java
@@ -29,7 +29,9 @@ public class ProcessorDefinitionHelperTest extends 
ContextTestSupport {
 IteratorProcessorDefinition it = 
ProcessorDefinitionHelper.filterTypeInOutputs(route.getOutputs(), 
ProcessorDefinition.class);
 assertNotNull(it);
 
+assertEquals(whenfoo, it.next().getId());
 assertEquals(foo, it.next().getId());
+assertEquals(whenbar, it.next().getId());
 assertEquals(bar, it.next().getId());
 assertEquals(baz, it.next().getId());
 assertFalse(it.hasNext());
@@ -42,8 +44,8 @@ public class ProcessorDefinitionHelperTest extends 
ContextTestSupport {
 public void configure() throws Exception {
 from(direct:start)
 .choice()
-.when(header(foo)).to(mock:foo).id(foo)
-.when(header(bar)).to(mock:bar).id(bar)
+
.when(header(foo)).id(whenfoo).to(mock:foo).id(foo)
+
.when(header(bar)).id(whenbar).to(mock:bar).id(bar)
 .otherwise()
 .to(mock:baz).id(baz);
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/61867a06/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringXPathFilterWithNamespaceOnImportRouteContextTest.java
--
diff --git 
a/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringXPathFilterWithNamespaceOnImportRouteContextTest.java
 
b/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringXPathFilterWithNamespaceOnImportRouteContextTest.java
new file mode 100644
index 000..0a1a42e
--- /dev/null
+++ 
b/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringXPathFilterWithNamespaceOnImportRouteContextTest.java
@@ -0,0 +1,38 @@
+/**
+ * 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 

[22/50] git commit: CAMEL-7864: Updates to allow setting Kafka's zookeeper.connect directly.

2014-10-17 Thread cmoulliard
CAMEL-7864: Updates to allow setting Kafka's zookeeper.connect directly.

- Added new property to KafkaConfiguration for zookeeperConnection and
  configured it to override the zookeeperHost and zookeeperPort
  properties.
- Created getZookeeperConnect method on KafkaConfiguration to return
  the zookeeperConnect property if set or the combination of host :
  port if zookeeperConnect is not set.
- Added zookeeperConnect get and set methods on KafkaEndpoint to
  delegate to KafkaConfiguration.
- Updated KafkaConsumer to use the getZookeeperConnect method on the
  KafkaEndpoint.
- Added tests for the changes.


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: daccc8e063ec3b305ddb1ef20a9a57b982c45328
Parents: 3a5497a
Author: john.shields john.shie...@tubemogul.com
Authored: Thu Sep 25 20:57:23 2014 -0500
Committer: Claus Ibsen davscl...@apache.org
Committed: Sat Sep 27 13:23:14 2014 +0200

--
 .../component/kafka/KafkaConfiguration.java | 25 +--
 .../camel/component/kafka/KafkaConsumer.java|  9 +++
 .../camel/component/kafka/KafkaEndpoint.java|  9 +++
 .../component/kafka/KafkaComponentTest.java | 26 
 .../component/kafka/KafkaConsumerTest.java  | 14 ---
 5 files changed, 71 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/daccc8e0/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
--
diff --git 
a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
 
b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
index 88d5017..881ef3c 100644
--- 
a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
+++ 
b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConfiguration.java
@@ -21,6 +21,7 @@ import java.util.Properties;
 import kafka.producer.DefaultPartitioner;
 
 public class KafkaConfiguration {
+private String zookeeperConnect;
 private String zookeeperHost;
 private int zookeeperPort = 2181;
 private String topic;
@@ -127,13 +128,31 @@ public class KafkaConfiguration {
 props.put(key, value.toString());
 }
 }
+
+public String getZookeeperConnect() {
+if (this.zookeeperConnect != null) {
+return zookeeperConnect;
+} else {
+return getZookeeperHost() + : + getZookeeperPort();
+}
+}
+
+public void setZookeeperConnect(String zookeeperConnect) {
+this.zookeeperConnect = zookeeperConnect;
+
+// connect overrides host and port
+this.zookeeperHost = null;
+this.zookeeperPort = -1;
+}
 
 public String getZookeeperHost() {
 return zookeeperHost;
 }
 
 public void setZookeeperHost(String zookeeperHost) {
-this.zookeeperHost = zookeeperHost;
+if (this.zookeeperConnect == null) {
+this.zookeeperHost = zookeeperHost;
+}
 }
 
 public int getZookeeperPort() {
@@ -141,7 +160,9 @@ public class KafkaConfiguration {
 }
 
 public void setZookeeperPort(int zookeeperPort) {
-this.zookeeperPort = zookeeperPort;
+if (this.zookeeperConnect == null) {
+this.zookeeperPort = zookeeperPort;
+}
 }
 
 public String getGroupId() {

http://git-wip-us.apache.org/repos/asf/camel/blob/daccc8e0/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java
--
diff --git 
a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java
 
b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java
index 3087a14..f801328 100644
--- 
a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java
+++ 
b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java
@@ -46,11 +46,8 @@ public class KafkaConsumer extends DefaultConsumer {
 super(endpoint, processor);
 this.endpoint = endpoint;
 this.processor = processor;
-if (endpoint.getZookeeperHost() == null) {
-throw new IllegalArgumentException(zookeeper host must be 
specified);
-}
-if (endpoint.getZookeeperPort() == 0) {
-throw new IllegalArgumentException(zookeeper port must be 
specified);
+if 

[12/50] git commit: CAMEL-7053 remove the dependency of hibernat

2014-10-17 Thread cmoulliard
CAMEL-7053 remove the dependency of hibernat

Conflicts:
components/camel-jpa/pom.xml


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: ee02b82d61af5cff753ee4f7ec7c45f7f212db13
Parents: d1628b4
Author: Willem Jiang willem.ji...@gmail.com
Authored: Wed Sep 17 09:54:43 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Wed Sep 17 11:03:46 2014 +0800

--
 components/camel-jpa/pom.xml  |  9 +
 .../processor/jpa/JpaRouteSkipLockedEntityTest.java   | 11 +--
 .../src/test/resources/META-INF/persistence.xml   | 14 --
 .../processor/jpa/springJpaRouteSkipLockedTest.xml|  6 +++---
 4 files changed, 17 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/ee02b82d/components/camel-jpa/pom.xml
--
diff --git a/components/camel-jpa/pom.xml b/components/camel-jpa/pom.xml
index e133fce..4912c73 100644
--- a/components/camel-jpa/pom.xml
+++ b/components/camel-jpa/pom.xml
@@ -65,7 +65,7 @@
   artifactIdgeronimo-jpa_2.0_spec/artifactId
   scopeprovided/scope
 /dependency
-
+
 !-- test dependencies --
 dependency
   groupIdorg.apache.camel/groupId
@@ -102,12 +102,6 @@
   artifactIdjunit/artifactId
   scopetest/scope
 /dependency
-dependency
-   groupIdorg.hibernate/groupId
-   artifactIdhibernate-entitymanager/artifactId
-   version${hibernate-version}/version
-   scopetest/scope
-/dependency
   /dependencies
 
   build
@@ -119,7 +113,6 @@
 configuration
   
persistenceXmlFile${project.basedir}/src/test/resources/META-INF/persistence.xml/persistenceXmlFile
   includesorg/apache/camel/examples/*.class/includes
-  excludesorg/apache/camel/examples/VersionedItem.class/excludes
   addDefaultConstructortrue/addDefaultConstructor
   enforcePropertyRestrictionstrue/enforcePropertyRestrictions
 /configuration

http://git-wip-us.apache.org/repos/asf/camel/blob/ee02b82d/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteSkipLockedEntityTest.java
--
diff --git 
a/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteSkipLockedEntityTest.java
 
b/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteSkipLockedEntityTest.java
index 3c95a06..c61d9b1 100644
--- 
a/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteSkipLockedEntityTest.java
+++ 
b/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaRouteSkipLockedEntityTest.java
@@ -26,12 +26,13 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.examples.VersionedItem;
 import org.apache.camel.spring.SpringRouteBuilder;
-import org.hibernate.engine.spi.SessionImplementor;
+import org.junit.Ignore;
 import org.junit.Test;
 
 /**
  * @version
  */
+@Ignore(Need the fix of OPENJPA-2461)
 public class JpaRouteSkipLockedEntityTest extends AbstractJpaTest {
 protected static final String SELECT_ALL_STRING = select x from  + 
VersionedItem.class.getName() +  x;
 
@@ -50,9 +51,9 @@ public class JpaRouteSkipLockedEntityTest extends 
AbstractJpaTest {
 template.sendBody(jpa:// + VersionedItem.class.getName(), new 
VersionedItem(two));
 template.sendBody(jpa:// + VersionedItem.class.getName(), new 
VersionedItem(three));
 template.sendBody(jpa:// + VersionedItem.class.getName(), new 
VersionedItem(four));
-
-this.context.startRoute(first);
+
 this.context.startRoute(second);
+this.context.startRoute(first);
 
 assertMockEndpointsSatisfied();

@@ -93,7 +94,6 @@ public class JpaRouteSkipLockedEntityTest extends 
AbstractJpaTest {
 try {
 
 count++;
-
 // if (count != 1) {
 cond1.signal();
 // }
@@ -116,8 +116,7 @@ public class JpaRouteSkipLockedEntityTest extends 
AbstractJpaTest {
 
 public void setLockTimeout(int timeout) throws SQLException {
 entityManager.getTransaction().begin();
-SessionImplementor session = 
entityManager.unwrap(SessionImplementor.class);
-Connection connection = session.connection();
+Connection connection = 
(Connection)entityManager.unwrap(java.sql.Connection.class);
 connection.createStatement().execute(CALL 

[29/50] git commit: CAMEL-7867 Fixed the NPE when using CXF endpoint to enrich

2014-10-17 Thread cmoulliard
CAMEL-7867 Fixed the NPE when using CXF endpoint to enrich


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: baac167688cbd135a56fac78ef0f0492ddb3663b
Parents: 66803bc
Author: Willem Jiang willem.ji...@gmail.com
Authored: Mon Sep 29 21:12:56 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Mon Sep 29 21:40:55 2014 +0800

--
 .../apache/camel/impl/DefaultRouteContext.java  |  7 +++
 .../component/cxf/CXFGreeterEnrichTest.java | 48 +++
 .../cxf/GreeterEnrichRouterContext.xml  | 61 
 3 files changed, 116 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/baac1676/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java 
b/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java
index aeb8b91..8109c1f 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java
@@ -28,6 +28,7 @@ import org.apache.camel.Endpoint;
 import org.apache.camel.NoSuchEndpointException;
 import org.apache.camel.Processor;
 import org.apache.camel.Route;
+import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.ShutdownRoute;
 import org.apache.camel.ShutdownRunningTask;
 import org.apache.camel.model.FromDefinition;
@@ -123,6 +124,12 @@ public class DefaultRouteContext implements RouteContext {
 if (!this.getCamelContext().equals(endpoint.getCamelContext())) {
 throw new NoSuchEndpointException(ref: + ref, make sure the 
endpoint has the same camel context as the route does.);
 }
+try {
+// need add the endpoint into service
+getCamelContext().addService(endpoint);
+} catch (Exception ex) {
+throw new RuntimeCamelException(ex);
+}
 }
 if (endpoint == null) {
 throw new IllegalArgumentException(Either 'uri' or 'ref' must be 
specified on:  + this);

http://git-wip-us.apache.org/repos/asf/camel/blob/baac1676/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterEnrichTest.java
--
diff --git 
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterEnrichTest.java
 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterEnrichTest.java
new file mode 100644
index 000..da4c564
--- /dev/null
+++ 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterEnrichTest.java
@@ -0,0 +1,48 @@
+/**
+ * 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.component.cxf;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.hello_world_soap_http.GreeterImpl;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+public class CXFGreeterEnrichTest extends AbstractCXFGreeterRouterTest {
+protected static Endpoint endpoint;
+@AfterClass
+public static void stopService() {
+if (endpoint != null) {
+endpoint.stop();
+}
+}
+
+
+@BeforeClass
+public static void startService() {
+Object implementor = new GreeterImpl();
+String address = http://localhost:; + getPort1() + 
/CXFGreeterEnrichTest/SoapContext/SoapPort; 
+endpoint = Endpoint.publish(address, implementor); 
+}
+
+protected ClassPathXmlApplicationContext createApplicationContext() {
+return new 
ClassPathXmlApplicationContext(org/apache/camel/component/cxf/GreeterEnrichRouterContext.xml);
+   

[35/50] git commit: CAMEL-7885: Restarting a timer endpoint may not trigger at expected time the first time

2014-10-17 Thread cmoulliard
CAMEL-7885: Restarting a timer endpoint may not trigger at expected time the 
first time


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 077e1e21795684159d7723a17298b6f84a533da7
Parents: b9ca479
Author: Claus Ibsen davscl...@apache.org
Authored: Wed Oct 1 11:17:14 2014 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Wed Oct 1 11:18:40 2014 +0200

--
 .../camel/component/timer/TimerComponent.java   | 39 ---
 .../camel/component/timer/TimerConsumer.java| 13 ++-
 .../camel/component/timer/TimerEndpoint.java| 41 ++--
 3 files changed, 74 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/077e1e21/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 aed97e0..ec67f01 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
@@ -22,6 +22,7 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Timer;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.camel.Endpoint;
 import org.apache.camel.impl.UriEndpointComponent;
@@ -34,14 +35,15 @@ import org.apache.camel.impl.UriEndpointComponent;
  */
 public class TimerComponent extends UriEndpointComponent {
 private final MapString, Timer timers = new HashMapString, Timer();
+private final MapString, AtomicInteger refCounts = new HashMap();
 
 public TimerComponent() {
 super(TimerEndpoint.class);
 }
 
-public Timer getTimer(TimerEndpoint endpoint) {
-String key = endpoint.getTimerName();
-if (!endpoint.isDaemon()) {
+public Timer getTimer(TimerConsumer consumer) {
+String key = consumer.getEndpoint().getTimerName();
+if (!consumer.getEndpoint().isDaemon()) {
 key = nonDaemon: + key;
 }
 
@@ -50,14 +52,40 @@ public class TimerComponent extends UriEndpointComponent {
 answer = timers.get(key);
 if (answer == null) {
 // the timer name is also the thread name, so lets resolve a 
name to be used
-String name = 
endpoint.getCamelContext().getExecutorServiceManager().resolveThreadName(timer://
 + endpoint.getTimerName());
-answer = new Timer(name, endpoint.isDaemon());
+String name = 
consumer.getEndpoint().getCamelContext().getExecutorServiceManager().resolveThreadName(timer://
 + consumer.getEndpoint().getTimerName());
+answer = new Timer(name, consumer.getEndpoint().isDaemon());
 timers.put(key, answer);
+// store new reference counter
+refCounts.put(key, new AtomicInteger(1));
+} else {
+// increase reference counter
+AtomicInteger counter = refCounts.get(key);
+counter.incrementAndGet();
 }
 }
 return answer;
 }
 
+public void removeTimer(TimerConsumer consumer) {
+String key = consumer.getEndpoint().getTimerName();
+if (!consumer.getEndpoint().isDaemon()) {
+key = nonDaemon: + key;
+}
+
+synchronized (timers) {
+// decrease reference counter
+AtomicInteger counter = refCounts.get(key);
+if (counter.decrementAndGet() = 0) {
+refCounts.remove(key);
+// remove timer as its no longer in use
+Timer timer = timers.remove(key);
+if (timer != null) {
+timer.cancel();
+}
+}
+}
+}
+
 @Override
 protected Endpoint createEndpoint(String uri, String remaining, 
MapString, Object parameters) throws Exception {
 TimerEndpoint answer = new TimerEndpoint(uri, this, remaining);
@@ -89,5 +117,6 @@ public class TimerComponent extends UriEndpointComponent {
 timer.cancel();
 }
 timers.clear();
+refCounts.clear();
 }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/077e1e21/camel-core/src/main/java/org/apache/camel/component/timer/TimerConsumer.java
--
diff --git 

[02/50] git commit: Default CXFRS Binding: Fix a wrong usage of HeaderFilterStrategy#applyFilterTo...

2014-10-17 Thread cmoulliard
Default CXFRS Binding: Fix a wrong usage of 
HeaderFilterStrategy#applyFilterTo...


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 5a05109eec7216a2aee1b053bd2117f2f7514d1e
Parents: c7d05d4
Author: Raul Kripalani ra...@apache.org
Authored: Tue Sep 9 17:49:28 2014 +0100
Committer: Raul Kripalani ra...@apache.org
Committed: Tue Sep 9 17:49:55 2014 +0100

--
 .../org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/5a05109e/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java
--
diff --git 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java
 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java
index d72ceab..4d0464a 100644
--- 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java
+++ 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java
@@ -283,7 +283,7 @@ public class DefaultCxfRsBinding implements CxfRsBinding, 
HeaderFilterStrategyAw
 MapString, ListString headers = (MapString, 
ListString)cxfMessage.get(org.apache.cxf.message.Message.PROTOCOL_HEADERS);
 for (Map.EntryString, ListStringentry : headers.entrySet()) {
 // just make sure the first String element is not null
-if (headerFilterStrategy.applyFilterToCamelHeaders(entry.getKey(), 
entry.getValue(), camelExchange) 
+if 
(headerFilterStrategy.applyFilterToExternalHeaders(entry.getKey(), 
entry.getValue(), camelExchange) 
 || entry.getValue().get(0) == null) {
 LOG.trace(Drop CXF message protocol header: {}={}, 
entry.getKey(), entry.getValue());
 } else {



[48/50] git commit: CAMEL-7909 camel-netty-http consumer need to close the connection if the response connection header is close

2014-10-17 Thread cmoulliard
CAMEL-7909 camel-netty-http consumer need to close the connection if the 
response connection header is close

Conflicts:

components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/DefaultNettyHttpBinding.java

components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 9cf11bd58146abb4938d0b546d3308d6e086b6da
Parents: f0e3e20
Author: Willem Jiang willem.ji...@gmail.com
Authored: Tue Oct 14 10:14:12 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Fri Oct 17 11:35:34 2014 +0800

--
 .../netty/http/DefaultNettyHttpBinding.java  |  9 +++--
 .../http/handlers/HttpServerChannelHandler.java  | 19 ++-
 .../camel/component/netty/NettyHelper.java   |  2 +-
 .../camel/component/netty/NettyProducer.java | 13 ++---
 .../handlers/ServerResponseFutureListener.java   |  5 +
 5 files changed, 25 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/9cf11bd5/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/DefaultNettyHttpBinding.java
--
diff --git 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/DefaultNettyHttpBinding.java
 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/DefaultNettyHttpBinding.java
index 23cae6c..fa8fa81 100644
--- 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/DefaultNettyHttpBinding.java
+++ 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/DefaultNettyHttpBinding.java
@@ -34,6 +34,7 @@ import org.apache.camel.Message;
 import org.apache.camel.NoTypeConversionAvailableException;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.TypeConverter;
+import org.apache.camel.component.netty.NettyConstants;
 import org.apache.camel.spi.HeaderFilterStrategy;
 import org.apache.camel.util.ExchangeHelper;
 import org.apache.camel.util.IOHelper;
@@ -67,7 +68,7 @@ public class DefaultNettyHttpBinding implements 
NettyHttpBinding, Cloneable {
 public DefaultNettyHttpBinding(HeaderFilterStrategy headerFilterStrategy) {
 this.headerFilterStrategy = headerFilterStrategy;
 }
-
+
 public DefaultNettyHttpBinding copy() {
 try {
 return (DefaultNettyHttpBinding)this.clone();
@@ -384,7 +385,7 @@ public class DefaultNettyHttpBinding implements 
NettyHttpBinding, Cloneable {
 if (buffer.readerIndex() == buffer.writerIndex()) {
 buffer.setIndex(0, buffer.writerIndex());
 }
-// TODO How to enable the chunk transport 
+// TODO How to enable the chunk transport
 int len = buffer.readableBytes();
 // set content-length
 response.setHeader(HttpHeaders.Names.CONTENT_LENGTH, len);
@@ -411,6 +412,10 @@ public class DefaultNettyHttpBinding implements 
NettyHttpBinding, Cloneable {
 }
 }
 response.setHeader(HttpHeaders.Names.CONNECTION, connection);
+// Just make sure we close the channel when the connection value is 
close
+if (connection.equalsIgnoreCase(HttpHeaders.Values.CLOSE)) {
+
message.setHeader(NettyConstants.NETTY_CLOSE_CHANNEL_WHEN_COMPLETE, true);
+}
 LOG.trace(Connection: {}, connection);
 
 return response;

http://git-wip-us.apache.org/repos/asf/camel/blob/9cf11bd5/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java
--
diff --git 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java
 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java
index 8894f6a..63edef7 100644
--- 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java
+++ 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.component.netty.http.handlers;
 
-import java.net.SocketAddress;
 import java.net.URI;
 import java.nio.channels.ClosedChannelException;
 import java.nio.charset.Charset;
@@ -26,7 +25,6 @@ 

[26/50] git commit: CAMEL-7856 Fixed the test error with JDK7

2014-10-17 Thread cmoulliard
CAMEL-7856 Fixed the test error with JDK7


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: ca14720c727f2f26005f41135460223642b37cc3
Parents: 234df76
Author: Willem Jiang willem.ji...@gmail.com
Authored: Sun Sep 28 10:59:39 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Sun Sep 28 14:08:37 2014 +0800

--
 .../org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java| 4 ++--
 .../org/apache/camel/component/cxf/jaxrs/CxfRsSpringRouter.xml | 4 ++--
 .../camel/component/cxf/jaxrs/JettyCxfRsSpringRouter.xml   | 6 +-
 3 files changed, 5 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/ca14720c/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
--
diff --git 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
index b4b63a1..9cf869f 100644
--- 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
+++ 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
@@ -392,8 +392,8 @@ public class CxfRsEndpoint extends DefaultEndpoint 
implements HeaderFilterStrate
 return ignoreDeleteMethodMessageBody;
 }
 
-public void setIgnoreDELETEMethodMessageBody(boolean 
ignoreDELETEMethodMessageBody) {
-this.ignoreDeleteMethodMessageBody = ignoreDELETEMethodMessageBody;
+public void setIgnoreDeleteMethodMessageBody(boolean 
ignoreDeleteMethodMessageBody) {
+this.ignoreDeleteMethodMessageBody = ignoreDeleteMethodMessageBody;
 }
 
 public BindingStyle getBindingStyle() {

http://git-wip-us.apache.org/repos/asf/camel/blob/ca14720c/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRouter.xml
--
diff --git 
a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRouter.xml
 
b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRouter.xml
index 172aac1..52d9d7f 100644
--- 
a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRouter.xml
+++ 
b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRouter.xml
@@ -64,9 +64,9 @@
   camelContext id=camel xmlns=http://camel.apache.org/schema/spring;
 route
!-- Just need to ignoreDeleteMethodMessageBody --
-   from uri=cxfrs://bean://rsServer?ignoreDeleteMethodMessageBody=true/
+   from uri=cxfrs://bean://rsServer/
to uri=log:body?level=INFO/
-   to uri=cxfrs://bean://rsClient/
+   to uri=cxfrs://bean://rsClient?ignoreDeleteMethodMessageBody=true/
 /route
   /camelContext
   

http://git-wip-us.apache.org/repos/asf/camel/blob/ca14720c/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/JettyCxfRsSpringRouter.xml
--
diff --git 
a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/JettyCxfRsSpringRouter.xml
 
b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/JettyCxfRsSpringRouter.xml
index 074bf89..0a2adce 100644
--- 
a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/JettyCxfRsSpringRouter.xml
+++ 
b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/JettyCxfRsSpringRouter.xml
@@ -52,11 +52,7 @@
 route
!-- Jetty server can be used to proxy the request to cxfrs client --
from 
uri=jetty://http://localhost:{{CXFTestSupport.port5}}/CxfRsRouterTest/route?matchOnUriPrefix=trueamp;bridgeEndpoint=true/
-   !-- We can remove this configure as the CXFRS producer is using the 
HttpAPI by default --
-   setHeader headerName=CamelCxfRsUsingHttpAPI
- constantTrue/constant
-   /setHeader
-   to uri=cxfrs://bean://rsClient/
+   to uri=cxfrs://bean://rsClient?ignoreDeleteMethodMessageBody=true/
 /route
   /camelContext
   



[08/50] git commit: CAMEL-7803 Fixed the CS errors

2014-10-17 Thread cmoulliard
CAMEL-7803 Fixed the CS errors


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 6df202851ddb017df8129fbd06c662f42c387fff
Parents: 75c973a
Author: Willem Jiang willem.ji...@gmail.com
Authored: Tue Sep 16 20:53:52 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Tue Sep 16 21:04:43 2014 +0800

--
 .../component/jdbc/DefaultJdbcPrepareStatementStrategy.java| 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/6df20285/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/DefaultJdbcPrepareStatementStrategy.java
--
diff --git 
a/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/DefaultJdbcPrepareStatementStrategy.java
 
b/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/DefaultJdbcPrepareStatementStrategy.java
index b412ff2..a88fd0e 100644
--- 
a/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/DefaultJdbcPrepareStatementStrategy.java
+++ 
b/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/DefaultJdbcPrepareStatementStrategy.java
@@ -72,8 +72,8 @@ public class DefaultJdbcPrepareStatementStrategy implements 
JdbcPrepareStatement
 return new IteratorObject() {
 private NamedQueryParser parser = new 
NamedQueryParser(query);
 private Object next;
-private boolean done = false;
-private boolean preFetched = false;
+private boolean done;
+private boolean preFetched;
 
 @Override
 public boolean hasNext() {
@@ -81,7 +81,7 @@ public class DefaultJdbcPrepareStatementStrategy implements 
JdbcPrepareStatement
 next();
 preFetched = true;
 }
-return (!done);
+return !done;
 }
 
 @Override



[17/50] git commit: CAMEL-7856 camel-cxf producer HttpAPI should not send the message body when using DELETE method

2014-10-17 Thread cmoulliard
CAMEL-7856 camel-cxf producer HttpAPI should not send the message body when 
using DELETE method


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 5b4abb619b808d317da99037b734e78fc4398d29
Parents: 2b1296e
Author: Willem Jiang willem.ji...@gmail.com
Authored: Wed Sep 24 13:41:41 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Wed Sep 24 13:43:43 2014 +0800

--
 .../java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java | 4 ++--
 .../org/apache/camel/component/cxf/jaxrs/CxfRsSpringRouter.xml   | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/5b4abb61/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java
--
diff --git 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java
 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java
index 572e991..c580445 100644
--- 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java
+++ 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java
@@ -158,8 +158,8 @@ public class CxfRsProducer extends DefaultProducer {
 
 // set the body
 Object body = null;
-if (!GET.equals(httpMethod)) {
-// need to check the request object.   
+if (!GET.equals(httpMethod)  !DELETE.equals(httpMethod)) {
+// need to check the request object if the http Method is not GET 
or DELETE   
 body = binding.bindCamelMessageBodyToRequestBody(inMessage, 
exchange);
 if (LOG.isTraceEnabled()) {
 LOG.trace(Request body =  + body);

http://git-wip-us.apache.org/repos/asf/camel/blob/5b4abb61/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRouter.xml
--
diff --git 
a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRouter.xml
 
b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRouter.xml
index 154b572..9f51dd6 100644
--- 
a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRouter.xml
+++ 
b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRouter.xml
@@ -64,6 +64,7 @@
   camelContext id=camel xmlns=http://camel.apache.org/schema/spring;
 route
from uri=cxfrs://bean://rsServer/
+   to uri=log:body?level=INFO/
!-- We can remove this configure as the CXFRS producer is using the 
HttpAPI by default --
setHeader headerName=CamelCxfRsUsingHttpAPI
  constantTrue/constant



[06/50] git commit: CAMEL-7804: MessageHelper - dump message for logging should catch throwable

2014-10-17 Thread cmoulliard
CAMEL-7804: MessageHelper - dump message for logging should catch throwable


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: e5d9899ff90ee495e759ddc66194964ce9ea86d8
Parents: 5805379
Author: Claus Ibsen davscl...@apache.org
Authored: Thu Sep 11 18:59:44 2014 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Fri Sep 12 07:27:53 2014 +0200

--
 .../org/apache/camel/util/MessageHelper.java | 19 ---
 1 file changed, 12 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/e5d9899f/camel-core/src/main/java/org/apache/camel/util/MessageHelper.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/util/MessageHelper.java 
b/camel-core/src/main/java/org/apache/camel/util/MessageHelper.java
index 0182594..ec088f3 100644
--- a/camel-core/src/main/java/org/apache/camel/util/MessageHelper.java
+++ b/camel-core/src/main/java/org/apache/camel/util/MessageHelper.java
@@ -251,13 +251,17 @@ public final class MessageHelper {
 String body = null;
 if (message.getExchange() != null) {
 try {
-body = 
message.getExchange().getContext().getTypeConverter().convertTo(String.class, 
message.getExchange(), obj);
-} catch (Exception e) {
+body = 
message.getExchange().getContext().getTypeConverter().tryConvertTo(String.class,
 message.getExchange(), obj);
+} catch (Throwable e) {
 // ignore as the body is for logging purpose
 }
 }
 if (body == null) {
-body = obj.toString();
+try {
+body = obj.toString();
+} catch (Throwable e) {
+// ignore as the body is for logging purpose
+}
 }
 
 // reset stream cache after use
@@ -359,13 +363,13 @@ public final class MessageHelper {
 // to String
 if (value != null) {
 try {
-String xml = 
message.getExchange().getContext().getTypeConverter().convertTo(String.class, 
+String xml = 
message.getExchange().getContext().getTypeConverter().tryConvertTo(String.class,
 message.getExchange(), value);
 if (xml != null) {
 // must always xml encode
 sb.append(StringHelper.xmlEncode(xml));
 }
-} catch (Exception e) {
+} catch (Throwable e) {
 // ignore as the body is for logging purpose
 }
 }
@@ -433,7 +437,8 @@ public final class MessageHelper {
 // must not cause new exceptions so run this in a try catch block
 try {
 return doDumpMessageHistoryStacktrace(exchange, exchangeFormatter, 
logStackTrace);
-} catch (Exception e) {
+} catch (Throwable e) {
+// ignore as the body is for logging purpose
 return ;
 }
 }
@@ -472,7 +477,7 @@ public final class MessageHelper {
 for (MessageHistory history : list) {
 routeId = history.getRouteId() != null ? history.getRouteId() : ;
 id = history.getNode().getId();
-// we need to avoid leak the sensibale information here
+// we need to avoid leak the sensible information here
 label =  URISupport.sanitizeUri(history.getNode().getLabel());
 elapsed = history.getElapsed();
 



[19/50] git commit: CAMEL-7863: Improve logging message and reduce verbosity from INFO to debug

2014-10-17 Thread cmoulliard
CAMEL-7863: Improve logging message and reduce verbosity from INFO to debug


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 94c748ca5e850dcaec8605e2ae77fc1091069771
Parents: a7b7206
Author: david da...@davidkarlsen.com
Authored: Thu Sep 25 19:57:06 2014 +0200
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Fri Sep 26 15:06:58 2014 +0800

--
 .../main/java/org/apache/camel/component/cxf/CxfProducer.java| 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/94c748ca/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
--
diff --git 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
index 8246c4f..28e9913 100644
--- 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
+++ 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
@@ -332,11 +332,11 @@ public class CxfProducer extends DefaultProducer 
implements AsyncProcessor {
 BindingOperationInfo answer = null;
 String lp = ex.getIn().getHeader(CxfConstants.OPERATION_NAME, 
String.class);
 if (lp == null) {
-LOG.info(CxfProducer cannot find the {} from message header, try 
to use the defaultOperationName, CxfConstants.OPERATION_NAME);
+LOG.debug(CxfProducer cannot find the {} from message header, 
trying with defaultOperationName, CxfConstants.OPERATION_NAME);
 lp = endpoint.getDefaultOperationName();
 }
 if (lp == null) {
-LOG.info(CxfProducer cannot find the {} from message header and 
there is no DefaultOperationName setting, CxfProducer will pick up the first 
available operation.,
+LOG.debug(CxfProducer cannot find the {} from message header and 
there is no DefaultOperationName setting, CxfProducer will pick up the first 
available operation.,
  CxfConstants.OPERATION_NAME);
 CollectionBindingOperationInfo bois = 
 
client.getEndpoint().getEndpointInfo().getBinding().getOperations();



[01/50] git commit: CAMEL-7796 camel-cxfrs consumer: Allow setting a custom binding.

2014-10-17 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/remotes/origin/camel-2.13.x 653f8d6f2 - f0ddb5ef7


CAMEL-7796 camel-cxfrs consumer: Allow setting a custom binding.


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: c7d05d4cf659914234c3c1a043c428c1acec911c
Parents: 9fca194
Author: Raul Kripalani ra...@apache.org
Authored: Tue Sep 9 15:45:59 2014 +0100
Committer: Raul Kripalani ra...@apache.org
Committed: Tue Sep 9 15:49:25 2014 +0100

--
 .../component/cxf/jaxrs/CxfRsEndpoint.java  |  29 -
 .../CxfRsBindingConfigurationSelectionTest.java | 127 +++
 2 files changed, 153 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/c7d05d4c/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
--
diff --git 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
index dec2747..d3e29c2 100644
--- 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
+++ 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
@@ -65,7 +65,13 @@ public class CxfRsEndpoint extends DefaultEndpoint 
implements HeaderFilterStrate
  * This is the traditional binding style, which simply dumps the 
{@link org.apache.cxf.message.MessageContentsList} coming in from the CXF stack
  * onto the IN message body. The user is then responsible for 
processing it according to the contract defined by the JAX-RS method signature.
  */
-Default
+Default,
+
+/**
+ * A custom binding set by the user.
+ */
+Custom
+
 }
 
 private static final Logger LOG = 
LoggerFactory.getLogger(CxfRsEndpoint.class);
@@ -473,8 +479,25 @@ public class CxfRsEndpoint extends DefaultEndpoint 
implements HeaderFilterStrate
 if (headerFilterStrategy == null) {
 headerFilterStrategy = new CxfRsHeaderFilterStrategy();
 }
-
-binding = bindingStyle == null || bindingStyle == BindingStyle.Default 
? new DefaultCxfRsBinding() : new SimpleCxfRsBinding();
+
+// if the user explicitly selected the Custom binding style, he must 
provide a binding
+if (bindingStyle == BindingStyle.Custom  binding == null) {
+throw new IllegalArgumentException(Custom binding style selected, 
but no binding was supplied);
+}
+
+// if the user has set a binding, do nothing, just make sure that 
BindingStyle = Custom for coherency purposes
+if (binding != null) {
+bindingStyle = BindingStyle.Custom;
+} 
+
+// set the right binding based on the binding style
+if (bindingStyle == BindingStyle.SimpleConsumer) {
+binding = new SimpleCxfRsBinding();
+} else if (bindingStyle == BindingStyle.Custom) {
+// do nothing
+} else {
+binding = new DefaultCxfRsBinding();
+}
 
 if (binding instanceof HeaderFilterStrategyAware) {
 ((HeaderFilterStrategyAware) 
binding).setHeaderFilterStrategy(getHeaderFilterStrategy());

http://git-wip-us.apache.org/repos/asf/camel/blob/c7d05d4c/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsBindingConfigurationSelectionTest.java
--
diff --git 
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsBindingConfigurationSelectionTest.java
 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsBindingConfigurationSelectionTest.java
new file mode 100644
index 000..e5d94af
--- /dev/null
+++ 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsBindingConfigurationSelectionTest.java
@@ -0,0 +1,127 @@
+/**
+ * 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 

[30/50] git commit: CAMEL-7848 Disable the AllowDefaultCodec option in camel-netty-http

2014-10-17 Thread cmoulliard
CAMEL-7848 Disable the AllowDefaultCodec option in camel-netty-http


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 84aa5c6ca18b308dd371d4cf8341f559e66a5dd1
Parents: baac167
Author: Willem Jiang willem.ji...@gmail.com
Authored: Mon Sep 29 09:03:25 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Mon Sep 29 22:10:58 2014 +0800

--
 .../camel/component/netty/http/NettyHttpConfiguration.java  | 9 +
 .../apache/camel/component/netty/NettyConfiguration.java| 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/84aa5c6c/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
--
diff --git 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
index 420a448..9c5dd4c 100644
--- 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
+++ 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
@@ -160,5 +160,14 @@ public class NettyHttpConfiguration extends 
NettyConfiguration {
 public void setChunkedMaxContentLength(int chunkedMaxContentLength) {
 this.chunkedMaxContentLength = chunkedMaxContentLength;
 }
+
+// Don't support allowDefaultCodec
+public boolean isAllowDefaultCodec() {
+return false;
+}
+
+public void setAllowDefaultCodec(boolean allowDefaultCodec) {
+throw new UnsupportedOperationException(You cannot 
setAllowDefaultCodec here.);
+}
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/84aa5c6c/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
--
diff --git 
a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
 
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
index 83ab62d..cf3aa0d 100644
--- 
a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
+++ 
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
@@ -161,7 +161,7 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
 
 // add default encoders and decoders
 if (encoders.isEmpty()  decoders.isEmpty()) {
-if (allowDefaultCodec) {
+if (isAllowDefaultCodec()) {
 // are we textline or object?
 if (isTextline()) {
 Charset charset = getEncoding() != null ? 
Charset.forName(getEncoding()) : CharsetUtil.UTF_8;



[34/50] git commit: Overrdie the httpclient version in camel-restlet pom

2014-10-17 Thread cmoulliard
Overrdie the httpclient version in camel-restlet pom


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: b9ca47981dd2c43da3d6e5d5c225043ec9c4c213
Parents: b23ab8b
Author: Willem Jiang willem.ji...@gmail.com
Authored: Tue Sep 30 13:28:03 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Tue Sep 30 13:29:48 2014 +0800

--
 components/camel-restlet/pom.xml | 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/b9ca4798/components/camel-restlet/pom.xml
--
diff --git a/components/camel-restlet/pom.xml b/components/camel-restlet/pom.xml
index 382bb45..c66a241 100644
--- a/components/camel-restlet/pom.xml
+++ b/components/camel-restlet/pom.xml
@@ -6,9 +6,9 @@
 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.
@@ -29,7 +29,7 @@
   packagingbundle/packaging
   nameCamel :: Restlet/name
   descriptionCamel REST (Restlet baesd) Component/description
-  
+
   properties
 camel.osgi.export.pkg
 org.apache.camel.component.restlet.*
@@ -63,10 +63,16 @@
  version${restlet-version}/version
 /dependency
 
+dependency
+ groupIdorg.apache.httpcomponents/groupId
+ artifactIdhttpclient/artifactId
+ version${httpclient4-version}/version
+/dependency
+
 !-- test dependencies --
 dependency
   groupIdorg.apache.camel/groupId
-  artifactIdcamel-test-spring/artifactId  
+  artifactIdcamel-test-spring/artifactId
   scopetest/scope
 /dependency
 



[23/50] git commit: CAMEL-7864: Updates to allow setting Kafka's zookeeper.connect directly.

2014-10-17 Thread cmoulliard
CAMEL-7864: Updates to allow setting Kafka's zookeeper.connect directly.

- Fixed a few accidental tabs...


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: b840c4dd265e1c1a9d1c0246de5ca4b8fa83ca6f
Parents: daccc8e
Author: john.shields john.shie...@tubemogul.com
Authored: Thu Sep 25 21:15:16 2014 -0500
Committer: Claus Ibsen davscl...@apache.org
Committed: Sat Sep 27 13:23:19 2014 +0200

--
 .../java/org/apache/camel/component/kafka/KafkaEndpoint.java | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/b840c4dd/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaEndpoint.java
--
diff --git 
a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaEndpoint.java
 
b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaEndpoint.java
index deed68a..af1bcd1 100644
--- 
a/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaEndpoint.java
+++ 
b/components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaEndpoint.java
@@ -103,13 +103,13 @@ public class KafkaEndpoint extends DefaultEndpoint {
 //-
 
 public String getZookeeperConnect() {
-   return configuration.getZookeeperConnect();
+return configuration.getZookeeperConnect();
 }
 
 public void setZookeeperConnect(String zookeeperConnect) {
-   configuration.setZookeeperConnect(zookeeperConnect);
-   }
-
+configuration.setZookeeperConnect(zookeeperConnect);
+}
+
 public String getZookeeperHost() {
 return configuration.getZookeeperHost();
 }



[44/50] git commit: upgraded jsch 0.1.50 to 0.1.51 and fixed the failing unit tests

2014-10-17 Thread cmoulliard
upgraded jsch 0.1.50 to 0.1.51 and fixed the failing unit tests


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: b1379c6cf24add7da74995bcfe7968ddb436c4ae
Parents: 21ff698
Author: Christian Mueller cmuel...@apache.org
Authored: Wed Oct 15 20:13:25 2014 +0200
Committer: Christian Mueller cmuel...@apache.org
Committed: Wed Oct 15 20:13:25 2014 +0200

--
 .../camel/component/jsch/ScpServerTestSupport.java   | 11 +++
 components/camel-jsch/src/test/resources/scp/known_hosts |  0
 parent/pom.xml   |  2 +-
 3 files changed, 4 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/b1379c6c/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java
--
diff --git 
a/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java
 
b/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java
index 1213e9d..8793f44 100644
--- 
a/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java
+++ 
b/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpServerTestSupport.java
@@ -48,12 +48,9 @@ import org.junit.BeforeClass;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/**
- * @version 
- */
 public abstract class ScpServerTestSupport extends CamelTestSupport {
 protected static final Logger LOG = 
LoggerFactory.getLogger(ScpServerTestSupport.class);
-protected static final String SCP_ROOT_DIR = target/scp;
+protected static final String SCP_ROOT_DIR = target/test-classes/scp;
 protected static final String KNOWN_HOSTS = known_hosts;
 protected static int port;
 
@@ -109,7 +106,6 @@ public abstract class ScpServerTestSupport extends 
CamelTestSupport {
 // and get errors when the ssh server is stopping.
 }
 }
-FileUtil.deleteFile(new File(knownHostsFile));
 deleteDirectory(getScpPath());
 }
 
@@ -153,8 +149,7 @@ public abstract class ScpServerTestSupport extends 
CamelTestSupport {
 }
 
 protected void setupKnownHosts() {
-knownHostsFile = SCP_ROOT_DIR + / + KNOWN_HOSTS + - + getPort();
-FileUtil.deleteFile(new File(knownHostsFile));
+knownHostsFile = SCP_ROOT_DIR + / + KNOWN_HOSTS;
 if (!acceptLocalhostConnections) {
 return;
 }
@@ -163,7 +158,7 @@ public abstract class ScpServerTestSupport extends 
CamelTestSupport {
 // camel-jsch will only connect to known hosts. For unit testing
 // we use a known key, but since the port it dynamic, the 
 // known_hosts file will be generated by the following code and 
-// should should contain a line like below (if 
+// should contain a line like below (if 
 // HashKnownHosts==yes the hostname:port part will be 
 // hashed and look a bit more complicated).
 //

http://git-wip-us.apache.org/repos/asf/camel/blob/b1379c6c/components/camel-jsch/src/test/resources/scp/known_hosts
--
diff --git a/components/camel-jsch/src/test/resources/scp/known_hosts 
b/components/camel-jsch/src/test/resources/scp/known_hosts
new file mode 100644
index 000..e69de29

http://git-wip-us.apache.org/repos/asf/camel/blob/b1379c6c/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index 75cd7bf..e2a0d93 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -241,7 +241,7 @@
 jruby-version1.7.13/jruby-version
 jsendnsca-version1.3.1/jsendnsca-version
 jsmpp-version2.1.0_4/jsmpp-version
-jsch-version0.1.50/jsch-version
+jsch-version0.1.51/jsch-version
 jsch-bundle-version0.1.50_1/jsch-bundle-version
 jsendnsca-bundle-version1.3.1_3/jsendnsca-bundle-version
 jsonlib-bundle-version2.4_1/jsonlib-bundle-version



[09/50] git commit: CAMEL-7803

2014-10-17 Thread cmoulliard
CAMEL-7803

 Patch added new boolean flag preFetched to allow inserts with parameters 
that have null values


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 75c973a25e3a12d749dc7da8d5e6f3d92d15cc26
Parents: 543e3a5
Author: nathanwray nathanw...@users.noreply.github.com
Authored: Thu Sep 11 11:57:09 2014 -0400
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Tue Sep 16 21:04:43 2014 +0800

--
 .../DefaultJdbcPrepareStatementStrategy.java| 20 +---
 1 file changed, 9 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/75c973a2/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/DefaultJdbcPrepareStatementStrategy.java
--
diff --git 
a/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/DefaultJdbcPrepareStatementStrategy.java
 
b/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/DefaultJdbcPrepareStatementStrategy.java
index cceafae..b412ff2 100644
--- 
a/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/DefaultJdbcPrepareStatementStrategy.java
+++ 
b/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/DefaultJdbcPrepareStatementStrategy.java
@@ -72,22 +72,21 @@ public class DefaultJdbcPrepareStatementStrategy implements 
JdbcPrepareStatement
 return new IteratorObject() {
 private NamedQueryParser parser = new 
NamedQueryParser(query);
 private Object next;
-private boolean done;
+private boolean done = false;
+private boolean preFetched = false;
 
 @Override
 public boolean hasNext() {
-if (done) {
-return false;
+if (!done  !preFetched) {
+next();
+preFetched = true;
 }
-if (next == null) {
-next = next();
-}
-return next != null;
+return (!done);
 }
 
 @Override
 public Object next() {
-if (next == null) {
+if (!preFetched) {
 String key = parser.next();
 if (key == null) {
 done = true;
@@ -100,9 +99,8 @@ public class DefaultJdbcPrepareStatementStrategy implements 
JdbcPrepareStatement
 }
 next = headerMap.get(key);
 }
-Object answer = next;
-next = null;
-return answer;
+preFetched = false;
+return next;
 }
 
 @Override



[36/50] git commit: CAMEL-7885: Restarting a timer endpoint may not trigger at expected time the first time

2014-10-17 Thread cmoulliard
CAMEL-7885: Restarting a timer endpoint may not trigger at expected time the 
first time


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 845410e83ab12f5b88cbdb5891e2ccb241e8608d
Parents: 077e1e2
Author: Claus Ibsen davscl...@apache.org
Authored: Wed Oct 1 11:22:39 2014 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Wed Oct 1 11:22:53 2014 +0200

--
 .../org/apache/camel/component/timer/TimerComponent.java | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/845410e8/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 ec67f01..6c6ab01 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
@@ -35,7 +35,7 @@ import org.apache.camel.impl.UriEndpointComponent;
  */
 public class TimerComponent extends UriEndpointComponent {
 private final MapString, Timer timers = new HashMapString, Timer();
-private final MapString, AtomicInteger refCounts = new HashMap();
+private final MapString, AtomicInteger refCounts = new HashMapString, 
AtomicInteger();
 
 public TimerComponent() {
 super(TimerEndpoint.class);
@@ -60,7 +60,9 @@ public class TimerComponent extends UriEndpointComponent {
 } else {
 // increase reference counter
 AtomicInteger counter = refCounts.get(key);
-counter.incrementAndGet();
+if (counter != null) {
+counter.incrementAndGet();
+}
 }
 }
 return answer;
@@ -75,7 +77,7 @@ public class TimerComponent extends UriEndpointComponent {
 synchronized (timers) {
 // decrease reference counter
 AtomicInteger counter = refCounts.get(key);
-if (counter.decrementAndGet() = 0) {
+if (counter != null  counter.decrementAndGet() = 0) {
 refCounts.remove(key);
 // remove timer as its no longer in use
 Timer timer = timers.remove(key);



[18/50] git commit: Fixed the camel-web build error with Windows

2014-10-17 Thread cmoulliard
Fixed the camel-web build error with Windows


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: a7b7206dbc0b12adb55280418b9c2f3d6fa1bf0f
Parents: 5b4abb6
Author: Willem Jiang willem.ji...@gmail.com
Authored: Thu Sep 25 11:42:47 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Thu Sep 25 11:45:35 2014 +0800

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


http://git-wip-us.apache.org/repos/asf/camel/blob/a7b7206d/components/camel-web/pom.xml
--
diff --git a/components/camel-web/pom.xml b/components/camel-web/pom.xml
index 626bb35..eeb925f 100644
--- a/components/camel-web/pom.xml
+++ b/components/camel-web/pom.xml
@@ -245,9 +245,9 @@
 /plugin
 
 !-- mvn tomcat7:run --
-plugin  
-  groupIdorg.apache.tomcat.maven/groupId  
-  artifactIdtomcat7-maven-plugin/artifactId  
+plugin
+  groupIdorg.apache.tomcat.maven/groupId
+  artifactIdtomcat7-maven-plugin/artifactId
 /plugin
 
 
@@ -371,7 +371,7 @@
 /docletArtifact
 /docletArtifacts
 additionalparam-output
-${project.build.outputDirectory}/resourcedoc.xml
+  
${project.build.outputDirectory}${file.separator}resourcedoc.xml
 /additionalparam
 /configuration
 /plugin



[41/50] git commit: CAMEL-7900 Honored chunksize in camel-hdfs

2014-10-17 Thread cmoulliard
CAMEL-7900 Honored chunksize in camel-hdfs


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 607ab4e83cb4af96b88d90a62bfdd1b609c53ce0
Parents: 4ff0ee9
Author: Willem Jiang willem.ji...@gmail.com
Authored: Fri Oct 10 21:58:47 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Sat Oct 11 13:57:24 2014 +0800

--
 .../main/java/org/apache/camel/component/hdfs/HdfsFileType.java| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/607ab4e8/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsFileType.java
--
diff --git 
a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsFileType.java
 
b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsFileType.java
index a3b2112..97c174f 100644
--- 
a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsFileType.java
+++ 
b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsFileType.java
@@ -75,7 +75,7 @@ public enum HdfsFileType {
 public long next(HdfsInputStream hdfsistr, HolderObject key, 
HolderObject value) {
 try {
 ByteArrayOutputStream bos = new 
ByteArrayOutputStream(hdfsistr.getChunkSize());
-byte buf[] = new byte[HdfsConstants.DEFAULT_BUFFERSIZE];
+byte buf[] = new byte[hdfsistr.getChunkSize()];
 int bytesRead = ((InputStream) hdfsistr.getIn()).read(buf);
 if (bytesRead = 0) {
 bos.write(buf, 0, bytesRead);



[20/50] git commit: CAMEL-7863 Updated the java doc for the operation name lookup.

2014-10-17 Thread cmoulliard
CAMEL-7863 Updated the java doc for the operation name lookup.


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 55c5c4b4d26b97a4f61d660a0951e617dc9fdb68
Parents: 94c748c
Author: Willem Jiang willem.ji...@gmail.com
Authored: Fri Sep 26 11:29:36 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Fri Sep 26 15:07:02 2014 +0800

--
 .../java/org/apache/camel/component/cxf/CxfProducer.java  | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/55c5c4b4/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
--
diff --git 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
index 28e9913..ea0e6d7 100644
--- 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
+++ 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
@@ -324,8 +324,14 @@ public class CxfProducer extends DefaultProducer 
implements AsyncProcessor {
 }
 
 /**
- * Get operation name from header and use it to lookup and return a 
- * {@link BindingOperationInfo}.
+ * pGet operation name from header and use it to lookup and return a 
+ * {@link BindingOperationInfo}./p
+ * pCxfProducer lookups the operation name lookup with below order, and 
it uses the first found one which is not null:/p
+ *  ul
+ *li Using the in message header operationName. /li
+ *li Using the defaultOperationName option value from the 
CxfEndpoint. /li
+ *li Using the first operation which is find from the CxfEndpoint 
Operations list. /li
+ *  ul
  */
 private BindingOperationInfo getBindingOperationInfo(Exchange ex) {
 CxfEndpoint endpoint = (CxfEndpoint)this.getEndpoint();



[31/50] git commit: Fixed the unit test issue of upgrade to CXF 2.7.12

2014-10-17 Thread cmoulliard
Fixed the unit test issue of upgrade to CXF 2.7.12


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 3bf3aefa3cb21230b36cda933746635c88f51a23
Parents: 84aa5c6
Author: Willem Jiang willem.ji...@gmail.com
Authored: Wed Jul 16 15:42:51 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Mon Sep 29 22:14:20 2014 +0800

--
 .../cxf/mtom/CxfMtomProducerPayloadModeTest.java   | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/3bf3aefa/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/mtom/CxfMtomProducerPayloadModeTest.java
--
diff --git 
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/mtom/CxfMtomProducerPayloadModeTest.java
 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/mtom/CxfMtomProducerPayloadModeTest.java
index f1a70a1..794e39e 100644
--- 
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/mtom/CxfMtomProducerPayloadModeTest.java
+++ 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/mtom/CxfMtomProducerPayloadModeTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.cxf.mtom;
 
 import java.awt.image.BufferedImage;
 import java.io.StringReader;
+import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -124,16 +125,17 @@ public class CxfMtomProducerPayloadModeTest extends 
AbstractJUnit4SpringContextT
 Element ele = 
(Element)xu.getValue(//ns:DetailResponse/ns:photo/xop:Include, oute,
XPathConstants.NODE);
 String photoId = ele.getAttribute(href).substring(4); // skip cid:
-
+
 ele = (Element)xu.getValue(//ns:DetailResponse/ns:image/xop:Include, 
oute,
XPathConstants.NODE);
 String imageId = ele.getAttribute(href).substring(4); // skip cid:
 
-DataHandler dr = exchange.getOut().getAttachment(photoId);
+
+DataHandler dr = 
exchange.getOut().getAttachment(decodingReference(photoId));
 Assert.assertEquals(application/octet-stream, dr.getContentType());
 MtomTestHelper.assertEquals(MtomTestHelper.RESP_PHOTO_DATA, 
IOUtils.readBytesFromStream(dr.getInputStream()));

-dr = exchange.getOut().getAttachment(imageId);
+dr = exchange.getOut().getAttachment(decodingReference(imageId));
 Assert.assertEquals(image/jpeg, dr.getContentType());
 
 BufferedImage image = ImageIO.read(dr.getInputStream());
@@ -144,6 +146,11 @@ public class CxfMtomProducerPayloadModeTest extends 
AbstractJUnit4SpringContextT
 
 }
 
+// CXF encoding the XOP reference since 3.0.1
+private String decodingReference(String reference) throws 
UnsupportedEncodingException {
+return java.net.URLDecoder.decode(reference, UTF-8);
+}
+
 protected boolean isMtomEnabled() {
 return true;
 }



[38/50] git commit: CAMEL-7896 netty http producer should close the channel when theresponse connection header is close

2014-10-17 Thread cmoulliard
CAMEL-7896 netty http producer should close the channel when theresponse 
connection header is close


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: d843918a90126e177026cfdfe7a727580bb3a79a
Parents: a5eb8c0
Author: Willem Jiang willem.ji...@gmail.com
Authored: Wed Oct 8 21:32:39 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Thu Oct 9 10:32:38 2014 +0800

--
 .../netty/http/handlers/HttpClientChannelHandler.java | 7 +++
 .../camel/component/netty/handlers/ClientChannelHandler.java  | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/d843918a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpClientChannelHandler.java
--
diff --git 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpClientChannelHandler.java
 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpClientChannelHandler.java
index 0f3a7a9..f1abaac 100644
--- 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpClientChannelHandler.java
+++ 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpClientChannelHandler.java
@@ -20,6 +20,7 @@ import java.util.Map;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
+import org.apache.camel.component.netty.NettyConstants;
 import org.apache.camel.component.netty.handlers.ClientChannelHandler;
 import org.apache.camel.component.netty.http.NettyHttpProducer;
 import org.jboss.netty.buffer.ChannelBuffer;
@@ -28,6 +29,7 @@ import org.jboss.netty.channel.ChannelHandlerContext;
 import org.jboss.netty.channel.MessageEvent;
 import org.jboss.netty.handler.codec.http.HttpChunk;
 import org.jboss.netty.handler.codec.http.HttpChunkTrailer;
+import org.jboss.netty.handler.codec.http.HttpHeaders;
 import org.jboss.netty.handler.codec.http.HttpResponse;
 import org.jboss.netty.handler.codec.http.HttpResponseStatus;
 import org.slf4j.Logger;
@@ -91,6 +93,11 @@ public class HttpClientChannelHandler extends 
ClientChannelHandler {
 }
 } else if (msg instanceof HttpResponse) {
 response = (HttpResponse) msg;
+Exchange exchange = super.getExchange(ctx);
+if (!HttpHeaders.isKeepAlive(response)) {
+// just want to make sure we close the channel if the 
keepAlive is not true
+
exchange.setProperty(NettyConstants.NETTY_CLOSE_CHANNEL_WHEN_COMPLETE, true);
+}
 if (LOG.isTraceEnabled()) {
 LOG.trace(HttpResponse received: {} chunked:, response, 
response.isChunked());
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d843918a/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java
--
diff --git 
a/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java
 
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java
index e0ddb9f..ea9d578 100644
--- 
a/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java
+++ 
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java
@@ -222,7 +222,7 @@ public class ClientChannelHandler extends 
SimpleChannelUpstreamHandler {
 }
 }
 
-private Exchange getExchange(ChannelHandlerContext ctx) {
+protected Exchange getExchange(ChannelHandlerContext ctx) {
 NettyCamelState state = producer.getState(ctx.getChannel());
 return state != null ? state.getExchange() : null;
 }



[11/50] git commit: CAMEL-7830 RestLetHeaderFilterStrategy should filter the header of Transfer-Encoding

2014-10-17 Thread cmoulliard
CAMEL-7830 RestLetHeaderFilterStrategy should filter the header of 
Transfer-Encoding

Conflicts:

components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletSetBodyTest.java


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: d1628b4bd59d5b6bb4187b0164e07026bbb065cd
Parents: aca61d1
Author: Willem Jiang willem.ji...@gmail.com
Authored: Wed Sep 17 10:48:41 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Wed Sep 17 10:56:53 2014 +0800

--
 .../component/restlet/RestletHeaderFilterStrategy.java  |  5 +
 .../camel/component/restlet/RestletSetBodyTest.java | 12 ++--
 2 files changed, 15 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/d1628b4b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java
--
diff --git 
a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java
 
b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java
index 3a102c5..662328c 100644
--- 
a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java
+++ 
b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java
@@ -37,6 +37,11 @@ public class RestletHeaderFilterStrategy extends 
DefaultHeaderFilterStrategy {
 // The CamelAcceptContentType header is not added to the outgoing 
HTTP 
 // headers but it will be going out as Accept.
 getOutFilter().add(Exchange.ACCEPT_CONTENT_TYPE);
+
+// As we don't set the transfer_encoding protocol header for the 
restlet service
+// we need to remove the transfer_encoding which could let the client 
wait forever
+getOutFilter().add(Exchange.TRANSFER_ENCODING);
+setCaseInsensitive(true);
 }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d1628b4b/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletSetBodyTest.java
--
diff --git 
a/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletSetBodyTest.java
 
b/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletSetBodyTest.java
index 74906ff..be12f05 100644
--- 
a/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletSetBodyTest.java
+++ 
b/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletSetBodyTest.java
@@ -20,6 +20,7 @@ import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.test.AvailablePortFinder;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.impl.client.CloseableHttpClient;
@@ -32,16 +33,18 @@ import org.restlet.representation.InputRepresentation;
  * @version
  */
 public class RestletSetBodyTest extends RestletTestSupport {
+protected static int portNum2 =  
AvailablePortFinder.getNextAvailable(4000);
 
 @Test
 public void testSetBody() throws Exception {
 String response = template.requestBody(restlet:http://0.0.0.0:; + 
portNum + /stock/ORCL?restletMethod=get, null, String.class);
 assertEquals(110, response);
+
 }
 
 @Test
 public void testSetBodyRepresentation() throws Exception {
-HttpGet get = new HttpGet(http://0.0.0.0:; + 1234 + /images/123);
+HttpGet get = new HttpGet(http://0.0.0.0:; + portNum + /images/123);
 CloseableHttpClient httpclient = HttpClientBuilder.create().build();
 InputStream is = null;
 try {
@@ -70,7 +73,12 @@ public class RestletSetBodyTest extends RestletTestSupport {
 @Override
 public void configure() throws Exception {
 from(restlet:http://0.0.0.0:; + portNum + 
/stock/{symbol}?restletMethods=get)
+.to(http://127.0.0.1:; + portNum2 + 
/test?bridgeEndpoint=true)
+//.removeHeader(Transfer-Encoding)
 .setBody().constant(110);
+
+from(jetty:http://0.0.0.0:; + portNum2 + 
/test).setBody().constant(response is back);
+
 // create ByteArrayRepresentation for response
 byte[] image = new byte[10];
 for (int i = 0; i  10; i++) {
@@ -78,7 +86,7 @@ public class 

[27/50] git commit: CAMEL-7848 Added support for registry's encoders and decoders

2014-10-17 Thread cmoulliard
CAMEL-7848 Added support for registry's encoders and decoders


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 229890c49ce0aefdefa2d8dc17b12ae0abdc16ab
Parents: ca14720
Author: Willem Jiang willem.ji...@gmail.com
Authored: Sun Sep 28 13:59:49 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Sun Sep 28 14:41:05 2014 +0800

--
 .../netty/http/HttpClientPipelineFactory.java   | 24 +++-
 .../netty/http/HttpServerPipelineFactory.java   | 23 +++
 2 files changed, 46 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/229890c4/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpClientPipelineFactory.java
--
diff --git 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpClientPipelineFactory.java
 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpClientPipelineFactory.java
index b5d2d4d..846d690 100644
--- 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpClientPipelineFactory.java
+++ 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpClientPipelineFactory.java
@@ -16,11 +16,13 @@
  */
 package org.apache.camel.component.netty.http;
 
+import java.util.List;
 import java.util.concurrent.TimeUnit;
 
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLEngine;
 
+import org.apache.camel.component.netty.ChannelHandlerFactory;
 import org.apache.camel.component.netty.ClientPipelineFactory;
 import org.apache.camel.component.netty.NettyComponent;
 import org.apache.camel.component.netty.NettyConfiguration;
@@ -79,6 +81,26 @@ public class HttpClientPipelineFactory extends 
ClientPipelineFactory {
 LOG.debug(Client SSL handler configured and added as an 
interceptor against the ChannelPipeline: {}, sslHandler);
 pipeline.addLast(ssl, sslHandler);
 }
+
+ListChannelHandler decoders = 
producer.getConfiguration().getDecoders();
+for (int x = 0; x  decoders.size(); x++) {
+ChannelHandler decoder = decoders.get(x);
+if (decoder instanceof ChannelHandlerFactory) {
+// use the factory to create a new instance of the channel as 
it may not be shareable
+decoder = ((ChannelHandlerFactory) 
decoder).newChannelHandler();
+}
+pipeline.addLast(decoder- + x, decoder);
+}
+
+ListChannelHandler encoders = 
producer.getConfiguration().getEncoders();
+for (int x = 0; x  encoders.size(); x++) {
+ChannelHandler encoder = encoders.get(x);
+if (encoder instanceof ChannelHandlerFactory) {
+// use the factory to create a new instance of the channel as 
it may not be shareable
+encoder = ((ChannelHandlerFactory) 
encoder).newChannelHandler();
+}
+pipeline.addLast(encoder- + x, encoder);
+}
 
 pipeline.addLast(http, new HttpClientCodec());
 
@@ -89,7 +111,7 @@ public class HttpClientPipelineFactory extends 
ClientPipelineFactory {
 ChannelHandler timeout = new 
ReadTimeoutHandler(NettyComponent.getTimer(), 
producer.getConfiguration().getRequestTimeout(), TimeUnit.MILLISECONDS);
 pipeline.addLast(timeout, timeout);
 }
-
+
 // handler to route Camel messages
 pipeline.addLast(handler, new HttpClientChannelHandler(producer));
 

http://git-wip-us.apache.org/repos/asf/camel/blob/229890c4/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpServerPipelineFactory.java
--
diff --git 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpServerPipelineFactory.java
 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpServerPipelineFactory.java
index 5d705ad..37fc58b 100644
--- 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpServerPipelineFactory.java
+++ 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpServerPipelineFactory.java
@@ -16,10 +16,13 @@
  */
 package org.apache.camel.component.netty.http;
 
+import java.util.List;
+
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLEngine;
 
 import org.apache.camel.CamelContext;
+import 

[47/50] git commit: fixed some more CS errors

2014-10-17 Thread cmoulliard
fixed some more CS errors


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: f0e3e2015c7a5297b19e741f11c9fb9753bae5ba
Parents: f424d82
Author: Christian Mueller cmuel...@apache.org
Authored: Thu Oct 16 10:33:13 2014 +0200
Committer: Christian Mueller cmuel...@apache.org
Committed: Thu Oct 16 10:33:13 2014 +0200

--
 .../camel/component/sjms/SjmsConsumer.java  |   2 +-
 .../camel/component/sjms/SjmsProducer.java  |   2 +-
 .../sjms/threadpool/ThreadPoolTest.java | 131 ++-
 .../log/CustomExchangeFormatterTest.java|   8 +-
 4 files changed, 73 insertions(+), 70 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/f0e3e201/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsConsumer.java
--
diff --git 
a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsConsumer.java
 
b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsConsumer.java
index 4ae566d..017acbe 100644
--- 
a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsConsumer.java
+++ 
b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsConsumer.java
@@ -157,7 +157,7 @@ public class SjmsConsumer extends DefaultConsumer {
 consumers.drainPool();
 consumers = null;
 }
-if(this.executor!=null){
+if (this.executor != null) {
 
getEndpoint().getCamelContext().getExecutorServiceManager().shutdownGraceful(this.executor);
 }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/f0e3e201/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsProducer.java
--
diff --git 
a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsProducer.java
 
b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsProducer.java
index 582d657..8e9e878 100644
--- 
a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsProducer.java
+++ 
b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsProducer.java
@@ -146,7 +146,7 @@ public abstract class SjmsProducer extends 
DefaultAsyncProducer {
 getProducers().drainPool();
 setProducers(null);
 }
-if(this.executor!=null){
+if (this.executor != null) {
 
getEndpoint().getCamelContext().getExecutorServiceManager().shutdownGraceful(this.executor);
 }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/f0e3e201/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/threadpool/ThreadPoolTest.java
--
diff --git 
a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/threadpool/ThreadPoolTest.java
 
b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/threadpool/ThreadPoolTest.java
index 1bff29e..3c67133 100644
--- 
a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/threadpool/ThreadPoolTest.java
+++ 
b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/threadpool/ThreadPoolTest.java
@@ -36,77 +36,80 @@ import org.slf4j.LoggerFactory;
  */
 public class ThreadPoolTest extends JmsTestSupport {
 
-   private static final Logger LOGGER = 
LoggerFactory.getLogger(ThreadPoolTest.class);
-   private static final String FROM_ROUTE = from;
-   private static final String TO_ROUTE = to;
+private static final Logger LOGGER = 
LoggerFactory.getLogger(ThreadPoolTest.class);
+private static final String FROM_ROUTE = from;
+private static final String TO_ROUTE = to;
 
-   @Override
-   protected boolean useJmx() {
-   return true;
-   }
+@Override
+protected boolean useJmx() {
+return true;
+}
 
-   @Override
-   protected RouteBuilder createRouteBuilder() throws Exception {
-   return new RouteBuilder() {
-   @Override
-   public void configure() throws Exception {
-   
from(direct:start).to(sjms:queue:foo).routeId(FROM_ROUTE);
-   
from(sjms:queue:foo).to(log:test.log.1?showBody=true).routeId(TO_ROUTE);
-   }
-   };
-   }
+@Override
+protected RouteBuilder createRouteBuilder() throws Exception {
+return new RouteBuilder() {
+@Override
+public 

[16/50] git commit: CAMEL-7852 Fixed the issue that camel-msv component cannot be resolved in OSGi

2014-10-17 Thread cmoulliard
CAMEL-7852 Fixed the issue that camel-msv component cannot be resolved in OSGi

Conflicts:

tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelMsvTest.java


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 2b1296e7758a1e0377e602796c1d8b23db745a94
Parents: 61867a0
Author: Willem Jiang willem.ji...@gmail.com
Authored: Tue Sep 23 20:16:47 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Tue Sep 23 20:27:29 2014 +0800

--
 components/camel-msv/pom.xml | 1 +
 .../src/test/java/org/apache/camel/itest/karaf/CamelMsvTest.java | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/2b1296e7/components/camel-msv/pom.xml
--
diff --git a/components/camel-msv/pom.xml b/components/camel-msv/pom.xml
index d7186e2..24a457a 100644
--- a/components/camel-msv/pom.xml
+++ b/components/camel-msv/pom.xml
@@ -31,6 +31,7 @@
 
   properties
 
camel.osgi.export.pkgorg.apache.camel.component.validator.msv.*/camel.osgi.export.pkg
+camel.osgi.import.pkgorg.apache.camel,*/camel.osgi.import.pkg
 
camel.osgi.export.serviceorg.apache.camel.spi.ComponentResolver;component=msv/camel.osgi.export.service
   /properties
 

http://git-wip-us.apache.org/repos/asf/camel/blob/2b1296e7/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelMsvTest.java
--
diff --git 
a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelMsvTest.java
 
b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelMsvTest.java
index 08dbecb..007d927 100644
--- 
a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelMsvTest.java
+++ 
b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelMsvTest.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.itest.karaf;
 
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
@@ -24,7 +23,6 @@ import org.ops4j.pax.exam.junit.Configuration;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 
 @RunWith(JUnit4TestRunner.class)
-@Ignore(Fails for some unknown reason)
 public class CamelMsvTest extends AbstractFeatureTest {
 
 public static final String COMPONENT = extractName(CamelMsvTest.class);
@@ -39,4 +37,4 @@ public class CamelMsvTest extends AbstractFeatureTest {
 return configure(COMPONENT);
 }
 
-}
\ No newline at end of file
+}



[49/50] git commit: CAMEL-7910 Netty {Client|Server}ChannelHandler need to pass the close and open event around

2014-10-17 Thread cmoulliard
CAMEL-7910 Netty {Client|Server}ChannelHandler need to pass the close and open 
event around


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: b41b8d05adcb3bd3bac8fd8948bef128f646d42a
Parents: 9cf11bd
Author: Willem Jiang willem.ji...@gmail.com
Authored: Tue Oct 14 10:24:46 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Fri Oct 17 11:36:33 2014 +0800

--
 .../camel/component/netty/handlers/ClientChannelHandler.java | 4 
 .../camel/component/netty/handlers/ServerChannelHandler.java | 4 
 2 files changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/b41b8d05/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java
--
diff --git 
a/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java
 
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java
index ea9d578..7a6d31f 100644
--- 
a/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java
+++ 
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java
@@ -56,6 +56,8 @@ public class ClientChannelHandler extends 
SimpleChannelUpstreamHandler {
 }
 // to keep track of open sockets
 producer.getAllChannels().add(channelStateEvent.getChannel());
+// make sure the event can be processed by other handlers
+super.channelOpen(ctx, channelStateEvent);
 }
 
 @Override
@@ -119,6 +121,8 @@ public class ClientChannelHandler extends 
SimpleChannelUpstreamHandler {
 // signal callback
 callback.done(false);
 }
+// make sure the event can be processed by other handlers
+super.channelClosed(ctx, e);
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/b41b8d05/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java
--
diff --git 
a/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java
 
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java
index 6bafe7b..f966dee 100644
--- 
a/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java
+++ 
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java
@@ -56,6 +56,8 @@ public class ServerChannelHandler extends 
SimpleChannelUpstreamHandler {
 }
 // to keep track of open sockets
 consumer.getNettyServerBootstrapFactory().addChannel(e.getChannel());
+   // make sure the event can be processed by other handlers
+super.channelOpen(ctx, e);
 }
 
 @Override
@@ -65,6 +67,8 @@ public class ServerChannelHandler extends 
SimpleChannelUpstreamHandler {
 }
 // to keep track of open sockets
 
consumer.getNettyServerBootstrapFactory().removeChannel(e.getChannel());
+// make sure the event can be processed by other handlers
+super.channelClosed(ctx, e);
 }
 
 @Override



[45/50] git commit: CAMEL-7917: camel-jsch unit tests are failing

2014-10-17 Thread cmoulliard
CAMEL-7917: camel-jsch unit tests are failing


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 217c81ccbd476d1614e41099d890974b325de081
Parents: b1379c6
Author: Christian Mueller cmuel...@apache.org
Authored: Wed Oct 15 21:51:39 2014 +0200
Committer: Christian Mueller cmuel...@apache.org
Committed: Wed Oct 15 21:51:39 2014 +0200

--
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/217c81cc/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index e2a0d93..9ec4f30 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -242,7 +242,7 @@
 jsendnsca-version1.3.1/jsendnsca-version
 jsmpp-version2.1.0_4/jsmpp-version
 jsch-version0.1.51/jsch-version
-jsch-bundle-version0.1.50_1/jsch-bundle-version
+jsch-bundle-version0.1.51_1/jsch-bundle-version
 jsendnsca-bundle-version1.3.1_3/jsendnsca-bundle-version
 jsonlib-bundle-version2.4_1/jsonlib-bundle-version
 jsonlib-version2.4/jsonlib-version



[39/50] git commit: CAMEL-7892 Fixed the restlet DELETE with no entity issue

2014-10-17 Thread cmoulliard
CAMEL-7892 Fixed the restlet DELETE with no entity issue


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 3580582d42358ec073c6d7bf7bdcf59420052b9f
Parents: d843918
Author: Willem Jiang willem.ji...@gmail.com
Authored: Wed Oct 8 22:16:39 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Thu Oct 9 10:32:49 2014 +0800

--
 .../restlet/DefaultRestletBinding.java  |  6 +-
 .../restlet/RestletProducerGetTest.java | 52 -
 .../component/restlet/RestletProducerTest.java  | 60 
 3 files changed, 65 insertions(+), 53 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/3580582d/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
--
diff --git 
a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
 
b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
index cd3d62d..e671749 100644
--- 
a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
+++ 
b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
@@ -171,7 +171,11 @@ public class DefaultRestletBinding implements 
RestletBinding, HeaderFilterStrate
 if (request.getMethod() == Method.GET || (request.getMethod() == 
Method.POST  mediaType == MediaType.APPLICATION_WWW_FORM)) {
 request.setEntity(form.getWebRepresentation());
 } else {
-request.setEntity(body, mediaType);
+if (body == null) {
+request.setEntity(null);
+} else {
+request.setEntity(body, mediaType);
+}
 }
 
 MediaType acceptedMediaType = 
exchange.getIn().getHeader(Exchange.ACCEPT_CONTENT_TYPE, MediaType.class);

http://git-wip-us.apache.org/repos/asf/camel/blob/3580582d/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletProducerGetTest.java
--
diff --git 
a/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletProducerGetTest.java
 
b/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletProducerGetTest.java
deleted file mode 100644
index 8a81980..000
--- 
a/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletProducerGetTest.java
+++ /dev/null
@@ -1,52 +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.component.restlet;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
-
-/**
- * @version 
- */
-public class RestletProducerGetTest extends RestletTestSupport {
-
-@Test
-public void testRestletProducerGet() throws Exception {
-String out = template.requestBodyAndHeader(direct:start, null, id, 
123, String.class);
-assertEquals(123;Donald Duck, out);
-}
-
-@Override
-protected RouteBuilder createRouteBuilder() throws Exception {
-return new RouteBuilder() {
-@Override
-public void configure() throws Exception {
-from(direct:start).to(restlet:http://localhost:; + portNum 
+ /users/123/basic).to(log:reply);
-
-from(restlet:http://localhost:; + portNum + 
/users/{id}/basic)
-.process(new Processor() {
-public void process(Exchange exchange) throws 
Exception {
-String id = exchange.getIn().getHeader(id, 
String.class);
-exchange.getOut().setBody(id + 

[33/50] git commit: Fixed build error of RestletHeaderFilterStrategy

2014-10-17 Thread cmoulliard
Fixed build error of RestletHeaderFilterStrategy


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: b23ab8b5958db102f8621172b46015c59e8c147e
Parents: e737849
Author: Willem Jiang willem.ji...@gmail.com
Authored: Tue Sep 30 13:29:04 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Tue Sep 30 13:29:04 2014 +0800

--
 .../restlet/RestletHeaderFilterStrategy.java| 23 ++--
 1 file changed, 12 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/b23ab8b5/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java
--
diff --git 
a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java
 
b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java
index 662328c..d2f727d 100644
--- 
a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java
+++ 
b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java
@@ -21,27 +21,28 @@ import org.apache.camel.impl.DefaultHeaderFilterStrategy;
 
 /**
  * Default header filtering strategy for Restlet
- * 
- * @version 
+ *
+ * @version
  */
 public class RestletHeaderFilterStrategy extends DefaultHeaderFilterStrategy {
 
 public RestletHeaderFilterStrategy() {
 // No IN filters and copy all headers from Restlet to Camel
-
+
 // OUT filters (from Camel headers to Restlet headers)
 // filter headers used internally by this component
-getOutFilter().add(RestletConstants.RESTLET_LOGIN);
-getOutFilter().add(RestletConstants.RESTLET_PASSWORD);
-
-// The CamelAcceptContentType header is not added to the outgoing 
HTTP 
+getOutFilter().add(RestletConstants.RESTLET_LOGIN.toLowerCase());
+getOutFilter().add(RestletConstants.RESTLET_PASSWORD.toLowerCase());
+
+// The CamelAcceptContentType header is not added to the outgoing 
HTTP
 // headers but it will be going out as Accept.
-getOutFilter().add(Exchange.ACCEPT_CONTENT_TYPE);
-
+getOutFilter().add(Exchange.ACCEPT_CONTENT_TYPE.toLowerCase());
+
 // As we don't set the transfer_encoding protocol header for the 
restlet service
 // we need to remove the transfer_encoding which could let the client 
wait forever
-getOutFilter().add(Exchange.TRANSFER_ENCODING);
-setCaseInsensitive(true);
+getOutFilter().add(Exchange.TRANSFER_ENCODING.toLowerCase());
+// Support to filter case insensitive
+setLowerCase(true);
 }
 
 }



[32/50] git commit: CAMEL-7881 Fixed the camel-restlet feature install issue

2014-10-17 Thread cmoulliard
CAMEL-7881 Fixed the camel-restlet feature install issue


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: e737849d8fd4919593507e03441cdb9d1ee54b35
Parents: 3bf3aef
Author: Willem Jiang willem.ji...@gmail.com
Authored: Tue Sep 30 10:23:19 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Tue Sep 30 10:24:33 2014 +0800

--
 platforms/karaf/features/src/main/resources/features.xml | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/e737849d/platforms/karaf/features/src/main/resources/features.xml
--
diff --git a/platforms/karaf/features/src/main/resources/features.xml 
b/platforms/karaf/features/src/main/resources/features.xml
index a140257..0d35a98 100644
--- a/platforms/karaf/features/src/main/resources/features.xml
+++ b/platforms/karaf/features/src/main/resources/features.xml
@@ -875,6 +875,9 @@
   feature name='camel-restlet' version='${project.version}' resolver='(obr)' 
start-level='50'
 feature version='${project.version}'camel-core/feature
 bundle 
dependency='true'mvn:http://maven.restlet.org!org.restlet.osgi/org.restlet/${restlet-version}/bundle
+bundle 
dependency='true'mvn:commons-codec/commons-codec/${commons-codec-version}/bundle
+bundle 
dependency='true'mvn:org.apache.httpcomponents/httpcore-osgi/${httpcore4-version}/bundle
+bundle 
dependency='true'mvn:org.apache.httpcomponents/httpclient-osgi/${httpclient4-version}/bundle
 bundle 
dependency='true'mvn:http://maven.restlet.org!org.restlet.osgi/org.restlet.ext.httpclient/${restlet-version}/bundle
 bundlemvn:org.apache.camel/camel-restlet/${project.version}/bundle
   /feature



[42/50] git commit: CAMEL-7900 Honored chunksize in camel-hdfs2

2014-10-17 Thread cmoulliard
CAMEL-7900 Honored chunksize in camel-hdfs2


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 246014f27e77205541416b911a8fdb2c9756efee
Parents: 607ab4e
Author: Willem Jiang willem.ji...@gmail.com
Authored: Fri Oct 10 21:58:11 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Sat Oct 11 13:57:33 2014 +0800

--
 .../main/java/org/apache/camel/component/hdfs2/HdfsFileType.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/246014f2/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsFileType.java
--
diff --git 
a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsFileType.java
 
b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsFileType.java
index bb08440..bc97355 100644
--- 
a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsFileType.java
+++ 
b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsFileType.java
@@ -76,7 +76,7 @@ public enum HdfsFileType {
 public long next(HdfsInputStream hdfsistr, HolderObject key, 
HolderObject value) {
 try {
 ByteArrayOutputStream bos = new 
ByteArrayOutputStream(hdfsistr.getChunkSize());
-byte buf[] = new byte[HdfsConstants.DEFAULT_BUFFERSIZE];
+byte buf[] = new byte[hdfsistr.getChunkSize()];
 int bytesRead = ((InputStream) hdfsistr.getIn()).read(buf);
 if (bytesRead = 0) {
 bos.write(buf, 0, bytesRead);



[50/50] git commit: CAMEL-7920 Make sure the JAXB fallback converter is the last one loaded

2014-10-17 Thread cmoulliard
CAMEL-7920 Make sure the JAXB fallback converter is the last one loaded


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: f0ddb5ef76a37bd0b7715ed6ee28165d814f2d95
Parents: b41b8d0
Author: Willem Jiang willem.ji...@gmail.com
Authored: Fri Oct 17 11:07:26 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Fri Oct 17 11:39:26 2014 +0800

--
 .../converter/BaseTypeConverterRegistry.java|  1 +
 .../org/apache/camel/impl/osgi/Activator.java   | 18 ---
 .../camel/core/osgi/OsgiTypeConverter.java  | 33 ++--
 3 files changed, 38 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/f0ddb5ef/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
 
b/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
index 5443e75..a71d46e 100644
--- 
a/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
+++ 
b/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
@@ -389,6 +389,7 @@ public abstract class BaseTypeConverterRegistry extends 
ServiceSupport implement
 log.trace(Adding fallback type converter: {} which can promote: {}, 
typeConverter, canPromote);
 
 // add in top of fallback as the toString() fallback will nearly 
always be able to convert
+// the last one which is add to the FallbackTypeConverter will be 
called at the first place
 fallbackConverters.add(0, new FallbackTypeConverter(typeConverter, 
canPromote));
 if (typeConverter instanceof TypeConverterAware) {
 TypeConverterAware typeConverterAware = (TypeConverterAware) 
typeConverter;

http://git-wip-us.apache.org/repos/asf/camel/blob/f0ddb5ef/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java 
b/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
index 9be601b..36d8249 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/osgi/Activator.java
@@ -61,8 +61,8 @@ import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleEvent;
+import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceRegistration;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -176,7 +176,8 @@ public class Activator implements BundleActivator, 
BundleTrackerCustomizer {
 URL url1 = bundle.getEntry(META_INF_TYPE_CONVERTER);
 URL url2 = bundle.getEntry(META_INF_FALLBACK_TYPE_CONVERTER);
 if (url1 != null || url2 != null) {
-resolvers.add(new BundleTypeConverterLoader(bundle));
+LOG.debug(Found TypeConverter in bundle {}, 
bundle.getSymbolicName());
+resolvers.add(new BundleTypeConverterLoader(bundle, url2 != 
null));
 }
 }
 }
@@ -264,11 +265,13 @@ public class Activator implements BundleActivator, 
BundleTrackerCustomizer {
 
 private final AnnotationTypeConverterLoader loader = new Loader();
 private final Bundle bundle;
+private final boolean hasFallbackTypeConverter;
 
-public BundleTypeConverterLoader(Bundle bundle) {
+public BundleTypeConverterLoader(Bundle bundle, boolean 
hasFallbackTypeConverter) {
 super(bundle, TypeConverter.class);
 ObjectHelper.notNull(bundle, bundle);
 this.bundle = bundle;
+this.hasFallbackTypeConverter = hasFallbackTypeConverter;
 }
 
 public synchronized void load(TypeConverterRegistry registry) throws 
TypeConverterLoaderException {
@@ -282,7 +285,13 @@ public class Activator implements BundleActivator, 
BundleTrackerCustomizer {
 }
 
 public void register() {
-doRegister(TypeConverterLoader.class);
+if (hasFallbackTypeConverter) {
+// The FallbackTypeConverter should have a higher ranking
+doRegister(TypeConverterLoader.class, 
Constants.SERVICE_RANKING, new Integer(100));
+} else {
+// The default service ranking is Integer(0);
+

[40/50] git commit: CAMEL-7886 Fixed the ContentType charset setting issue of camel-http4

2014-10-17 Thread cmoulliard
CAMEL-7886 Fixed the ContentType charset setting issue of camel-http4


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 4ff0ee9f0d3779205c3f5839e7627f3161ae28ae
Parents: 3580582
Author: Willem Jiang willem.ji...@gmail.com
Authored: Thu Oct 9 16:11:17 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Thu Oct 9 16:15:05 2014 +0800

--
 .../java/org/apache/camel/component/http4/HttpProducer.java   | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/4ff0ee9f/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
--
diff --git 
a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
 
b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
index 2fb8380..d41dbe1 100644
--- 
a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
+++ 
b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
@@ -412,7 +412,12 @@ public class HttpProducer extends DefaultProducer {
 //When ContentType.parse parse method parse 
multipart/form-data;boundary=---j2radvtrk,
 //it removes boundary from Content-Type; I have to use 
contentType.create method.
 if (contentTypeString != null) {
-contentType = ContentType.create(contentTypeString);
+// using ContentType.parser for charset 
+if (contentTypeString.indexOf(charset)  0) {
+contentType = ContentType.parse(contentTypeString);
+} else {
+contentType = 
ContentType.create(contentTypeString);
+}
 }
 
 if (contentTypeString != null  
HttpConstants.CONTENT_TYPE_JAVA_SERIALIZED_OBJECT.equals(contentTypeString)) {



[3/3] git commit: CAMEL-7915 Share the HashedWheelTimer across the Camel NettyComponent

2014-10-17 Thread cmoulliard
CAMEL-7915 Share the HashedWheelTimer across the Camel NettyComponent


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 3fa185751fdfe428d52072a50197aaecff2636b9
Parents: 5fbd945
Author: Willem Jiang willem.ji...@gmail.com
Authored: Fri Oct 17 16:20:21 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Fri Oct 17 16:26:46 2014 +0800

--
 .../apache/camel/component/netty/NettyProducer.java| 13 ++---
 1 file changed, 2 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/3fa18575/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java
--
diff --git 
a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java
 
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java
index 87ad2be..7be6a21 100644
--- 
a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java
+++ 
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java
@@ -51,8 +51,6 @@ import 
org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory;
 import org.jboss.netty.channel.socket.nio.NioDatagramChannelFactory;
 import org.jboss.netty.channel.socket.nio.NioDatagramWorkerPool;
 import org.jboss.netty.channel.socket.nio.WorkerPool;
-import org.jboss.netty.util.HashedWheelTimer;
-import org.jboss.netty.util.Timer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -68,7 +66,7 @@ public class NettyProducer extends DefaultAsyncProducer {
 private BossPool bossPool;
 private WorkerPool workerPool;
 private ObjectPoolChannel pool;
-private Timer timer;
+   
 
 public NettyProducer(NettyEndpoint nettyEndpoint, NettyConfiguration 
configuration) {
 super(nettyEndpoint);
@@ -126,8 +124,6 @@ public class NettyProducer extends DefaultAsyncProducer {
 }
 }
 
-timer = new HashedWheelTimer();
-
 // setup pipeline factory
 ClientPipelineFactory factory = 
configuration.getClientPipelineFactory();
 if (factory != null) {
@@ -180,11 +176,6 @@ public class NettyProducer extends DefaultAsyncProducer {
 pool = null;
 }
 
-if (timer != null) {
-timer.stop();
-timer = null;
-}
-
 super.doStop();
 }
 
@@ -337,7 +328,7 @@ public class NettyProducer extends DefaultAsyncProducer {
 if (bp == null) {
 // create new pool which we should shutdown when stopping as 
its not shared
 bossPool = new NettyClientBossPoolBuilder()
-.withTimer(timer)
+.withTimer(getEndpoint().getTimer())
 .withBossCount(configuration.getBossCount())
 .withName(NettyClientTCPBoss)
 .build();



[2/3] git commit: CAMEL-7922 start the MQTT connection when consumer or producer is started

2014-10-17 Thread cmoulliard
CAMEL-7922 start the MQTT connection when consumer or producer is started


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

Branch: refs/remotes/origin/camel-2.13.x
Commit: 5fbd9452d488842a8be7b48fdc22ed22649a2f26
Parents: 0fcb13e
Author: Willem Jiang willem.ji...@gmail.com
Authored: Fri Oct 17 14:33:39 2014 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Fri Oct 17 16:26:37 2014 +0800

--
 .../camel/component/mqtt/MQTTConsumer.java  |  3 ++
 .../camel/component/mqtt/MQTTEndpoint.java  | 47 +---
 .../camel/component/mqtt/MQTTProducer.java  |  9 
 3 files changed, 42 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/5fbd9452/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTConsumer.java
--
diff --git 
a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTConsumer.java
 
b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTConsumer.java
index 934e419..449a767 100644
--- 
a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTConsumer.java
+++ 
b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTConsumer.java
@@ -33,6 +33,9 @@ public class MQTTConsumer extends DefaultConsumer {
 
 protected void doStart() throws Exception {
 getEndpoint().addConsumer(this);
+if (!getEndpoint().isConnected()) {
+getEndpoint().connect();
+}
 super.doStart();
 }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/5fbd9452/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java
--
diff --git 
a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java
 
b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java
index e264c85..12952bc 100644
--- 
a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java
+++ 
b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java
@@ -44,6 +44,7 @@ public class MQTTEndpoint extends DefaultEndpoint {
 
 private CallbackConnection connection;
 private final MQTTConfiguration configuration;
+private volatile boolean connected;
 private final ListMQTTConsumer consumers = new 
CopyOnWriteArrayListMQTTConsumer();
 
 public MQTTEndpoint(String uri, MQTTComponent component, MQTTConfiguration 
properties) {
@@ -107,6 +108,27 @@ public class MQTTEndpoint extends DefaultEndpoint {
 }
 });
 
+
+}
+
+protected void doStop() throws Exception {
+if (connection != null) {
+final PromiseVoid promise = new PromiseVoid();
+connection.disconnect(new CallbackVoid() {
+public void onSuccess(Void value) {
+promise.onSuccess(value);
+}
+
+public void onFailure(Throwable value) {
+promise.onFailure(value);
+}
+});
+promise.await(configuration.getDisconnectWaitInSeconds(), 
TimeUnit.SECONDS);
+}
+super.doStop();
+}
+
+void connect() throws Exception {
 final PromiseObject promise = new PromiseObject();
 connection.connect(new CallbackVoid() {
 public void onSuccess(Void value) {
@@ -118,15 +140,18 @@ public class MQTTEndpoint extends DefaultEndpoint {
 connection.subscribe(topics, new Callbackbyte[]() {
 public void onSuccess(byte[] value) {
 promise.onSuccess(value);
+connected = true;
 }
 
 public void onFailure(Throwable value) {
 promise.onFailure(value);
 connection.disconnect(null);
+connected = false;
 }
 });
 } else {
 promise.onSuccess(value);
+connected = true;
 }
 
 }
@@ -134,28 +159,16 @@ public class MQTTEndpoint extends DefaultEndpoint {
 public void onFailure(Throwable value) {
 promise.onFailure(value);
 connection.disconnect(null);
+connected = false;
 }
 });
 promise.await(configuration.getConnectWaitInSeconds(), 
TimeUnit.SECONDS);
 }
-

git commit: Reformat json test examples for better readability

2014-08-28 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master c8ff55bdc - a94f95b61


Reformat json test examples for better readability


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

Branch: refs/heads/master
Commit: a94f95b6114cbcb3d825eb2c79175520553aef99
Parents: c8ff55b
Author: Charles Moulliard ch0...@gmail.com
Authored: Thu Aug 28 08:22:47 2014 +0200
Committer: Charles Moulliard ch0...@gmail.com
Committed: Thu Aug 28 08:22:47 2014 +0200

--
 .../src/test/resources/average.json | 29 +++---
 .../src/test/resources/books.json   | 41 ++--
 .../src/test/resources/cheap.json   | 27 ++---
 .../src/test/resources/expensive.json   | 29 +++---
 4 files changed, 65 insertions(+), 61 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/a94f95b6/components/camel-jsonpath/src/test/resources/average.json
--
diff --git a/components/camel-jsonpath/src/test/resources/average.json 
b/components/camel-jsonpath/src/test/resources/average.json
index 51a45ba..bd888dc 100644
--- a/components/camel-jsonpath/src/test/resources/average.json
+++ b/components/camel-jsonpath/src/test/resources/average.json
@@ -1,16 +1,17 @@
-{ store: {
-  book: [
-{
-  category: fiction,
-  author: Evelyn Waugh,
-  title: Sword of Honour,
-  price: 12.99,
-  isbn: 0-553-21311-3
+{
+store: {
+book: [
+{
+category: fiction,
+author: Evelyn Waugh,
+title: Sword of Honour,
+price: 12.99,
+isbn: 0-553-21311-3
+}
+],
+bicycle: {
+color: red,
+price: 19.95
+}
 }
-  ],
-  bicycle: {
-color: red,
-price: 19.95
-  }
-}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/a94f95b6/components/camel-jsonpath/src/test/resources/books.json
--
diff --git a/components/camel-jsonpath/src/test/resources/books.json 
b/components/camel-jsonpath/src/test/resources/books.json
index c06af59..6d4594f 100644
--- a/components/camel-jsonpath/src/test/resources/books.json
+++ b/components/camel-jsonpath/src/test/resources/books.json
@@ -1,22 +1,23 @@
-{ store: {
-  book: [
-{
-  category: reference,
-  author: Nigel Rees,
-  title: Sayings of the Century,
-  price: 8.95
-},
-{
-  category: fiction,
-  author: Evelyn Waugh,
-  title: Sword of Honour,
-  price: 12.99,
-  isbn: 0-553-21311-3
+{
+store: {
+book: [
+{
+category: reference,
+author: Nigel Rees,
+title: Sayings of the Century,
+price: 8.95
+},
+{
+category: fiction,
+author: Evelyn Waugh,
+title: Sword of Honour,
+price: 12.99,
+isbn: 0-553-21311-3
+}
+],
+bicycle: {
+color: red,
+price: 19.95
+}
 }
-  ],
-  bicycle: {
-color: red,
-price: 19.95
-  }
-}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/a94f95b6/components/camel-jsonpath/src/test/resources/cheap.json
--
diff --git a/components/camel-jsonpath/src/test/resources/cheap.json 
b/components/camel-jsonpath/src/test/resources/cheap.json
index 9ffb356..02df81c 100644
--- a/components/camel-jsonpath/src/test/resources/cheap.json
+++ b/components/camel-jsonpath/src/test/resources/cheap.json
@@ -1,15 +1,16 @@
-{ store: {
-  book: [
-{
-  category: reference,
-  author: Nigel Rees,
-  title: Sayings of the Century,
-  price: 8.95
+{
+store: {
+book: [
+{
+category: reference,
+author: Nigel Rees,
+title: Sayings of the Century,
+price: 8.95
+}
+],
+bicycle: {
+color: red,
+price: 19.95
+}
 }
-  ],
-  bicycle: {
-color: red,
-price: 19.95
-  }
-}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/a94f95b6/components/camel-jsonpath/src/test/resources/expensive.json
--
diff --git a/components/camel-jsonpath/src/test/resources/expensive.json 

git commit: Extend unit test to include field search based on type/customer

2014-08-28 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master 75bcfbc58 - 394c08712


Extend unit test to include field search based on type/customer


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

Branch: refs/heads/master
Commit: 394c087126c1e744d06f8ac8536ff41f31803855
Parents: 75bcfbc
Author: Charles Moulliard ch0...@gmail.com
Authored: Thu Aug 28 12:21:57 2014 +0200
Committer: Charles Moulliard ch0...@gmail.com
Committed: Thu Aug 28 12:21:57 2014 +0200

--
 .../camel/jsonpath/JsonPathLanguageTest.java| 24 
 1 file changed, 20 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/394c0871/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java
--
diff --git 
a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java
 
b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java
index 0773760..a0d8a28 100644
--- 
a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java
+++ 
b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java
@@ -35,14 +35,14 @@ public class JsonPathLanguageTest extends CamelTestSupport {
 }
 
 @Test
-public void testExpression() throws Exception {
+public void testExpressionArray() throws Exception {
 Exchange exchange = new DefaultExchange(context);
 exchange.getIn().setBody(new File(src/test/resources/books.json));
 
 Language lan = context.resolveLanguage(jsonpath);
 Expression exp = lan.createExpression($.store.book[*].author);
 List? authors = exp.evaluate(exchange, List.class);
-log.info(Authors {}, authors);
+log.debug(Authors {}, authors);
 
 assertNotNull(authors);
 assertEquals(2, authors.size());
@@ -52,8 +52,24 @@ public class JsonPathLanguageTest extends CamelTestSupport {
 exp = lan.createExpression($.store.bicycle.price);
 String price = exp.evaluate(exchange, String.class);
 assertEquals(Got a wrong result, 19.95, price);
-
-
+}
+
+@Test
+public void testExpressionField() throws Exception {
+Exchange exchange = new DefaultExchange(context);
+exchange.getIn().setBody(new File(src/test/resources/type.json));
+
+Language lan = context.resolveLanguage(jsonpath);
+Expression exp = lan.createExpression($.kind);
+String kind = exp.evaluate(exchange, String.class);
+
+assertNotNull(kind);
+assertEquals(full, kind);
+
+exp = lan.createExpression($.type);
+String type = exp.evaluate(exchange, String.class);
+assertNotNull(type);
+assertEquals(customer, type);
 }
 
 @Test



git commit: Extend unit test to include field search based on type/customer. Remove predicate as it fails

2014-08-28 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master 394c08712 - d62717e51


Extend unit test to include field search based on type/customer. Remove 
predicate as it fails


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

Branch: refs/heads/master
Commit: d62717e51aab8e344454dd92a0f91f875521c288
Parents: 394c087
Author: Charles Moulliard ch0...@gmail.com
Authored: Thu Aug 28 14:32:21 2014 +0200
Committer: Charles Moulliard ch0...@gmail.com
Committed: Thu Aug 28 14:32:21 2014 +0200

--
 .../java/org/apache/camel/jsonpath/JsonPathLanguageTest.java | 1 +
 components/camel-jsonpath/src/test/resources/type.json   | 4 
 2 files changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/d62717e5/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java
--
diff --git 
a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java
 
b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java
index a0d8a28..1522bc6 100644
--- 
a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java
+++ 
b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java
@@ -74,6 +74,7 @@ public class JsonPathLanguageTest extends CamelTestSupport {
 
 @Test
 public void testPredicate() throws Exception {
+// Test books.json file
 Exchange exchange = new DefaultExchange(context);
 exchange.getIn().setBody(new File(src/test/resources/books.json));
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d62717e5/components/camel-jsonpath/src/test/resources/type.json
--
diff --git a/components/camel-jsonpath/src/test/resources/type.json 
b/components/camel-jsonpath/src/test/resources/type.json
new file mode 100644
index 000..a2a75df
--- /dev/null
+++ b/components/camel-jsonpath/src/test/resources/type.json
@@ -0,0 +1,4 @@
+{
+kind: full,
+type: customer
+}
\ No newline at end of file



git commit: CAMEL-7754: Add QuartzConstants.QUARTZ_TRIGGER_CRON_TIMEZONE to the QuartzEndpoint if it exists

2014-08-27 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master 68d0f1419 - 253af883b


CAMEL-7754: Add QuartzConstants.QUARTZ_TRIGGER_CRON_TIMEZONE to the 
QuartzEndpoint if it exists


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

Branch: refs/heads/master
Commit: 253af883b461ddc6b50cbbb58509eeaaf8abdcb6
Parents: 68d0f14
Author: Charles Moulliard ch0...@gmail.com
Authored: Wed Aug 27 11:54:10 2014 +0200
Committer: Charles Moulliard ch0...@gmail.com
Committed: Wed Aug 27 11:54:10 2014 +0200

--
 .../camel/component/quartz/QuartzComponent.java | 10 +++---
 .../quartz/QuartzCronTriggerRouteTest.java  | 34 
 2 files changed, 39 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/253af883/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
--
diff --git 
a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
 
b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
index 63f9dad..559b9fd 100644
--- 
a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
+++ 
b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
@@ -20,11 +20,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.net.URI;
 import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
+import java.util.*;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.camel.CamelContext;
@@ -169,6 +165,10 @@ public class QuartzComponent extends UriEndpointComponent 
implements StartupList
 if (cron != null) {
 
answer.getJobDetail().getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_TYPE, 
cron);
 
answer.getJobDetail().getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_CRON_EXPRESSION,
 cron);
+String timeZone = 
EndpointHelper.resloveStringParameter(getCamelContext(), 
(String)triggerParameters.get(timeZone), String.class);
+if (timeZone != null) {
+
answer.getJobDetail().getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_CRON_TIMEZONE,
 timeZone);
+}
 } else {
 
answer.getJobDetail().getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_TYPE, 
simple);
 Long interval = 
EndpointHelper.resloveStringParameter(getCamelContext(), 
(String)triggerParameters.get(repeatInterval), Long.class);

http://git-wip-us.apache.org/repos/asf/camel/blob/253af883/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronTriggerRouteTest.java
--
diff --git 
a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronTriggerRouteTest.java
 
b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronTriggerRouteTest.java
new file mode 100644
index 000..2e62406
--- /dev/null
+++ 
b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronTriggerRouteTest.java
@@ -0,0 +1,34 @@
+package org.apache.camel.component.quartz;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+import org.quartz.JobDetail;
+
+public class QuartzCronTriggerRouteTest extends CamelTestSupport {
+
+@Test
+public void testQuartzCronRoute() throws Exception {
+MockEndpoint mock = getMockEndpoint(mock:result);
+mock.expectedMinimumMessageCount(3);
+
+assertMockEndpointsSatisfied();
+
+JobDetail job = 
mock.getReceivedExchanges().get(0).getIn().getHeader(jobDetail, 
JobDetail.class);
+assertNotNull(job);
+
+assertEquals(cron, 
job.getJobDataMap().get(QuartzConstants.QUARTZ_TRIGGER_TYPE));
+assertEquals(UTC, 
job.getJobDataMap().get(QuartzConstants.QUARTZ_TRIGGER_CRON_TIMEZONE));
+assertEquals(0/2 * * * * ?, 
job.getJobDataMap().get(QuartzConstants.QUARTZ_TRIGGER_CRON_EXPRESSION));
+}
+
+@Override
+protected RouteBuilder createRouteBuilder() {
+return new RouteBuilder() {
+public void configure() {
+
from(quartz://myGroup/myTimerName?cron=0/2+*+*+*+*+?trigger.timeZone=UTC).to(mock:result);
+}
+};
+}
+}
\ No newline at end of file



git commit: CAMEL-7754: Add support for TimeZone

2014-08-27 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master 253af883b - d4a930623


CAMEL-7754: Add support for TimeZone


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

Branch: refs/heads/master
Commit: d4a9306232ab633b8a38de87a56b308296c4b5a7
Parents: 253af88
Author: Charles Moulliard ch0...@gmail.com
Authored: Wed Aug 27 12:27:02 2014 +0200
Committer: Charles Moulliard ch0...@gmail.com
Committed: Wed Aug 27 12:27:02 2014 +0200

--
 .../camel/component/quartz2/QuartzEndpoint.java | 25 ++
 .../quartz2/QuartzCronTriggerRouteTest.java | 34 
 2 files changed, 53 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/d4a93062/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzEndpoint.java
--
diff --git 
a/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzEndpoint.java
 
b/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzEndpoint.java
index c4cb731..7552c4c 100644
--- 
a/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzEndpoint.java
+++ 
b/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzEndpoint.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.quartz2;
 
 import java.util.Date;
 import java.util.Map;
+import java.util.TimeZone;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 
@@ -282,16 +283,28 @@ public class QuartzEndpoint extends DefaultEndpoint {
 }
 if (cron != null) {
 LOG.debug(Creating CronTrigger: {}, cron);
-result = TriggerBuilder.newTrigger()
-.withIdentity(triggerKey)
-.startAt(startTime)
-
.withSchedule(cronSchedule(cron).withMisfireHandlingInstructionFireAndProceed())
-.build();
+String timeZone = (String)triggerParameters.get(timeZone);
+if (timeZone != null) {
+result = TriggerBuilder.newTrigger()
+.withIdentity(triggerKey)
+.startAt(startTime)
+.withSchedule(cronSchedule(cron)
+.withMisfireHandlingInstructionFireAndProceed()
+.inTimeZone(TimeZone.getTimeZone(timeZone)))
+.build();
+
jobDetail.getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_CRON_TIMEZONE, 
timeZone);
+} else {
+result = TriggerBuilder.newTrigger()
+.withIdentity(triggerKey)
+.startAt(startTime)
+.withSchedule(cronSchedule(cron)
+
.withMisfireHandlingInstructionFireAndProceed())
+.build();
+}
 
 // enrich job map with details
 jobDetail.getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_TYPE, 
cron);
 
jobDetail.getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_CRON_EXPRESSION, 
cron);
-
 } else {
 LOG.debug(Creating SimpleTrigger.);
 int repeat = SimpleTrigger.REPEAT_INDEFINITELY;

http://git-wip-us.apache.org/repos/asf/camel/blob/d4a93062/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzCronTriggerRouteTest.java
--
diff --git 
a/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzCronTriggerRouteTest.java
 
b/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzCronTriggerRouteTest.java
new file mode 100644
index 000..bd31fec
--- /dev/null
+++ 
b/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzCronTriggerRouteTest.java
@@ -0,0 +1,34 @@
+package org.apache.camel.component.quartz2;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+import org.quartz.JobDetail;
+
+public class QuartzCronTriggerRouteTest extends CamelTestSupport {
+
+@Test
+public void testQuartzCronRoute() throws Exception {
+MockEndpoint mock = getMockEndpoint(mock:result);
+mock.expectedMinimumMessageCount(3);
+
+assertMockEndpointsSatisfied();
+
+JobDetail job = 
mock.getReceivedExchanges().get(0).getIn().getHeader(jobDetail, 
JobDetail.class);
+

git commit: CAMEL-7742: Add rounding, decimal, grouping attributes for @DateField, add unit tests

2014-08-26 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master e1f9e26e6 - 2854e18ff


CAMEL-7742: Add rounding, decimal, grouping attributes for @DateField, add unit 
tests


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

Branch: refs/heads/master
Commit: 2854e18ff985ffb9abaca305038801f6c508f0c4
Parents: e1f9e26
Author: Charles Moulliard ch0...@gmail.com
Authored: Tue Aug 26 10:34:12 2014 +0200
Committer: Charles Moulliard ch0...@gmail.com
Committed: Tue Aug 26 10:34:12 2014 +0200

--
 .../camel/dataformat/bindy/FormatFactory.java   |  38 +++
 .../dataformat/bindy/annotation/DataField.java  |  21 
 .../bindy/format/BigDecimalPatternFormat.java   |  34 ++
 .../bindy/format/NumberPatternFormat.java   |  52 -
 .../bindy/number/BindyFormatUnmarshallTest.java | 105 ---
 .../BindyBigDecimalGroupingUnmarshallTest.java  |  93 
 .../BindyBigDecimalRoundingUnmarshallTest.java  |  89 
 7 files changed, 303 insertions(+), 129 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/2854e18f/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/FormatFactory.java
--
diff --git 
a/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/FormatFactory.java
 
b/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/FormatFactory.java
index d5dc68b..794aace 100755
--- 
a/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/FormatFactory.java
+++ 
b/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/FormatFactory.java
@@ -24,25 +24,7 @@ import java.util.Locale;
 
 import org.apache.camel.dataformat.bindy.annotation.DataField;
 import org.apache.camel.dataformat.bindy.annotation.KeyValuePairField;
-import org.apache.camel.dataformat.bindy.format.BigDecimalFormat;
-import org.apache.camel.dataformat.bindy.format.BigIntegerFormat;
-import org.apache.camel.dataformat.bindy.format.BooleanFormat;
-import org.apache.camel.dataformat.bindy.format.ByteFormat;
-import org.apache.camel.dataformat.bindy.format.BytePatternFormat;
-import org.apache.camel.dataformat.bindy.format.CharacterFormat;
-import org.apache.camel.dataformat.bindy.format.DatePatternFormat;
-import org.apache.camel.dataformat.bindy.format.DoubleFormat;
-import org.apache.camel.dataformat.bindy.format.DoublePatternFormat;
-import org.apache.camel.dataformat.bindy.format.EnumFormat;
-import org.apache.camel.dataformat.bindy.format.FloatFormat;
-import org.apache.camel.dataformat.bindy.format.FloatPatternFormat;
-import org.apache.camel.dataformat.bindy.format.IntegerFormat;
-import org.apache.camel.dataformat.bindy.format.IntegerPatternFormat;
-import org.apache.camel.dataformat.bindy.format.LongFormat;
-import org.apache.camel.dataformat.bindy.format.LongPatternFormat;
-import org.apache.camel.dataformat.bindy.format.ShortFormat;
-import org.apache.camel.dataformat.bindy.format.ShortPatternFormat;
-import org.apache.camel.dataformat.bindy.format.StringFormat;
+import org.apache.camel.dataformat.bindy.format.*;
 import org.apache.camel.util.ObjectHelper;
 
 
@@ -61,13 +43,17 @@ public final class FormatFactory {
  * @param pattern is the pattern to be used during the formatting of the 
data
  * @param locale optional locale for NumberFormat and DateFormat parsing.
  * @param precision optional scale for BigDecimal parsing.
+ * @param rounding optional rounding mode to be used to scale BigDecimal 
with precision value
  * @param impliedDecimalSeparator optional flag for floating-point values
+ * @param decimalSeparator optional decimal separator for BigDecimal
+ * @param groupingSeparator optional grouping separator for BigDecimal
  * @return Format the formatter
  * @throws IllegalArgumentException if not suitable formatter is found
  */
 @SuppressWarnings(unchecked)
 private static Format? doGetFormat(Class? clazz, String pattern, 
String locale,
- String timezone, int precision, 
boolean impliedDecimalSeparator)
+ String timezone, int precision, 
String rounding,
+ boolean impliedDecimalSeparator, 
String decimalSeparator, String groupingSeparator)
 throws Exception {
 if (clazz == byte.class || clazz == Byte.class) {
 return ObjectHelper.isNotEmpty(pattern)
@@ -94,7 +80,9 @@ public final class FormatFactory {
 ? new DoublePatternFormat(pattern, getLocale(locale))
 : new 

git commit: Add test case covering Camel Custom Tracer

2014-08-26 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master 5094d6006 - 8c2fa7c56


Add test case covering Camel Custom Tracer


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

Branch: refs/heads/master
Commit: 8c2fa7c561caaef73338146657096f5be36ef1d8
Parents: 5094d60
Author: Charles Moulliard ch0...@gmail.com
Authored: Tue Aug 26 14:20:52 2014 +0200
Committer: Charles Moulliard ch0...@gmail.com
Committed: Tue Aug 26 14:20:52 2014 +0200

--
 .../osgi/blueprint/BlueprintTracerTest.java | 84 
 .../camel/itest/osgi/blueprint/blueprint-29.xml | 38 +
 2 files changed, 122 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/8c2fa7c5/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java
--
diff --git 
a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java
 
b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java
new file mode 100644
index 000..170faf7
--- /dev/null
+++ 
b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java
@@ -0,0 +1,84 @@
+package org.apache.camel.itest.osgi.blueprint;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.processor.interceptor.DefaultTraceEventMessage;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.tinybundles.core.TinyBundles;
+import org.osgi.framework.Constants;
+
+import static org.ops4j.pax.exam.OptionUtils.combine;
+
+@RunWith(PaxExam.class)
+public class BlueprintTracerTest extends OSGiBlueprintTestSupport {
+
+private String name = BlueprintTracerTest.class.getName();
+
+@Test
+public void testTracer() throws Exception {
+// start bundle
+getInstalledBundle(name).start();
+
+// must use the camel context from osgi
+CamelContext ctx = getOsgiService(CamelContext.class, 
(camel.context.symbolicname= + name + ), 1);
+
+ProducerTemplate myTemplate = ctx.createProducerTemplate();
+myTemplate.start();
+
+// do our testing
+MockEndpoint result = ctx.getEndpoint(mock:result, 
MockEndpoint.class);
+result.expectedMessageCount(1);
+
+MockEndpoint tracer = ctx.getEndpoint(mock:traced, 
MockEndpoint.class);
+
+myTemplate.sendBody(direct:start, Hello World);
+
+result.assertIsSatisfied();
+
+DefaultTraceEventMessage em = 
tracer.getReceivedExchanges().get(0).getIn().getBody(DefaultTraceEventMessage.class);
+assertEquals(Hello Camel, em.getBody());
+
+assertEquals(String, em.getBodyType());
+assertEquals(null, em.getCausedByException());
+assertNotNull(em.getExchangeId());
+assertNotNull(em.getShortExchangeId());
+assertNotNull(em.getExchangePattern());
+assertEquals(direct://start, em.getFromEndpointUri());
+// there is always a breadcrumb header
+assertNotNull(em.getHeaders());
+assertNotNull(em.getProperties());
+assertNull(em.getOutBody());
+assertNull(em.getOutBodyType());
+assertNull(em.getOutHeaders());
+assertNull(em.getPreviousNode());
+assertNotNull(em.getToNode());
+assertNotNull(em.getTimestamp());
+
+myTemplate.stop();
+}
+
+@Configuration
+public static Option[] configure() throws Exception {
+
+Option[] options = combine(
+getDefaultCamelKarafOptions(),
+
+bundle(TinyBundles.bundle()
+.add(OSGI-INF/blueprint/test.xml, 
BlueprintTracerTest.class.getResource(blueprint-29.xml))
+.set(Constants.BUNDLE_SYMBOLICNAME, 
BlueprintTracerTest.class.getName())
+.set(Constants.BUNDLE_VERSION, 1.0.0)
+.set(Constants.DYNAMICIMPORT_PACKAGE, *)
+.build()).noStart(),
+
+// using the features to install the camel components
+loadCamelFeatures(camel-blueprint));
+
+return options;
+}
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/8c2fa7c5/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-29.xml
--
diff --git 

git commit: Extend the test case to add a customTraceEventHandler

2014-08-26 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master 8c2fa7c56 - 0b86b0014


Extend the test case to add a customTraceEventHandler


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

Branch: refs/heads/master
Commit: 0b86b001420e35c137726e9a38b4cfc5b23e314c
Parents: 8c2fa7c
Author: Charles Moulliard ch0...@gmail.com
Authored: Tue Aug 26 14:25:53 2014 +0200
Committer: Charles Moulliard ch0...@gmail.com
Committed: Tue Aug 26 14:25:53 2014 +0200

--
 .../org/apache/camel/itest/osgi/blueprint/blueprint-29.xml| 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/0b86b001/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-29.xml
--
diff --git 
a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-29.xml
 
b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-29.xml
index 8dea9c8..4235ba3 100644
--- 
a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-29.xml
+++ 
b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/osgi/blueprint/blueprint-29.xml
@@ -33,6 +33,9 @@
 property name=logLevel value=INFO/
 property name=logName value=org.apache.camel.blueprint.log/
 property name=destination ref=traced/
+property name=traceHandler ref=myTraceEventHandler/
 /bean
 
+bean id=myTraceEventHandler 
class=org.apache.camel.processor.interceptor.DefaultTraceEventHandler/
+
 /blueprint



git commit: There is an issue with Blueprint. To be fixed

2014-08-26 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master 91b7e2be6 - b84e7e923


There is an issue with Blueprint. To be fixed


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

Branch: refs/heads/master
Commit: b84e7e9232e894a53ba29487654b8d37a6854a41
Parents: 91b7e2b
Author: Charles Moulliard ch0...@gmail.com
Authored: Tue Aug 26 15:37:31 2014 +0200
Committer: Charles Moulliard ch0...@gmail.com
Committed: Tue Aug 26 15:37:31 2014 +0200

--
 tests/camel-itest-osgi/pom.xml  |  1 +
 .../osgi/blueprint/BlueprintTracerTest.java |  3 +-
 .../osgi/blueprint/MyTraceEventHandler.java | 69 
 .../camel/itest/osgi/blueprint/blueprint-29.xml |  6 +-
 4 files changed, 75 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/b84e7e92/tests/camel-itest-osgi/pom.xml
--
diff --git a/tests/camel-itest-osgi/pom.xml b/tests/camel-itest-osgi/pom.xml
index 0d89681..a1be199 100644
--- a/tests/camel-itest-osgi/pom.xml
+++ b/tests/camel-itest-osgi/pom.xml
@@ -496,6 +496,7 @@
   exclude**/FtpConsumeTest.*/exclude
   exclude**/BlobStoreRouteTest.*/exclude !-- CAMEL-6134 
--
   exclude**/BlobStoreBlueprintRouteTest.*/exclude !-- 
CAMEL-6134 --
+  exclude**/BlueprintTracerTest.*/exclude !-- We get a 
Gave up waiting for service ((objectClass=org.apache.camel.CamelContext) --
   /excludes
   systemPropertyVariables
   karafVersion${karaf-version}/karafVersion

http://git-wip-us.apache.org/repos/asf/camel/blob/b84e7e92/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java
--
diff --git 
a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java
 
b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java
index 170faf7..f372e26 100644
--- 
a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java
+++ 
b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java
@@ -25,7 +25,7 @@ public class BlueprintTracerTest extends 
OSGiBlueprintTestSupport {
 getInstalledBundle(name).start();
 
 // must use the camel context from osgi
-CamelContext ctx = getOsgiService(CamelContext.class, 
(camel.context.symbolicname= + name + ), 1);
+CamelContext ctx = getOsgiService(CamelContext.class, 
(camel.context.symbolicname= + name + ), 3);
 
 ProducerTemplate myTemplate = ctx.createProducerTemplate();
 myTemplate.start();
@@ -73,6 +73,7 @@ public class BlueprintTracerTest extends 
OSGiBlueprintTestSupport {
 .set(Constants.BUNDLE_SYMBOLICNAME, 
BlueprintTracerTest.class.getName())
 .set(Constants.BUNDLE_VERSION, 1.0.0)
 .set(Constants.DYNAMICIMPORT_PACKAGE, *)
+.add(MyTraceEventHandler.class)
 .build()).noStart(),
 
 // using the features to install the camel components

http://git-wip-us.apache.org/repos/asf/camel/blob/b84e7e92/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/MyTraceEventHandler.java
--
diff --git 
a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/MyTraceEventHandler.java
 
b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/MyTraceEventHandler.java
new file mode 100644
index 000..fcc7b75
--- /dev/null
+++ 
b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/MyTraceEventHandler.java
@@ -0,0 +1,69 @@
+package org.apache.camel.itest.osgi.blueprint;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.model.ProcessorDefinition;
+import org.apache.camel.processor.interceptor.TraceEventHandler;
+import org.apache.camel.processor.interceptor.TraceInterceptor;
+
+import java.util.LinkedList;
+import java.util.List;
+
+public class MyTraceEventHandler implements TraceEventHandler {
+
+private ListStringBuilder eventMessages;
+
+public MyTraceEventHandler() {
+this.eventMessages = new LinkedListStringBuilder();
+}
+
+public static void recordComplete(StringBuilder message, 
ProcessorDefinition? node, Exchange exchange) {
+message.append(Complete: );

git commit: Remove MyTraceEventHandler class as this is irrelevant for the test

2014-08-26 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master b84e7e923 - 85e35dadc


Remove MyTraceEventHandler class as this is irrelevant for the test


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

Branch: refs/heads/master
Commit: 85e35dadc8e3990fff6db3ebe8c2c148e5a5df5c
Parents: b84e7e9
Author: Charles Moulliard ch0...@gmail.com
Authored: Tue Aug 26 15:49:23 2014 +0200
Committer: Charles Moulliard ch0...@gmail.com
Committed: Tue Aug 26 15:49:23 2014 +0200

--
 .../osgi/blueprint/BlueprintTracerTest.java |  1 -
 .../osgi/blueprint/MyTraceEventHandler.java | 69 
 .../camel/itest/osgi/blueprint/blueprint-29.xml |  7 +-
 3 files changed, 2 insertions(+), 75 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/85e35dad/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java
--
diff --git 
a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java
 
b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java
index f372e26..05d0c66 100644
--- 
a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java
+++ 
b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java
@@ -73,7 +73,6 @@ public class BlueprintTracerTest extends 
OSGiBlueprintTestSupport {
 .set(Constants.BUNDLE_SYMBOLICNAME, 
BlueprintTracerTest.class.getName())
 .set(Constants.BUNDLE_VERSION, 1.0.0)
 .set(Constants.DYNAMICIMPORT_PACKAGE, *)
-.add(MyTraceEventHandler.class)
 .build()).noStart(),
 
 // using the features to install the camel components

http://git-wip-us.apache.org/repos/asf/camel/blob/85e35dad/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/MyTraceEventHandler.java
--
diff --git 
a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/MyTraceEventHandler.java
 
b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/MyTraceEventHandler.java
deleted file mode 100644
index fcc7b75..000
--- 
a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/MyTraceEventHandler.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package org.apache.camel.itest.osgi.blueprint;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.model.ProcessorDefinition;
-import org.apache.camel.processor.interceptor.TraceEventHandler;
-import org.apache.camel.processor.interceptor.TraceInterceptor;
-
-import java.util.LinkedList;
-import java.util.List;
-
-public class MyTraceEventHandler implements TraceEventHandler {
-
-private ListStringBuilder eventMessages;
-
-public MyTraceEventHandler() {
-this.eventMessages = new LinkedListStringBuilder();
-}
-
-public static void recordComplete(StringBuilder message, 
ProcessorDefinition? node, Exchange exchange) {
-message.append(Complete: );
-message.append(node.getLabel() + : );
-message.append(exchange.getIn().getBody());
-}
-
-public static void recordIn(StringBuilder message, ProcessorDefinition? 
node, Exchange exchange) {
-message.append(In: );
-message.append(node.getLabel() + : );
-message.append(exchange.getIn().getBody());
-}
-
-public static void recordOut(StringBuilder message, ProcessorDefinition? 
node, Exchange exchange) {
-message.append(Out: );
-message.append(node.getLabel() + : );
-if (null != exchange.getOut()) {
-message.append(exchange.getOut().getBody());
-}
-if (null != exchange.getException()) {
-Exception ex = exchange.getException();
-message.append(\t);
-message.append(Ex: );
-message.append(ex.getMessage());
-}
-}
-
-private synchronized void storeMessage(StringBuilder message) {
-eventMessages.add(message);
-}
-
-public void traceExchange(ProcessorDefinition? node, Processor target, 
TraceInterceptor traceInterceptor, Exchange exchange) throws Exception {
-StringBuilder message = new StringBuilder();
-recordComplete(message, node, exchange);
-storeMessage(message);
-}
-
-public Object traceExchangeIn(ProcessorDefinition? node, Processor 
target, 

git commit: Remove Pattern from @DataField defintion of Math class test and it is not yet supported by BigDecimal FormatFactory

2014-08-25 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master ddf9e0be5 - f846d6b57


Remove Pattern from @DataField defintion of Math class test and it is not yet 
supported by BigDecimal FormatFactory


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

Branch: refs/heads/master
Commit: f846d6b57823eb8d8f48be3675d17404249b2c0c
Parents: ddf9e0b
Author: Charles Moulliard ch0...@gmail.com
Authored: Mon Aug 25 11:21:33 2014 +0200
Committer: Charles Moulliard ch0...@gmail.com
Committed: Mon Aug 25 11:21:33 2014 +0200

--
 .../dataformat/bindy/model/simple/oneclassmath/Math.java | 11 ++-
 .../jms/issues/JmsTXForceShutdownIssueTest.java  |  2 +-
 2 files changed, 11 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/f846d6b5/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/oneclassmath/Math.java
--
diff --git 
a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/oneclassmath/Math.java
 
b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/oneclassmath/Math.java
index fd19d7a..25c6838 100644
--- 
a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/oneclassmath/Math.java
+++ 
b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/oneclassmath/Math.java
@@ -27,7 +27,16 @@ public class Math {
 @DataField(pos = 1, pattern = 00)
 private Integer intAmount;
 
-@DataField(pos = 2, precision = 2, pattern = 00.00)
+@DataField(pos = 2, precision = 2)
+/*
+   Pattern is not yet supported by BigDecimal.
+   FormatFactory class --
+
+   } else if (clazz == BigDecimal.class) {
+return new BigDecimalFormat(impliedDecimalSeparator, precision, 
getLocale(locale));
+
+So we should remove it from the model pattern = 00.00
+  */
 private BigDecimal bigDecimal;
 
 public Integer getIntAmount() {

http://git-wip-us.apache.org/repos/asf/camel/blob/f846d6b5/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsTXForceShutdownIssueTest.java
--
diff --git 
a/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsTXForceShutdownIssueTest.java
 
b/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsTXForceShutdownIssueTest.java
index d94b048..0cb0461 100644
--- 
a/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsTXForceShutdownIssueTest.java
+++ 
b/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsTXForceShutdownIssueTest.java
@@ -40,7 +40,7 @@ public class JmsTXForceShutdownIssueTest extends 
CamelSpringTestSupport {
 }
 
 @Test
-@Ignore(This is a manual test, start Apache ActiveMQ broker manually 
first, using bin/activemq console)
+//@Ignore(This is a manual test, start Apache ActiveMQ broker manually 
first, using bin/activemq console)
 // and make sure to setup tcp transport connector on the remote AMQ broker 
in the conf/activemq.xml file
 // transportConnectors
 //   transportConnector name=openwire uri=tcp://0.0.0.0:61616/



git commit: Add missing test maven artifact required to debug in IntelliJ, ...

2014-06-03 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master c04e4d029 - 3e1042c3a


Add missing test maven artifact required to debug in IntelliJ, ...


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

Branch: refs/heads/master
Commit: 3e1042c3ab9aea09da1523182b0991b3e65c94a5
Parents: c04e4d0
Author: Charles Moulliard ch0...@gmail.com
Authored: Tue Jun 3 08:55:19 2014 +0200
Committer: Charles Moulliard ch0...@gmail.com
Committed: Tue Jun 3 08:55:19 2014 +0200

--
 components/camel-jaxb/pom.xml | 5 +
 1 file changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/3e1042c3/components/camel-jaxb/pom.xml
--
diff --git a/components/camel-jaxb/pom.xml b/components/camel-jaxb/pom.xml
index 1faa656..0b552e1 100644
--- a/components/camel-jaxb/pom.xml
+++ b/components/camel-jaxb/pom.xml
@@ -62,6 +62,11 @@
 /dependency
 dependency
 groupIdorg.apache.camel/groupId
+artifactIdcamel-core-xml/artifactId
+scopetest/scope
+/dependency
+dependency
+groupIdorg.apache.camel/groupId
 artifactIdcamel-spring-javaconfig/artifactId
 scopetest/scope
 /dependency



[2/2] git commit: - Do a push before pull for this commit (Add unit test to support scenario concurrentConsumers)

2014-03-17 Thread cmoulliard
- Do a push before pull for this commit (Add unit test to support scenario 
concurrentConsumers)


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

Branch: refs/heads/master
Commit: 93992e83619e4a8e49a2a699ab65888e1ed5e6cd
Parents: 1a7b676 3d359ec
Author: Charles Moulliard ch0...@gmail.com
Authored: Mon Mar 17 11:25:39 2014 +0100
Committer: Charles Moulliard ch0...@gmail.com
Committed: Mon Mar 17 11:25:39 2014 +0100

--
 .../org/apache/camel/builder/SimpleBuilder.java |  6 +--
 .../camel/language/simple/SimpleLanguage.java   |  9 ++--
 .../language/simple/SimplePredicateParser.java  |  9 
 .../simple/SimpleParserPredicateTest.java   | 12 +
 .../SimpleRouteExpressionAsPredicateTest.java   | 51 
 .../camel/component/hl7/HL7Converter.java   | 19 +---
 parent/pom.xml  |  2 +-
 .../features/src/main/resources/features.xml|  1 +
 8 files changed, 94 insertions(+), 15 deletions(-)
--




[1/2] git commit: Add unit test to support scenario concurrentConsumers

2014-03-17 Thread cmoulliard
Repository: camel
Updated Branches:
  refs/heads/master 3d359ec1c - 93992e836


Add unit test to support scenario concurrentConsumers


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

Branch: refs/heads/master
Commit: 1a7b676e1b5c29b652e3faf16240ee3cc831a0c9
Parents: f6cf4a2
Author: Charles Moulliard ch0...@gmail.com
Authored: Mon Mar 17 11:21:08 2014 +0100
Committer: Charles Moulliard ch0...@gmail.com
Committed: Mon Mar 17 11:21:08 2014 +0100

--
 .../component/sjms/CamelJmsTestHelper.java  | 83 
 .../consumer/InOutConcurrentConsumerTest.java   | 80 +++
 2 files changed, 163 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/1a7b676e/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/CamelJmsTestHelper.java
--
diff --git 
a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/CamelJmsTestHelper.java
 
b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/CamelJmsTestHelper.java
new file mode 100644
index 000..00e3555
--- /dev/null
+++ 
b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/CamelJmsTestHelper.java
@@ -0,0 +1,83 @@
+package org.apache.camel.component.sjms;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.pool.PooledConnectionFactory;
+import org.apache.camel.util.FileUtil;
+
+import javax.jms.ConnectionFactory;
+import java.io.File;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * A helper for unit testing with Apache ActiveMQ as embedded JMS broker.
+ *
+ * @version
+ */
+public final class CamelJmsTestHelper {
+
+private static AtomicInteger counter = new AtomicInteger(0);
+
+private CamelJmsTestHelper() {
+}
+
+public static ConnectionFactory createConnectionFactory() {
+return createConnectionFactory(null);
+}
+
+public static ConnectionFactory createConnectionFactory(String options) {
+// using a unique broker name improves testing when running the entire 
test suite in the same JVM
+int id = counter.incrementAndGet();
+String url = vm://test-broker- + id + 
?broker.persistent=falsebroker.useJmx=false;
+if (options != null) {
+url = url +  + options;
+}
+ActiveMQConnectionFactory connectionFactory = new 
ActiveMQConnectionFactory(url);
+// optimize AMQ to be as fast as possible so unit testing is quicker
+connectionFactory.setCopyMessageOnSend(false);
+connectionFactory.setOptimizeAcknowledge(true);
+connectionFactory.setOptimizedMessageDispatch(true);
+
+// When using asyncSend, producers will not be guaranteed to send in 
the order we
+// have in the tests (which may be confusing for queues) so we need 
this set to false.
+// Another way of guaranteeing order is to use persistent messages or 
transactions.
+connectionFactory.setUseAsyncSend(false);
+
+connectionFactory.setAlwaysSessionAsync(false);
+// use a pooled connection factory
+PooledConnectionFactory pooled = new 
PooledConnectionFactory(connectionFactory);
+pooled.setMaxConnections(8);
+return pooled;
+}
+
+public static ConnectionFactory createPersistentConnectionFactory() {
+return createPersistentConnectionFactory(null);
+}
+
+public static ConnectionFactory createPersistentConnectionFactory(String 
options) {
+// using a unique broker name improves testing when running the entire 
test suite in the same JVM
+int id = counter.incrementAndGet();
+
+// use an unique data directory in target
+String dir = target/activemq-data- + id;
+
+// remove dir so its empty on startup
+FileUtil.removeDir(new File(dir));
+
+String url = vm://test-broker- + id + 
?broker.persistent=truebroker.useJmx=falsebroker.dataDirectory= + dir;
+if (options != null) {
+url = url +  + options;
+}
+ActiveMQConnectionFactory connectionFactory = new 
ActiveMQConnectionFactory(url);
+// optimize AMQ to be as fast as possible so unit testing is quicker
+connectionFactory.setCopyMessageOnSend(false);
+connectionFactory.setOptimizeAcknowledge(true);
+connectionFactory.setOptimizedMessageDispatch(true);
+connectionFactory.setUseAsyncSend(true);
+connectionFactory.setAlwaysSessionAsync(false);
+
+// use a pooled connection factory
+PooledConnectionFactory pooled = new 
PooledConnectionFactory(connectionFactory);

git commit: Add weld2 property - weld 2.1.0-Final

2013-11-07 Thread cmoulliard
Updated Branches:
  refs/heads/master 8c2640c68 - 0916620d8


Add weld2 property - weld 2.1.0-Final


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

Branch: refs/heads/master
Commit: 0916620d85207ff6281882fffc977ed570d3a607
Parents: 8c2640c
Author: Charles Mouliard cmoulli...@apache.org
Authored: Thu Nov 7 11:05:34 2013 +0100
Committer: Charles Mouliard cmoulli...@apache.org
Committed: Thu Nov 7 11:05:34 2013 +0100

--
 parent/pom.xml | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/0916620d/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index 7ee54f5..fa920e6 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -403,6 +403,7 @@
 vysper-version0.7/vysper-version
 !-- should be in-sync with deltaspike --
 weld-version1.1.5.Final/weld-version
+weld2-version2.1.0.Final/weld2-version
 werken-xpath-bundle-version0.9.4_5/werken-xpath-bundle-version
 woodstox-version4.2.0/woodstox-version
 ws-commons-util-bundle-version1.0.2_2/ws-commons-util-bundle-version



[2/2] git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/camel

2013-11-06 Thread cmoulliard
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/camel


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

Branch: refs/heads/master
Commit: 5de774cb1eb5467a8917fe36e37f0f7fc180f93d
Parents: c97601f 61312f5
Author: Charles Mouliard cmoulli...@apache.org
Authored: Wed Nov 6 16:02:23 2013 +0100
Committer: Charles Mouliard cmoulli...@apache.org
Committed: Wed Nov 6 16:02:23 2013 +0100

--
 .../camel/converter/jaxp/XmlConverter.java  | 19 +-
 .../management/DefaultManagementAgent.java  | 12 
 .../DefaultManagementNamingStrategy.java|  7 +-
 .../camel/management/JmxSystemPropertyKeys.java |  3 +
 .../management/mbean/ManagedCamelContext.java   |  8 ++-
 .../camel/management/mbean/ManagedRoute.java|  6 +-
 .../org/apache/camel/spi/ManagementAgent.java   | 19 ++
 .../camel/management/BacklogDebuggerTest.java   | 12 ++--
 .../management/BacklogTracerFilterTest.java |  2 +-
 .../BacklogTracerIdOnAllNodesTest.java  |  2 +-
 .../BacklogTracerPatternRouteTest.java  |  2 +-
 .../management/BacklogTracerPatternTest.java|  2 +-
 .../camel/management/BacklogTracerTest.java | 14 ++--
 .../DualManagedThreadPoolProfileTest.java   |  4 +-
 .../DualManagedThreadPoolWithIdTest.java|  4 +-
 .../management/EndpointCompletionTest.java  |  4 +-
 .../JmxInstrumentationCustomMBeanTest.java  |  3 -
 .../JmxNotificationEventNotifierTest.java   |  8 +--
 .../camel/management/JmxRecipientListTest.java  | 20 +++---
 .../ManagedBrowsableEndpointAsXmlTest.java  | 14 ++--
 .../ManagedBrowsableEndpointEmptyTest.java  |  2 +-
 .../ManagedBrowsableEndpointTest.java   |  2 +-
 .../apache/camel/management/ManagedCBRTest.java | 16 ++---
 .../ManagedCamelContextAutoStartupTest.java |  4 +-
 .../ManagedCamelContextDumpRoutesAsXmlTest.java |  2 +-
 .../ManagedCamelContextDumpStatsAsXmlTest.java  |  2 +-
 .../ManagedCamelContextPropertiesTest.java  |  2 +-
 .../ManagedCamelContextRestartTest.java |  2 +-
 .../ManagedCamelContextSuspendResumeTest.java   |  2 +-
 .../ManagedCamelContextSuspendStartTest.java|  2 +-
 .../management/ManagedCamelContextTest.java | 12 ++--
 .../ManagedCamelContextTracerTest.java  |  4 +-
 ...agedCamelContextUpdateRoutesFromXmlTest.java |  2 +-
 ...nagedCanekContextExchangeStatisticsTest.java |  6 +-
 .../camel/management/ManagedCustomBeanTest.java |  2 +-
 .../management/ManagedCustomPolicyTest.java |  6 +-
 .../management/ManagedCustomProcessorTest.java  |  2 +-
 .../camel/management/ManagedDelayerTest.java|  4 +-
 .../management/ManagedDualCamelContextTest.java |  7 +-
 .../camel/management/ManagedEndpointTest.java   |  4 +-
 .../camel/management/ManagedInterceptTest.java  |  6 +-
 .../management/ManagedLoadBalancerTest.java |  6 +-
 .../management/ManagedLogEndpointTest.java  |  2 +-
 .../camel/management/ManagedMulticastTest.java  |  6 +-
 .../management/ManagedNamePatternFixedTest.java |  2 +-
 .../ManagedNamePatternIncludeHostNameTest.java  | 63 ++
 .../management/ManagedNamePatternTest.java  |  2 +-
 .../ManagedRedeliverRouteOnlyTest.java  |  2 +-
 .../camel/management/ManagedRedeliverTest.java  |  4 +-
 .../ManagedRegisterCamelContextTest.java|  2 +-
 .../management/ManagedRegisterEndpointTest.java |  6 +-
 .../ManagedRegisterExchangeStatisticsTest.java  |  2 +-
 ...nagedRemoveRouteAggregateThreadPoolTest.java |  2 +-
 .../ManagedResetIncludeRoutesTest.java  |  2 +-
 .../camel/management/ManagedResourceTest.java   |  4 +-
 .../ManagedRouteAddFromRouteTest.java   |  4 +-
 .../management/ManagedRouteAddRemoveTest.java   | 14 ++--
 ...eAddSecondRouteNotRegisterNewRoutesTest.java |  4 +-
 .../ManagedRouteAddSecondRouteTest.java |  4 +-
 .../management/ManagedRouteAutoStartupTest.java |  6 +-
 .../ManagedRouteContextTracerTest.java  |  4 +-
 .../ManagedRouteDumpStatsAsXmlTest.java |  2 +-
 .../ManagedRoutePerformanceCounterTest.java |  2 +-
 ...outeRemoveWireTapExplicitThreadPoolTest.java |  2 +-
 .../ManagedRouteRemoveWireTapTest.java  |  2 +-
 .../camel/management/ManagedSanitizeTest.java   |  2 +-
 .../management/ManagedSedaEndpointTest.java |  2 +-
 .../management/ManagedSendProcessorTest.java|  2 +-
 .../management/ManagedServiceUrlPathTest.java   |  6 +-
 .../management/ManagedShutdownStrategyTest.java |  2 +-
 .../camel/management/ManagedStatisticsTest.java |  4 +-
 .../ManagedStatisticsWithSplitterTest.java  | 10 +--
 .../ManagedStreamCachingStrategyTest.java   |  2 +-
 .../ManagedThreadPoolProfileTest.java   |  2 +-
 .../camel/management/ManagedThreadPoolTest.java |  2 

[1/2] git commit: Add BeanManager as parameter - will be injected by @Observes PassivationCapable

2013-11-06 Thread cmoulliard
Updated Branches:
  refs/heads/master 61312f51c - 5de774cb1


Add BeanManager as parameter - will be injected by @Observes  
PassivationCapable


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

Branch: refs/heads/master
Commit: c97601f546323279931ea9a0f1ff8df72b3d1b7e
Parents: 71758b5
Author: Charles Mouliard cmoulli...@apache.org
Authored: Wed Nov 6 16:01:51 2013 +0100
Committer: Charles Mouliard cmoulli...@apache.org
Committed: Wed Nov 6 16:01:51 2013 +0100

--
 .../org/apache/camel/cdi/internal/BeanAdapter.java   | 14 +-
 .../apache/camel/cdi/internal/CamelContextBean.java  | 11 +--
 .../apache/camel/cdi/internal/CamelExtension.java| 15 ++-
 3 files changed, 28 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/c97601f5/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/BeanAdapter.java
--
diff --git 
a/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/BeanAdapter.java
 
b/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/BeanAdapter.java
index db986f6..504ac11 100644
--- 
a/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/BeanAdapter.java
+++ 
b/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/BeanAdapter.java
@@ -20,6 +20,8 @@ import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.inject.Inject;
 
 import org.apache.camel.Consume;
 import org.apache.camel.EndpointInject;
@@ -38,6 +40,8 @@ public class BeanAdapter {
 private final ListField endpointFields = new ArrayListField();
 private final ContextName startup;
 
+@Inject BeanManager beanManager;
+
 public BeanAdapter(ContextName startup) {
 this.startup = startup;
 }
@@ -80,7 +84,7 @@ public class BeanAdapter {
 if (annotation != null) {
 String contextName = 
CamelExtension.getCamelContextName(annotation.context(), startup);
 DefaultCamelBeanPostProcessor postProcessor = 
camelExtension.getPostProcessor(
-contextName);
+contextName, beanManager);
 if (postProcessor != null) {
 
postProcessor.getPostProcessorHelper().consumerInjection(method, reference, 
beanName);
 }
@@ -91,7 +95,7 @@ public class BeanAdapter {
 if (annotation != null) {
 String contextName = 
CamelExtension.getCamelContextName(annotation.context(), startup);
 DefaultCamelBeanPostProcessor postProcessor = 
camelExtension.getPostProcessor(
-contextName);
+contextName, beanManager);
 if (postProcessor != null  
postProcessor.getPostProcessorHelper().matchContext(contextName)) {
 postProcessor.setterInjection(method, reference, beanName, 
annotation.uri(), annotation.ref(),
 annotation.property());
@@ -103,7 +107,7 @@ public class BeanAdapter {
 if (annotation != null) {
 String contextName = 
CamelExtension.getCamelContextName(annotation.context(), startup);
 DefaultCamelBeanPostProcessor postProcessor = 
camelExtension.getPostProcessor(
-contextName);
+contextName, beanManager);
 if (postProcessor != null  
postProcessor.getPostProcessorHelper().matchContext(contextName)) {
 postProcessor.setterInjection(method, reference, beanName, 
annotation.uri(), annotation.ref(),
 annotation.property());
@@ -116,7 +120,7 @@ public class BeanAdapter {
 if (annotation != null) {
 String contextName = 
CamelExtension.getCamelContextName(annotation.context(), startup);
 DefaultCamelBeanPostProcessor postProcessor = 
camelExtension.getPostProcessor(
-contextName);
+contextName, beanManager);
 if (postProcessor != null  
postProcessor.getPostProcessorHelper().matchContext(contextName)) {
 postProcessor.injectField(field, annotation.uri(), 
annotation.ref(),
 annotation.property(), reference, beanName);
@@ -127,7 +131,7 @@ public class BeanAdapter {
 EndpointInject annotation = 
field.getAnnotation(EndpointInject.class);
 String contextName = 

git commit: CAMEL-6935 : Add instructions to support Require-Capability and Provide-Capability introduced by OSGI v4.3

2013-11-05 Thread cmoulliard
Updated Branches:
  refs/heads/master 360319d2d - 71758b5b1


CAMEL-6935 : Add instructions to support Require-Capability and 
Provide-Capability introduced by OSGI v4.3


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

Branch: refs/heads/master
Commit: 71758b5b1cdf546f90d7528496c4227aefb10ce9
Parents: 360319d
Author: Charles Mouliard cmoulli...@apache.org
Authored: Tue Nov 5 16:27:09 2013 +0100
Committer: Charles Mouliard cmoulli...@apache.org
Committed: Tue Nov 5 16:27:34 2013 +0100

--
 components/camel-cdi/pom.xml | 3 +++
 parent/pom.xml   | 4 
 2 files changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/71758b5b/components/camel-cdi/pom.xml
--
diff --git a/components/camel-cdi/pom.xml b/components/camel-cdi/pom.xml
index 4da2f70..cafc652 100644
--- a/components/camel-cdi/pom.xml
+++ b/components/camel-cdi/pom.xml
@@ -42,6 +42,9 @@
 org.apache.camel.cdi.internal;${camel.osgi.version},
 org.apache.camel.cdi.component.*;${camel.osgi.version}
 /camel.osgi.export.pkg
+camel.osgi.provide.capability
+  org.ops4j.pax.cdi.extension; extension=camel-cdi-extension
+/camel.osgi.provide.capability
 /properties
 
 dependencies

http://git-wip-us.apache.org/repos/asf/camel/blob/71758b5b/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index 336b144..7ee54f5 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -482,6 +482,8 @@
 camel.osgi.dynamic /
 
camel.osgi.symbolic.name${project.groupId}.${project.artifactId}/camel.osgi.symbolic.name
 camel.osgi.exclude.dependenciesfalse/camel.osgi.exclude.dependencies
+camel.osgi.require.capability/
+camel.osgi.provide.capability/
   /properties
 
   dependencyManagement
@@ -2525,6 +2527,8 @@
 Private-Package${camel.osgi.private.pkg}/Private-Package
 Import-Service${camel.osgi.import.service}/Import-Service
 Export-Service${camel.osgi.export.service}/Export-Service
+
Require-Capability${camel.osgi.require.capability}/Require-Capability
+
Provide-Capability${camel.osgi.provide.capability}/Provide-Capability
 Implementation-TitleApache Camel/Implementation-Title
 Implementation-Version${project.version}/Implementation-Version
 
Karaf-InfoCamel;${project.artifactId}=${project.version}/Karaf-Info



git commit: CAMEL-6432: Use URL to load resources using camel getclassresolver

2013-06-07 Thread cmoulliard
Updated Branches:
  refs/heads/camel-2.11.x aa939a6eb - 75a171143


CAMEL-6432: Use URL to load resources using camel getclassresolver


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

Branch: refs/heads/camel-2.11.x
Commit: 75a1711434cb515f154de6f2a741248a228d987c
Parents: aa939a6
Author: Charles Mouliard cmoulli...@apache.org
Authored: Fri Jun 7 15:10:00 2013 +0200
Committer: Charles Mouliard cmoulli...@apache.org
Committed: Fri Jun 7 15:10:37 2013 +0200

--
 .../component/websocket/WebsocketComponent.java|6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/75a17114/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
--
diff --git 
a/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
 
b/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
index 04e9f06..31bc5c0 100644
--- 
a/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
+++ 
b/components/camel-websocket/src/main/java/org/apache/camel/component/websocket/WebsocketComponent.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.websocket;
 
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.net.URL;
 import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.List;
@@ -349,7 +350,10 @@ public class WebsocketComponent extends DefaultComponent {
 }
 
 if (resources[0].equals(classpath)) {
-context.setBaseResource(new 
JettyClassPathResource(getCamelContext().getClassResolver(), resources[1]));
+// Does not work when deployed as a bundle
+// context.setBaseResource(new 
JettyClassPathResource(getCamelContext().getClassResolver(), resources[1]));
+URL url = 
this.getCamelContext().getClassResolver().loadResourceAsURL(resources[1]);
+context.setBaseResource(Resource.newResource(url));
 } else if (resources[0].equals(file)) {
 context.setBaseResource(Resource.newResource(resources[1]));
 }



svn commit: r1477508 - in /camel/trunk/components/camel-bindy/src: main/java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java test/java/org/apache/camel/dataformat/bindy/fixed/link/Bindy

2013-04-30 Thread cmoulliard
Author: cmoulliard
Date: Tue Apr 30 08:43:14 2013
New Revision: 1477508

URL: http://svn.apache.org/r1477508
Log:
CAMEL-6323 : Add a new unit test for FixedLengthFormat with @Link class, 
replace LinkedHashMap with TreeMap to solve ordering issue

Modified:

camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java

camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/link/BindySimpleFixedLengthWithLinkTest.java

Modified: 
camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java?rev=1477508r1=1477507r2=1477508view=diff
==
--- 
camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java
 (original)
+++ 
camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyFixedLengthFactory.java
 Tue Apr 30 08:43:14 2013
@@ -21,7 +21,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.LinkedHashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
@@ -34,7 +33,6 @@ import org.apache.camel.dataformat.bindy
 import org.apache.camel.dataformat.bindy.format.FormatException;
 import org.apache.camel.spi.PackageScanClassResolver;
 import org.apache.camel.spi.PackageScanFilter;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -50,8 +48,10 @@ public class BindyFixedLengthFactory ext
 
 boolean isOneToMany;
 
-private MapInteger, DataField dataFields = new LinkedHashMapInteger, 
DataField();
-private MapInteger, Field annotatedFields = new LinkedHashMapInteger, 
Field();
+//private MapInteger, DataField dataFields = new LinkedHashMapInteger, 
DataField();
+private MapInteger, DataField dataFields = new TreeMapInteger, 
DataField();
+//private MapInteger, Field annotatedFields = new LinkedHashMapInteger, 
Field();
+private MapInteger, Field annotatedFields = new TreeMapInteger, 
Field();

 private int numberOptionalFields;
 private int numberMandatoryFields;

Modified: 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/link/BindySimpleFixedLengthWithLinkTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/link/BindySimpleFixedLengthWithLinkTest.java?rev=1477508r1=1477507r2=1477508view=diff
==
--- 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/link/BindySimpleFixedLengthWithLinkTest.java
 (original)
+++ 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/link/BindySimpleFixedLengthWithLinkTest.java
 Tue Apr 30 08:43:14 2013
@@ -16,6 +16,10 @@
  */
 package org.apache.camel.dataformat.bindy.fixed.link;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 import org.apache.camel.EndpointInject;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
@@ -58,10 +62,22 @@ public class BindySimpleFixedLengthWithL
 
 // check the model
 Exchange exchange = unmarshallResult.getReceivedExchanges().get(0);
-BindySimpleFixedLengthWithLinkTest.Order order = 
(BindySimpleFixedLengthWithLinkTest.Order) exchange.getIn().getBody();
-assertEquals(AAA, order.fieldA);
-assertEquals(BBB, order.subRec.fieldB);
-assertEquals(CCC, order.fieldC);
+ListHashMapString, Object results = (List) 
exchange.getIn().getBody();
+String orderKey = 
org.apache.camel.dataformat.bindy.fixed.link.BindySimpleFixedLengthWithLinkTest$Order;
+
+for (int i = 0; i  results.size(); i++) {
+MapString, Object map = results.get(i);
+for ( String key : map.keySet() ) {
+if (key.equals(orderKey)) {
+Order order = (Order) map.get(orderKey);
+assertEquals(AAA, order.fieldA);
+assertEquals(CCC, order.fieldC);
+assertEquals(BBB, order.subRec.fieldB);
+}
+}
+
+}
+
 
 }
 
@@ -76,12 +92,12 @@ public class BindySimpleFixedLengthWithL
 @Override
 public void configure() throws Exception {
 BindyDataFormat bindy = new BindyDataFormat();
-
bindy.setClassType(BindySimpleFixedLengthWithLinkTest.Order.class);
+bindy.setPackages(new 
String[]{org.apache.camel.dataformat.bindy.fixed.link});
 bindy.setLocale(en);
 bindy.setType

  1   2   3   >