camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bibr...@apache.org
Subject camel git commit: Cleanup jbpm component: removed hardcoded improts and replaced wrong types
Date Fri, 16 Oct 2015 10:00:33 GMT
Repository: camel
Updated Branches:
  refs/heads/master 1b68fc482 -> 30b38266e


Cleanup jbpm component: removed hardcoded improts and replaced wrong types


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

Branch: refs/heads/master
Commit: 30b38266ef20dd26718fefce58ccc3d00e8052c1
Parents: 1b68fc4
Author: Bilgin Ibryam <bibryam@apache.org>
Authored: Fri Oct 16 09:33:02 2015 +0100
Committer: Bilgin Ibryam <bibryam@apache.org>
Committed: Fri Oct 16 09:33:02 2015 +0100

----------------------------------------------------------------------
 components/camel-jbpm/pom.xml                   |  7 ------
 .../camel/component/jbpm/JBPMConfiguration.java | 26 +++++---------------
 .../camel/component/jbpm/JBPMProducer.java      |  2 +-
 .../jbpm/JBPMComponentIntegrationTest.java      |  4 +--
 4 files changed, 9 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/30b38266/components/camel-jbpm/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-jbpm/pom.xml b/components/camel-jbpm/pom.xml
index ed4cb5e..6314548 100644
--- a/components/camel-jbpm/pom.xml
+++ b/components/camel-jbpm/pom.xml
@@ -31,13 +31,6 @@
     <description>Camel JBPM support</description>
 
     <properties>
-        <camel.osgi.import.before.defaults>
-            org.apache.camel;version="[2.15,3)",
-            org.apache.camel.impl;version="[2.15,3)",
-            org.apache.camel.spi;version="[2.15,3)",
-            org.apache.camel.util;version="[2.15,3)",
-            *
-        </camel.osgi.import.before.defaults>
         <camel.osgi.export.pkg>org.apache.camel.component.jbpm.*</camel.osgi.export.pkg>
         <camel.osgi.export.service>org.apache.camel.spi.ComponentResolver;component=jbpm</camel.osgi.export.service>
     </properties>

http://git-wip-us.apache.org/repos/asf/camel/blob/30b38266/components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMConfiguration.java
b/components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMConfiguration.java
index b7ce878..961e439 100644
--- a/components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMConfiguration.java
+++ b/components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMConfiguration.java
@@ -19,7 +19,6 @@ package org.apache.camel.component.jbpm;
 import java.net.URL;
 import java.util.List;
 import java.util.Map;
-import java.util.Objects;
 import javax.naming.InitialContext;
 
 import org.apache.camel.spi.Metadata;
@@ -39,15 +38,10 @@ public class JBPMConfiguration {
     @UriParam(label = "producer", defaultValue = "startProcess")
     private String operation;
     /**
-     * Specifies the key to use
-     */
-    @UriParam
-    private String key;
-    /**
      * Specifies the value to use
      */
     @UriParam
-    private Objects value;
+    private Object value;
     private String processId;
     private Map<String, Object> parameters;
     /**
@@ -56,7 +50,7 @@ public class JBPMConfiguration {
     @UriParam @Metadata(required = "true")
     private Long processInstanceId;
     private String eventType;
-    private String event;
+    private Object event;
     private Integer maxNumber;
     private String identifier;
     private Long workItemId;
@@ -94,19 +88,11 @@ public class JBPMConfiguration {
         this.operation = operation;
     }
 
-    public String getKey() {
-        return key;
-    }
-
-    public void setKey(String key) {
-        this.key = key;
-    }
-
-    public Objects getValue() {
+    public Object getValue() {
         return value;
     }
 
-    public void setValue(Objects value) {
+    public void setValue(Object value) {
         this.value = value;
     }
 
@@ -142,11 +128,11 @@ public class JBPMConfiguration {
         this.eventType = eventType;
     }
 
-    public String getEvent() {
+    public Object getEvent() {
         return event;
     }
 
-    public void setEvent(String event) {
+    public void setEvent(Object event) {
         this.event = event;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/30b38266/components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMProducer.java
b/components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMProducer.java
index efccd67..8fc9fc4 100644
--- a/components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMProducer.java
+++ b/components/camel-jbpm/src/main/java/org/apache/camel/component/jbpm/JBPMProducer.java
@@ -407,7 +407,7 @@ public class JBPMProducer extends DefaultProducer {
         }
 
         Object getEvent(JBPMConfiguration configuration, Exchange exchange) {
-            String event = exchange.getIn().getHeader(JBPMConstants.EVENT, String.class);
+            Object event = exchange.getIn().getHeader(JBPMConstants.EVENT);
             if (event == null) {
                 event = configuration.getEvent();
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/30b38266/components/camel-jbpm/src/test/java/org/apache/camel/component/jbpm/JBPMComponentIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jbpm/src/test/java/org/apache/camel/component/jbpm/JBPMComponentIntegrationTest.java
b/components/camel-jbpm/src/test/java/org/apache/camel/component/jbpm/JBPMComponentIntegrationTest.java
index 0b53c6a..987b0a6 100644
--- a/components/camel-jbpm/src/test/java/org/apache/camel/component/jbpm/JBPMComponentIntegrationTest.java
+++ b/components/camel-jbpm/src/test/java/org/apache/camel/component/jbpm/JBPMComponentIntegrationTest.java
@@ -28,7 +28,7 @@ public class JBPMComponentIntegrationTest extends CamelTestSupport {
     @Test
     public void interactsOverRest() throws Exception {
         getMockEndpoint("mock:result").expectedMessageCount(1);
-        template.sendBodyAndHeader("direct:rest", null, JBPMConstants.PROCESS_ID, "project1.integration-test");
+        template.sendBodyAndHeader("direct:start", null, JBPMConstants.PROCESS_ID, "project1.integration-test");
         assertMockEndpointsSatisfied();
 
         assertNotNull(getMockEndpoint("mock:result").getExchanges().get(0).getIn().getBody());
@@ -39,7 +39,7 @@ public class JBPMComponentIntegrationTest extends CamelTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() {
-                from("direct:rest")
+                from("direct:start")
                         .to("jbpm:http://localhost:8080/business-central?userName=bpmsAdmin&password=pa$word1"
                             + "&deploymentId=org.kie.example:project1:1.0.0-SNAPSHOT")
                         .to("mock:result");


Mime
View raw message