Author: buildbot
Date: Thu Jan 22 14:18:18 2015
New Revision: 937261

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/salesforce.html

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/salesforce.html
==============================================================================
--- websites/production/camel/content/salesforce.html (original)
+++ websites/production/camel/content/salesforce.html Thu Jan 22 14:18:18 2015
@@ -85,116 +85,59 @@
        <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 
id="Salesforce-Salesforcecomponent">Salesforce component</h2>
-<p><strong>Available as of Camel 2.12</strong></p>
-
-<p>This component supports producer and consumer endpoints to communicate with 
Salesforce using Java DTOs. <br clear="none">
-There is a companion maven plugin Camel Salesforce Plugin that generates these 
DTOs (see further below). </p>
-
-<p>Maven users will need to add the following dependency to their 
<code>pom.xml</code> for this component:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-&lt;dependency&gt;
+<div class="wiki-content maincontent"><h2 
id="Salesforce-Salesforcecomponent">Salesforce 
component</h2><p><strong>Available as of Camel 2.12</strong></p><p>This 
component supports producer and consumer endpoints to communicate with 
Salesforce using Java DTOs. <br clear="none"> There is a companion maven plugin 
Camel Salesforce Plugin that generates these DTOs (see further 
below).</p><p>Maven users will need to add the following dependency to their 
<code>pom.xml</code> for this component:</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
     &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
     &lt;artifactId&gt;camel-salesforce&lt;/artifactId&gt;
     &lt;version&gt;x.x.x&lt;/version&gt;
     &lt;!-- use the same version as your Camel core version --&gt;
 &lt;/dependency&gt;
 ]]></script>
-</div></div>
-
-<h3 id="Salesforce-URIformat">URI format</h3>
-
-<p>The URI scheme for a salesforce component is as follows</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-salesforce:topic?options
-]]></script>
-</div></div>
-
-<p>You can append query options to the URI in the following format, 
<code>?option=value&amp;option=value&amp;...</code></p>
-
-<h3 id="Salesforce-SupportedSalesforceAPIs">Supported Salesforce APIs</h3>
-
-<p>The component supports the following Salesforce APIs</p>
-
-<p>Producer endpoints can use the following APIs. Most of the APIs process one 
record at a time, the Query API can retrieve multiple Records. </p>
-
-<h4 id="Salesforce-RestAPI">Rest API</h4>
-
-<ul><li>getVersions - Gets supported Salesforce REST API 
versions</li><li>getResources - Gets available Salesforce REST Resource 
endpoints</li><li>getGlobalObjects - Gets metadata for all available SObject 
types</li><li>getBasicInfo - Gets basic metadata for a specific SObject 
type</li><li>getDescription - Gets comprehensive metadata for a specific 
SObject type</li><li>getSObject - Gets an SObject using its Salesforce 
Id</li><li>createSObject - Creates an SObject</li><li>updateSObject - Updates 
an SObject using Id</li><li>deleteSObject - Deletes an SObject using 
Id</li><li>getSObjectWithId - Gets an SObject using an external (user defined) 
id field</li><li>upsertSObject - Updates or inserts an SObject using an 
external id</li><li>deleteSObjectWithId - Deletes an SObject using an external 
id</li><li>query - Runs a Salesforce SOQL query</li><li>queryMore - Retrieves 
more results (in case of large number of results) using result link returned 
from the 'query' API</li><li>search - Runs 
 a Salesforce SOSL query</li></ul>
-
-
-<p>For example, the following producer endpoint uses the upsertSObject API, 
with the sObjectIdName parameter specifying 'Name' as the external id field. 
<br clear="none">
-The request message body should be an SObject DTO generated using the maven 
plugin. <br clear="none">
-The response message will either be <code>null</code> if an existing record 
was updated, or <code>CreateSObjectResult</code> with an id of the new record, 
or a list of errors while creating the new object.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-       ...to(&quot;salesforce:upsertSObject?sObjectIdName=Name&quot;)...
-]]></script>
-</div></div>
-
-
-<h4 id="Salesforce-RestBulkAPI">Rest Bulk API</h4>
-
-<p>Producer endpoints can use the following APIs. All Job data formats, i.e. 
xml, csv, zip/xml, and zip/csv are supported. <br clear="none">
-The request and response have to be marshalled/unmarshalled by the route. 
Usually the request will be some stream source like a CSV file, <br 
clear="none">
-and the response may also be saved to a file to be correlated with the 
request. </p>
-
-<ul><li>createJob - Creates a Salesforce Bulk Job</li><li>getJob - Gets a Job 
using its Salesforce Id</li><li>closeJob - Closes a Job</li><li>abortJob - 
Aborts a Job</li><li>createBatch - Submits a Batch within a Bulk 
Job</li><li>getBatch - Gets a Batch using Id</li><li>getAllBatches - Gets all 
Batches for a Bulk Job Id</li><li>getRequest - Gets Request data (XML/CSV) for 
a Batch</li><li>getResults - Gets the results of the Batch when its 
complete</li><li>createBatchQuery - Creates a Batch from an SOQL 
query</li><li>getQueryResultIds - Gets a list of Result Ids for a Batch 
Query</li><li>getQueryResult - Gets results for a Result Id</li></ul>
-
-
-<p>For example, the following producer endpoint uses the createBatch API to 
create a Job Batch. <br clear="none">
-The in message must contain a body that can be converted into an 
<code>InputStream</code> (usually UTF-8 CSV or XML content from a file, etc.) 
and header fields 'jobId' for the Job and 'contentType' for the Job content 
type, which can be XML, CSV, ZIP_XML or ZIP_CSV. The put message body will 
contain <code>BatchInfo</code> on success, or throw a 
<code>SalesforceException</code> on error.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-       ...to(&quot;salesforce:createBatchJob&quot;)..
+</div></div><h3 id="Salesforce-URIformat">URI format</h3><p>The URI scheme for 
a salesforce component is as follows</p><div class="code panel pdl" 
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[salesforce:topic?options
 ]]></script>
-</div></div>
-
-<h4 id="Salesforce-RestStreamingAPI">Rest Streaming API</h4>
-
-<p>Consumer endpoints can use the following sytax for streaming endpoints to 
receive Salesforce notifications on create/update. </p>
-
-<p>To create and subscribe to a topic</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-       
from(&quot;salesforce:CamelTestTopic?notifyForFields=ALL&amp;notifyForOperations=ALL&amp;sObjectName=Merchandise__c&amp;updateTopic=true&amp;sObjectQuery=SELECT
 Id, Name FROM Merchandise__c&quot;)...
+</div></div><p>You can append query options to the URI in the following 
format, <code>?option=value&amp;option=value&amp;...</code></p><h3 
id="Salesforce-SupportedSalesforceAPIs">Supported Salesforce APIs</h3><p>The 
component supports the following Salesforce APIs</p><p>Producer endpoints can 
use the following APIs. Most of the APIs process one record at a time, the 
Query API can retrieve multiple Records.</p><h4 id="Salesforce-RestAPI">Rest 
API</h4><ul><li>getVersions - Gets supported Salesforce REST API 
versions</li><li>getResources - Gets available Salesforce REST Resource 
endpoints</li><li>getGlobalObjects - Gets metadata for all available SObject 
types</li><li>getBasicInfo - Gets basic metadata for a specific SObject 
type</li><li>getDescription - Gets comprehensive metadata for a specific 
SObject type</li><li>getSObject - Gets an SObject using its Salesforce 
Id</li><li>createSObject - Creates an SObject</li><li>updateSObject - Updates 
an SObject using Id</li><li>deleteSObject -
  Deletes an SObject using Id</li><li>getSObjectWithId - Gets an SObject using 
an external (user defined) id field</li><li>upsertSObject - Updates or inserts 
an SObject using an external id</li><li>deleteSObjectWithId - Deletes an 
SObject using an external id</li><li>query - Runs a Salesforce SOQL 
query</li><li>queryMore - Retrieves more results (in case of large number of 
results) using result link returned from the 'query' API</li><li>search - Runs 
a Salesforce SOSL query</li></ul><p>For example, the following producer 
endpoint uses the upsertSObject API, with the sObjectIdName parameter 
specifying 'Name' as the external id field. <br clear="none"> The request 
message body should be an SObject DTO generated using the maven plugin. <br 
clear="none"> The response message will either be <code>null</code> if an 
existing record was updated, or <code>CreateSObjectResult</code> with an id of 
the new record, or a list of errors while creating the new object.</p><div 
class="code panel pdl" 
 style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[  
...to(&quot;salesforce:upsertSObject?sObjectIdName=Name&quot;)...
 ]]></script>
-</div></div>
-
-<p>To subscribe to an existing topic</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-       
from(&quot;salesforce:CamelTestTopic&amp;sObjectName=Merchandise__c&quot;)...
+</div></div><h4 id="Salesforce-RestBulkAPI">Rest Bulk API</h4><p>Producer 
endpoints can use the following APIs. All Job data formats, i.e. xml, csv, 
zip/xml, and zip/csv are supported. <br clear="none"> The request and response 
have to be marshalled/unmarshalled by the route. Usually the request will be 
some stream source like a CSV file, <br clear="none"> and the response may also 
be saved to a file to be correlated with the request.</p><ul><li>createJob - 
Creates a Salesforce Bulk Job</li><li>getJob - Gets a Job using its Salesforce 
Id</li><li>closeJob - Closes a Job</li><li>abortJob - Aborts a 
Job</li><li>createBatch - Submits a Batch within a Bulk Job</li><li>getBatch - 
Gets a Batch using Id</li><li>getAllBatches - Gets all Batches for a Bulk Job 
Id</li><li>getRequest - Gets Request data (XML/CSV) for a 
Batch</li><li>getResults - Gets the results of the Batch when its 
complete</li><li>createBatchQuery - Creates a Batch from an SOQL 
query</li><li>getQueryResultIds - Gets a list o
 f Result Ids for a Batch Query</li><li>getQueryResult - Gets results for a 
Result Id</li></ul><p>For example, the following producer endpoint uses the 
createBatch API to create a Job Batch. <br clear="none"> The in message must 
contain a body that can be converted into an <code>InputStream</code> (usually 
UTF-8 CSV or XML content from a file, etc.) and header fields 'jobId' for the 
Job and 'contentType' for the Job content type, which can be XML, CSV, ZIP_XML 
or ZIP_CSV. The put message body will contain <code>BatchInfo</code> on 
success, or throw a <code>SalesforceException</code> on error.</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[  
...to(&quot;salesforce:createBatchJob&quot;)..
 ]]></script>
-</div></div>
-
-<h2 id="Salesforce-CamelSalesforceMavenPlugin">Camel Salesforce Maven 
Plugin</h2>
-
-<p>This Maven plugin generates DTOs for the Camel <a shape="rect" 
href="salesforce.html">Salesforce</a>.</p>
-
-<h3 id="Salesforce-Usage">Usage</h3>
-
-<p>The plugin configuration has the following properties.</p>
-
-<div class="confluenceTableSmall">
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th 
colspan="1" rowspan="1" class="confluenceTh"><p> Option </p></th><th 
colspan="1" rowspan="1" class="confluenceTh"><p> Description 
</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> clientId 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Salesforce client 
Id for Remote API access </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> clientSecret </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Salesforce client secret for Remote API access 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> userName 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Salesforce 
account user name </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> password </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Salesforce account password (including secret token) 
</p></td></tr><tr><td colspan="1" rowspan="1" class="
 confluenceTd"><p> version </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Salesforce Rest API version, defaults to 25.0 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
outputDirectory </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 
Directory where to place generated DTOs, defaults to 
${project.build.directory}/generated-sources/camel-salesforce 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> includes 
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> List of SObject 
types to include </p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p> excludes </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> List of SObject types to exclude </p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p> includePattern </p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p> Java RegEx for SObject types 
to include </p></td></tr><tr><td colspan="1" rowspan="1" class="confluen
 ceTd"><p> excludePattern </p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p> Java RegEx for SObject types to exclude 
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> 
packageName </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Java 
package name for generated DTOs, defaults to org.apache.camel.salesforce.dto. 
</p></td></tr></tbody></table></div>
-</div>
-<p>For obvious security reasons it is recommended that the clientId, 
clientSecret, userName and password fields be not set in the pom.xml. <br 
clear="none">
-The plugin should be configured for the rest of the properties, and can be 
executed using the following command:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[
-       mvn camel-salesforce:generate -DclientId=&lt;clientid&gt; 
-DclientSecret=&lt;clientsecret&gt; -DuserName=&lt;username&gt; 
-Dpassword=&lt;password&gt;
+</div></div><h4 id="Salesforce-RestStreamingAPI">Rest Streaming 
API</h4><p>Consumer endpoints can use the following sytax for streaming 
endpoints to receive Salesforce notifications on create/update.</p><p>To create 
and subscribe to a topic</p><div class="code panel pdl" style="border-width: 
1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[  
from(&quot;salesforce:CamelTestTopic?notifyForFields=ALL&amp;notifyForOperations=ALL&amp;sObjectName=Merchandise__c&amp;updateTopic=true&amp;sObjectQuery=SELECT
 Id, Name FROM Merchandise__c&quot;)...
+]]></script>
+</div></div><p>To subscribe to an existing topic</p><div class="code panel 
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[  
from(&quot;salesforce:CamelTestTopic&amp;sObjectName=Merchandise__c&quot;)...
+]]></script>
+</div></div><h2 id="Salesforce-Examples">Examples</h2><h3 
id="Salesforce-UploadingadocumenttoaContentWorkspace">Uploading a document to a 
ContentWorkspace</h3><p>Create the ContentVersion in Java, using a Processor 
instance:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[public class ContentProcessor implements 
Processor {
+       public void process(Exchange exchange) throws Exception {
+       Message message = exchange.getIn();
+
+               ContentVersion cv = new ContentVersion();
+               ContentWorkspace cw = getWorkspace(exchange);
+               cv.setFirstPublishLocationId(cw.getId());
+               cv.setTitle(&quot;test document&quot;);
+               cv.setPathOnClient(&quot;test_doc.html&quot;);
+               byte[] document = message.getBody(byte[].class);
+               ObjectMapper mapper = new ObjectMapper();
+               String enc = mapper.convertValue(document, String.class);
+               cv.setVersionDataUrl(enc);
+       }
+
+       protected ContentWorkspace getWorkSpace(Exchange exchange) {
+               // Look up the content workspace somehow, maybe use enrich() to 
add it to a
+               // header that can be extracted here
+               ....
+       }
+} ]]></script>
+</div></div><p>Give the output from the processor to the Salesforce 
component:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[  from(&quot;file:///home/camel/library&quot;)
+               .to(new ContentProcessor())
+               .to(&quot;salesforce:createSObject&quot;); ]]></script>
+</div></div><h2 id="Salesforce-CamelSalesforceMavenPlugin">Camel Salesforce 
Maven Plugin</h2><p>This Maven plugin generates DTOs for the Camel <a 
shape="rect" href="salesforce.html">Salesforce</a>.</p><h3 
id="Salesforce-Usage">Usage</h3><p>The plugin configuration has the following 
properties.</p><div class="confluenceTableSmall"><div class="table-wrap"><table 
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Option</p></th><th colspan="1" rowspan="1" 
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"><p>clientId</p></td><td colspan="1" 
rowspan="1" class="confluenceTd"><p>Salesforce client Id for Remote API 
access</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>clientSecret</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Salesforce client secret for Remote API 
access</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>userName</p></td><td colspan=
 "1" rowspan="1" class="confluenceTd"><p>Salesforce account user 
name</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>password</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Salesforce account password (including secret 
token)</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>version</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Salesforce Rest API version, defaults to 
25.0</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>outputDirectory</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Directory where to place generated DTOs, defaults to 
${project.build.directory}/generated-sources/camel-salesforce</p></td></tr><tr><td
 colspan="1" rowspan="1" class="confluenceTd"><p>includes</p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>List of SObject types to 
include</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>excludes</p></td><td colspan="1" rowspan="1" class="co
 nfluenceTd"><p>List of SObject types to exclude</p></td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"><p>includePattern</p></td><td 
colspan="1" rowspan="1" class="confluenceTd"><p>Java RegEx for SObject types to 
include</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>excludePattern</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Java RegEx for SObject types to 
exclude</p></td></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"><p>packageName</p></td><td colspan="1" rowspan="1" 
class="confluenceTd"><p>Java package name for generated DTOs, defaults to 
org.apache.camel.salesforce.dto.</p></td></tr></tbody></table></div></div><p>For
 obvious security reasons it is recommended that the clientId, clientSecret, 
userName and password fields be not set in the pom.xml. <br clear="none"> The 
plugin should be configured for the rest of the properties, and can be executed 
using the following command:</p><div class="code panel pdl" style="border-w
 idth: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" 
type="syntaxhighlighter"><![CDATA[  mvn camel-salesforce:generate 
-DclientId=&lt;clientid&gt; -DclientSecret=&lt;clientsecret&gt; 
-DuserName=&lt;username&gt; -Dpassword=&lt;password&gt;
 ]]></script>
-</div></div>
-
-<p>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. </p>
-
-
-<h3 id="Salesforce-SeeAlso">See Also</h3>
+</div></div><p>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.</p><p></p><h3 id="Salesforce-SeeAlso">See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html">Configuring 
Camel</a></li><li><a shape="rect" 
href="component.html">Component</a></li><li><a shape="rect" 
href="endpoint.html">Endpoint</a></li><li><a shape="rect" 
href="getting-started.html">Getting Started</a></li></ul></div>
         </td>
         <td valign="top">


Reply via email to