You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by an...@apache.org on 2016/07/03 17:43:52 UTC

[1/2] camel git commit: Drop jodatime dependency

Repository: camel
Updated Branches:
  refs/heads/master b21138530 -> ddc89511d


Drop jodatime dependency


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

Branch: refs/heads/master
Commit: 683b53afeb8da28eab9c21b8156983875c99a6a2
Parents: b211385
Author: Arno Noordover <an...@users.noreply.github.com>
Authored: Wed Jun 29 22:32:21 2016 +0200
Committer: Arno Noordover <an...@users.noreply.github.com>
Committed: Sun Jul 3 19:14:56 2016 +0200

----------------------------------------------------------------------
 .../camel-salesforce-component/pom.xml          |   8 -
 .../src/main/docs/salesforce.adoc               | 267 ++++++++++++++-----
 .../salesforce/api/JodaTimeConverter.java       |  35 +--
 .../salesforce/api/dto/AbstractSObjectBase.java |  33 +--
 .../dto/analytics/reports/AsyncAttributes.java  |  15 +-
 .../api/dto/analytics/reports/Report.java       |   8 +-
 .../dto/analytics/reports/ReportInstance.java   |  15 +-
 .../internal/joda/DateTimeDeserializer.java     |  29 +-
 .../internal/joda/DateTimeModule.java           |   8 +-
 .../internal/joda/DateTimeSerializer.java       |  28 +-
 .../salesforce/RestApiIntegrationTest.java      |   9 +-
 .../salesforce/StreamingApiIntegrationTest.java |   5 +-
 .../salesforce/dto/generated/Tasks__c.java      |  43 +--
 .../processor/JsonRestProcessorTest.java        |  11 +-
 .../camel-salesforce-maven-plugin/README.md     |   2 +-
 .../apache/camel/maven/CamelSalesforceMojo.java |   9 +-
 16 files changed, 314 insertions(+), 211 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/683b53af/components/camel-salesforce/camel-salesforce-component/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/pom.xml b/components/camel-salesforce/camel-salesforce-component/pom.xml
index af5507b..3f20a73 100644
--- a/components/camel-salesforce/camel-salesforce-component/pom.xml
+++ b/components/camel-salesforce/camel-salesforce-component/pom.xml
@@ -31,9 +31,6 @@
   <description>Camel Salesforce support</description>
 
   <properties>
-    <camel.osgi.import.before.defaults>
-        org.joda.time.*;version="[1.6,3)"
-    </camel.osgi.import.before.defaults>
     <camel.osgi.export.pkg>
       org.apache.camel.component.salesforce,
       org.apache.camel.component.salesforce.api.*
@@ -103,11 +100,6 @@
         </exclusion>
       </exclusions>
     </dependency>
-    <dependency>
-      <groupId>joda-time</groupId>
-      <artifactId>joda-time</artifactId>
-      <version>${jodatime2-bundle-version}</version>
-    </dependency>
 
     <!-- logging -->
     <dependency>

http://git-wip-us.apache.org/repos/asf/camel/blob/683b53af/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce.adoc
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce.adoc b/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce.adoc
index 3f5c9cd..1fb5aa7 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce.adoc
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce.adoc
@@ -199,88 +199,229 @@ Options
 ^^^^^^^
 
 
+
 // component options: START
 The Salesforce component supports 16 options which are listed below.
 
 
 
 {% raw %}
-[width="100%",cols="2s,1m,8",options="header"]
-|=======================================================================
-| Name | Java Type | Description
-| loginConfig | SalesforceLoginConfig | To use the shared SalesforceLoginConfig as login configuration
-| config | SalesforceEndpointConfig | To use the shared SalesforceLoginConfig as configuration
-| httpClientProperties | Map | Used for configuring HTTP client properties as key/value pairs
-| sslContextParameters | SSLContextParameters | To configure security using SSLContextParameters
-| httpProxyHost | String | To configure HTTP proxy host
-| httpProxyPort | Integer | To configure HTTP proxy port
-| httpProxyUsername | String | To configure HTTP proxy username
-| httpProxyPassword | String | To configure HTTP proxy password
-| isHttpProxySocks4 | boolean | Enable for Socks4 proxy false by default
-| isHttpProxySecure | boolean | Enable for TLS connections true by default
-| httpProxyIncludedAddresses | Set | HTTP proxy included addresses
-| httpProxyExcludedAddresses | Set | HTTP proxy excluded addresses
-| httpProxyAuthUri | String | HTTP proxy authentication URI
-| httpProxyRealm | String | HTTP proxy authentication realm
-| httpProxyUseDigestAuth | boolean | Use HTTP proxy Digest authentication false by default
-| packages | String[] | Package names to scan for DTO classes (multiple packages can be separated by comma).
-|=======================================================================
+
+loginConfig (SalesforceLoginConfig)::
+  To use the shared SalesforceLoginConfig as login configuration
+config (SalesforceEndpointConfig)::
+  To use the shared SalesforceLoginConfig as configuration
+httpClientProperties (Map)::
+  Used for configuring HTTP client properties as key/value pairs
+sslContextParameters (SSLContextParameters)::
+  To configure security using SSLContextParameters
+httpProxyHost (String)::
+  To configure HTTP proxy host
+httpProxyPort (Integer)::
+  To configure HTTP proxy port
+httpProxyUsername (String)::
+  To configure HTTP proxy username
+httpProxyPassword (String)::
+  To configure HTTP proxy password
+isHttpProxySocks4 (boolean)::
+  Enable for Socks4 proxy false by default
+isHttpProxySecure (boolean)::
+  Enable for TLS connections true by default
+httpProxyIncludedAddresses (Set)::
+  HTTP proxy included addresses
+httpProxyExcludedAddresses (Set)::
+  HTTP proxy excluded addresses
+httpProxyAuthUri (String)::
+  HTTP proxy authentication URI
+httpProxyRealm (String)::
+  HTTP proxy authentication realm
+httpProxyUseDigestAuth (boolean)::
+  Use HTTP proxy Digest authentication false by default
+packages (String[])::
+  Package names to scan for DTO classes (multiple packages can be separated by comma).
+
+
 {% endraw %}
 // component options: END
 
 
 
+
+
 // endpoint options: START
 The Salesforce component supports 39 endpoint options which are listed below:
 
 {% raw %}
-[width="100%",cols="2s,1,1m,1m,5",options="header"]
-|=======================================================================
-| Name | Group | Default | Java Type | Description
-| operationName | common |  | OperationName | 
-| topicName | common |  | String | 
-| apexMethod | common |  | String | APEX method name
-| apexQueryParams | common |  | Map | Query params for APEX method
-| apexUrl | common |  | String | APEX method URL
-| apiVersion | common |  | String | Salesforce API version defaults to SalesforceEndpointConfig.DEFAULT_VERSION
-| batchId | common |  | String | Bulk API Batch ID
-| contentType | common |  | ContentType | Bulk API content type one of XML CSV ZIP_XML ZIP_CSV
-| defaultReplayId | common |  | Integer | Default replayId setting if no value is found in link initialReplayIdMap
-| format | common |  | PayloadFormat | Payload format to use for Salesforce API calls either JSON or XML defaults to JSON
-| httpClient | common |  | SalesforceHttpClient | Custom Jetty Http Client to use to connect to Salesforce.
-| includeDetails | common |  | Boolean | Include details in Salesforce1 Analytics report defaults to false.
-| initialReplayIdMap | common |  | Map | Replay IDs to start from per channel name.
-| instanceId | common |  | String | Salesforce1 Analytics report execution instance ID
-| jobId | common |  | String | Bulk API Job ID
-| notifyForFields | common |  | NotifyForFieldsEnum | Notify for fields options are ALL REFERENCED SELECT WHERE
-| notifyForOperationCreate | common |  | Boolean | Notify for create operation defaults to false (API version = 29.0)
-| notifyForOperationDelete | common |  | Boolean | Notify for delete operation defaults to false (API version = 29.0)
-| notifyForOperations | common |  | NotifyForOperationsEnum | Notify for operations options are ALL CREATE EXTENDED UPDATE (API version 29.0)
-| notifyForOperationUndelete | common |  | Boolean | Notify for un-delete operation defaults to false (API version = 29.0)
-| notifyForOperationUpdate | common |  | Boolean | Notify for update operation defaults to false (API version = 29.0)
-| objectMapper | common |  | ObjectMapper | Custom Jackson ObjectMapper to use when serializing/deserializing Salesforce objects.
-| reportId | common |  | String | Salesforce1 Analytics report Id
-| reportMetadata | common |  | ReportMetadata | Salesforce1 Analytics report metadata for filtering
-| resultId | common |  | String | Bulk API Result ID
-| sObjectBlobFieldName | common |  | String | SObject blob field name
-| sObjectClass | common |  | String | Fully qualified SObject class name usually generated using camel-salesforce-maven-plugin
-| sObjectFields | common |  | String | SObject fields to retrieve
-| sObjectId | common |  | String | SObject ID if required by API
-| sObjectIdName | common |  | String | SObject external ID field name
-| sObjectIdValue | common |  | String | SObject external ID field value
-| sObjectName | common |  | String | SObject name if required or supported by API
-| sObjectQuery | common |  | String | Salesforce SOQL query string
-| sObjectSearch | common |  | String | Salesforce SOSL search string
-| updateTopic | common | false | boolean | Whether to update an existing Push Topic when using the Streaming API defaults to false
-| bridgeErrorHandler | consumer | false | boolean | Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored.
-| exceptionHandler | consumer (advanced) |  | ExceptionHandler | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
-| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange
-| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
-|=======================================================================
+
+common::
+
+operationName (OperationName):::
+
+  
+
+topicName (String):::
+
+  
+
+apexMethod (String):::
+
+  APEX method name
+
+apexQueryParams (Map):::
+
+  Query params for APEX method
+
+apexUrl (String):::
+
+  APEX method URL
+
+apiVersion (String):::
+
+  Salesforce API version defaults to SalesforceEndpointConfig.DEFAULT_VERSION
+
+batchId (String):::
+
+  Bulk API Batch ID
+
+contentType (ContentType):::
+
+  Bulk API content type one of XML CSV ZIP_XML ZIP_CSV
+
+defaultReplayId (Integer):::
+
+  Default replayId setting if no value is found in link initialReplayIdMap
+
+format (PayloadFormat):::
+
+  Payload format to use for Salesforce API calls either JSON or XML defaults to JSON
+
+httpClient (SalesforceHttpClient):::
+
+  Custom Jetty Http Client to use to connect to Salesforce.
+
+includeDetails (Boolean):::
+
+  Include details in Salesforce1 Analytics report defaults to false.
+
+initialReplayIdMap (Map):::
+
+  Replay IDs to start from per channel name.
+
+instanceId (String):::
+
+  Salesforce1 Analytics report execution instance ID
+
+jobId (String):::
+
+  Bulk API Job ID
+
+notifyForFields (NotifyForFieldsEnum):::
+
+  Notify for fields options are ALL REFERENCED SELECT WHERE
+
+notifyForOperationCreate (Boolean):::
+
+  Notify for create operation defaults to false (API version = 29.0)
+
+notifyForOperationDelete (Boolean):::
+
+  Notify for delete operation defaults to false (API version = 29.0)
+
+notifyForOperations (NotifyForOperationsEnum):::
+
+  Notify for operations options are ALL CREATE EXTENDED UPDATE (API version 29.0)
+
+notifyForOperationUndelete (Boolean):::
+
+  Notify for un-delete operation defaults to false (API version = 29.0)
+
+notifyForOperationUpdate (Boolean):::
+
+  Notify for update operation defaults to false (API version = 29.0)
+
+objectMapper (ObjectMapper):::
+
+  Custom Jackson ObjectMapper to use when serializing/deserializing Salesforce objects.
+
+reportId (String):::
+
+  Salesforce1 Analytics report Id
+
+reportMetadata (ReportMetadata):::
+
+  Salesforce1 Analytics report metadata for filtering
+
+resultId (String):::
+
+  Bulk API Result ID
+
+sObjectBlobFieldName (String):::
+
+  SObject blob field name
+
+sObjectClass (String):::
+
+  Fully qualified SObject class name usually generated using camel-salesforce-maven-plugin
+
+sObjectFields (String):::
+
+  SObject fields to retrieve
+
+sObjectId (String):::
+
+  SObject ID if required by API
+
+sObjectIdName (String):::
+
+  SObject external ID field name
+
+sObjectIdValue (String):::
+
+  SObject external ID field value
+
+sObjectName (String):::
+
+  SObject name if required or supported by API
+
+sObjectQuery (String):::
+
+  Salesforce SOQL query string
+
+sObjectSearch (String):::
+
+  Salesforce SOSL search string
+
+updateTopic (boolean; default: false):::
+
+  Whether to update an existing Push Topic when using the Streaming API defaults to false
+
+advanced::
+
+exchangePattern (ExchangePattern; default: InOnly):::
+
+  Sets the default exchange pattern when creating an exchange
+
+synchronous (boolean; default: false):::
+
+  Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
+
+consumer (advanced)::
+
+exceptionHandler (ExceptionHandler):::
+
+  To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
+
+consumer::
+
+bridgeErrorHandler (boolean; default: false):::
+
+  Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored.
+
 {% endraw %}
 // endpoint options: END
 
 
+
 For obvious security reasons it is recommended that the clientId,
 clientSecret, userName and password fields be not set in the pom.xml.  
 The plugin should be configured for the rest of the properties, and can

http://git-wip-us.apache.org/repos/asf/camel/blob/683b53af/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/JodaTimeConverter.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/JodaTimeConverter.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/JodaTimeConverter.java
index 5cd19b1..c2c056d 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/JodaTimeConverter.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/JodaTimeConverter.java
@@ -17,6 +17,9 @@
 package org.apache.camel.component.salesforce.api;
 
 import java.lang.reflect.Constructor;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
 
 import com.thoughtworks.xstream.converters.ConversionException;
 import com.thoughtworks.xstream.converters.Converter;
@@ -25,10 +28,6 @@ import com.thoughtworks.xstream.converters.UnmarshallingContext;
 import com.thoughtworks.xstream.io.HierarchicalStreamReader;
 import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
 
-import org.joda.time.DateTime;
-import org.joda.time.DateTimeZone;
-import org.joda.time.format.DateTimeFormatter;
-import org.joda.time.format.DateTimeFormatterBuilder;
 
 /**
  * XStream converter for handling JodaTime fields.
@@ -36,26 +35,14 @@ import org.joda.time.format.DateTimeFormatterBuilder;
 public class JodaTimeConverter implements Converter {
 
     private final DateTimeFormatter formatter = new DateTimeFormatterBuilder()
-            .appendYear(4, 4)
-            .appendLiteral('-')
-            .appendMonthOfYear(2)
-            .appendLiteral('-')
-            .appendDayOfMonth(2)
-            .appendLiteral('T')
-            .appendHourOfDay(2)
-            .appendLiteral(':')
-            .appendMinuteOfHour(2)
-            .appendLiteral(':')
-            .appendSecondOfMinute(2)
-            .appendLiteral('.')
-            .appendMillisOfSecond(3)
-            .appendTimeZoneOffset("Z", true, 2, 2)
+            .appendPattern("yyyy-MM-dd'T'HH:mm:ss")
+            .appendOffset("+HH:mm", "Z")
             .toFormatter();
 
     @Override
     public void marshal(Object o, HierarchicalStreamWriter writer, MarshallingContext context) {
-        DateTime dateTime = (DateTime) o;
-        writer.setValue(formatter.print(dateTime));
+        ZonedDateTime dateTime = (ZonedDateTime) o;
+        writer.setValue(formatter.format(dateTime));
     }
 
     @Override
@@ -63,12 +50,10 @@ public class JodaTimeConverter implements Converter {
         String dateTimeStr = reader.getValue();
         Class<?> requiredType = context.getRequiredType();
         try {
-            Constructor<?> constructor = requiredType.getConstructor(Object.class, DateTimeZone.class);
-            // normalize date time to UTC
-            return constructor.newInstance(dateTimeStr, DateTimeZone.UTC);
+            return formatter.parse(dateTimeStr, ZonedDateTime::from);
         } catch (Exception e) {
             throw new ConversionException(
-                    String.format("Error reading Joda DateTime from value %s: %s",
+                    String.format("Error reading ZonedDateTime from value %s: %s",
                             dateTimeStr, e.getMessage()),
                     e);
         }
@@ -76,7 +61,7 @@ public class JodaTimeConverter implements Converter {
 
     @Override
     public boolean canConvert(Class aClass) {
-        return DateTime.class.isAssignableFrom(aClass);
+        return ZonedDateTime.class.isAssignableFrom(aClass);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/683b53af/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/AbstractSObjectBase.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/AbstractSObjectBase.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/AbstractSObjectBase.java
index 7ba39da..bbdc3ac 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/AbstractSObjectBase.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/AbstractSObjectBase.java
@@ -16,9 +16,10 @@
  */
 package org.apache.camel.component.salesforce.api.dto;
 
+import java.time.ZonedDateTime;
+
 import com.fasterxml.jackson.annotation.JsonProperty;
 
-import org.joda.time.DateTime;
 //CHECKSTYLE:OFF
 public class AbstractSObjectBase extends AbstractDTOBase {
 
@@ -30,14 +31,14 @@ public class AbstractSObjectBase extends AbstractDTOBase {
     private String OwnerId;
     private Boolean IsDeleted;
     private String Name;
-    private DateTime CreatedDate;
+    private ZonedDateTime CreatedDate;
     private String CreatedById;
-    private DateTime LastModifiedDate;
+    private ZonedDateTime LastModifiedDate;
     private String LastModifiedById;
-    private DateTime SystemModstamp;
+    private ZonedDateTime SystemModstamp;
     private String LastActivityDate;
-    private DateTime LastViewedDate;
-    private DateTime LastReferencedDate;
+    private ZonedDateTime LastViewedDate;
+    private ZonedDateTime LastReferencedDate;
 
     /**
      * Utility method to clear all system {@link AbstractSObjectBase} fields.
@@ -106,12 +107,12 @@ public class AbstractSObjectBase extends AbstractDTOBase {
     }
 
     @JsonProperty("CreatedDate")
-    public DateTime getCreatedDate() {
+    public ZonedDateTime getCreatedDate() {
         return CreatedDate;
     }
 
     @JsonProperty("CreatedDate")
-    public void setCreatedDate(DateTime createdDate) {
+    public void setCreatedDate(ZonedDateTime createdDate) {
         this.CreatedDate = createdDate;
     }
 
@@ -126,12 +127,12 @@ public class AbstractSObjectBase extends AbstractDTOBase {
     }
 
     @JsonProperty("LastModifiedDate")
-    public DateTime getLastModifiedDate() {
+    public ZonedDateTime getLastModifiedDate() {
         return LastModifiedDate;
     }
 
     @JsonProperty("LastModifiedDate")
-    public void setLastModifiedDate(DateTime lastModifiedDate) {
+    public void setLastModifiedDate(ZonedDateTime lastModifiedDate) {
         this.LastModifiedDate = lastModifiedDate;
     }
 
@@ -146,12 +147,12 @@ public class AbstractSObjectBase extends AbstractDTOBase {
     }
 
     @JsonProperty("SystemModstamp")
-    public DateTime getSystemModstamp() {
+    public ZonedDateTime getSystemModstamp() {
         return SystemModstamp;
     }
 
     @JsonProperty("SystemModstamp")
-    public void setSystemModstamp(DateTime systemModstamp) {
+    public void setSystemModstamp(ZonedDateTime systemModstamp) {
         this.SystemModstamp = systemModstamp;
     }
 
@@ -166,22 +167,22 @@ public class AbstractSObjectBase extends AbstractDTOBase {
     }
 
     @JsonProperty("LastViewedDate")
-    public DateTime getLastViewedDate() {
+    public ZonedDateTime getLastViewedDate() {
         return LastViewedDate;
     }
 
     @JsonProperty("LastViewedDate")
-    public void setLastViewedDate(DateTime lastViewedDate) {
+    public void setLastViewedDate(ZonedDateTime lastViewedDate) {
         LastViewedDate = lastViewedDate;
     }
 
     @JsonProperty("LastReferencedDate")
-    public DateTime getLastReferencedDate() {
+    public ZonedDateTime getLastReferencedDate() {
         return LastReferencedDate;
     }
 
     @JsonProperty("LastReferencedDate")
-    public void setLastReferencedDate(DateTime lastReferencedDate) {
+    public void setLastReferencedDate(ZonedDateTime lastReferencedDate) {
         LastReferencedDate = lastReferencedDate;
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/683b53af/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/analytics/reports/AsyncAttributes.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/analytics/reports/AsyncAttributes.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/analytics/reports/AsyncAttributes.java
index d66583a..c523115 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/analytics/reports/AsyncAttributes.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/analytics/reports/AsyncAttributes.java
@@ -16,7 +16,8 @@
  */
 package org.apache.camel.component.salesforce.api.dto.analytics.reports;
 
-import org.joda.time.DateTime;
+
+import java.time.ZonedDateTime;
 
 /**
  * Async report attributes DTO.
@@ -26,8 +27,8 @@ public class AsyncAttributes extends AbstractAttributesBase {
     private String id;
     private ReportStatusEnum status;
     private String ownerId;
-    private DateTime completionDate;
-    private DateTime requestDate;
+    private ZonedDateTime completionDate;
+    private ZonedDateTime requestDate;
 
     public String getId() {
         return id;
@@ -53,19 +54,19 @@ public class AsyncAttributes extends AbstractAttributesBase {
         this.ownerId = ownerId;
     }
 
-    public DateTime getCompletionDate() {
+    public ZonedDateTime getCompletionDate() {
         return completionDate;
     }
 
-    public void setCompletionDate(DateTime completionDate) {
+    public void setCompletionDate(ZonedDateTime completionDate) {
         this.completionDate = completionDate;
     }
 
-    public DateTime getRequestDate() {
+    public ZonedDateTime getRequestDate() {
         return requestDate;
     }
 
-    public void setRequestDate(DateTime requestDate) {
+    public void setRequestDate(ZonedDateTime requestDate) {
         this.requestDate = requestDate;
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/683b53af/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/analytics/reports/Report.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/analytics/reports/Report.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/analytics/reports/Report.java
index cd7141a..29c7a22 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/analytics/reports/Report.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/analytics/reports/Report.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.salesforce.api.dto.analytics.reports;
 
+import java.time.ZonedDateTime;
+
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.thoughtworks.xstream.annotations.XStreamAlias;
 import com.thoughtworks.xstream.annotations.XStreamConverter;
@@ -40,7 +42,7 @@ public class Report extends AbstractSObjectBase {
     private String NamespacePrefix;
 
     // LastRunDate
-    private org.joda.time.DateTime LastRunDate;
+    private ZonedDateTime LastRunDate;
 
     // Format
     @XStreamConverter(PicklistEnumConverter.class)
@@ -77,12 +79,12 @@ public class Report extends AbstractSObjectBase {
     }
 
     @JsonProperty("LastRunDate")
-    public org.joda.time.DateTime getLastRunDate() {
+    public ZonedDateTime getLastRunDate() {
         return this.LastRunDate;
     }
 
     @JsonProperty("LastRunDate")
-    public void setLastRunDate(org.joda.time.DateTime LastRunDate) {
+    public void setLastRunDate(ZonedDateTime LastRunDate) {
         this.LastRunDate = LastRunDate;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/683b53af/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/analytics/reports/ReportInstance.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/analytics/reports/ReportInstance.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/analytics/reports/ReportInstance.java
index f69ae8d..fc303a7 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/analytics/reports/ReportInstance.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/analytics/reports/ReportInstance.java
@@ -16,8 +16,9 @@
  */
 package org.apache.camel.component.salesforce.api.dto.analytics.reports;
 
+import java.time.ZonedDateTime;
+
 import org.apache.camel.component.salesforce.api.dto.AbstractDTOBase;
-import org.joda.time.DateTime;
 
 /**
  * Report instance DTO.
@@ -29,8 +30,8 @@ public class ReportInstance extends AbstractDTOBase {
     private String url;
     private String ownerId;
     private Boolean hasDetailRows;
-    private DateTime completionDate;
-    private DateTime requestDate;
+    private ZonedDateTime completionDate;
+    private ZonedDateTime requestDate;
 
     public String getId() {
         return id;
@@ -72,19 +73,19 @@ public class ReportInstance extends AbstractDTOBase {
         this.hasDetailRows = hasDetailRows;
     }
 
-    public DateTime getCompletionDate() {
+    public ZonedDateTime getCompletionDate() {
         return completionDate;
     }
 
-    public void setCompletionDate(DateTime completionDate) {
+    public void setCompletionDate(ZonedDateTime completionDate) {
         this.completionDate = completionDate;
     }
 
-    public DateTime getRequestDate() {
+    public ZonedDateTime getRequestDate() {
         return requestDate;
     }
 
-    public void setRequestDate(DateTime requestDate) {
+    public void setRequestDate(ZonedDateTime requestDate) {
         this.requestDate = requestDate;
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/683b53af/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/joda/DateTimeDeserializer.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/joda/DateTimeDeserializer.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/joda/DateTimeDeserializer.java
index 280f238..0f4b771 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/joda/DateTimeDeserializer.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/joda/DateTimeDeserializer.java
@@ -17,6 +17,10 @@
 package org.apache.camel.component.salesforce.internal.joda;
 
 import java.io.IOException;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.temporal.TemporalQuery;
 
 import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.core.JsonProcessingException;
@@ -24,27 +28,12 @@ import com.fasterxml.jackson.core.JsonToken;
 import com.fasterxml.jackson.databind.DeserializationContext;
 import com.fasterxml.jackson.databind.JsonDeserializer;
 
-import org.joda.time.DateTime;
-import org.joda.time.format.DateTimeFormatter;
-import org.joda.time.format.DateTimeFormatterBuilder;
 
-public class DateTimeDeserializer extends JsonDeserializer<DateTime> {
+public class DateTimeDeserializer extends JsonDeserializer<ZonedDateTime> {
 
     private final DateTimeFormatter formatter = new DateTimeFormatterBuilder()
-            .appendYear(4, 4)
-            .appendLiteral('-')
-            .appendMonthOfYear(2)
-            .appendLiteral('-')
-            .appendDayOfMonth(2)
-            .appendLiteral('T')
-            .appendHourOfDay(2)
-            .appendLiteral(':')
-            .appendMinuteOfHour(2)
-            .appendLiteral(':')
-            .appendSecondOfMinute(2)
-            .appendLiteral('.')
-            .appendMillisOfSecond(3)
-            .appendTimeZoneOffset("Z", true, 2, 2)
+            .appendPattern("yyyy-MM-dd'T'HH:mm:ss")
+            .appendOffset("+HH:mm", "Z")
             .toFormatter();
 
     public DateTimeDeserializer() {
@@ -52,11 +41,11 @@ public class DateTimeDeserializer extends JsonDeserializer<DateTime> {
     }
 
     @Override
-    public DateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
+    public ZonedDateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
         JsonToken currentToken = jsonParser.getCurrentToken();
         if (currentToken == JsonToken.VALUE_STRING) {
             String dateTimeAsString = jsonParser.getText().trim();
-            return formatter.parseDateTime(dateTimeAsString);
+            return formatter.parse(dateTimeAsString, ZonedDateTime::from);
         }
         throw deserializationContext.mappingException(getClass());
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/683b53af/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/joda/DateTimeModule.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/joda/DateTimeModule.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/joda/DateTimeModule.java
index f3385b4..8ce74f1 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/joda/DateTimeModule.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/joda/DateTimeModule.java
@@ -17,15 +17,15 @@
 package org.apache.camel.component.salesforce.internal.joda;
 
 
-import com.fasterxml.jackson.databind.module.SimpleModule;
+import java.time.ZonedDateTime;
 
-import org.joda.time.DateTime;
+import com.fasterxml.jackson.databind.module.SimpleModule;
 
 public class DateTimeModule extends SimpleModule {
 
     public DateTimeModule() {
         super();
-        addSerializer(DateTime.class, new DateTimeSerializer());
-        addDeserializer(DateTime.class, new DateTimeDeserializer());
+        addSerializer(ZonedDateTime.class, new DateTimeSerializer());
+        addDeserializer(ZonedDateTime.class, new DateTimeDeserializer());
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/683b53af/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/joda/DateTimeSerializer.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/joda/DateTimeSerializer.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/joda/DateTimeSerializer.java
index 1c40eb9..bcc216f 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/joda/DateTimeSerializer.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/joda/DateTimeSerializer.java
@@ -19,33 +19,21 @@ package org.apache.camel.component.salesforce.internal.joda;
 
 
 import java.io.IOException;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
 
 import com.fasterxml.jackson.core.JsonGenerator;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JsonSerializer;
 import com.fasterxml.jackson.databind.SerializerProvider;
 
-import org.joda.time.DateTime;
-import org.joda.time.format.DateTimeFormatter;
-import org.joda.time.format.DateTimeFormatterBuilder;
 
-public class DateTimeSerializer extends JsonSerializer<DateTime> {
+public class DateTimeSerializer extends JsonSerializer<ZonedDateTime> {
 
     private final DateTimeFormatter formatter = new DateTimeFormatterBuilder()
-            .appendYear(4, 4)
-            .appendLiteral('-')
-            .appendMonthOfYear(2)
-            .appendLiteral('-')
-            .appendDayOfMonth(2)
-            .appendLiteral('T')
-            .appendHourOfDay(2)
-            .appendLiteral(':')
-            .appendMinuteOfHour(2)
-            .appendLiteral(':')
-            .appendSecondOfMinute(2)
-            .appendLiteral('.')
-            .appendMillisOfSecond(3)
-            .appendTimeZoneOffset("Z", true, 2, 2)
+            .appendPattern("yyyy-MM-dd'T'HH:mm:ss")
+            .appendOffset("+HH:mm", "Z")
             .toFormatter();
 
     public DateTimeSerializer() {
@@ -53,8 +41,8 @@ public class DateTimeSerializer extends JsonSerializer<DateTime> {
     }
 
     @Override
-    public void serialize(DateTime dateTime, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException, JsonProcessingException {
-        jsonGenerator.writeString(formatter.print(dateTime));
+    public void serialize(ZonedDateTime dateTime, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException, JsonProcessingException {
+        jsonGenerator.writeString(formatter.format(dateTime));
     }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/683b53af/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java
index 390f161..af60692 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java
@@ -21,6 +21,8 @@ import java.io.InputStream;
 import java.nio.channels.Channels;
 import java.nio.channels.FileChannel;
 import java.nio.channels.ReadableByteChannel;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
 import java.util.HashMap;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
@@ -53,7 +55,6 @@ import org.eclipse.jetty.client.api.Request;
 import org.eclipse.jetty.http.HttpMethod;
 import org.eclipse.jetty.http.HttpStatus;
 import org.eclipse.jetty.util.ssl.SslContextFactory;
-import org.joda.time.DateTime;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
@@ -233,7 +234,7 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     @Test
-    @Ignore("Depends on a Task object with a datetime field")
+    //@Ignore("Depends on a Task object with a datetime field")
     public void testCreateUpdateDeleteTasks() throws Exception {
         doTestCreateUpdateDeleteTasks("");
         doTestCreateUpdateDeleteTasks("Xml");
@@ -242,7 +243,7 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     private void doTestCreateUpdateDeleteTasks(String suffix) throws Exception {
         Tasks__c taken = new Tasks__c();
         taken.setName("Task1");
-        taken.setStart__c(new DateTime(1700, 1, 2, 3, 4, 5, 6));
+        taken.setStart__c(ZonedDateTime.of(1700, 1, 2, 3, 4, 5, 6, ZoneId.systemDefault()));
         CreateSObjectResult result = template().requestBody("direct:createSObject" + suffix,
                 taken, CreateSObjectResult.class);
         assertNotNull(result);
@@ -252,7 +253,7 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
         // test JSON update
         // make the plane cheaper
         taken.setId(result.getId());
-        taken.setStart__c(new DateTime(1991, 1, 2, 3, 4, 5, 6));
+        taken.setStart__c(ZonedDateTime.of(1991, 1, 2, 3, 4, 5, 6, ZoneId.systemDefault()));
 
         assertNull(template().requestBodyAndHeader("direct:updateSObject" + suffix,
                 taken, SalesforceEndpointConfig.SOBJECT_ID, result.getId()));

http://git-wip-us.apache.org/repos/asf/camel/blob/683b53af/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java
index 0123b05..e0ed9ff 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java
@@ -16,13 +16,14 @@
  */
 package org.apache.camel.component.salesforce;
 
+import java.time.ZonedDateTime;
+
 import org.apache.camel.Message;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.salesforce.api.dto.CreateSObjectResult;
 import org.apache.camel.component.salesforce.dto.generated.Merchandise__c;
 import org.apache.camel.component.salesforce.internal.dto.QueryRecordsPushTopic;
-import org.joda.time.DateTime;
 import org.junit.Test;
 
 public class StreamingApiIntegrationTest extends AbstractSalesforceTestBase {
@@ -37,7 +38,7 @@ public class StreamingApiIntegrationTest extends AbstractSalesforceTestBase {
 
         Merchandise__c merchandise = new Merchandise__c();
         merchandise.setName("TestNotification");
-        merchandise.setDescription__c("Merchandise for testing Streaming API updated on " + new DateTime().toString());
+        merchandise.setDescription__c("Merchandise for testing Streaming API updated on " + ZonedDateTime.now().toString());
         merchandise.setPrice__c(9.99);
         merchandise.setTotal_Inventory__c(1000.0);
         CreateSObjectResult result = template().requestBody(

http://git-wip-us.apache.org/repos/asf/camel/blob/683b53af/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/dto/generated/Tasks__c.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/dto/generated/Tasks__c.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/dto/generated/Tasks__c.java
index fef222d..709db668 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/dto/generated/Tasks__c.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/dto/generated/Tasks__c.java
@@ -1,26 +1,14 @@
-/**
- * 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: Wed Jun 29 21:11:17 CEST 2016
  */
 package org.apache.camel.component.salesforce.dto.generated;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.thoughtworks.xstream.annotations.XStreamAlias;
+import java.time.ZonedDateTime;
 
+import com.thoughtworks.xstream.annotations.XStreamAlias;
 import org.apache.camel.component.salesforce.api.dto.AbstractSObjectBase;
-import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
 
 /**
  * Salesforce DTO for SObject Tasks__c
@@ -29,16 +17,29 @@ import org.joda.time.DateTime;
 public class Tasks__c extends AbstractSObjectBase {
 
     // Start__c
-    private DateTime Start__c;
+    private ZonedDateTime Start__c;
 
     @JsonProperty("Start__c")
-    public DateTime getStart__c() {
+    public ZonedDateTime getStart__c() {
         return this.Start__c;
     }
 
     @JsonProperty("Start__c")
-    public void setStart__c(DateTime Start__c) {
+    public void setStart__c(ZonedDateTime Start__c) {
         this.Start__c = Start__c;
     }
 
+    // Planned__c
+    private ZonedDateTime Planned__c;
+
+    @JsonProperty("Planned__c")
+    public ZonedDateTime getPlanned__c() {
+        return this.Planned__c;
+    }
+
+    @JsonProperty("Planned__c")
+    public void setPlanned__c(ZonedDateTime Planned__c) {
+        this.Planned__c = Planned__c;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/683b53af/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessorTest.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessorTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessorTest.java
index 2d322aa..d6a73d9 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessorTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessorTest.java
@@ -17,6 +17,8 @@
 package org.apache.camel.component.salesforce.internal.processor;
 
 import java.io.ByteArrayInputStream;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
 import java.util.Calendar;
 import java.util.Date;
 
@@ -33,7 +35,6 @@ import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.impl.DefaultExchange;
 import org.apache.commons.io.IOUtils;
 import org.hamcrest.core.Is;
-import org.joda.time.DateTime;
 import org.junit.Test;
 
 import static org.junit.Assert.*;
@@ -50,7 +51,7 @@ public class JsonRestProcessorTest {
         DefaultCamelContext context = new DefaultCamelContext();
         Exchange exchange = new DefaultExchange(context, ExchangePattern.InOut);
         TestObject doc = new TestObject();
-        doc.setCreationDate(new DateTime(1717, 1, 2, 3, 4, 5, 6));
+        doc.setCreationDate(ZonedDateTime.of(1717, 1, 2, 3, 4, 5, 6, ZoneId.systemDefault()));
 
         exchange.getIn().setBody(doc);
         ByteArrayInputStream is = (ByteArrayInputStream) jsonRestProcessor.getRequestStream(exchange);
@@ -60,13 +61,13 @@ public class JsonRestProcessorTest {
 
     private static class TestObject extends AbstractDTOBase {
 
-        private DateTime creationDate;
+        private ZonedDateTime creationDate;
 
-        public DateTime getCreationDate() {
+        public ZonedDateTime getCreationDate() {
             return creationDate;
         }
 
-        public void setCreationDate(DateTime creationDate) {
+        public void setCreationDate(ZonedDateTime creationDate) {
             this.creationDate = creationDate;
         }
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/683b53af/components/camel-salesforce/camel-salesforce-maven-plugin/README.md
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/README.md b/components/camel-salesforce/camel-salesforce-maven-plugin/README.md
index 328dcb3..54f42c4 100644
--- a/components/camel-salesforce/camel-salesforce-maven-plugin/README.md
+++ b/components/camel-salesforce/camel-salesforce-maven-plugin/README.md
@@ -89,4 +89,4 @@ The plugin should be configured for the rest of the properties, and can be execu
 
 	mvn camel-salesforce:generate -DcamelSalesforce.clientId=<clientid> -DcamelSalesforce.clientSecret=<clientsecret> -DcamelSalesforce.userName=<username> -DcamelSalesforce.password=<password>
 
-The generated DTOs use Jackson and XStream annotations. All Salesforce field types are supported. Date and time fields are mapped to Joda DateTime, and picklist fields are mapped to generated Java Enumerations. 
+The generated DTOs use Jackson and XStream annotations. All Salesforce field types are supported. Date and time fields are mapped to java.time.ZonedDateTime, and picklist fields are mapped to generated Java Enumerations.

http://git-wip-us.apache.org/repos/asf/camel/blob/683b53af/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java b/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java
index 287ca71..3462264 100644
--- a/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java
+++ b/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java
@@ -690,8 +690,7 @@ public class CamelSalesforceMojo extends AbstractMojo {
                 {"byte", "Byte"},
 //                {"QName", "javax.xml.namespace.QName"},
 
-//                {"dateTime", "javax.xml.datatype.XMLGregorianCalendar"},
-                {"dateTime", "org.joda.time.DateTime"},
+                {"dateTime", "java.time.ZonedDateTime"},
 
                     // the blob base64Binary type is mapped to String URL for retrieving the blob
                 {"base64Binary", "String"},
@@ -702,11 +701,11 @@ public class CamelSalesforceMojo extends AbstractMojo {
                 {"unsignedByte", "Short"},
 
 //                {"time", "javax.xml.datatype.XMLGregorianCalendar"},
-                {"time", "org.joda.time.DateTime"},
+                {"time", "java.time.ZonedDateTime"},
 //                {"date", "javax.xml.datatype.XMLGregorianCalendar"},
-                {"date", "org.joda.time.DateTime"},
+                {"date", "java.time.ZonedDateTime"},
 //                {"g", "javax.xml.datatype.XMLGregorianCalendar"},
-                {"g", "org.joda.time.DateTime"},
+                {"g", "java.time.ZonedDateTime"},
 
                     // Salesforce maps any types like string, picklist, reference, etc. to string
                 {"anyType", "String"},


[2/2] camel git commit: salesforce: ignore integrationtest, changed documentation

Posted by an...@apache.org.
salesforce: ignore integrationtest, changed documentation


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

Branch: refs/heads/master
Commit: ddc89511d7bd24930e29b7a2bc695e1bf29c49b6
Parents: 683b53a
Author: Arno Noordover <an...@users.noreply.github.com>
Authored: Sun Jul 3 19:42:26 2016 +0200
Committer: Arno Noordover <an...@users.noreply.github.com>
Committed: Sun Jul 3 19:42:26 2016 +0200

----------------------------------------------------------------------
 .../src/main/docs/salesforce.adoc               | 270 +++++--------------
 .../salesforce/RestApiIntegrationTest.java      |   2 +-
 2 files changed, 70 insertions(+), 202 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ddc89511/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce.adoc
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce.adoc b/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce.adoc
index 1fb5aa7..f931960 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce.adoc
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce.adoc
@@ -200,47 +200,33 @@ Options
 
 
 
+
 // component options: START
 The Salesforce component supports 16 options which are listed below.
 
 
 
 {% raw %}
-
-loginConfig (SalesforceLoginConfig)::
-  To use the shared SalesforceLoginConfig as login configuration
-config (SalesforceEndpointConfig)::
-  To use the shared SalesforceLoginConfig as configuration
-httpClientProperties (Map)::
-  Used for configuring HTTP client properties as key/value pairs
-sslContextParameters (SSLContextParameters)::
-  To configure security using SSLContextParameters
-httpProxyHost (String)::
-  To configure HTTP proxy host
-httpProxyPort (Integer)::
-  To configure HTTP proxy port
-httpProxyUsername (String)::
-  To configure HTTP proxy username
-httpProxyPassword (String)::
-  To configure HTTP proxy password
-isHttpProxySocks4 (boolean)::
-  Enable for Socks4 proxy false by default
-isHttpProxySecure (boolean)::
-  Enable for TLS connections true by default
-httpProxyIncludedAddresses (Set)::
-  HTTP proxy included addresses
-httpProxyExcludedAddresses (Set)::
-  HTTP proxy excluded addresses
-httpProxyAuthUri (String)::
-  HTTP proxy authentication URI
-httpProxyRealm (String)::
-  HTTP proxy authentication realm
-httpProxyUseDigestAuth (boolean)::
-  Use HTTP proxy Digest authentication false by default
-packages (String[])::
-  Package names to scan for DTO classes (multiple packages can be separated by comma).
-
-
+[width="100%",cols="2s,1m,8",options="header"]
+|=======================================================================
+| Name | Java Type | Description
+| loginConfig | SalesforceLoginConfig | To use the shared SalesforceLoginConfig as login configuration
+| config | SalesforceEndpointConfig | To use the shared SalesforceLoginConfig as configuration
+| httpClientProperties | Map | Used for configuring HTTP client properties as key/value pairs
+| sslContextParameters | SSLContextParameters | To configure security using SSLContextParameters
+| httpProxyHost | String | To configure HTTP proxy host
+| httpProxyPort | Integer | To configure HTTP proxy port
+| httpProxyUsername | String | To configure HTTP proxy username
+| httpProxyPassword | String | To configure HTTP proxy password
+| isHttpProxySocks4 | boolean | Enable for Socks4 proxy false by default
+| isHttpProxySecure | boolean | Enable for TLS connections true by default
+| httpProxyIncludedAddresses | Set | HTTP proxy included addresses
+| httpProxyExcludedAddresses | Set | HTTP proxy excluded addresses
+| httpProxyAuthUri | String | HTTP proxy authentication URI
+| httpProxyRealm | String | HTTP proxy authentication realm
+| httpProxyUseDigestAuth | boolean | Use HTTP proxy Digest authentication false by default
+| packages | String[] | Package names to scan for DTO classes (multiple packages can be separated by comma).
+|=======================================================================
 {% endraw %}
 // component options: END
 
@@ -248,180 +234,61 @@ packages (String[])::
 
 
 
+
+
 // endpoint options: START
 The Salesforce component supports 39 endpoint options which are listed below:
 
 {% raw %}
-
-common::
-
-operationName (OperationName):::
-
-  
-
-topicName (String):::
-
-  
-
-apexMethod (String):::
-
-  APEX method name
-
-apexQueryParams (Map):::
-
-  Query params for APEX method
-
-apexUrl (String):::
-
-  APEX method URL
-
-apiVersion (String):::
-
-  Salesforce API version defaults to SalesforceEndpointConfig.DEFAULT_VERSION
-
-batchId (String):::
-
-  Bulk API Batch ID
-
-contentType (ContentType):::
-
-  Bulk API content type one of XML CSV ZIP_XML ZIP_CSV
-
-defaultReplayId (Integer):::
-
-  Default replayId setting if no value is found in link initialReplayIdMap
-
-format (PayloadFormat):::
-
-  Payload format to use for Salesforce API calls either JSON or XML defaults to JSON
-
-httpClient (SalesforceHttpClient):::
-
-  Custom Jetty Http Client to use to connect to Salesforce.
-
-includeDetails (Boolean):::
-
-  Include details in Salesforce1 Analytics report defaults to false.
-
-initialReplayIdMap (Map):::
-
-  Replay IDs to start from per channel name.
-
-instanceId (String):::
-
-  Salesforce1 Analytics report execution instance ID
-
-jobId (String):::
-
-  Bulk API Job ID
-
-notifyForFields (NotifyForFieldsEnum):::
-
-  Notify for fields options are ALL REFERENCED SELECT WHERE
-
-notifyForOperationCreate (Boolean):::
-
-  Notify for create operation defaults to false (API version = 29.0)
-
-notifyForOperationDelete (Boolean):::
-
-  Notify for delete operation defaults to false (API version = 29.0)
-
-notifyForOperations (NotifyForOperationsEnum):::
-
-  Notify for operations options are ALL CREATE EXTENDED UPDATE (API version 29.0)
-
-notifyForOperationUndelete (Boolean):::
-
-  Notify for un-delete operation defaults to false (API version = 29.0)
-
-notifyForOperationUpdate (Boolean):::
-
-  Notify for update operation defaults to false (API version = 29.0)
-
-objectMapper (ObjectMapper):::
-
-  Custom Jackson ObjectMapper to use when serializing/deserializing Salesforce objects.
-
-reportId (String):::
-
-  Salesforce1 Analytics report Id
-
-reportMetadata (ReportMetadata):::
-
-  Salesforce1 Analytics report metadata for filtering
-
-resultId (String):::
-
-  Bulk API Result ID
-
-sObjectBlobFieldName (String):::
-
-  SObject blob field name
-
-sObjectClass (String):::
-
-  Fully qualified SObject class name usually generated using camel-salesforce-maven-plugin
-
-sObjectFields (String):::
-
-  SObject fields to retrieve
-
-sObjectId (String):::
-
-  SObject ID if required by API
-
-sObjectIdName (String):::
-
-  SObject external ID field name
-
-sObjectIdValue (String):::
-
-  SObject external ID field value
-
-sObjectName (String):::
-
-  SObject name if required or supported by API
-
-sObjectQuery (String):::
-
-  Salesforce SOQL query string
-
-sObjectSearch (String):::
-
-  Salesforce SOSL search string
-
-updateTopic (boolean; default: false):::
-
-  Whether to update an existing Push Topic when using the Streaming API defaults to false
-
-advanced::
-
-exchangePattern (ExchangePattern; default: InOnly):::
-
-  Sets the default exchange pattern when creating an exchange
-
-synchronous (boolean; default: false):::
-
-  Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
-
-consumer (advanced)::
-
-exceptionHandler (ExceptionHandler):::
-
-  To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
-
-consumer::
-
-bridgeErrorHandler (boolean; default: false):::
-
-  Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored.
-
+[width="100%",cols="2s,1,1m,1m,5",options="header"]
+|=======================================================================
+| Name | Group | Default | Java Type | Description
+| operationName | common |  | OperationName | 
+| topicName | common |  | String | 
+| apexMethod | common |  | String | APEX method name
+| apexQueryParams | common |  | Map | Query params for APEX method
+| apexUrl | common |  | String | APEX method URL
+| apiVersion | common |  | String | Salesforce API version defaults to SalesforceEndpointConfig.DEFAULT_VERSION
+| batchId | common |  | String | Bulk API Batch ID
+| contentType | common |  | ContentType | Bulk API content type one of XML CSV ZIP_XML ZIP_CSV
+| defaultReplayId | common |  | Integer | Default replayId setting if no value is found in link initialReplayIdMap
+| format | common |  | PayloadFormat | Payload format to use for Salesforce API calls either JSON or XML defaults to JSON
+| httpClient | common |  | SalesforceHttpClient | Custom Jetty Http Client to use to connect to Salesforce.
+| includeDetails | common |  | Boolean | Include details in Salesforce1 Analytics report defaults to false.
+| initialReplayIdMap | common |  | Map | Replay IDs to start from per channel name.
+| instanceId | common |  | String | Salesforce1 Analytics report execution instance ID
+| jobId | common |  | String | Bulk API Job ID
+| notifyForFields | common |  | NotifyForFieldsEnum | Notify for fields options are ALL REFERENCED SELECT WHERE
+| notifyForOperationCreate | common |  | Boolean | Notify for create operation defaults to false (API version = 29.0)
+| notifyForOperationDelete | common |  | Boolean | Notify for delete operation defaults to false (API version = 29.0)
+| notifyForOperations | common |  | NotifyForOperationsEnum | Notify for operations options are ALL CREATE EXTENDED UPDATE (API version 29.0)
+| notifyForOperationUndelete | common |  | Boolean | Notify for un-delete operation defaults to false (API version = 29.0)
+| notifyForOperationUpdate | common |  | Boolean | Notify for update operation defaults to false (API version = 29.0)
+| objectMapper | common |  | ObjectMapper | Custom Jackson ObjectMapper to use when serializing/deserializing Salesforce objects.
+| reportId | common |  | String | Salesforce1 Analytics report Id
+| reportMetadata | common |  | ReportMetadata | Salesforce1 Analytics report metadata for filtering
+| resultId | common |  | String | Bulk API Result ID
+| sObjectBlobFieldName | common |  | String | SObject blob field name
+| sObjectClass | common |  | String | Fully qualified SObject class name usually generated using camel-salesforce-maven-plugin
+| sObjectFields | common |  | String | SObject fields to retrieve
+| sObjectId | common |  | String | SObject ID if required by API
+| sObjectIdName | common |  | String | SObject external ID field name
+| sObjectIdValue | common |  | String | SObject external ID field value
+| sObjectName | common |  | String | SObject name if required or supported by API
+| sObjectQuery | common |  | String | Salesforce SOQL query string
+| sObjectSearch | common |  | String | Salesforce SOSL search string
+| updateTopic | common | false | boolean | Whether to update an existing Push Topic when using the Streaming API defaults to false
+| bridgeErrorHandler | consumer | false | boolean | Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored.
+| exceptionHandler | consumer (advanced) |  | ExceptionHandler | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
+| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange
+| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
+|=======================================================================
 {% endraw %}
 // endpoint options: END
 
 
 
+
 For obvious security reasons it is recommended that the clientId,
 clientSecret, userName and password fields be not set in the pom.xml.  
 The plugin should be configured for the rest of the properties, and can
@@ -429,7 +296,8 @@ be executed using the following command:
 
 [source,java]
 ---------------------------------------------------------------------------------------------------------------------------------
-    mvn camel-salesforce:generate -DclientId=<clientid> -DclientSecret=<clientsecret> -DuserName=<username> -Dpassword=<password>
+    mvn camel-salesforce:generate -DcamelSalesforce.clientId=<clientid> -DcamelSalesforce.clientSecret=<clientsecret> \
+    -DcamelSalesforce.userName=<username> -DcamelSalesforce.password=<password>
 ---------------------------------------------------------------------------------------------------------------------------------
 
 The generated DTOs use Jackson and XStream annotations. All Salesforce

http://git-wip-us.apache.org/repos/asf/camel/blob/ddc89511/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java
index af60692..486447a 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java
@@ -234,7 +234,7 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     @Test
-    //@Ignore("Depends on a Task object with a datetime field")
+    @Ignore("Depends on a Task object with a datetime field")
     public void testCreateUpdateDeleteTasks() throws Exception {
         doTestCreateUpdateDeleteTasks("");
         doTestCreateUpdateDeleteTasks("Xml");