camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhira...@apache.org
Subject camel git commit: CAMEL-8469: Added custom ParamConverterProvider to handle Enum query params in LinkedIn component, also moved enum params to xsd
Date Tue, 10 Mar 2015 19:06:12 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x e20750cc0 -> 3170993f9


CAMEL-8469: Added custom ParamConverterProvider to handle Enum query params in LinkedIn component,
also moved enum params to xsd


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

Branch: refs/heads/camel-2.15.x
Commit: 3170993f98cf58fe9eaafe3155277b8e5e0e91c5
Parents: e20750c
Author: Dhiraj Bokde <dhirajsb@yahoo.com>
Authored: Tue Mar 10 11:55:31 2015 -0700
Committer: Dhiraj Bokde <dhirajsb@yahoo.com>
Committed: Tue Mar 10 12:06:05 2015 -0700

----------------------------------------------------------------------
 .../api/EnumQueryParamConverterProvider.java    | 73 ++++++++++++++++++++
 .../src/main/resources/linkedin-api-schema.xjb  | 35 +++++++++-
 .../src/main/resources/linkedin-api-schema.xsd  | 36 ++++++++++
 .../src/main/resources/linkedin-api-wadl.xml    | 48 +++----------
 .../api/AbstractResourceIntegrationTest.java    |  2 +-
 .../api/PeopleResourceIntegrationTest.java      | 25 +++++++
 .../component/linkedin/LinkedInEndpoint.java    |  3 +-
 .../CompaniesResourceIntegrationTest.java       | 10 +--
 8 files changed, 184 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/3170993f/components/camel-linkedin/camel-linkedin-api/src/main/java/org/apache/camel/component/linkedin/api/EnumQueryParamConverterProvider.java
----------------------------------------------------------------------
diff --git a/components/camel-linkedin/camel-linkedin-api/src/main/java/org/apache/camel/component/linkedin/api/EnumQueryParamConverterProvider.java
b/components/camel-linkedin/camel-linkedin-api/src/main/java/org/apache/camel/component/linkedin/api/EnumQueryParamConverterProvider.java
new file mode 100644
index 0000000..8d3cee3
--- /dev/null
+++ b/components/camel-linkedin/camel-linkedin-api/src/main/java/org/apache/camel/component/linkedin/api/EnumQueryParamConverterProvider.java
@@ -0,0 +1,73 @@
+/**
+ * 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.linkedin.api;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import javax.ws.rs.ext.ParamConverter;
+import javax.ws.rs.ext.ParamConverterProvider;
+import javax.ws.rs.ext.Provider;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Converter provider for Enum Query params.
+ */
+@Provider
+public class EnumQueryParamConverterProvider<T extends Enum<T>> implements ParamConverterProvider
{
+    private static final Logger LOG = LoggerFactory.getLogger(EnumQueryParamConverterProvider.class);
+
+    @Override
+    public <T> ParamConverter<T> getConverter(Class<T> rawType, Type genericType,
Annotation[] annotations) {
+        if (rawType.isEnum()) {
+            try {
+                final Method valueMethod = rawType.getMethod("value", null);
+                final Method fromValueMethod = rawType.getMethod("fromValue", String.class);
+
+                return new ParamConverter<T>() {
+                    @Override
+                    public T fromString(String value) {
+                        try {
+                            return (T) fromValueMethod.invoke(null, value);
+                        } catch (IllegalAccessException e) {
+                            throw new IllegalArgumentException(e);
+                        } catch (InvocationTargetException e) {
+                            throw new IllegalArgumentException(e);
+                        }
+                    }
+
+                    @Override
+                    public String toString(T value) {
+                        try {
+                            return (String) valueMethod.invoke(value);
+                        } catch (IllegalAccessException e) {
+                            throw new IllegalArgumentException(e);
+                        } catch (InvocationTargetException e) {
+                            throw new IllegalArgumentException(e);
+                        }
+                    }
+                };
+            } catch (NoSuchMethodException e) {
+                LOG.debug("Enumeration {} does not follow JAXB convention for conversion",
rawType.getName());
+            }
+        }
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/3170993f/components/camel-linkedin/camel-linkedin-api/src/main/resources/linkedin-api-schema.xjb
----------------------------------------------------------------------
diff --git a/components/camel-linkedin/camel-linkedin-api/src/main/resources/linkedin-api-schema.xjb
b/components/camel-linkedin/camel-linkedin-api/src/main/resources/linkedin-api-schema.xjb
index 778a4f5..48ed025 100644
--- a/components/camel-linkedin/camel-linkedin-api/src/main/resources/linkedin-api-schema.xjb
+++ b/components/camel-linkedin/camel-linkedin-api/src/main/resources/linkedin-api-schema.xjb
@@ -37,6 +37,33 @@
       <package name="org.apache.camel.component.linkedin.api.model" />
     </schemaBindings>
 
+	<bindings node="//xs:element[@name='order']/xs:simpleType">
+		<typesafeEnumClass name="Order">
+			<typesafeEnumMember name="RECENCY" value="recency"/>
+			<typesafeEnumMember name="POPULARITY" value="popularity"/>
+		</typesafeEnumClass>
+	</bindings>
+	<bindings node="//xs:element[@name='post-role']/xs:simpleType">
+		<typesafeEnumClass name="PostRole">
+			<typesafeEnumMember name="CREATOR" value="creator"/>
+			<typesafeEnumMember name="COMMENTER" value="commenter"/>
+			<typesafeEnumMember name="FOLLOWER" value="follower"/>
+		</typesafeEnumClass>
+	</bindings>
+	<bindings node="//xs:element[@name='event-type']/xs:simpleType">
+		<typesafeEnumClass name="EventType">
+			<typesafeEnumMember name="JOB_POSTING" value="job-posting"/>
+			<typesafeEnumMember name="NEW_PRODUCT" value="new-product"/>
+			<typesafeEnumMember name="STATUS_UPDATE" value="status-update"/>
+		</typesafeEnumClass>
+	</bindings>
+	<bindings node="//xs:element[@name='time-granularity']/xs:simpleType">
+		<typesafeEnumClass name="TimeGranularity">
+			<typesafeEnumMember name="DAY" value="day"/>
+			<typesafeEnumMember name="MONTH" value="month"/>
+		</typesafeEnumClass>
+	</bindings>
+
 	<bindings node="//xs:element[@name='content-type']/xs:simpleType">
 		<typesafeEnumClass name="NetworkUpdateContentType">
 			<typesafeEnumMember name="LINKED_IN_HTML" value="linkedin-html"/>
@@ -52,19 +79,23 @@
 			<typesafeEnumMember name="ANSWER_UPDATE" value="ANSW"/>
 			<typesafeEnumMember name="APPLICATION_CONNECTION_UPDATE" value="APPM"/>
 			<typesafeEnumMember name="APPLICATION_TO_MEMBER_UPDATE" value="APPS"/>
+			<typesafeEnumMember name="COMPANY_UPDATED" value="CMPY"/>
 			<typesafeEnumMember name="CONNECTION_ADDED_CONNECTIONS" value="CONN"/>
 			<typesafeEnumMember name="NEW_CONNECTIONS" value="NCON"/>
 			<typesafeEnumMember name="CONTACT_JOINED" value="CCEM"/>
 			<typesafeEnumMember name="JOB_POSTED" value="JOBP"/>
 			<typesafeEnumMember name="CONNECTION_JOINED_GROUP" value="JGRP"/>
+			<typesafeEnumMember name="MEMBER_STARTS_FOLLOWING_COMPANY" value="MSFC"/>
+			<typesafeEnumMember name="PEOPLE_FOLLOW_UPDATE" value="PFOL"/>
 			<typesafeEnumMember name="CONNECTION_UPDATED_PICTURE" value="PICU"/>
 			<typesafeEnumMember name="CONNECTION_RECOMMENDED" value="PREC"/>
+			<typesafeEnumMember name="CONNECTION_PROFILE_UPDATE" value="PRFU"/>
 			<typesafeEnumMember name="CONNECTION_UPDATED_PROFILE" value="PROF"/>
 			<typesafeEnumMember name="QUESTION_UPDATED" value="QSTN"/>
 			<typesafeEnumMember name="STATUS_UPDATED" value="STAT"/>
-			<typesafeEnumMember name="SHARED_ITEM" value="SHAR"/>
+			<typesafeEnumMember name="RECOMMENDATIONS_UPDATE" value="SVPR"/>
 			<typesafeEnumMember name="EXTENDED_PROFILE_UPDATED" value="PRFX"/>
-			<typesafeEnumMember name="COMPANY_UPDATED" value="CMPY"/>
+			<typesafeEnumMember name="SHARED_ITEM" value="SHAR"/>
 			<typesafeEnumMember name="VIRAL_UPDATE" value="VIRL"/>
 		</typesafeEnumClass>
 	</bindings>

http://git-wip-us.apache.org/repos/asf/camel/blob/3170993f/components/camel-linkedin/camel-linkedin-api/src/main/resources/linkedin-api-schema.xsd
----------------------------------------------------------------------
diff --git a/components/camel-linkedin/camel-linkedin-api/src/main/resources/linkedin-api-schema.xsd
b/components/camel-linkedin/camel-linkedin-api/src/main/resources/linkedin-api-schema.xsd
index ed19f73..a5796f9 100644
--- a/components/camel-linkedin/camel-linkedin-api/src/main/resources/linkedin-api-schema.xsd
+++ b/components/camel-linkedin/camel-linkedin-api/src/main/resources/linkedin-api-schema.xsd
@@ -2252,4 +2252,40 @@
       </xs:sequence>
     </xs:complexType>
   </xs:element>
+
+  <xs:element name="order">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:enumeration value="recency"/>
+        <xs:enumeration value="popularity"/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:element>
+  <xs:element name="post-role">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:enumeration value="creator"/>
+        <xs:enumeration value="commenter"/>
+        <xs:enumeration value="follower"/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:element>
+  <xs:element name="event-type">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:enumeration value="job-posting"/>
+        <xs:enumeration value="new-product"/>
+        <xs:enumeration value="status-update"/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:element>
+  <xs:element name="time-granularity">
+    <xs:simpleType>
+      <xs:restriction base="xs:string">
+        <xs:enumeration value="day"/>
+        <xs:enumeration value="month"/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:element>
+
 </xs:schema>

http://git-wip-us.apache.org/repos/asf/camel/blob/3170993f/components/camel-linkedin/camel-linkedin-api/src/main/resources/linkedin-api-wadl.xml
----------------------------------------------------------------------
diff --git a/components/camel-linkedin/camel-linkedin-api/src/main/resources/linkedin-api-wadl.xml
b/components/camel-linkedin/camel-linkedin-api/src/main/resources/linkedin-api-wadl.xml
index cb0c390..c08df21 100644
--- a/components/camel-linkedin/camel-linkedin-api/src/main/resources/linkedin-api-wadl.xml
+++ b/components/camel-linkedin/camel-linkedin-api/src/main/resources/linkedin-api-wadl.xml
@@ -167,7 +167,7 @@
       </wadl:resource>
 
       <wadl:resource path="~/group-memberships{fields}">
-        <wadl:param name="membership-state" style="query" type="tns:membershipstate"/>
+        <wadl:param name="membership-state" style="query" type="tns:membershipstatecode"/>
         <wadl:param href="#fields-selector"/>
         <wadl:method name="GET" id="getGroupMemberships">
           <wadl:request>
@@ -221,7 +221,7 @@
               <wadl:param href="#start"/>
               <wadl:param href="#count"/>
               <wadl:param href="#order"/>
-              <wadl:param href="#role"/>
+              <wadl:param href="#post-role"/>
               <wadl:param href="#category"/>
               <wadl:param href="#modified-since"/>
               <wadl:param href="#fields-selector"/>
@@ -286,7 +286,7 @@
                   <wadl:param href="#start"/>
                   <wadl:param href="#count"/>
                   <wadl:param href="#order"/>
-                  <wadl:param href="#role"/>
+                  <wadl:param href="#post-role"/>
                   <wadl:param href="#category"/>
                   <wadl:param href="#modified-since"/>
                   <wadl:param href="#fields-selector"/>
@@ -927,40 +927,17 @@
   <wadl:param name="partner-job-id" style="template" type="xsd:integer" required="true"
id="partner-job-id"/>
 
   <!-- posts params -->
-  <wadl:param name="order" style="query" id="order">
-    <wadl:option value="recency"/>
-    <wadl:option value="popularity"/>
-  </wadl:param>
+  <wadl:param name="order" style="query" id="order" type="tns:order"/>
 
-  <wadl:param name="role" style="query" id="role">
-    <wadl:option value="creator"/>
-    <wadl:option value="commenter"/>
-    <wadl:option value="follower"/>
-  </wadl:param>
+  <wadl:param name="role" style="query" id="post-role" type="tns:post-role"/>
 
-  <wadl:param name="category" style="query" id="category">
-    <wadl:option value="discussion"/>
-  </wadl:param>
+  <wadl:param name="category" style="query" id="category" type="tns:postcategorycode"/>
 
   <wadl:param name="modified-since" style="query" id="modified-since" type="xsd:integer"/>
 
   <wadl:param name="scope" style="query" type="tns:scope" id="scope"/>
 
-  <wadl:param name="type" style="query" id="type">
-    <wadl:option value="APPS"/>
-    <wadl:option value="CMPY"/>
-    <wadl:option value="CONN"/>
-    <wadl:option value="JOBS"/>
-    <wadl:option value="JGRP"/>
-    <wadl:option value="PICT"/>
-    <wadl:option value="PFOL"/>
-    <wadl:option value="PRFX"/>
-    <wadl:option value="RECU"/>
-    <wadl:option value="PRFU"/>
-    <wadl:option value="SHAR"/>
-    <wadl:option value="STAT"/>
-    <wadl:option value="VIRL"/>
-  </wadl:param>
+  <wadl:param name="type" style="query" id="type" type="tns:networkupdatereturntype"/>
 
   <wadl:param name="keywords" style="query" type="tns:keywords" id="keywords"/>
 
@@ -989,18 +966,11 @@
   <!-- update-key path param -->
   <wadl:param name="update-key" style="template" id="update-key"/>
 
-  <wadl:param name="event-type" style="query" id="event-type">
-    <wadl:option value="job-posting"/>
-    <wadl:option value="new-product"/>
-    <wadl:option value="status-update"/>
-  </wadl:param>
+  <wadl:param name="event-type" style="query" id="event-type" type="tns:eventtype"/>
 
   <wadl:param name="start-timestamp" style="query" type="xsd:integer" id="start-timestamp"/>
   <wadl:param name="end-timestamp" style="query" type="xsd:integer" id="end-timestamp"/>
-  <wadl:param name="time-granularity" style="query" id="time-granularity">
-    <wadl:option value="day"/>
-    <wadl:option value="month"/>
-  </wadl:param>
+  <wadl:param name="time-granularity" style="query" id="time-granularity" type="tns:time-granularity"/>
 
   <!-- representation types -->
   <wadl:representation mediaType="application/xml" element="tns:person" id="person"/>

http://git-wip-us.apache.org/repos/asf/camel/blob/3170993f/components/camel-linkedin/camel-linkedin-api/src/test/java/org/apache/camel/component/linkedin/api/AbstractResourceIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-linkedin/camel-linkedin-api/src/test/java/org/apache/camel/component/linkedin/api/AbstractResourceIntegrationTest.java
b/components/camel-linkedin/camel-linkedin-api/src/test/java/org/apache/camel/component/linkedin/api/AbstractResourceIntegrationTest.java
index 55405a2..49b2921 100644
--- a/components/camel-linkedin/camel-linkedin-api/src/test/java/org/apache/camel/component/linkedin/api/AbstractResourceIntegrationTest.java
+++ b/components/camel-linkedin/camel-linkedin-api/src/test/java/org/apache/camel/component/linkedin/api/AbstractResourceIntegrationTest.java
@@ -107,7 +107,7 @@ public abstract class AbstractResourceIntegrationTest extends Assert {
         }
         final T resource = JAXRSClientFactory.create(LinkedInOAuthRequestFilter.BASE_ADDRESS,
resourceClass,
 //            Arrays.asList(new Object[] { requestFilter, new LinkedInExceptionResponseFilter()
} ));
-            Arrays.asList(new Object[]{requestFilter}));
+            Arrays.asList(new Object[]{requestFilter, new EnumQueryParamConverterProvider()}));
         resourceList.add(resource);
         return resource;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/3170993f/components/camel-linkedin/camel-linkedin-api/src/test/java/org/apache/camel/component/linkedin/api/PeopleResourceIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-linkedin/camel-linkedin-api/src/test/java/org/apache/camel/component/linkedin/api/PeopleResourceIntegrationTest.java
b/components/camel-linkedin/camel-linkedin-api/src/test/java/org/apache/camel/component/linkedin/api/PeopleResourceIntegrationTest.java
index 6256b6a..88c2a1a 100644
--- a/components/camel-linkedin/camel-linkedin-api/src/test/java/org/apache/camel/component/linkedin/api/PeopleResourceIntegrationTest.java
+++ b/components/camel-linkedin/camel-linkedin-api/src/test/java/org/apache/camel/component/linkedin/api/PeopleResourceIntegrationTest.java
@@ -18,8 +18,14 @@ package org.apache.camel.component.linkedin.api;
 
 import java.util.Date;
 
+import org.apache.camel.component.linkedin.api.model.GroupMemberships;
 import org.apache.camel.component.linkedin.api.model.JobSuggestions;
+import org.apache.camel.component.linkedin.api.model.MembershipStateCode;
+import org.apache.camel.component.linkedin.api.model.Order;
 import org.apache.camel.component.linkedin.api.model.Person;
+import org.apache.camel.component.linkedin.api.model.PostCategoryCode;
+import org.apache.camel.component.linkedin.api.model.PostRole;
+import org.apache.camel.component.linkedin.api.model.Posts;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -52,6 +58,25 @@ public class PeopleResourceIntegrationTest extends AbstractResourceIntegrationTe
         });
     }
 
+    @Test
+    public void testGetPosts() throws Exception {
+        execute(new Runnable() {
+            @Override
+            public void run() {
+                final GroupMemberships groupMemberships = peopleResource.getGroupMemberships(MembershipStateCode.MEMBER,
+                    "", null, null);
+                assertNotNull(groupMemberships);
+                assertNotNull(groupMemberships.getGroupMembershipList());
+                assertFalse(groupMemberships.getGroupMembershipList().isEmpty());
+                final Posts posts = peopleResource.getPosts(Long.parseLong(
+                        groupMemberships.getGroupMembershipList().get(0).getGroup().getId()),
null, null,
+                    Order.RECENCY, PostRole.FOLLOWER, PostCategoryCode.DISCUSSION, null,
":(id)");
+                assertNotNull(posts);
+                LOG.debug("getPosts result: " + posts);
+            }
+        });
+    }
+
     @Test(expected = LinkedInException.class)
     public void testLinkedInError() throws Exception {
         execute(new Runnable() {

http://git-wip-us.apache.org/repos/asf/camel/blob/3170993f/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/LinkedInEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/LinkedInEndpoint.java
b/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/LinkedInEndpoint.java
index b0e7a75..990fd04 100644
--- a/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/LinkedInEndpoint.java
+++ b/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/LinkedInEndpoint.java
@@ -24,6 +24,7 @@ import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.component.linkedin.api.CommentsResource;
 import org.apache.camel.component.linkedin.api.CompaniesResource;
+import org.apache.camel.component.linkedin.api.EnumQueryParamConverterProvider;
 import org.apache.camel.component.linkedin.api.GroupsResource;
 import org.apache.camel.component.linkedin.api.JobsResource;
 import org.apache.camel.component.linkedin.api.LinkedInOAuthRequestFilter;
@@ -125,7 +126,7 @@ public class LinkedInEndpoint extends AbstractApiEndpoint<LinkedInApiName,
Linke
 
         // create endpoint proxy
         resourceProxy = JAXRSClientFactory.create(LinkedInOAuthRequestFilter.BASE_ADDRESS,
proxyClass,
-            Arrays.asList(new Object[]{requestFilter}));
+            Arrays.asList(new Object[]{requestFilter, new EnumQueryParamConverterProvider()}));
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/3170993f/components/camel-linkedin/camel-linkedin-component/src/test/java/org/apache/camel/component/linkedin/CompaniesResourceIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-linkedin/camel-linkedin-component/src/test/java/org/apache/camel/component/linkedin/CompaniesResourceIntegrationTest.java
b/components/camel-linkedin/camel-linkedin-component/src/test/java/org/apache/camel/component/linkedin/CompaniesResourceIntegrationTest.java
index 785f563..438f1ac 100644
--- a/components/camel-linkedin/camel-linkedin-component/src/test/java/org/apache/camel/component/linkedin/CompaniesResourceIntegrationTest.java
+++ b/components/camel-linkedin/camel-linkedin-component/src/test/java/org/apache/camel/component/linkedin/CompaniesResourceIntegrationTest.java
@@ -24,6 +24,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.linkedin.api.model.EventType;
 import org.apache.camel.component.linkedin.internal.CompaniesResourceApiMethod;
 import org.apache.camel.component.linkedin.internal.LinkedInApiCollection;
 
@@ -160,12 +161,11 @@ public class CompaniesResourceIntegrationTest extends AbstractLinkedInTestSuppor
     public void testGetCompanyUpdates() throws Exception {
         final Map<String, Object> headers = new HashMap<String, Object>();
         headers.put("CamelLinkedIn.company_id", TEST_COMPANY_ID);
-        // use defaults
-/*
         // parameter type is String
-        headers.put("CamelLinkedIn.fields", null);
-        // parameter type is org.apache.camel.component.linkedin.api.Eventtype
-        headers.put("CamelLinkedIn.event_type", null);
+//        headers.put("CamelLinkedIn.fields", null);
+        // parameter type is org.apache.camel.component.linkedin.api.model.Eventtype
+        headers.put("CamelLinkedIn.event_type", EventType.STATUS_UPDATE);
+/*
         // parameter type is Long
         headers.put("CamelLinkedIn.start", null);
         // parameter type is Long


Mime
View raw message