Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D4D1210789 for ; Wed, 5 Jun 2013 15:12:50 +0000 (UTC) Received: (qmail 91418 invoked by uid 500); 5 Jun 2013 15:12:47 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 91104 invoked by uid 500); 5 Jun 2013 15:12:47 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 90283 invoked by uid 99); 5 Jun 2013 15:12:45 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jun 2013 15:12:45 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3176E3159C8; Wed, 5 Jun 2013 15:12:45 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Date: Wed, 05 Jun 2013 15:12:47 -0000 Message-Id: In-Reply-To: <325802c52a634d95939d3c86dbd5b82d@git.apache.org> References: <325802c52a634d95939d3c86dbd5b82d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [03/11] CAMEL-6428: Fixed CS http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/ObjectFactory.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/ObjectFactory.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/ObjectFactory.java index dc476ac..c0dbfc2 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/ObjectFactory.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/ObjectFactory.java @@ -23,18 +23,17 @@ import javax.xml.namespace.QName; /** - * This object contains factory methods for each - * Java content interface and Java element interface + * This object contains factory methods for each + * Java content interface and Java element interface * in the org.apache.camel.component.salesforce.api.dto.bulk package. - *

An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are * provided in this class. - * */ @XmlRegistry public class ObjectFactory { @@ -49,14 +48,12 @@ public class ObjectFactory { /** * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.apache.camel.component.salesforce.api.dto.bulk - * */ public ObjectFactory() { } /** * Create an instance of {@link SObject } - * */ public SObject createSObject() { return new SObject(); @@ -64,7 +61,6 @@ public class ObjectFactory { /** * Create an instance of {@link ResultError } - * */ public ResultError createResultError() { return new ResultError(); @@ -72,7 +68,6 @@ public class ObjectFactory { /** * Create an instance of {@link BatchInfo } - * */ public BatchInfo createBatchInfo() { return new BatchInfo(); @@ -80,7 +75,6 @@ public class ObjectFactory { /** * Create an instance of {@link BatchResult } - * */ public BatchResult createBatchResult() { return new BatchResult(); @@ -88,7 +82,6 @@ public class ObjectFactory { /** * Create an instance of {@link QueryResultList } - * */ public QueryResultList createQueryResultList() { return new QueryResultList(); @@ -96,7 +89,6 @@ public class ObjectFactory { /** * Create an instance of {@link Error } - * */ public Error createError() { return new Error(); @@ -104,7 +96,6 @@ public class ObjectFactory { /** * Create an instance of {@link BatchInfoList } - * */ public BatchInfoList createBatchInfoList() { return new BatchInfoList(); @@ -112,7 +103,6 @@ public class ObjectFactory { /** * Create an instance of {@link Result } - * */ public Result createResult() { return new Result(); @@ -120,7 +110,6 @@ public class ObjectFactory { /** * Create an instance of {@link JobInfo } - * */ public JobInfo createJobInfo() { return new JobInfo(); @@ -128,7 +117,6 @@ public class ObjectFactory { /** * Create an instance of {@link QueryResult } - * */ public QueryResult createQueryResult() { return new QueryResult(); @@ -136,7 +124,6 @@ public class ObjectFactory { /** * Create an instance of {@link javax.xml.bind.JAXBElement }{@code <}{@link JobInfo }{@code >}} - * */ @XmlElementDecl(namespace = "http://www.force.com/2009/06/asyncapi/dataload", name = "jobInfo") public JAXBElement createJobInfo(JobInfo value) { @@ -145,7 +132,6 @@ public class ObjectFactory { /** * Create an instance of {@link javax.xml.bind.JAXBElement }{@code <}{@link BatchInfo }{@code >}} - * */ @XmlElementDecl(namespace = "http://www.force.com/2009/06/asyncapi/dataload", name = "batchInfo") public JAXBElement createBatchInfo(BatchInfo value) { @@ -154,7 +140,6 @@ public class ObjectFactory { /** * Create an instance of {@link javax.xml.bind.JAXBElement }{@code <}{@link Error }{@code >}} - * */ @XmlElementDecl(namespace = "http://www.force.com/2009/06/asyncapi/dataload", name = "error") public JAXBElement createError(Error value) { @@ -163,7 +148,6 @@ public class ObjectFactory { /** * Create an instance of {@link javax.xml.bind.JAXBElement }{@code <}{@link BatchResult }{@code >}} - * */ @XmlElementDecl(namespace = "http://www.force.com/2009/06/asyncapi/dataload", name = "results") public JAXBElement createResults(BatchResult value) { @@ -172,7 +156,6 @@ public class ObjectFactory { /** * Create an instance of {@link javax.xml.bind.JAXBElement }{@code <}{@link QueryResultList }{@code >}} - * */ @XmlElementDecl(namespace = "http://www.force.com/2009/06/asyncapi/dataload", name = "result-list") public JAXBElement createResultList(QueryResultList value) { @@ -181,7 +164,6 @@ public class ObjectFactory { /** * Create an instance of {@link javax.xml.bind.JAXBElement }{@code <}{@link BatchInfoList }{@code >}} - * */ @XmlElementDecl(namespace = "http://www.force.com/2009/06/asyncapi/dataload", name = "batchInfoList") public JAXBElement createBatchInfoList(BatchInfoList value) { @@ -190,7 +172,6 @@ public class ObjectFactory { /** * Create an instance of {@link javax.xml.bind.JAXBElement }{@code <}{@link QueryResult }{@code >}} - * */ @XmlElementDecl(namespace = "http://www.force.com/2009/06/asyncapi/dataload", name = "queryResult") public JAXBElement createQueryResult(QueryResult value) { http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/OperationEnum.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/OperationEnum.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/OperationEnum.java index 3f25e66..a3f6f5b 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/OperationEnum.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/OperationEnum.java @@ -23,9 +23,9 @@ import javax.xml.bind.annotation.XmlType; /** *

Java class for OperationEnum. - * + *

*

The following schema fragment specifies the expected content contained within this class. - *

+ *

*

  * <simpleType name="OperationEnum">
  *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
@@ -38,7 +38,6 @@ import javax.xml.bind.annotation.XmlType;
  *   </restriction>
  * </simpleType>
  * 
- * */ @XmlType(name = "OperationEnum") @XmlEnum @@ -67,7 +66,7 @@ public enum OperationEnum { } public static OperationEnum fromValue(String v) { - for (OperationEnum c: OperationEnum.values()) { + for (OperationEnum c : OperationEnum.values()) { if (c.value.equals(v)) { return c; } http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/QueryResult.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/QueryResult.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/QueryResult.java index 702d993..aaaf1b1 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/QueryResult.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/QueryResult.java @@ -16,19 +16,19 @@ */ package org.apache.camel.component.salesforce.api.dto.bulk; +import java.util.ArrayList; +import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; -import java.util.ArrayList; -import java.util.List; /** *

Java class for QueryResult complex type. - * + *

*

The following schema fragment specifies the expected content contained within this class. - * + *

*

  * <complexType name="QueryResult">
  *   <complexContent>
@@ -40,12 +40,10 @@ import java.util.List;
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "QueryResult", propOrder = { - "records" + "records" }) public class QueryResult { @@ -54,25 +52,23 @@ public class QueryResult { /** * Gets the value of the records property. - * - *

+ *

+ *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the records property. - * - *

+ *

+ *

* For example, to add a new item, do as follows: *

      *    getRecords().add(newItem);
      * 
- * - * - *

+ *

+ *

+ *

* Objects of the following type(s) are allowed in the list * {@link SObject } - * - * */ public List getRecords() { if (records == null) { http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/QueryResultList.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/QueryResultList.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/QueryResultList.java index 6dbda5a..89339e3 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/QueryResultList.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/QueryResultList.java @@ -16,18 +16,18 @@ */ package org.apache.camel.component.salesforce.api.dto.bulk; +import java.util.ArrayList; +import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; -import java.util.ArrayList; -import java.util.List; /** *

Java class for QueryResultList complex type. - * + *

*

The following schema fragment specifies the expected content contained within this class. - * + *

*

  * <complexType name="QueryResultList">
  *   <complexContent>
@@ -39,12 +39,10 @@ import java.util.List;
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "QueryResultList", propOrder = { - "result" + "result" }) public class QueryResultList { @@ -52,25 +50,23 @@ public class QueryResultList { /** * Gets the value of the result property. - * - *

+ *

+ *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the result property. - * - *

+ *

+ *

* For example, to add a new item, do as follows: *

      *    getResult().add(newItem);
      * 
- * - * - *

+ *

+ *

+ *

* Objects of the following type(s) are allowed in the list * {@link String } - * - * */ public List getResult() { if (result == null) { http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/Result.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/Result.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/Result.java index c36d9aa..b8406c3 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/Result.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/Result.java @@ -16,18 +16,18 @@ */ package org.apache.camel.component.salesforce.api.dto.bulk; +import java.util.ArrayList; +import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; -import java.util.ArrayList; -import java.util.List; /** *

Java class for Result complex type. - * + *

*

The following schema fragment specifies the expected content contained within this class. - * + *

*

  * <complexType name="Result">
  *   <complexContent>
@@ -42,15 +42,13 @@ import java.util.List;
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Result", propOrder = { - "errors", - "id", - "success", - "created" + "errors", + "id", + "success", + "created" }) public class Result { @@ -61,25 +59,23 @@ public class Result { /** * Gets the value of the errors property. - * - *

+ *

+ *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the errors property. - * - *

+ *

+ *

* For example, to add a new item, do as follows: *

      *    getErrors().add(newItem);
      * 
- * - * - *

+ *

+ *

+ *

* Objects of the following type(s) are allowed in the list * {@link ResultError } - * - * */ public List getErrors() { if (errors == null) { @@ -90,11 +86,9 @@ public class Result { /** * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * + * + * @return possible object is + * {@link String } */ public String getId() { return id; @@ -102,11 +96,9 @@ public class Result { /** * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * + * + * @param value allowed object is + * {@link String } */ public void setId(String value) { this.id = value; @@ -114,7 +106,6 @@ public class Result { /** * Gets the value of the success property. - * */ public boolean isSuccess() { return success; @@ -122,7 +113,6 @@ public class Result { /** * Sets the value of the success property. - * */ public void setSuccess(boolean value) { this.success = value; @@ -130,7 +120,6 @@ public class Result { /** * Gets the value of the created property. - * */ public boolean isCreated() { return created; @@ -138,7 +127,6 @@ public class Result { /** * Sets the value of the created property. - * */ public void setCreated(boolean value) { this.created = value; http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/ResultError.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/ResultError.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/ResultError.java index fabccab..c837888 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/ResultError.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/ResultError.java @@ -16,19 +16,19 @@ */ package org.apache.camel.component.salesforce.api.dto.bulk; +import java.util.ArrayList; +import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; -import java.util.ArrayList; -import java.util.List; /** *

Java class for ResultError complex type. - * + *

*

The following schema fragment specifies the expected content contained within this class. - * + *

*

  * <complexType name="ResultError">
  *   <complexContent>
@@ -42,14 +42,12 @@ import java.util.List;
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ResultError", propOrder = { - "fields", - "message", - "statusCode" + "fields", + "message", + "statusCode" }) public class ResultError { @@ -62,25 +60,23 @@ public class ResultError { /** * Gets the value of the fields property. - * - *

+ *

+ *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the fields property. - * - *

+ *

+ *

* For example, to add a new item, do as follows: *

      *    getFields().add(newItem);
      * 
- * - * - *

+ *

+ *

+ *

* Objects of the following type(s) are allowed in the list * {@link String } - * - * */ public List getFields() { if (fields == null) { @@ -91,11 +87,9 @@ public class ResultError { /** * Gets the value of the message property. - * - * @return - * possible object is - * {@link String } - * + * + * @return possible object is + * {@link String } */ public String getMessage() { return message; @@ -103,11 +97,9 @@ public class ResultError { /** * Sets the value of the message property. - * - * @param value - * allowed object is - * {@link String } - * + * + * @param value allowed object is + * {@link String } */ public void setMessage(String value) { this.message = value; @@ -115,11 +107,9 @@ public class ResultError { /** * Gets the value of the statusCode property. - * - * @return - * possible object is - * {@link StatusCode } * + * @return possible object is + * {@link StatusCode } */ public StatusCode getStatusCode() { return statusCode; @@ -128,10 +118,8 @@ public class ResultError { /** * Sets the value of the statusCode property. * - * @param value - * allowed object is - * {@link StatusCode } - * + * @param value allowed object is + * {@link StatusCode } */ public void setStatusCode(StatusCode value) { this.statusCode = value; http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/SObject.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/SObject.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/SObject.java index aa9c2c5..ff08913 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/SObject.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/SObject.java @@ -16,16 +16,20 @@ */ package org.apache.camel.component.salesforce.api.dto.bulk; -import javax.xml.bind.annotation.*; import java.util.ArrayList; import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; /** *

Java class for sObject complex type. - * + *

*

The following schema fragment specifies the expected content contained within this class. - * + *

*

  * <complexType name="sObject">
  *   <complexContent>
@@ -39,14 +43,12 @@ import java.util.List;
  *   </complexContent>
  * </complexType>
  * 
- * - * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "sObject", propOrder = { - "type", - "id", - "any" + "type", + "id", + "any" }) public class SObject { @@ -59,11 +61,9 @@ public class SObject { /** * Gets the value of the type property. - * - * @return - * possible object is - * {@link String } - * + * + * @return possible object is + * {@link String } */ public String getType() { return type; @@ -71,11 +71,9 @@ public class SObject { /** * Sets the value of the type property. - * - * @param value - * allowed object is - * {@link String } - * + * + * @param value allowed object is + * {@link String } */ public void setType(String value) { this.type = value; @@ -83,11 +81,9 @@ public class SObject { /** * Gets the value of the id property. - * - * @return - * possible object is - * {@link String } - * + * + * @return possible object is + * {@link String } */ public String getId() { return id; @@ -95,11 +91,9 @@ public class SObject { /** * Sets the value of the id property. - * - * @param value - * allowed object is - * {@link String } - * + * + * @param value allowed object is + * {@link String } */ public void setId(String value) { this.id = value; @@ -107,26 +101,24 @@ public class SObject { /** * Gets the value of the any property. - * - *

+ *

+ *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a set method for the any property. - * - *

+ *

+ *

* For example, to add a new item, do as follows: *

      *    getAny().add(newItem);
      * 
- * - * - *

+ *

+ *

+ *

* Objects of the following type(s) are allowed in the list * {@link Object } * {@link org.w3c.dom.Element } - * - * */ public List getAny() { if (any == null) { http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/StatusCode.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/StatusCode.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/StatusCode.java index d4e3493..4106109 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/StatusCode.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/StatusCode.java @@ -22,9 +22,9 @@ import javax.xml.bind.annotation.XmlType; /** *

Java class for StatusCode. - * + *

*

The following schema fragment specifies the expected content contained within this class. - *

+ *

*

  * <simpleType name="StatusCode">
  *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
@@ -204,7 +204,6 @@ import javax.xml.bind.annotation.XmlType;
  *   </restriction>
  * </simpleType>
  * 
- * */ @XmlType(name = "StatusCode") @XmlEnum http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/package-info.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/package-info.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/package-info.java index ae2b9ee..4eccf4d 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/package-info.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/package-info.java @@ -14,5 +14,4 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.force.com/2009/06/asyncapi/dataload", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) -package org.apache.camel.component.salesforce.api.dto.bulk; +@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.force.com/2009/06/asyncapi/dataload", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package org.apache.camel.component.salesforce.api.dto.bulk; http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/SalesforceSession.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/SalesforceSession.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/SalesforceSession.java index a16a2a3..d60c1a0 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/SalesforceSession.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/SalesforceSession.java @@ -16,7 +16,18 @@ */ package org.apache.camel.component.salesforce.internal; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.concurrent.CopyOnWriteArraySet; + import org.apache.camel.Service; +import org.apache.camel.component.salesforce.SalesforceLoginConfig; +import org.apache.camel.component.salesforce.api.SalesforceException; +import org.apache.camel.component.salesforce.api.dto.RestError; +import org.apache.camel.component.salesforce.internal.dto.LoginError; +import org.apache.camel.component.salesforce.internal.dto.LoginToken; import org.codehaus.jackson.map.ObjectMapper; import org.eclipse.jetty.client.ContentExchange; import org.eclipse.jetty.client.HttpClient; @@ -27,18 +38,9 @@ import org.eclipse.jetty.io.Buffer; import org.eclipse.jetty.io.ByteArrayBuffer; import org.eclipse.jetty.util.StringUtil; import org.eclipse.jetty.util.UrlEncoded; -import org.apache.camel.component.salesforce.SalesforceLoginConfig; -import org.apache.camel.component.salesforce.api.SalesforceException; -import org.apache.camel.component.salesforce.api.dto.RestError; -import org.apache.camel.component.salesforce.internal.dto.LoginError; -import org.apache.camel.component.salesforce.internal.dto.LoginToken; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.IOException; -import java.util.*; -import java.util.concurrent.CopyOnWriteArraySet; - public class SalesforceSession implements Service { private static final String OAUTH2_REVOKE_PATH = "/services/oauth2/revoke?token="; @@ -120,7 +122,7 @@ public class SalesforceSession implements Service { // set form content loginPost.setRequestContent(new ByteArrayBuffer( - nvps.encode(StringUtil.__UTF8, true).getBytes(StringUtil.__UTF8))); + nvps.encode(StringUtil.__UTF8, true).getBytes(StringUtil.__UTF8))); httpClient.send(loginPost); // wait for the login to finish @@ -135,7 +137,7 @@ public class SalesforceSession implements Service { case HttpStatus.OK_200: // parse the response to get token LoginToken token = objectMapper.readValue(responseContent, - LoginToken.class); + LoginToken.class); // don't log token or instance URL for security reasons LOG.info("Login successful"); @@ -156,26 +158,26 @@ public class SalesforceSession implements Service { case HttpStatus.BAD_REQUEST_400: // parse the response to get error final LoginError error = objectMapper.readValue(responseContent, - LoginError.class); + LoginError.class); final String msg = String.format("Login error code:[%s] description:[%s]", - error.getError(), error.getErrorDescription()); + error.getError(), error.getErrorDescription()); final List errors = new ArrayList(); errors.add(new RestError(msg, error.getErrorDescription())); throw new SalesforceException(errors, HttpStatus.BAD_REQUEST_400); default: throw new SalesforceException( - String.format("Login error status:[%s] reason:[%s]", - responseStatus, loginPost.getReason()), - responseStatus); + String.format("Login error status:[%s] reason:[%s]", + responseStatus, loginPost.getReason()), + responseStatus); } break; case HttpExchange.STATUS_EXCEPTED: final Throwable ex = loginPost.getException(); throw new SalesforceException( - String.format("Unexpected login exception: %s", ex.getMessage()), - ex); + String.format("Unexpected login exception: %s", ex.getMessage()), + ex); case HttpExchange.STATUS_CANCELLED: throw new SalesforceException("Login request CANCELLED!", null); @@ -219,9 +221,9 @@ public class SalesforceSession implements Service { LOG.info("Logout successful"); } else { throw new SalesforceException( - String.format("Logout error, code: [%s] reason: [%s]", - statusCode, reason), - statusCode); + String.format("Logout error, code: [%s] reason: [%s]", + statusCode, reason), + statusCode); } break; @@ -330,6 +332,7 @@ public class SalesforceSession implements Service { public static interface SalesforceSessionListener { void onLogin(String accessToken, String instanceUrl); + void onLogout(); } http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/AbstractClientBase.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/AbstractClientBase.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/AbstractClientBase.java index 6fe7028..1c058b9 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/AbstractClientBase.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/AbstractClientBase.java @@ -16,7 +16,13 @@ */ package org.apache.camel.component.salesforce.internal.client; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; + import org.apache.camel.Service; +import org.apache.camel.component.salesforce.api.SalesforceException; +import org.apache.camel.component.salesforce.internal.SalesforceSession; import org.eclipse.jetty.client.ContentExchange; import org.eclipse.jetty.client.HttpClient; import org.eclipse.jetty.client.HttpEventListenerWrapper; @@ -25,15 +31,9 @@ import org.eclipse.jetty.http.HttpSchemes; import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.io.Buffer; import org.eclipse.jetty.util.StringUtil; -import org.apache.camel.component.salesforce.api.SalesforceException; -import org.apache.camel.component.salesforce.internal.SalesforceSession; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; - public abstract class AbstractClientBase implements SalesforceSession.SalesforceSessionListener, Service { protected final Logger LOG = LoggerFactory.getLogger(getClass()); @@ -107,13 +107,13 @@ public abstract class AbstractClientBase implements SalesforceSession.Salesforce try { final boolean isHttps = HttpSchemes.HTTPS.equals(String.valueOf(request.getScheme())); request.setEventListener(new SalesforceSecurityListener( - httpClient.getDestination(request.getAddress(), isHttps), - request, session, accessToken)); + httpClient.getDestination(request.getAddress(), isHttps), + request, session, accessToken)); } catch (IOException e) { // propagate exception callback.onResponse(null, new SalesforceException( - String.format("Error registering security listener: %s", e.getMessage()), - e)); + String.format("Error registering security listener: %s", e.getMessage()), + e)); } // use HttpEventListener for lifecycle events @@ -125,21 +125,21 @@ public abstract class AbstractClientBase implements SalesforceSession.Salesforce public void onConnectionFailed(Throwable ex) { super.onConnectionFailed(ex); callback.onResponse(null, - new SalesforceException("Connection error: " + ex.getMessage(), ex)); + new SalesforceException("Connection error: " + ex.getMessage(), ex)); } @Override public void onException(Throwable ex) { super.onException(ex); callback.onResponse(null, - new SalesforceException("Unexpected exception: " + ex.getMessage(), ex)); + new SalesforceException("Unexpected exception: " + ex.getMessage(), ex)); } @Override public void onExpire() { super.onExpire(); callback.onResponse(null, - new SalesforceException("Request expired", null)); + new SalesforceException("Request expired", null)); } @Override @@ -149,7 +149,7 @@ public abstract class AbstractClientBase implements SalesforceSession.Salesforce final int responseStatus = request.getResponseStatus(); if (responseStatus < HttpStatus.OK_200 || responseStatus >= HttpStatus.MULTIPLE_CHOICES_300) { final String msg = String.format("Error {%s:%s} executing {%s:%s}", - responseStatus, reason, request.getMethod(), request.getRequestURI()); + responseStatus, reason, request.getMethod(), request.getRequestURI()); final SalesforceException exception = new SalesforceException(msg, createRestException(request)); exception.setStatusCode(responseStatus); callback.onResponse(null, exception); http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/BulkApiClient.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/BulkApiClient.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/BulkApiClient.java index b00e3fd..f388bc7 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/BulkApiClient.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/BulkApiClient.java @@ -16,12 +16,14 @@ */ package org.apache.camel.component.salesforce.internal.client; -import org.apache.camel.component.salesforce.api.SalesforceException; -import org.apache.camel.component.salesforce.api.dto.bulk.*; - import java.io.InputStream; import java.util.List; +import org.apache.camel.component.salesforce.api.SalesforceException; +import org.apache.camel.component.salesforce.api.dto.bulk.BatchInfo; +import org.apache.camel.component.salesforce.api.dto.bulk.ContentType; +import org.apache.camel.component.salesforce.api.dto.bulk.JobInfo; + /** * Client interface for Salesforce Bulk API */ @@ -50,7 +52,7 @@ public interface BulkApiClient { /** * Creates a Bulk Job * - * @param jobInfo {@link JobInfo} with required fields + * @param jobInfo {@link JobInfo} with required fields * @param callback {@link JobInfoResponseCallback} to be invoked on response or error */ void createJob(JobInfo jobInfo, http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultBulkApiClient.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultBulkApiClient.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultBulkApiClient.java index b4899e5..81f467e 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultBulkApiClient.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultBulkApiClient.java @@ -16,6 +16,29 @@ */ package org.apache.camel.component.salesforce.internal.client; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.util.Arrays; +import java.util.Collections; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Marshaller; +import javax.xml.bind.Unmarshaller; +import javax.xml.transform.stream.StreamSource; + +import org.apache.camel.component.salesforce.api.SalesforceException; +import org.apache.camel.component.salesforce.api.dto.RestError; +import org.apache.camel.component.salesforce.api.dto.bulk.BatchInfo; +import org.apache.camel.component.salesforce.api.dto.bulk.BatchInfoList; +import org.apache.camel.component.salesforce.api.dto.bulk.ContentType; +import org.apache.camel.component.salesforce.api.dto.bulk.Error; +import org.apache.camel.component.salesforce.api.dto.bulk.JobInfo; +import org.apache.camel.component.salesforce.api.dto.bulk.JobStateEnum; +import org.apache.camel.component.salesforce.api.dto.bulk.ObjectFactory; +import org.apache.camel.component.salesforce.api.dto.bulk.QueryResultList; +import org.apache.camel.component.salesforce.internal.SalesforceSession; import org.eclipse.jetty.client.ContentExchange; import org.eclipse.jetty.client.HttpClient; import org.eclipse.jetty.client.HttpExchange; @@ -23,19 +46,6 @@ import org.eclipse.jetty.http.HttpHeaders; import org.eclipse.jetty.http.HttpMethods; import org.eclipse.jetty.io.ByteArrayBuffer; import org.eclipse.jetty.util.StringUtil; -import org.apache.camel.component.salesforce.api.SalesforceException; -import org.apache.camel.component.salesforce.api.dto.RestError; -import org.apache.camel.component.salesforce.api.dto.bulk.*; -import org.apache.camel.component.salesforce.api.dto.bulk.Error; -import org.apache.camel.component.salesforce.internal.SalesforceSession; - -import javax.xml.bind.*; -import javax.xml.transform.stream.StreamSource; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.InputStream; -import java.util.Arrays; -import java.util.Collections; public class DefaultBulkApiClient extends AbstractClientBase implements BulkApiClient { @@ -330,7 +340,7 @@ public class DefaultBulkApiClient extends AbstractClientBase implements BulkApiC ex = e; } callback.onResponse(value != null ? Collections.unmodifiableList(value.getResult()) : null, - ex); + ex); } }); @@ -401,7 +411,7 @@ public class DefaultBulkApiClient extends AbstractClientBase implements BulkApiC // this must be of type Error try { final Error error = unmarshalResponse(new ByteArrayInputStream(request.getResponseContentBytes()), - request, Error.class); + request, Error.class); final RestError restError = new RestError(); restError.setErrorCode(error.getExceptionCode()); @@ -415,26 +425,26 @@ public class DefaultBulkApiClient extends AbstractClientBase implements BulkApiC } private T unmarshalResponse(InputStream response, ContentExchange request, Class resultClass) - throws SalesforceException { + throws SalesforceException { try { Unmarshaller unmarshaller = context.createUnmarshaller(); JAXBElement result = unmarshaller.unmarshal(new StreamSource(response), resultClass); return result.getValue(); } catch (JAXBException e) { throw new SalesforceException( - String.format("Error unmarshaling response {%s:%s} : %s", - request.getMethod(), request.getRequestURI(), e.getMessage()), - e); + String.format("Error unmarshaling response {%s:%s} : %s", + request.getMethod(), request.getRequestURI(), e.getMessage()), + e); } catch (IllegalArgumentException e) { throw new SalesforceException( - String.format("Error unmarshaling response for {%s:%s} : %s", - request.getMethod(), request.getRequestURI(), e.getMessage()), - e); + String.format("Error unmarshaling response for {%s:%s} : %s", + request.getMethod(), request.getRequestURI(), e.getMessage()), + e); } } private void marshalRequest(Object input, ContentExchange request, String contentType) - throws SalesforceException { + throws SalesforceException { try { Marshaller marshaller = context.createMarshaller(); ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); @@ -443,14 +453,14 @@ public class DefaultBulkApiClient extends AbstractClientBase implements BulkApiC request.setRequestContentType(contentType); } catch (JAXBException e) { throw new SalesforceException( - String.format("Error marshaling request for {%s:%s} : %s", - request.getMethod(), request.getRequestURI(), e.getMessage()), - e); + String.format("Error marshaling request for {%s:%s} : %s", + request.getMethod(), request.getRequestURI(), e.getMessage()), + e); } catch (IllegalArgumentException e) { throw new SalesforceException( - String.format("Error marshaling request for {%s:%s} : %s", - request.getMethod(), request.getRequestURI(), e.getMessage()), - e); + String.format("Error marshaling request for {%s:%s} : %s", + request.getMethod(), request.getRequestURI(), e.getMessage()), + e); } } http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java index 07f5af2..70eec1c 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java @@ -16,7 +16,17 @@ */ package org.apache.camel.component.salesforce.internal.client; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.List; + import com.thoughtworks.xstream.XStream; +import org.apache.camel.component.salesforce.api.SalesforceException; +import org.apache.camel.component.salesforce.api.dto.RestError; +import org.apache.camel.component.salesforce.internal.SalesforceSession; +import org.apache.camel.component.salesforce.internal.dto.RestErrors; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.type.TypeReference; import org.eclipse.jetty.client.ContentExchange; @@ -25,16 +35,6 @@ import org.eclipse.jetty.client.HttpExchange; import org.eclipse.jetty.http.HttpHeaders; import org.eclipse.jetty.http.HttpMethods; import org.eclipse.jetty.util.StringUtil; -import org.apache.camel.component.salesforce.api.SalesforceException; -import org.apache.camel.component.salesforce.api.dto.RestError; -import org.apache.camel.component.salesforce.internal.SalesforceSession; -import org.apache.camel.component.salesforce.internal.dto.RestErrors; - -import java.io.IOException; -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.util.List; public class DefaultRestClient extends AbstractClientBase implements RestClient { @@ -75,7 +75,7 @@ public class DefaultRestClient extends AbstractClientBase implements RestClient try { if ("json".equals(format)) { List restErrors = objectMapper.readValue( - httpExchange.getResponseContent(), new TypeReference>() { + httpExchange.getResponseContent(), new TypeReference>() { }); return new SalesforceException(restErrors, httpExchange.getResponseStatus()); } else { @@ -211,7 +211,7 @@ public class DefaultRestClient extends AbstractClientBase implements RestClient public void getSObjectWithId(String sObjectName, String fieldName, String fieldValue, ResponseCallback callback) { final ContentExchange get = getContentExchange(HttpMethods.GET, - sobjectsExternalIdUrl(sObjectName, fieldName, fieldValue)); + sobjectsExternalIdUrl(sObjectName, fieldName, fieldValue)); // requires authorization token setAccessToken(get); @@ -223,7 +223,7 @@ public class DefaultRestClient extends AbstractClientBase implements RestClient public void upsertSObject(String sObjectName, String fieldName, String fieldValue, InputStream sObject, ResponseCallback callback) { final ContentExchange patch = getContentExchange("PATCH", - sobjectsExternalIdUrl(sObjectName, fieldName, fieldValue)); + sobjectsExternalIdUrl(sObjectName, fieldName, fieldValue)); // requires authorization token setAccessToken(patch); @@ -240,7 +240,7 @@ public class DefaultRestClient extends AbstractClientBase implements RestClient public void deleteSObjectWithId(String sObjectName, String fieldName, String fieldValue, ResponseCallback callback) { final ContentExchange delete = getContentExchange(HttpMethods.DELETE, - sobjectsExternalIdUrl(sObjectName, fieldName, fieldValue)); + sobjectsExternalIdUrl(sObjectName, fieldName, fieldValue)); // requires authorization token setAccessToken(delete); @@ -251,7 +251,7 @@ public class DefaultRestClient extends AbstractClientBase implements RestClient @Override public void getBlobField(String sObjectName, String id, String blobFieldName, ResponseCallback callback) { final ContentExchange get = getContentExchange(HttpMethods.GET, - sobjectsUrl(sObjectName + "/" + id +"/" + blobFieldName)); + sobjectsUrl(sObjectName + "/" + id + "/" + blobFieldName)); // TODO this doesn't seem to be required, the response is always the content binary stream //get.setRequestHeader(HttpHeaders.ACCEPT_ENCODING, "base64"); http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/RestClient.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/RestClient.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/RestClient.java index 30186d9..431a821 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/RestClient.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/RestClient.java @@ -16,10 +16,10 @@ */ package org.apache.camel.component.salesforce.internal.client; -import org.apache.camel.component.salesforce.api.SalesforceException; - import java.io.InputStream; +import org.apache.camel.component.salesforce.api.SalesforceException; + public interface RestClient { public static interface ResponseCallback { @@ -31,37 +31,37 @@ public interface RestClient { * including the version, label, and a link to each version's root. * * @param callback {@link ResponseCallback} to handle response or exception - */ + */ void getVersions(ResponseCallback callback); /** * Lists available resources for the specified API version, including resource name and URI. * * @param callback {@link ResponseCallback} to handle response or exception - */ + */ void getResources(ResponseCallback callback); /** * Lists the available objects and their metadata for your organization's data. * * @param callback {@link ResponseCallback} to handle response or exception - */ + */ void getGlobalObjects(ResponseCallback callback); /** * Describes the individual metadata for the specified object. * * @param sObjectName specified object name - * @param callback {@link ResponseCallback} to handle response or exception - */ + * @param callback {@link ResponseCallback} to handle response or exception + */ void getBasicInfo(String sObjectName, ResponseCallback callback); /** * Completely describes the individual metadata at all levels for the specified object. * * @param sObjectName specified object name - * @param callback {@link ResponseCallback} to handle response or exception - */ + * @param callback {@link ResponseCallback} to handle response or exception + */ void getDescription(String sObjectName, ResponseCallback callback); /** @@ -69,8 +69,8 @@ public interface RestClient { * * @param sObjectName specified object name * @param id object id - * @param callback {@link ResponseCallback} to handle response or exception - */ + * @param callback {@link ResponseCallback} to handle response or exception + */ void getSObject(String sObjectName, String id, String[] fields, ResponseCallback callback); /** @@ -78,8 +78,8 @@ public interface RestClient { * * @param sObjectName specified object name * @param sObject request entity - * @param callback {@link ResponseCallback} to handle response or exception - */ + * @param callback {@link ResponseCallback} to handle response or exception + */ void createSObject(String sObjectName, InputStream sObject, ResponseCallback callback); /** @@ -88,8 +88,8 @@ public interface RestClient { * @param sObjectName specified object name * @param id object id * @param sObject request entity - * @param callback {@link ResponseCallback} to handle response or exception - */ + * @param callback {@link ResponseCallback} to handle response or exception + */ void updateSObject(String sObjectName, String id, InputStream sObject, ResponseCallback callback); /** @@ -97,47 +97,46 @@ public interface RestClient { * * @param sObjectName specified object name * @param id object id - * @param callback {@link ResponseCallback} to handle response or exception - */ + * @param callback {@link ResponseCallback} to handle response or exception + */ void deleteSObject(String sObjectName, String id, ResponseCallback callback); /** * Retrieves a record for the specified external ID. * * @param sObjectName specified object name - * @param fieldName external field name - * @param fieldValue external field value - * @param callback {@link ResponseCallback} to handle response or exception - */ + * @param fieldName external field name + * @param fieldValue external field value + * @param callback {@link ResponseCallback} to handle response or exception + */ void getSObjectWithId(String sObjectName, String fieldName, String fieldValue, ResponseCallback callback); /** * Creates or updates a record based on the value of a specified external ID field. * * @param sObjectName specified object name - * @param fieldName external field name - * @param fieldValue external field value - * @param sObject input object to insert or update - * @param callback {@link ResponseCallback} to handle response or exception - */ + * @param fieldName external field name + * @param fieldValue external field value + * @param sObject input object to insert or update + * @param callback {@link ResponseCallback} to handle response or exception + */ void upsertSObject(String sObjectName, - String fieldName, String fieldValue, InputStream sObject, ResponseCallback callback); + String fieldName, String fieldValue, InputStream sObject, ResponseCallback callback); /** * Deletes a record based on the value of a specified external ID field. * * @param sObjectName specified object name - * @param fieldName external field name - * @param fieldValue external field value - * @param callback {@link ResponseCallback} to handle response or exception - */ + * @param fieldName external field name + * @param fieldValue external field value + * @param callback {@link ResponseCallback} to handle response or exception + */ void deleteSObjectWithId(String sObjectName, String fieldName, String fieldValue, ResponseCallback callback); /** * Retrieves the specified blob field from an individual record. - * */ void getBlobField(String sObjectName, String id, String blobFieldName, ResponseCallback callback); @@ -154,24 +153,24 @@ public interface RestClient { * Executes the specified SOQL query. * * @param soqlQuery SOQL query - * @param callback {@link ResponseCallback} to handle response or exception - */ + * @param callback {@link ResponseCallback} to handle response or exception + */ void query(String soqlQuery, ResponseCallback callback); /** * Get SOQL query results using nextRecordsUrl. * * @param nextRecordsUrl URL for next records to fetch, returned by query() - * @param callback {@link ResponseCallback} to handle response or exception - */ + * @param callback {@link ResponseCallback} to handle response or exception + */ void queryMore(String nextRecordsUrl, ResponseCallback callback); /** * Executes the specified SOSL search. * * @param soslQuery SOSL query - * @param callback {@link ResponseCallback} to handle response or exception - */ + * @param callback {@link ResponseCallback} to handle response or exception + */ void search(String soslQuery, ResponseCallback callback); } http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SalesforceSecurityListener.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SalesforceSecurityListener.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SalesforceSecurityListener.java index 5eec212..93ebc43 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SalesforceSecurityListener.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SalesforceSecurityListener.java @@ -16,19 +16,19 @@ */ package org.apache.camel.component.salesforce.internal.client; +import java.io.IOException; + +import org.apache.camel.component.salesforce.api.SalesforceException; +import org.apache.camel.component.salesforce.internal.SalesforceSession; import org.eclipse.jetty.client.HttpDestination; import org.eclipse.jetty.client.HttpEventListenerWrapper; import org.eclipse.jetty.client.HttpExchange; import org.eclipse.jetty.http.HttpHeaders; import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.io.Buffer; -import org.apache.camel.component.salesforce.api.SalesforceException; -import org.apache.camel.component.salesforce.internal.SalesforceSession; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.IOException; - public class SalesforceSecurityListener extends HttpEventListenerWrapper { private static final Logger LOG = LoggerFactory.getLogger(SalesforceSecurityListener.class); @@ -55,7 +55,7 @@ public class SalesforceSecurityListener extends HttpEventListenerWrapper { @Override public void onResponseStatus(Buffer version, int status, Buffer reason) throws IOException { if (status == HttpStatus.UNAUTHORIZED_401 && - retries < destination.getHttpClient().maxRetries()) { + retries < destination.getHttpClient().maxRetries()) { LOG.warn("Retrying on Salesforce authentication error [{}]: [{}]", status, reason); setDelegatingRequests(false); @@ -106,7 +106,7 @@ public class SalesforceSecurityListener extends HttpEventListenerWrapper { client.setAccessToken(exchange); } else { exchange.addRequestHeader(HttpHeaders.AUTHORIZATION, - "OAuth " + currentToken); + "OAuth " + currentToken); } // TODO handle a change in Salesforce instanceUrl, right now we retry with the same destination http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SyncResponseCallback.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SyncResponseCallback.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SyncResponseCallback.java index 0f567e6..ca62e88 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SyncResponseCallback.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SyncResponseCallback.java @@ -16,12 +16,12 @@ */ package org.apache.camel.component.salesforce.internal.client; -import org.apache.camel.component.salesforce.api.SalesforceException; - import java.io.InputStream; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import org.apache.camel.component.salesforce.api.SalesforceException; + /** * Thin wrapper to handle callbacks for {@link RestClient.ResponseCallback} and allow waiting for results */ http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/PushTopic.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/PushTopic.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/PushTopic.java index 2135a16..6dc8490 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/PushTopic.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/PushTopic.java @@ -18,9 +18,9 @@ package org.apache.camel.component.salesforce.internal.dto; import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamConverter; -import org.codehaus.jackson.annotate.JsonProperty; import org.apache.camel.component.salesforce.api.PicklistEnumConverter; import org.apache.camel.component.salesforce.api.dto.AbstractSObjectBase; +import org.codehaus.jackson.annotate.JsonProperty; /** * Salesforce DTO for SObject PushTopic http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/QueryRecordsPushTopic.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/QueryRecordsPushTopic.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/QueryRecordsPushTopic.java index 4adc13c..b7ed5f9 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/QueryRecordsPushTopic.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/QueryRecordsPushTopic.java @@ -16,11 +16,11 @@ */ package org.apache.camel.component.salesforce.internal.dto; +import java.util.List; + import com.thoughtworks.xstream.annotations.XStreamImplicit; import org.apache.camel.component.salesforce.api.dto.AbstractQueryRecordsBase; -import java.util.List; - /** * Salesforce Query Records DTO for PushTopic */ http://git-wip-us.apache.org/repos/asf/camel/blob/aaa2710c/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/RestErrors.java ---------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/RestErrors.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/RestErrors.java index caf59fe..2213067 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/RestErrors.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/RestErrors.java @@ -16,12 +16,12 @@ */ package org.apache.camel.component.salesforce.internal.dto; +import java.util.List; + import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamImplicit; import org.apache.camel.component.salesforce.api.dto.RestError; -import java.util.List; - /** * DTO for Salesforce REST errors */