camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/4] camel git commit: CAMEL-10811 Provide sample Salesforce connector...
Date Fri, 10 Feb 2017 11:21:52 GMT
Repository: camel
Updated Branches:
  refs/heads/master 36c8dff06 -> dc0dee169


http://git-wip-us.apache.org/repos/asf/camel/blob/c8d2aad1/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_CleanStatusEnum.java
----------------------------------------------------------------------
diff --git a/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_CleanStatusEnum.java
b/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_CleanStatusEnum.java
new file mode 100644
index 0000000..f85517d
--- /dev/null
+++ b/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_CleanStatusEnum.java
@@ -0,0 +1,69 @@
+/**
+ * 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.
+ */
+/*
+ * Salesforce DTO generated by camel-salesforce-maven-plugin
+ * Generated on: Thu Feb 09 14:29:57 CET 2017
+ */
+package org.foo.salesforce.upsert.contact;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Salesforce Enumeration DTO for picklist CleanStatus
+ */
+public enum Contact_CleanStatusEnum {
+
+    // Acknowledged
+    ACKNOWLEDGED("Acknowledged"),
+    // Different
+    DIFFERENT("Different"),
+    // Inactive
+    INACTIVE("Inactive"),
+    // Matched
+    MATCHED("Matched"),
+    // NotFound
+    NOTFOUND("NotFound"),
+    // Pending
+    PENDING("Pending"),
+    // SelectMatch
+    SELECTMATCH("SelectMatch"),
+    // Skipped
+    SKIPPED("Skipped");
+
+    final String value;
+
+    private Contact_CleanStatusEnum(String value) {
+        this.value = value;
+    }
+
+    @JsonValue
+    public String value() {
+        return this.value;
+    }
+
+    @JsonCreator
+    public static Contact_CleanStatusEnum fromValue(String value) {
+        for (Contact_CleanStatusEnum e : Contact_CleanStatusEnum.values()) {
+            if (e.value.equals(value)) {
+                return e;
+            }
+        }
+        throw new IllegalArgumentException(value);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/c8d2aad1/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_LeadSourceEnum.java
----------------------------------------------------------------------
diff --git a/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_LeadSourceEnum.java
b/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_LeadSourceEnum.java
new file mode 100644
index 0000000..3057f25
--- /dev/null
+++ b/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_LeadSourceEnum.java
@@ -0,0 +1,63 @@
+/**
+ * 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.
+ */
+/*
+ * Salesforce DTO generated by camel-salesforce-maven-plugin
+ * Generated on: Thu Feb 09 14:29:57 CET 2017
+ */
+package org.foo.salesforce.upsert.contact;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Salesforce Enumeration DTO for picklist LeadSource
+ */
+public enum Contact_LeadSourceEnum {
+
+    // Other
+    OTHER("Other"),
+    // Partner Referral
+    PARTNER_REFERRAL("Partner Referral"),
+    // Phone Inquiry
+    PHONE_INQUIRY("Phone Inquiry"),
+    // Purchased List
+    PURCHASED_LIST("Purchased List"),
+    // Web
+    WEB("Web");
+
+    final String value;
+
+    private Contact_LeadSourceEnum(String value) {
+        this.value = value;
+    }
+
+    @JsonValue
+    public String value() {
+        return this.value;
+    }
+
+    @JsonCreator
+    public static Contact_LeadSourceEnum fromValue(String value) {
+        for (Contact_LeadSourceEnum e : Contact_LeadSourceEnum.values()) {
+            if (e.value.equals(value)) {
+                return e;
+            }
+        }
+        throw new IllegalArgumentException(value);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/c8d2aad1/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_LevelEnum.java
----------------------------------------------------------------------
diff --git a/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_LevelEnum.java
b/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_LevelEnum.java
new file mode 100644
index 0000000..e414ebb
--- /dev/null
+++ b/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_LevelEnum.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.
+ */
+/*
+ * Salesforce DTO generated by camel-salesforce-maven-plugin
+ * Generated on: Thu Feb 09 14:29:57 CET 2017
+ */
+package org.foo.salesforce.upsert.contact;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Salesforce Enumeration DTO for picklist Level__c
+ */
+public enum Contact_LevelEnum {
+
+    // Primary
+    PRIMARY("Primary"),
+    // Secondary
+    SECONDARY("Secondary"),
+    // Tertiary
+    TERTIARY("Tertiary");
+
+    final String value;
+
+    private Contact_LevelEnum(String value) {
+        this.value = value;
+    }
+
+    @JsonValue
+    public String value() {
+        return this.value;
+    }
+
+    @JsonCreator
+    public static Contact_LevelEnum fromValue(String value) {
+        for (Contact_LevelEnum e : Contact_LevelEnum.values()) {
+            if (e.value.equals(value)) {
+                return e;
+            }
+        }
+        throw new IllegalArgumentException(value);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/c8d2aad1/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_MailingGeocodeAccuracyEnum.java
----------------------------------------------------------------------
diff --git a/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_MailingGeocodeAccuracyEnum.java
b/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_MailingGeocodeAccuracyEnum.java
new file mode 100644
index 0000000..0cb2d1d
--- /dev/null
+++ b/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_MailingGeocodeAccuracyEnum.java
@@ -0,0 +1,75 @@
+/**
+ * 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.
+ */
+/*
+ * Salesforce DTO generated by camel-salesforce-maven-plugin
+ * Generated on: Thu Feb 09 14:29:57 CET 2017
+ */
+package org.foo.salesforce.upsert.contact;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Salesforce Enumeration DTO for picklist MailingGeocodeAccuracy
+ */
+public enum Contact_MailingGeocodeAccuracyEnum {
+
+    // Address
+    ADDRESS("Address"),
+    // Block
+    BLOCK("Block"),
+    // City
+    CITY("City"),
+    // County
+    COUNTY("County"),
+    // ExtendedZip
+    EXTENDEDZIP("ExtendedZip"),
+    // NearAddress
+    NEARADDRESS("NearAddress"),
+    // Neighborhood
+    NEIGHBORHOOD("Neighborhood"),
+    // State
+    STATE("State"),
+    // Street
+    STREET("Street"),
+    // Unknown
+    UNKNOWN("Unknown"),
+    // Zip
+    ZIP("Zip");
+
+    final String value;
+
+    private Contact_MailingGeocodeAccuracyEnum(String value) {
+        this.value = value;
+    }
+
+    @JsonValue
+    public String value() {
+        return this.value;
+    }
+
+    @JsonCreator
+    public static Contact_MailingGeocodeAccuracyEnum fromValue(String value) {
+        for (Contact_MailingGeocodeAccuracyEnum e : Contact_MailingGeocodeAccuracyEnum.values())
{
+            if (e.value.equals(value)) {
+                return e;
+            }
+        }
+        throw new IllegalArgumentException(value);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/c8d2aad1/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_OtherGeocodeAccuracyEnum.java
----------------------------------------------------------------------
diff --git a/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_OtherGeocodeAccuracyEnum.java
b/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_OtherGeocodeAccuracyEnum.java
new file mode 100644
index 0000000..c4848a2
--- /dev/null
+++ b/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_OtherGeocodeAccuracyEnum.java
@@ -0,0 +1,75 @@
+/**
+ * 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.
+ */
+/*
+ * Salesforce DTO generated by camel-salesforce-maven-plugin
+ * Generated on: Thu Feb 09 14:29:57 CET 2017
+ */
+package org.foo.salesforce.upsert.contact;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Salesforce Enumeration DTO for picklist OtherGeocodeAccuracy
+ */
+public enum Contact_OtherGeocodeAccuracyEnum {
+
+    // Address
+    ADDRESS("Address"),
+    // Block
+    BLOCK("Block"),
+    // City
+    CITY("City"),
+    // County
+    COUNTY("County"),
+    // ExtendedZip
+    EXTENDEDZIP("ExtendedZip"),
+    // NearAddress
+    NEARADDRESS("NearAddress"),
+    // Neighborhood
+    NEIGHBORHOOD("Neighborhood"),
+    // State
+    STATE("State"),
+    // Street
+    STREET("Street"),
+    // Unknown
+    UNKNOWN("Unknown"),
+    // Zip
+    ZIP("Zip");
+
+    final String value;
+
+    private Contact_OtherGeocodeAccuracyEnum(String value) {
+        this.value = value;
+    }
+
+    @JsonValue
+    public String value() {
+        return this.value;
+    }
+
+    @JsonCreator
+    public static Contact_OtherGeocodeAccuracyEnum fromValue(String value) {
+        for (Contact_OtherGeocodeAccuracyEnum e : Contact_OtherGeocodeAccuracyEnum.values())
{
+            if (e.value.equals(value)) {
+                return e;
+            }
+        }
+        throw new IllegalArgumentException(value);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/c8d2aad1/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_SalutationEnum.java
----------------------------------------------------------------------
diff --git a/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_SalutationEnum.java
b/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_SalutationEnum.java
new file mode 100644
index 0000000..9931854
--- /dev/null
+++ b/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/Contact_SalutationEnum.java
@@ -0,0 +1,63 @@
+/**
+ * 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.
+ */
+/*
+ * Salesforce DTO generated by camel-salesforce-maven-plugin
+ * Generated on: Thu Feb 09 14:29:57 CET 2017
+ */
+package org.foo.salesforce.upsert.contact;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Salesforce Enumeration DTO for picklist Salutation
+ */
+public enum Contact_SalutationEnum {
+
+    // Dr.
+    DR_("Dr."),
+    // Mr.
+    MR_("Mr."),
+    // Mrs.
+    MRS_("Mrs."),
+    // Ms.
+    MS_("Ms."),
+    // Prof.
+    PROF_("Prof.");
+
+    final String value;
+
+    private Contact_SalutationEnum(String value) {
+        this.value = value;
+    }
+
+    @JsonValue
+    public String value() {
+        return this.value;
+    }
+
+    @JsonCreator
+    public static Contact_SalutationEnum fromValue(String value) {
+        for (Contact_SalutationEnum e : Contact_SalutationEnum.values()) {
+            if (e.value.equals(value)) {
+                return e;
+            }
+        }
+        throw new IllegalArgumentException(value);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/c8d2aad1/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/QueryRecordsContact.java
----------------------------------------------------------------------
diff --git a/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/QueryRecordsContact.java
b/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/QueryRecordsContact.java
new file mode 100644
index 0000000..5977c86
--- /dev/null
+++ b/connectors/examples/salesforce-upsert-contact-connector/src/generated/java/org/foo/salesforce/upsert/contact/QueryRecordsContact.java
@@ -0,0 +1,43 @@
+/**
+ * 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.
+ */
+/*
+ * Salesforce Query DTO generated by camel-salesforce-maven-plugin
+ * Generated on: Thu Feb 09 14:29:57 CET 2017
+ */
+package org.foo.salesforce.upsert.contact;
+
+import com.thoughtworks.xstream.annotations.XStreamImplicit;
+import org.apache.camel.component.salesforce.api.dto.AbstractQueryRecordsBase;
+
+import java.util.List;
+
+/**
+ * Salesforce QueryRecords DTO for type Contact
+ */
+public class QueryRecordsContact extends AbstractQueryRecordsBase {
+
+    @XStreamImplicit
+    private List<Contact> records;
+
+    public List<Contact> getRecords() {
+        return records;
+    }
+
+    public void setRecords(List<Contact> records) {
+        this.records = records;
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/c8d2aad1/connectors/examples/salesforce-upsert-contact-connector/src/main/java/org/foo/salesforce/contact/SalesforceUpsertContactComponent.java
----------------------------------------------------------------------
diff --git a/connectors/examples/salesforce-upsert-contact-connector/src/main/java/org/foo/salesforce/contact/SalesforceUpsertContactComponent.java
b/connectors/examples/salesforce-upsert-contact-connector/src/main/java/org/foo/salesforce/contact/SalesforceUpsertContactComponent.java
new file mode 100644
index 0000000..df88a5e
--- /dev/null
+++ b/connectors/examples/salesforce-upsert-contact-connector/src/main/java/org/foo/salesforce/contact/SalesforceUpsertContactComponent.java
@@ -0,0 +1,30 @@
+/**
+ * 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.foo.salesforce.contact;
+
+import org.apache.camel.component.connector.DefaultConnectorComponent;
+
+/**
+ * Camel salesforce-upsert-contact connector
+ */
+public class SalesforceUpsertContactComponent extends DefaultConnectorComponent {
+
+    public SalesforceUpsertContactComponent() {
+        super("salesforce-upsert-contact", SalesforceUpsertContactComponent.class.getName());
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/c8d2aad1/connectors/examples/salesforce-upsert-contact-connector/src/main/resources/META-INF/services/org/apache/camel/component/salesforce-upsert-contact
----------------------------------------------------------------------
diff --git a/connectors/examples/salesforce-upsert-contact-connector/src/main/resources/META-INF/services/org/apache/camel/component/salesforce-upsert-contact
b/connectors/examples/salesforce-upsert-contact-connector/src/main/resources/META-INF/services/org/apache/camel/component/salesforce-upsert-contact
new file mode 100644
index 0000000..0d97cf1
--- /dev/null
+++ b/connectors/examples/salesforce-upsert-contact-connector/src/main/resources/META-INF/services/org/apache/camel/component/salesforce-upsert-contact
@@ -0,0 +1,18 @@
+#
+# 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.
+#
+
+class=org.foo.salesforce.contact.SalesforceUpsertContactComponent

http://git-wip-us.apache.org/repos/asf/camel/blob/c8d2aad1/connectors/examples/salesforce-upsert-contact-connector/src/main/resources/camel-connector-schema.json
----------------------------------------------------------------------
diff --git a/connectors/examples/salesforce-upsert-contact-connector/src/main/resources/camel-connector-schema.json
b/connectors/examples/salesforce-upsert-contact-connector/src/main/resources/camel-connector-schema.json
new file mode 100644
index 0000000..9685870
--- /dev/null
+++ b/connectors/examples/salesforce-upsert-contact-connector/src/main/resources/camel-connector-schema.json
@@ -0,0 +1,25 @@
+{
+  "component": {
+    "kind": "component",
+    "baseScheme": "salesforce",
+    "scheme": "salesforce-upsert-contact",
+    "syntax": "salesforce-upsert-contact:operationName:topicName",
+    "title": "SalesforceUpsertContact",
+    "description": "Create or update Salesforce Contact SObject",
+    "label": "salesforce",
+    "deprecated": "false",
+    "async": "false",
+    "producerOnly": "true",
+    "javaType": "org.foo.salesforce.contact.SalesforceUpsertContactComponent",
+    "groupId": "org.foo",
+    "artifactId": "salesforce-upsert-contact-connector",
+    "version": "2.19.0-SNAPSHOT"
+  },
+  "componentProperties": {
+    "loginConfig": {"kind":"property","group":"security","label":"security","required":"false","type":"object","javaType":"org.apache.camel.component.salesforce.SalesforceLoginConfig","deprecated":"false","secret":"false","description":"To
use the shared SalesforceLoginConfig as login configuration"}
+  },
+  "properties": {
+    "sObjectIdName": {"kind":"parameter","group":"common","type":"string","javaType":"java.lang.String","deprecated":"false","secret":"false","description":"SObject
external ID field name"},
+    "sObjectIdValue": {"kind":"parameter","group":"common","type":"string","javaType":"java.lang.String","deprecated":"false","secret":"false","description":"SObject
external ID field value"}
+  }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/c8d2aad1/connectors/examples/salesforce-upsert-contact-connector/src/main/resources/camel-connector.json
----------------------------------------------------------------------
diff --git a/connectors/examples/salesforce-upsert-contact-connector/src/main/resources/camel-connector.json
b/connectors/examples/salesforce-upsert-contact-connector/src/main/resources/camel-connector.json
new file mode 100644
index 0000000..76c9a67
--- /dev/null
+++ b/connectors/examples/salesforce-upsert-contact-connector/src/main/resources/camel-connector.json
@@ -0,0 +1,20 @@
+{
+  "baseScheme": "salesforce",
+  "baseGroupId": "org.apache.camel",
+  "baseArtifactId": "camel-salesforce",
+  "baseVersion": "2.19.0-SNAPSHOT",
+  "name": "SalesforceUpsertContact",
+  "scheme": "salesforce-upsert-contact",
+  "javaType": "org.foo.salesforce.contact.SalesforceUpsertContactComponent",
+  "groupId": "org.foo",
+  "artifactId": "twitter-mention-connector",
+  "version": "1.0",
+  "description": "Create or update Salesforce Contact SObject",
+  "labels" : [ "salesforce" ],
+  "pattern": "To",
+  "componentOptions" : [ "loginConfig" ],
+  "endpointValues" : {
+    "operationName": "upsertSObject"
+  },
+  "endpointOptions": [ "sObjectIdName", "sObjectIdValue" ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/c8d2aad1/connectors/examples/twitter-salesforce-example/pom.xml
----------------------------------------------------------------------
diff --git a/connectors/examples/twitter-salesforce-example/pom.xml b/connectors/examples/twitter-salesforce-example/pom.xml
index bec26ba..79797fe 100644
--- a/connectors/examples/twitter-salesforce-example/pom.xml
+++ b/connectors/examples/twitter-salesforce-example/pom.xml
@@ -80,6 +80,11 @@
     </dependency>
     <dependency>
       <groupId>org.foo</groupId>
+      <artifactId>salesforce-upsert-contact-connector</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.foo</groupId>
       <artifactId>foo-connector</artifactId>
       <version>${project.version}</version>
     </dependency>

http://git-wip-us.apache.org/repos/asf/camel/blob/c8d2aad1/connectors/examples/twitter-salesforce-example/src/main/java/org/foo/MentionAddContractRoute.java
----------------------------------------------------------------------
diff --git a/connectors/examples/twitter-salesforce-example/src/main/java/org/foo/MentionAddContractRoute.java
b/connectors/examples/twitter-salesforce-example/src/main/java/org/foo/MentionAddContractRoute.java
index 0876aab..f58625f 100644
--- a/connectors/examples/twitter-salesforce-example/src/main/java/org/foo/MentionAddContractRoute.java
+++ b/connectors/examples/twitter-salesforce-example/src/main/java/org/foo/MentionAddContractRoute.java
@@ -25,6 +25,8 @@ public class MentionAddContractRoute extends RouteBuilder {
     @Override
     public void configure() throws Exception {
         from("twitter-mention")
-            .log("I was mentioned by ${body}");
+            .log("I was mentioned by ${body}")
+            .process("tweetToContactMapper")
+            .to("salesforce-upsert-contact?sObjectIdName=TwitterScreenName__c");
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/c8d2aad1/connectors/examples/twitter-salesforce-example/src/main/java/org/foo/TweetToContactMapper.java
----------------------------------------------------------------------
diff --git a/connectors/examples/twitter-salesforce-example/src/main/java/org/foo/TweetToContactMapper.java
b/connectors/examples/twitter-salesforce-example/src/main/java/org/foo/TweetToContactMapper.java
new file mode 100644
index 0000000..d56d9a0
--- /dev/null
+++ b/connectors/examples/twitter-salesforce-example/src/main/java/org/foo/TweetToContactMapper.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.foo;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+import org.apache.camel.Processor;
+import org.foo.salesforce.upsert.contact.Contact;
+import org.springframework.stereotype.Component;
+
+import twitter4j.Status;
+import twitter4j.User;
+
+@Component
+public class TweetToContactMapper implements Processor {
+
+    @Override
+    public void process(Exchange exchange) throws Exception {
+        Message in = exchange.getIn();
+
+        Status status = exchange.getIn().getBody(Status.class);
+
+        User user = status.getUser();
+        String name = user.getName();
+        String screenName = user.getScreenName();
+
+        Contact contact = new Contact();
+        contact.setLastName(name);
+        contact.setTwitterScreenName__c(screenName);
+
+        in.setBody(contact);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/c8d2aad1/connectors/examples/twitter-salesforce-example/src/main/resources/application.properties
----------------------------------------------------------------------
diff --git a/connectors/examples/twitter-salesforce-example/src/main/resources/application.properties
b/connectors/examples/twitter-salesforce-example/src/main/resources/application.properties
index 36baa9b..9d745d7 100644
--- a/connectors/examples/twitter-salesforce-example/src/main/resources/application.properties
+++ b/connectors/examples/twitter-salesforce-example/src/main/resources/application.properties
@@ -9,3 +9,12 @@ camel.component.twitter.consumer-secret=VxNQiRLwwKVD0K9mmfxlTTbVdgRpriORypnUbHhx
 camel.component.twitter.access-token=26693234-W0YjxL9cMJrC0VZZ4xdgFMymxIQ10LeL1K8YlbBY
 camel.component.twitter.access-token-secret=BZD51BgzbOdFstWZYsqB5p5dbuuDV12vrOdatzhY4E
 
+## Consumer Key of the connected application
+camel.component.salesforce.loginConfig.clientId=3MVG9szVa2RxsqBZXHfqsW3hf9HQp_N6qdSmpjKMzSJaEL4UP161JlDkE32EigL82ra_jM1WuQgF4rYDgzL3u
+## Consumer Secret of the connected application
+camel.component.salesforce.loginConfig.clientSecret=1039611643161946846
+## refresh_token from OAuth flow
+camel.component.salesforce.loginConfig.refreshToken=5Aep861HDR3iASSXIX6hI7M1qMWSCs1Ym57WUH1ftjE7RvnM7MvnAXx9EZaw_HIoNCKktNsuhx.xwjLThofuJH4
+## you can also use:
+#camel.component.salesforce.loginConfig.userName=<Salesforce username>
+#camel.component.salesforce.loginConfig.password=<Salesforce password>


Mime
View raw message