syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [syncope] branch master updated: Upgrading Camel to 3.0.0-M1
Date Fri, 01 Mar 2019 10:45:22 GMT
This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/master by this push:
     new 464dbb7  Upgrading Camel to 3.0.0-M1
464dbb7 is described below

commit 464dbb7541931f755828487af38126a2d040edfd
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
AuthorDate: Fri Mar 1 11:45:13 2019 +0100

    Upgrading Camel to 3.0.0-M1
---
 ext/camel/provisioning-camel/pom.xml                        |  4 ++++
 .../camel/AbstractCamelProvisioningManager.java             | 12 ++++--------
 .../provisioning/camel/component/PropagateComponent.java    |  2 +-
 .../provisioning/camel/component/PropagateEndpoint.java     |  4 ++--
 .../core/provisioning/camel/producer/AbstractProducer.java  |  2 +-
 .../src/main/resources/anyObjectRoutes.xml                  |  2 +-
 .../provisioning-camel/src/main/resources/groupRoutes.xml   |  2 +-
 .../provisioning-camel/src/main/resources/userRoutes.xml    |  8 ++++----
 .../java/org/apache/syncope/fit/core/CamelRouteITCase.java  | 12 ++++++------
 pom.xml                                                     | 13 +++++++++----
 10 files changed, 33 insertions(+), 28 deletions(-)

diff --git a/ext/camel/provisioning-camel/pom.xml b/ext/camel/provisioning-camel/pom.xml
index a7f592a..3bcff53 100644
--- a/ext/camel/provisioning-camel/pom.xml
+++ b/ext/camel/provisioning-camel/pom.xml
@@ -58,6 +58,10 @@ under the License.
       <groupId>org.apache.camel</groupId>
       <artifactId>camel-metrics</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>spi-annotations</artifactId>
+    </dependency>
 
     <dependency>
       <groupId>org.apache.syncope.core</groupId>
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/AbstractCamelProvisioningManager.java
b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/AbstractCamelProvisioningManager.java
index c8eaf2f..5ead92e 100644
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/AbstractCamelProvisioningManager.java
+++ b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/AbstractCamelProvisioningManager.java
@@ -26,9 +26,9 @@ import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
 import org.apache.camel.PollingConsumer;
 import org.apache.camel.ProducerTemplate;
-import org.apache.camel.impl.DefaultExchange;
-import org.apache.camel.impl.DefaultMessage;
 import org.apache.camel.model.RoutesDefinition;
+import org.apache.camel.support.DefaultExchange;
+import org.apache.camel.support.DefaultMessage;
 import org.apache.syncope.core.persistence.api.dao.CamelRouteDAO;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -62,12 +62,8 @@ abstract class AbstractCamelProvisioningManager {
     }
 
     protected void sendMessage(final String uri, final Object body, final Map<String,
Object> properties) {
-        Exchange exchange = new DefaultExchange(contextFactory.getCamelContext());
-
-        for (Map.Entry<String, Object> property : properties.entrySet()) {
-            exchange.setProperty(property.getKey(), property.getValue());
-            LOG.debug("Added property {}", property.getKey());
-        }
+        DefaultExchange exchange = new DefaultExchange(contextFactory.getCamelContext());
+        exchange.setProperties(properties);
 
         DefaultMessage message = new DefaultMessage(contextFactory.getCamelContext());
         message.setBody(body);
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateComponent.java
b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateComponent.java
index d1e36bd..e445177 100644
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateComponent.java
+++ b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateComponent.java
@@ -21,7 +21,7 @@ package org.apache.syncope.core.provisioning.camel.component;
 import java.util.Map;
 
 import org.apache.camel.Endpoint;
-import org.apache.camel.impl.DefaultComponent;
+import org.apache.camel.support.DefaultComponent;
 import org.apache.syncope.core.persistence.api.dao.AnyObjectDAO;
 import org.apache.syncope.core.persistence.api.dao.GroupDAO;
 import org.apache.syncope.core.persistence.api.dao.UserDAO;
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateEndpoint.java
b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateEndpoint.java
index 5936430..f45451d 100644
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateEndpoint.java
+++ b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateEndpoint.java
@@ -22,11 +22,11 @@ import org.apache.camel.Component;
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
-import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriPath;
+import org.apache.camel.support.DefaultEndpoint;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.core.persistence.api.dao.AnyObjectDAO;
 import org.apache.syncope.core.persistence.api.dao.GroupDAO;
@@ -49,7 +49,7 @@ import org.apache.syncope.core.workflow.api.UserWorkflowAdapter;
 public class PropagateEndpoint extends DefaultEndpoint {
 
     @UriPath
-    @Metadata(required = "true")
+    @Metadata(required = true)
     private PropagateType propagateType;
 
     @UriParam
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/AbstractProducer.java
b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/AbstractProducer.java
index a8b13e4..54df5d8 100644
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/AbstractProducer.java
+++ b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/AbstractProducer.java
@@ -19,7 +19,7 @@
 package org.apache.syncope.core.provisioning.camel.producer;
 
 import org.apache.camel.Endpoint;
-import org.apache.camel.impl.DefaultProducer;
+import org.apache.camel.support.DefaultProducer;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.core.provisioning.api.propagation.PropagationManager;
 import org.apache.syncope.core.provisioning.api.propagation.PropagationTaskExecutor;
diff --git a/ext/camel/provisioning-camel/src/main/resources/anyObjectRoutes.xml b/ext/camel/provisioning-camel/src/main/resources/anyObjectRoutes.xml
index 872b09b..c9dc1f1 100644
--- a/ext/camel/provisioning-camel/src/main/resources/anyObjectRoutes.xml
+++ b/ext/camel/provisioning-camel/src/main/resources/anyObjectRoutes.xml
@@ -63,7 +63,7 @@ under the License.
       <to uri="propagate:delete?anyTypeKind=ANY_OBJECT"/>
       <bean ref="awfAdapter" method="delete(${body})"/>
       <setBody>
-        <simple>${property.statuses}</simple>
+        <simple>${exchangeProperty.statuses}</simple>
       </setBody>
       <to uri="direct:deleteAnyObjectPort"/>
       <doCatch>        
diff --git a/ext/camel/provisioning-camel/src/main/resources/groupRoutes.xml b/ext/camel/provisioning-camel/src/main/resources/groupRoutes.xml
index c595330..c7731a7 100644
--- a/ext/camel/provisioning-camel/src/main/resources/groupRoutes.xml
+++ b/ext/camel/provisioning-camel/src/main/resources/groupRoutes.xml
@@ -82,7 +82,7 @@ under the License.
       <to uri="propagate:delete?anyTypeKind=GROUP"/>
       <bean ref="gwfAdapter" method="delete(${body})"/>
       <setBody>
-        <simple>${property.statuses}</simple>
+        <simple>${exchangeProperty.statuses}</simple>
       </setBody>
       <to uri="direct:deleteGroupPort"/>
       <doCatch>        
diff --git a/ext/camel/provisioning-camel/src/main/resources/userRoutes.xml b/ext/camel/provisioning-camel/src/main/resources/userRoutes.xml
index d7c3afd..7d6775b 100644
--- a/ext/camel/provisioning-camel/src/main/resources/userRoutes.xml
+++ b/ext/camel/provisioning-camel/src/main/resources/userRoutes.xml
@@ -25,7 +25,7 @@ under the License.
       <simple>${body}</simple>
     </setProperty>
     <doTry>
-      <bean method="create(${body},${property.disablePwdPolicyCheck},${property.enabled})"
+      <bean method="create(${body},${exchangeProperty.disablePwdPolicyCheck},${exchangeProperty.enabled})"
             ref="uwfAdapter" />
       <to uri="propagate:create?anyTypeKind=USER"/>
       <to uri="direct:createPort"/>
@@ -86,7 +86,7 @@ under the License.
       <to uri="propagate:delete?anyTypeKind=USER"/>
       <bean ref="uwfAdapter" method="delete(${body})"/>
       <setBody>
-        <simple>${property.statuses}</simple>
+        <simple>${exchangeProperty.statuses}</simple>
       </setBody>
       <to uri="direct:deletePort"/>
       <doCatch>        
@@ -138,7 +138,7 @@ under the License.
   <route id="activateUser">
     <from uri="direct:activateUser"/>
     <doTry>
-      <bean ref="uwfAdapter" method="activate(${body}, ${property.token})"/>
+      <bean ref="uwfAdapter" method="activate(${body}, ${exchangeProperty.token})"/>
       <to uri="direct:userStatusPropagation"/>
       <doCatch>        
         <exception>java.lang.RuntimeException</exception>
@@ -232,7 +232,7 @@ under the License.
   <route id="confirmPwdReset">
     <from uri="direct:confirmPwdReset"/>
     <doTry>
-      <bean ref="uwfAdapter" method="confirmPasswordReset(${property.key},${property.token},${property.password})"/>
+      <bean ref="uwfAdapter" method="confirmPasswordReset(${exchangeProperty.key},${exchangeProperty.token},${exchangeProperty.password})"/>
       <to uri="propagate:confirmPasswordReset?anyTypeKind=USER"/>
       <to uri="direct:confirmPwdResetPort"/>
       <doCatch>        
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/CamelRouteITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/CamelRouteITCase.java
index 3589832..2a3b815 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/CamelRouteITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/CamelRouteITCase.java
@@ -78,8 +78,8 @@ public class CamelRouteITCase extends AbstractITCase {
                 + "    <simple>${body}</simple>\n"
                 + "  </setProperty>\n"
                 + "  <doTry>\n"
-                + "    <bean ref=\"uwfAdapter\" method=\"create(${body},${property.disablePwdPolicyCheck},\n"
-                + "                             ${property.enabled})\"/>\n"
+                + "    <bean ref=\"uwfAdapter\" method=\"create(${body},${exchangeProperty.disablePwdPolicyCheck},\n"
+                + "                             ${exchangeProperty.enabled})\"/>\n"
                 + "    <to uri=\"propagate:create?anyTypeKind=USER\"/>\n"
                 + "    <to uri=\"direct:createPort\"/>\n"
                 + "    <to uri=\"log:myLog\"/>\n"
@@ -118,8 +118,8 @@ public class CamelRouteITCase extends AbstractITCase {
                 + "     </groovy>\n"
                 + "    </setBody>\n"
                 + "    <doTry>\n"
-                + "      <bean ref=\"uwfAdapter\" method=\"create(${body},${property.disablePwdPolicyCheck},\n"
-                + "                                     ${property.enabled})\"/>\n"
+                + "      <bean ref=\"uwfAdapter\" method=\"create(${body},${exchangeProperty.disablePwdPolicyCheck},\n"
+                + "                                     ${exchangeProperty.enabled})\"/>\n"
                 + "      <to uri=\"propagate:create?anyTypeKind=USER\"/>\n"
                 + "      <to uri=\"direct:createPort\"/>\n"
                 + "      <doCatch>        \n"
@@ -174,8 +174,8 @@ public class CamelRouteITCase extends AbstractITCase {
                 + "    <simple>${body}</simple>\n"
                 + "  </setProperty>\n"
                 + "  <doTry>\n"
-                + "    <bean ref=\"uwfAdapter\" method=\"create(${body},${property.disablePwdPolicyCheck},\n"
-                + "                             ${property.enabled})\"/>\n"
+                + "    <bean ref=\"uwfAdapter\" method=\"create(${body},${exchangeProperty.disablePwdPolicyCheck},\n"
+                + "                             ${exchangeProperty.enabled})\"/>\n"
                 + "    <to uri=\"propagate:create123?anyTypeKind=USER\"/>\n"
                 + "    <to uri=\"direct:createPort\"/>\n"
                 + "    <to uri=\"log:myLog\"/>\n"
diff --git a/pom.xml b/pom.xml
index e61fe8e..eed6809 100644
--- a/pom.xml
+++ b/pom.xml
@@ -411,7 +411,7 @@ under the License.
 
     <flowable.version>6.4.1</flowable.version>
 
-    <camel.version>2.23.1</camel.version>	
+    <camel.version>3.0.0-M1</camel.version>
 
     <slf4j.version>1.7.26</slf4j.version>
     <opensaml.version>3.3.0</opensaml.version>
@@ -451,7 +451,7 @@ under the License.
     <jquery-slimscroll.version>1.3.8</jquery-slimscroll.version>
     <jquery-cookie.version>1.4.1-1</jquery-cookie.version>
     
-    <bootstrap.version>3.4.0</bootstrap.version>
+    <bootstrap.version>3.4.1</bootstrap.version>
     <bootstrap-select.version>1.12.4</bootstrap-select.version>
     <bootstrap-fileinput.version>4.4.8</bootstrap-fileinput.version>
     <bootbox.version>4.4.0</bootbox.version>
@@ -768,6 +768,11 @@ under the License.
           </exclusion>
         </exclusions>
       </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>spi-annotations</artifactId>
+        <version>${camel.version}</version>
+      </dependency>
       <!-- /Camel -->
       
       <!-- OpenSAML -->
@@ -2462,8 +2467,8 @@ under the License.
             <link>http://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.9/</link>
             <link>http://fasterxml.github.io/jackson-dataformat-yaml/javadoc/2.9.pr1/</link>
             <link>http://fasterxml.github.io/jackson-datatype-joda/javadoc/2.9/</link>
-            <link>http://www.javadoc.io/doc/org.apache.camel/camel-core/2.23.1/</link>
-            <link>http://www.javadoc.io/doc/org.apache.camel/camel-spring/2.23.1/</link>
+            <link>http://www.javadoc.io/doc/org.apache.camel/camel-core/3.0.0-M1/</link>
+            <link>http://www.javadoc.io/doc/org.apache.camel/camel-spring/3.0.0-M1/</link>
             <link>https://ci.apache.org/projects/wicket/apidocs/8.x/</link>
             <link>https://commons.apache.org/proper/commons-lang/javadocs/api-release/</link>
             <link>https://commons.apache.org/proper/commons-jexl/apidocs/</link>


Mime
View raw message