camel git commit: Camel-Openshift Removed uselese null checks inside producer class

2015-05-02 Thread acosentino
Repository: camel
Updated Branches:
  refs/heads/master d93056a3b - e63deab9a


Camel-Openshift Removed uselese null checks inside producer class


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

Branch: refs/heads/master
Commit: e63deab9a26b5f5424a676f9828b461343152e53
Parents: d93056a
Author: Andrea Cosentino anco...@gmail.com
Authored: Sat May 2 08:37:36 2015 +0200
Committer: Andrea Cosentino anco...@gmail.com
Committed: Sat May 2 08:37:36 2015 +0200

--
 .../component/openshift/OpenShiftProducer.java  | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/e63deab9/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/OpenShiftProducer.java
--
diff --git 
a/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/OpenShiftProducer.java
 
b/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/OpenShiftProducer.java
index 1e01c4e..f85e7cd 100644
--- 
a/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/OpenShiftProducer.java
+++ 
b/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/OpenShiftProducer.java
@@ -313,7 +313,7 @@ public class OpenShiftProducer extends DefaultProducer {
 throw new CamelExchangeException(Application with id  + name +  
not found., exchange);
 } else {
 String embeddedCartridgeName = 
exchange.getIn().getHeader(OpenShiftConstants.EMBEDDED_CARTRIDGE_NAME, 
getEndpoint().getApplication(), String.class);
-if (!ObjectHelper.isEmpty(embeddedCartridgeName)  
embeddedCartridgeName != null) {
+if (ObjectHelper.isNotEmpty(embeddedCartridgeName)) {
 IEmbeddedCartridge p = app.addEmbeddableCartridge((new 
LatestEmbeddableCartridge(embeddedCartridgeName)).get(app));
 exchange.getIn().setBody(p.getDisplayName());
 } else {
@@ -333,7 +333,7 @@ public class OpenShiftProducer extends DefaultProducer {
 throw new CamelExchangeException(Application with id  + name +  
not found., exchange);
 } else {
 String embeddedCartridgeName = 
exchange.getIn().getHeader(OpenShiftConstants.EMBEDDED_CARTRIDGE_NAME, 
getEndpoint().getApplication(), String.class);
-if (!ObjectHelper.isEmpty(embeddedCartridgeName)  
embeddedCartridgeName != null) {
+if (ObjectHelper.isNotEmpty(embeddedCartridgeName)) {
 IEmbeddableCartridge removingCartridge = (new 
LatestEmbeddableCartridge(embeddedCartridgeName)).get(app);
 for (IEmbeddedCartridge cartridge : 
app.getEmbeddedCartridges()) {
 if (cartridge.equals(removingCartridge)) {
@@ -429,7 +429,7 @@ public class OpenShiftProducer extends DefaultProducer {
 throw new CamelExchangeException(Application with id  + name +  
not found., exchange);
 } else {
 String deploymentType = 
exchange.getIn().getHeader(OpenShiftConstants.DEPLOYMENT_TYPE, 
getEndpoint().getApplication(), String.class);
-if (!ObjectHelper.isEmpty(deploymentType)  deploymentType != 
null) {
+if (ObjectHelper.isNotEmpty(deploymentType)) {
 String result = app.setDeploymentType(deploymentType);
 exchange.getIn().setBody(result);
 } else {
@@ -453,7 +453,7 @@ public class OpenShiftProducer extends DefaultProducer {
 if (!app.canUpdateEnvironmentVariables()) {
 throw new CamelExchangeException(The application with id  + 
name +  can't update Environment Variables, exchange);
 }
-if ((!ObjectHelper.isEmpty(variableName)  variableName != null) 
|| (!ObjectHelper.isEmpty(variableValue)  variableValue != null)) {
+if (ObjectHelper.isNotEmpty(variableName)  
ObjectHelper.isNotEmpty(variableValue)) {
 IEnvironmentVariable result = 
app.addEnvironmentVariable(variableName, variableValue);
 exchange.getIn().setBody(result.getName());
 } else {
@@ -476,7 +476,7 @@ public class OpenShiftProducer extends DefaultProducer {
 if (!app.canUpdateEnvironmentVariables()) {
 throw new CamelExchangeException(The application with id  + 
name +  can't update Environment Variables, exchange);
 }
-if (!ObjectHelper.isEmpty(environmentVariables)  
environmentVariables != null) {
+if (ObjectHelper.isNotEmpty(environmentVariables)) {
 MapString, 

camel git commit: CAMEL-8730 Camel-Hazelcast: Add replace operation to map producer

2015-05-02 Thread acosentino
Repository: camel
Updated Branches:
  refs/heads/master e63deab9a - 94ce9de81


CAMEL-8730 Camel-Hazelcast: Add replace operation to map producer


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

Branch: refs/heads/master
Commit: 94ce9de81ccea6ddf0e3e346537f547e32bffe3d
Parents: e63deab
Author: Andrea Cosentino anco...@gmail.com
Authored: Sat May 2 11:43:37 2015 +0200
Committer: Andrea Cosentino anco...@gmail.com
Committed: Sat May 2 11:43:37 2015 +0200

--
 .../component/hazelcast/HazelcastConstants.java |  4 ++-
 .../hazelcast/map/HazelcastMapProducer.java | 29 
 .../hazelcast/HazelcastMapProducerTest.java | 17 
 3 files changed, 49 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/94ce9de8/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastConstants.java
--
diff --git 
a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastConstants.java
 
b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastConstants.java
index 3caa167..7757f74 100644
--- 
a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastConstants.java
+++ 
b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastConstants.java
@@ -35,6 +35,7 @@ public final class HazelcastConstants {
  */
 public static final String OBJECT_ID = CamelHazelcastObjectId;
 public static final String OBJECT_POS = CamelHazelcastObjectIndex;
+public static final String OBJECT_VALUE = CamelHazelcastObjectValue;
 public static final String QUERY = CamelHazelcastQuery;
 
 /*
@@ -48,7 +49,7 @@ public final class HazelcastConstants {
 public static final String CACHE_NAME = CamelHazelcastCacheName;
 public static final String CACHE_TYPE = CamelHazelcastCacheType;
 
-// actions (put, delete, get, update)
+// actions (put, delete, get, getAll, replace, update)
 public static final String OPERATION = CamelHazelcastOperationType;
 public static final int PUT_OPERATION = 1;
 public static final int DELETE_OPERATION = 2;
@@ -56,6 +57,7 @@ public final class HazelcastConstants {
 public static final int UPDATE_OPERATION = 4;
 public static final int QUERY_OPERATION = 5;
 public static final int GET_ALL_OPERATION = 6;
+public static final int REPLACE_OPERATION = 7;
 
 // multimap
 public static final int REMOVEVALUE_OPERATION = 10;

http://git-wip-us.apache.org/repos/asf/camel/blob/94ce9de8/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/map/HazelcastMapProducer.java
--
diff --git 
a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/map/HazelcastMapProducer.java
 
b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/map/HazelcastMapProducer.java
index ec453a7..8b6cd69 100644
--- 
a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/map/HazelcastMapProducer.java
+++ 
b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/map/HazelcastMapProducer.java
@@ -45,11 +45,16 @@ public class HazelcastMapProducer extends 
HazelcastDefaultProducer {
 
 // get header parameters
 Object oid = null;
+Object ovalue = null;
 String query = null;
 
 if (headers.containsKey(HazelcastConstants.OBJECT_ID)) {
 oid = headers.get(HazelcastConstants.OBJECT_ID);
 }
+
+if (headers.containsKey(HazelcastConstants.OBJECT_VALUE)) {
+ovalue = headers.get(HazelcastConstants.OBJECT_VALUE);
+}
 
 if (headers.containsKey(HazelcastConstants.QUERY)) {
 query = (String) headers.get(HazelcastConstants.QUERY);
@@ -82,6 +87,14 @@ public class HazelcastMapProducer extends 
HazelcastDefaultProducer {
 this.query(query, exchange);
 break;
 
+case HazelcastConstants.REPLACE_OPERATION:
+if (ObjectHelper.isEmpty(ovalue)) {
+this.replace(oid, exchange);
+} else {
+this.replace(oid, ovalue, exchange);
+}
+break;
+
 default:
 throw new IllegalArgumentException(String.format(The value '%s' 
is not allowed for parameter '%s' on the MAP cache., operation, 
HazelcastConstants.OPERATION));
 }
@@ -143,4 +156,20 @@ public class HazelcastMapProducer 

camel git commit: Fix Camel-7501 Only one ZooKeeperRoutePolicy possible

2015-05-02 Thread acosentino
Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x c77d0f1c6 - 2f2746e35


Fix Camel-7501 Only one ZooKeeperRoutePolicy possible


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

Branch: refs/heads/camel-2.15.x
Commit: 2f2746e35eabcb82b91485eeae4bbd5055154e3d
Parents: c77d0f1
Author: Andrea Cosentino anco...@gmail.com
Authored: Sat May 2 14:09:15 2015 +0200
Committer: Andrea Cosentino anco...@gmail.com
Committed: Sat May 2 17:10:31 2015 +0200

--
 .../zookeeper/policy/ZooKeeperElection.java |  2 +-
 ...ZookeeperDoubleRouteAndDoublePolicyTest.java | 57 
 2 files changed, 58 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/2f2746e3/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperElection.java
--
diff --git 
a/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperElection.java
 
b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperElection.java
index 3fb3eb1..79e6a19 100644
--- 
a/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperElection.java
+++ 
b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperElection.java
@@ -219,7 +219,7 @@ public class ZooKeeperElection {
  * status changes. This will require enhancing the consumer to 
allow
  * custom operation lists.
  */
-from(zep).id(election-route- + candidateName.substring(0, 
8)).sort(body(), comparator).process(new Processor() {
+from(zep).id(election-route- + candidateName).sort(body(), 
comparator).process(new Processor() {
 @Override
 public void process(Exchange e) throws Exception {
 @SuppressWarnings(unchecked)

http://git-wip-us.apache.org/repos/asf/camel/blob/2f2746e3/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/policy/ZookeeperDoubleRouteAndDoublePolicyTest.java
--
diff --git 
a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/policy/ZookeeperDoubleRouteAndDoublePolicyTest.java
 
b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/policy/ZookeeperDoubleRouteAndDoublePolicyTest.java
new file mode 100644
index 000..0cdb180
--- /dev/null
+++ 
b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/policy/ZookeeperDoubleRouteAndDoublePolicyTest.java
@@ -0,0 +1,57 @@
+/**
+ * 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.zookeeper.policy;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.component.zookeeper.ZooKeeperTestSupport;
+import org.junit.Test;
+
+public class ZookeeperDoubleRouteAndDoublePolicyTest extends 
ZooKeeperTestSupport {
+
+@Test
+public void routeDoublePoliciesAndTwoRoutes() throws Exception {
+// set up the parent used to control the election
+client.createPersistent(/someapp, App node to contain policy 
election nodes...);
+client.createPersistent(/someapp/somepolicy, Policy node used by 
route policy to control routes...);
+client.createPersistent(/someapp/someotherpolicy, Policy node used 
by route policy to control routes...);
+context.addRoutes(new ZooKeeperPolicyEnforcedRoute());
+
+MockEndpoint mockedpolicy = getMockEndpoint(mock:controlled);
+mockedpolicy.setExpectedMessageCount(1);
+sendBody(direct:policy-controlled, This is a test);
+mockedpolicy.await(5, 

camel git commit: Fix Camel-7501 Only one ZooKeeperRoutePolicy possible

2015-05-02 Thread acosentino
Repository: camel
Updated Branches:
  refs/heads/master 94ce9de81 - 0b3e38a7e


Fix Camel-7501 Only one ZooKeeperRoutePolicy possible


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

Branch: refs/heads/master
Commit: 0b3e38a7e9bb7de9d4645b9db88060092442af40
Parents: 94ce9de
Author: Andrea Cosentino anco...@gmail.com
Authored: Sat May 2 14:09:15 2015 +0200
Committer: Andrea Cosentino anco...@gmail.com
Committed: Sat May 2 14:09:15 2015 +0200

--
 .../zookeeper/policy/ZooKeeperElection.java |  2 +-
 ...ZookeeperDoubleRouteAndDoublePolicyTest.java | 57 
 2 files changed, 58 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/0b3e38a7/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperElection.java
--
diff --git 
a/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperElection.java
 
b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperElection.java
index 3fb3eb1..79e6a19 100644
--- 
a/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperElection.java
+++ 
b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperElection.java
@@ -219,7 +219,7 @@ public class ZooKeeperElection {
  * status changes. This will require enhancing the consumer to 
allow
  * custom operation lists.
  */
-from(zep).id(election-route- + candidateName.substring(0, 
8)).sort(body(), comparator).process(new Processor() {
+from(zep).id(election-route- + candidateName).sort(body(), 
comparator).process(new Processor() {
 @Override
 public void process(Exchange e) throws Exception {
 @SuppressWarnings(unchecked)

http://git-wip-us.apache.org/repos/asf/camel/blob/0b3e38a7/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/policy/ZookeeperDoubleRouteAndDoublePolicyTest.java
--
diff --git 
a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/policy/ZookeeperDoubleRouteAndDoublePolicyTest.java
 
b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/policy/ZookeeperDoubleRouteAndDoublePolicyTest.java
new file mode 100644
index 000..0cdb180
--- /dev/null
+++ 
b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/policy/ZookeeperDoubleRouteAndDoublePolicyTest.java
@@ -0,0 +1,57 @@
+/**
+ * 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.zookeeper.policy;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.component.zookeeper.ZooKeeperTestSupport;
+import org.junit.Test;
+
+public class ZookeeperDoubleRouteAndDoublePolicyTest extends 
ZooKeeperTestSupport {
+
+@Test
+public void routeDoublePoliciesAndTwoRoutes() throws Exception {
+// set up the parent used to control the election
+client.createPersistent(/someapp, App node to contain policy 
election nodes...);
+client.createPersistent(/someapp/somepolicy, Policy node used by 
route policy to control routes...);
+client.createPersistent(/someapp/someotherpolicy, Policy node used 
by route policy to control routes...);
+context.addRoutes(new ZooKeeperPolicyEnforcedRoute());
+
+MockEndpoint mockedpolicy = getMockEndpoint(mock:controlled);
+mockedpolicy.setExpectedMessageCount(1);
+sendBody(direct:policy-controlled, This is a test);
+mockedpolicy.await(5, TimeUnit.SECONDS);
+

camel git commit: CAMEL-8731 Camel-Hazelcast: Add clear operation to map and multimap producers

2015-05-02 Thread acosentino
Repository: camel
Updated Branches:
  refs/heads/master 0b3e38a7e - 9c628c284


CAMEL-8731 Camel-Hazelcast: Add clear operation to map and multimap producers


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

Branch: refs/heads/master
Commit: 9c628c2841daf3b457e1ccfcf69050d5c3c274b7
Parents: 0b3e38a
Author: Andrea Cosentino anco...@gmail.com
Authored: Sat May 2 16:50:43 2015 +0200
Committer: Andrea Cosentino anco...@gmail.com
Committed: Sat May 2 16:50:43 2015 +0200

--
 .../camel/component/hazelcast/HazelcastConstants.java|  3 ++-
 .../component/hazelcast/map/HazelcastMapProducer.java| 11 +++
 .../hazelcast/multimap/HazelcastMultimapProducer.java|  7 +++
 .../component/hazelcast/HazelcastMapProducerTest.java|  9 -
 .../hazelcast/HazelcastMultimapProducerTest.java |  8 
 5 files changed, 36 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/9c628c28/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastConstants.java
--
diff --git 
a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastConstants.java
 
b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastConstants.java
index 7757f74..84521c3 100644
--- 
a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastConstants.java
+++ 
b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/HazelcastConstants.java
@@ -49,7 +49,7 @@ public final class HazelcastConstants {
 public static final String CACHE_NAME = CamelHazelcastCacheName;
 public static final String CACHE_TYPE = CamelHazelcastCacheType;
 
-// actions (put, delete, get, getAll, replace, update)
+// actions (put, delete, get, getAll, replace, update, clear)
 public static final String OPERATION = CamelHazelcastOperationType;
 public static final int PUT_OPERATION = 1;
 public static final int DELETE_OPERATION = 2;
@@ -58,6 +58,7 @@ public final class HazelcastConstants {
 public static final int QUERY_OPERATION = 5;
 public static final int GET_ALL_OPERATION = 6;
 public static final int REPLACE_OPERATION = 7;
+public static final int CLEAR_OPERATION = 8;
 
 // multimap
 public static final int REMOVEVALUE_OPERATION = 10;

http://git-wip-us.apache.org/repos/asf/camel/blob/9c628c28/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/map/HazelcastMapProducer.java
--
diff --git 
a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/map/HazelcastMapProducer.java
 
b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/map/HazelcastMapProducer.java
index 8b6cd69..ab59a6a 100644
--- 
a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/map/HazelcastMapProducer.java
+++ 
b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/map/HazelcastMapProducer.java
@@ -94,6 +94,10 @@ public class HazelcastMapProducer extends 
HazelcastDefaultProducer {
 this.replace(oid, ovalue, exchange);
 }
 break;
+
+case HazelcastConstants.CLEAR_OPERATION:
+this.clear(exchange);
+break;
 
 default:
 throw new IllegalArgumentException(String.format(The value '%s' 
is not allowed for parameter '%s' on the MAP cache., operation, 
HazelcastConstants.OPERATION));
@@ -172,4 +176,11 @@ public class HazelcastMapProducer extends 
HazelcastDefaultProducer {
 Object body = exchange.getIn().getBody();
 this.cache.replace(oid, ovalue, body);
 }
+
+/**
+ * Clear all the entries
+ */
+private void clear(Exchange exchange) {
+this.cache.clear();
+}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/9c628c28/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/multimap/HazelcastMultimapProducer.java
--
diff --git 
a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/multimap/HazelcastMultimapProducer.java
 
b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/multimap/HazelcastMultimapProducer.java
index 2bbe5f3..4e9ff53 100644
--- 

camel git commit: Fix Camel-7501 Only one ZooKeeperRoutePolicy possible

2015-05-02 Thread acosentino
Repository: camel
Updated Branches:
  refs/heads/camel-2.14.x 329666bd1 - a47daab68


Fix Camel-7501 Only one ZooKeeperRoutePolicy possible


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

Branch: refs/heads/camel-2.14.x
Commit: a47daab680fb3daa153f82d87e044816ded2f001
Parents: 329666b
Author: Andrea Cosentino anco...@gmail.com
Authored: Sat May 2 14:09:15 2015 +0200
Committer: Andrea Cosentino anco...@gmail.com
Committed: Sat May 2 17:13:02 2015 +0200

--
 .../zookeeper/policy/ZooKeeperElection.java |  2 +-
 ...ZookeeperDoubleRouteAndDoublePolicyTest.java | 57 
 2 files changed, 58 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/a47daab6/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperElection.java
--
diff --git 
a/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperElection.java
 
b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperElection.java
index 3fb3eb1..79e6a19 100644
--- 
a/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperElection.java
+++ 
b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperElection.java
@@ -219,7 +219,7 @@ public class ZooKeeperElection {
  * status changes. This will require enhancing the consumer to 
allow
  * custom operation lists.
  */
-from(zep).id(election-route- + candidateName.substring(0, 
8)).sort(body(), comparator).process(new Processor() {
+from(zep).id(election-route- + candidateName).sort(body(), 
comparator).process(new Processor() {
 @Override
 public void process(Exchange e) throws Exception {
 @SuppressWarnings(unchecked)

http://git-wip-us.apache.org/repos/asf/camel/blob/a47daab6/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/policy/ZookeeperDoubleRouteAndDoublePolicyTest.java
--
diff --git 
a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/policy/ZookeeperDoubleRouteAndDoublePolicyTest.java
 
b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/policy/ZookeeperDoubleRouteAndDoublePolicyTest.java
new file mode 100644
index 000..0cdb180
--- /dev/null
+++ 
b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/policy/ZookeeperDoubleRouteAndDoublePolicyTest.java
@@ -0,0 +1,57 @@
+/**
+ * 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.zookeeper.policy;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.component.zookeeper.ZooKeeperTestSupport;
+import org.junit.Test;
+
+public class ZookeeperDoubleRouteAndDoublePolicyTest extends 
ZooKeeperTestSupport {
+
+@Test
+public void routeDoublePoliciesAndTwoRoutes() throws Exception {
+// set up the parent used to control the election
+client.createPersistent(/someapp, App node to contain policy 
election nodes...);
+client.createPersistent(/someapp/somepolicy, Policy node used by 
route policy to control routes...);
+client.createPersistent(/someapp/someotherpolicy, Policy node used 
by route policy to control routes...);
+context.addRoutes(new ZooKeeperPolicyEnforcedRoute());
+
+MockEndpoint mockedpolicy = getMockEndpoint(mock:controlled);
+mockedpolicy.setExpectedMessageCount(1);
+sendBody(direct:policy-controlled, This is a test);
+mockedpolicy.await(5, 

svn commit: r949885 - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache hazelcast-component.html

2015-05-02 Thread buildbot
Author: buildbot
Date: Sat May  2 19:20:44 2015
New Revision: 949885

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/book-component-appendix.html
websites/production/camel/content/book-in-one-page.html
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/hazelcast-component.html

Modified: websites/production/camel/content/book-component-appendix.html
==
--- websites/production/camel/content/book-component-appendix.html (original)
+++ websites/production/camel/content/book-component-appendix.html Sat May  2 
19:20:44 2015
@@ -1334,11 +1334,11 @@ template.send(quot;direct:alias-verify
 /div
 /div
 pThe strongcxf:/strong component provides integration with a 
shape=rect href=http://cxf.apache.org;Apache CXF/a for connecting to 
JAX-WS services hosted in CXF./ppstyle type=text/css/*![CDATA[*/
-div.rbtoc1430461123464 {padding: 0px;}
-div.rbtoc1430461123464 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1430461123464 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1430594342538 {padding: 0px;}
+div.rbtoc1430594342538 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1430594342538 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]*//style/pdiv class=toc-macro rbtoc1430461123464
+/*]]*//style/pdiv class=toc-macro rbtoc1430594342538
 ul class=toc-indentationlia shape=rect href=#CXF-CXFComponentCXF 
Component/a
 ul class=toc-indentationlia shape=rect href=#CXF-URIformatURI 
format/a/lilia shape=rect href=#CXF-OptionsOptions/a
 ul class=toc-indentationlia shape=rect 
href=#CXF-ThedescriptionsofthedataformatsThe descriptions of the 
dataformats/a
@@ -3866,7 +3866,7 @@ http://java.sun.com/xml/ns/javaee/web-ap
 pYou have to use the second prefix to define 
which type of data store you want to use./p
 /div
 /div
-h3 id=BookComponentAppendix-SectionsSections/h3olliUsage of a 
shape=rect href=#BookComponentAppendix-map#map/a/liliUsage of a 
shape=rect href=#BookComponentAppendix-multimap#multimap/a/liliUsage 
of a shape=rect href=#BookComponentAppendix-queue#queue/a/liliUsage 
of a shape=rect href=#BookComponentAppendix-topic#topic/a/liliUsage 
of a shape=rect href=#BookComponentAppendix-list#list/a/liliUsage 
of a shape=rect href=#BookComponentAppendix-seda#seda/a/liliUsage 
of a shape=rect href=#BookComponentAppendix-atomicnumberatomic 
number/a/liliUsage of a shape=rect 
href=#BookComponentAppendix-cluster#cluster/a support 
(instance)/li/olpspan class=confluence-anchor-link 
id=BookComponentAppendix-map/span/ph3 
id=BookComponentAppendix-UsageofMapUsage of Map/h3h4 
id=BookComponentAppendix-mapcacheproducer-to(quot;hazelcast:map:fooquot;)map
 cache producer - to(hazelcast:ma
 p:foo)/h4pIf you want to store a value in a map you can use the map cache 
producer. The map cache producer provides 5 operations (put, get, update, 
delete, query). For the first 4 you have to provide the operation inside the 
hazelcast.operation.type header variable. In Java DSL you can use the 
constants from 
codeorg.apache.camel.component.hazelcast.HazelcastConstants/code./ppHeader
 Variables for the request message:/pdiv class=table-wraptable 
class=confluenceTabletbodytrth colspan=1 rowspan=1 
class=confluenceThpName/p/thth colspan=1 rowspan=1 
class=confluenceThpType/p/thth colspan=1 rowspan=1 
class=confluenceThpDescription/p/th/trtrtd colspan=1 
rowspan=1 
class=confluenceTdpcodehazelcast.operation.type/code/p/tdtd 
colspan=1 rowspan=1 class=confluenceTdpcodeString/code/p/tdtd 
colspan=1 rowspan=1 class=confluenceTdpvalid values are: put, delete, 
get, update, query/p
 /td/trtrtd colspan=1 rowspan=1 
 class=confluenceTdpcodehazelcast.objectId/code/p/tdtd 
 colspan=1 rowspan=1 
 class=confluenceTdpcodeString/code/p/tdtd colspan=1 
 rowspan=1 class=confluenceTdpthe object id to store / find your object 
 inside the cache (not needed for the query 
 operation)/p/td/tr/tbody/table/divdiv class=aui-message 
 problem shadowed information-macro
+h3 id=BookComponentAppendix-SectionsSections/h3olliUsage of a 
shape=rect href=#BookComponentAppendix-map#map/a/liliUsage of a 
shape=rect href=#BookComponentAppendix-multimap#multimap/a/liliUsage 
of a shape=rect href=#BookComponentAppendix-queue#queue/a/liliUsage 
of a shape=rect href=#BookComponentAppendix-topic#topic/a/liliUsage 
of a shape=rect href=#BookComponentAppendix-list#list/a/liliUsage 
of a shape=rect href=#BookComponentAppendix-seda#seda/a/liliUsage 
of a shape=rect href=#BookComponentAppendix-atomicnumberatomic 
number/a/liliUsage of a shape=rect 
href=#BookComponentAppendix-cluster#cluster/a support 
(instance)/li/olpspan class=confluence-anchor-link 
id=BookComponentAppendix-map/span/ph3 
id=BookComponentAppendix-UsageofMapUsage of Map/h3h4 
id=BookComponentAppendix-mapcacheproducer-to(quot;hazelcast:map:fooquot;)map
 cache producer 

buildbot failure in ASF Buildbot on camel-site-production

2015-05-02 Thread buildbot
The Buildbot has detected a new failure on builder camel-site-production while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/camel-site-production/builds/8911

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-cms-slave

Build Reason: The Nightly scheduler named 'camel-site-production' triggered 
this build
Build Source Stamp: [branch camel/website] HEAD
Blamelist: 

BUILD FAILED: failed shell

Sincerely,
 -The Buildbot





buildbot success in ASF Buildbot on camel-site-production

2015-05-02 Thread buildbot
The Buildbot has detected a restored build on builder camel-site-production 
while building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/camel-site-production/builds/8921

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-cms-slave

Build Reason: The Nightly scheduler named 'camel-site-production' triggered 
this build
Build Source Stamp: [branch camel/website] HEAD
Blamelist: 

Build succeeded!

Sincerely,
 -The Buildbot