You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2016/05/19 12:02:42 UTC
[1/3] camel git commit: Added camel-ruby docs to Gitbook
Repository: camel
Updated Branches:
refs/heads/master 2a79f9cef -> 056990397
Added camel-ruby docs to Gitbook
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/80e6c75a
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/80e6c75a
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/80e6c75a
Branch: refs/heads/master
Commit: 80e6c75ab00765d3cd609f7b1c89df1d1408e46e
Parents: 2a79f9c
Author: Andrea Cosentino <an...@gmail.com>
Authored: Thu May 19 13:39:20 2016 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Thu May 19 13:39:20 2016 +0200
----------------------------------------------------------------------
components/camel-ruby/src/main/docs/ruby.adoc | 179 +++++++++++++++++++++
docs/user-manual/en/SUMMARY.md | 1 +
2 files changed, 180 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/80e6c75a/components/camel-ruby/src/main/docs/ruby.adoc
----------------------------------------------------------------------
diff --git a/components/camel-ruby/src/main/docs/ruby.adoc b/components/camel-ruby/src/main/docs/ruby.adoc
new file mode 100644
index 0000000..e0e1d4d
--- /dev/null
+++ b/components/camel-ruby/src/main/docs/ruby.adoc
@@ -0,0 +1,179 @@
+[[Ruby-Ruby]]
+Ruby
+~~~~
+
+Camel supports http://www.ruby-lang.org/en/[Ruby] among other
+link:scripting-languages.html[Scripting Languages] to allow an
+link:expression.html[Expression] or link:predicate.html[Predicate] to be
+used in the link:dsl.html[DSL] or link:xml-configuration.html[Xml
+Configuration].
+
+To use a Ruby expression use the following Java code
+
+[source,java]
+-----------------------------------
+... ruby("someRubyExpression") ...
+-----------------------------------
+
+For example you could use the *ruby* function to create an
+link:predicate.html[Predicate] in a link:message-filter.html[Message
+Filter] or as an link:expression.html[Expression] for a
+link:recipient-list.html[Recipient List]
+
+[[Ruby-Example]]
+Example
+^^^^^^^
+
+In the sample below we use Ruby to create a
+link:predicate.html[Predicate] use in the route path, to route exchanges
+from admin users to a special queue.
+
+[source,java]
+-------------------------------------------------------------------------------------
+ from("direct:start")
+ .choice()
+ .when().ruby("$request.headers['user'] == 'admin'").to("seda:adminQueue")
+ .otherwise()
+ .to("seda:regularQueue");
+-------------------------------------------------------------------------------------
+
+And a Spring DSL sample as well:
+
+[source,xml]
+----------------------------------------------------------------
+ <route>
+ <from uri="direct:start"/>
+ <choice>
+ <when>
+ <ruby>$request.headers['user'] == 'admin'</ruby>
+ <to uri="seda:adminQueue"/>
+ </when>
+ <otherwise>
+ <to uri="seda:regularQueue"/>
+ </otherwise>
+ </choice>
+ </route>
+----------------------------------------------------------------
+
+[[Ruby-ScriptContext]]
+ScriptContext
+^^^^^^^^^^^^^
+
+The JSR-223 scripting languages ScriptContext is pre configured with the
+following attributes all set at `ENGINE_SCOPE`:
+
+[width="100%",cols="10%,10%,80%",options="header",]
+|=======================================================================
+|Attribute |Type |Value
+
+|context |`org.apache.camel.CamelContext` |The Camel Context ( It cannot be used in groovy)
+
+|camelContext |`org.apache.camel.CamelContext` |The Camel Context
+
+|exchange |`org.apache.camel.Exchange` |The current Exchange
+
+|request |`org.apache.camel.Message` |The message (IN message)
+
+|response |`org.apache.camel.Message` |*Deprecated*: The OUT message. The OUT message if null by default. Use
+IN message instead.
+
+|properties |`org.apache.camel.builder.script.PropertiesFunction` |*Camel 2.9:* Function with a `resolve` method to make it easier to use
+Camels link:properties.html[Properties] component from scripts. See
+further below for example.
+|=======================================================================
+
+See link:scripting-languages.html[Scripting Languages] for the list of
+languages with explicit DSL support.
+
+[[Ruby-AdditionalargumentstoScriptingEngine]]
+Additional arguments to ScriptingEngine
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+*Available as of Camel 2.8*
+
+You can provide additional arguments to the `ScriptingEngine` using a
+header on the Camel message with the key `CamelScriptArguments`. +
+ See this example:
+
+[[Ruby-Usingpropertiesfunction]]
+Using properties function
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+*Available as of Camel 2.9*
+
+If you need to use the link:properties.html[Properties] component from a
+script to lookup property placeholders, then its a bit cumbersome to do
+so. For example to set a header name myHeader with a value from a property
+placeholder, which key is provided in a header named "foo".
+
+[source,java]
+{% raw %}
+--------------------------------------------------------------------------------------------------------------
+.setHeader("myHeader").groovy("context.resolvePropertyPlaceholders('{{' + request.headers.get('foo') + '}}')")
+--------------------------------------------------------------------------------------------------------------
+{% endraw %}
+
+From Camel 2.9 onwards you can now use the properties function and the
+same example is simpler:
+
+[source,java]
+-------------------------------------------------------------------------------
+.setHeader("myHeader").groovy("properties.resolve(request.headers.get('foo'))")
+-------------------------------------------------------------------------------
+
+[[Ruby-Loadingscriptfromexternalresource]]
+Loading script from external resource
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+*Available as of Camel 2.11*
+
+You can externalize the script and have Camel load it from a resource
+such as `"classpath:"`, `"file:"`, or `"http:"`. +
+ This is done using the following syntax: `"resource:scheme:location"`,
+eg to refer to a file on the classpath you can do:
+
+[source,java]
+-------------------------------------------------------------------
+.setHeader("myHeader").groovy("resource:classpath:mygroovy.groovy")
+-------------------------------------------------------------------
+
+[[Ruby-Howtogettheresultfrommultiplestatementsscript]]
+How to get the result from multiple statements script
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+*Available as of Camel 2.14*
+
+As the scripteengine evale method just return a Null if it runs a
+multiple statments script. Camel now look up the value of script result
+by using the key of "result" from the value set. If you have multiple
+statements script, you need to make sure you set the value of result
+variable as the script return value.
+
+[source,text]
+-------------------------------------------------------------
+bar = "baz";
+# some other statements ...
+# camel take the result value as the script evaluation result
+result = body * 2 + 1
+-------------------------------------------------------------
+
+[[Ruby-Dependencies]]
+Dependencies
+^^^^^^^^^^^^
+
+To use scripting languages in your camel routes you need to add the a
+dependency on *camel-script* which integrates the JSR-223 scripting
+engine.
+
+If you use maven you could just add the following to your pom.xml,
+substituting the version number for the latest & greatest release (see
+link:download.html[the download page for the latest versions]).
+
+[source,xml]
+---------------------------------------
+<dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-script</artifactId>
+ <version>x.x.x</version>
+</dependency>
+---------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/80e6c75a/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index 2dd9e51..f80232b 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -242,6 +242,7 @@
* [Jsonpath](jsonpath.adoc)
* [JXPath](jxpath.adoc)
* [Ognl](ognl.adoc)
+ * [Ruby](ruby.adoc)
* [SQL](josql.adoc)
* Data Formats
[3/3] camel git commit: Added camel-sap-netweaver docs to Gitbook
Posted by ac...@apache.org.
Added camel-sap-netweaver docs to Gitbook
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/05699039
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/05699039
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/05699039
Branch: refs/heads/master
Commit: 056990397d73732a3cb2a920a320041ffda015fc
Parents: e4366a7
Author: Andrea Cosentino <an...@gmail.com>
Authored: Thu May 19 14:01:39 2016 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Thu May 19 14:01:39 2016 +0200
----------------------------------------------------------------------
.../src/main/docs/sap-netweaver.adoc | 192 +++++++++++++++++++
docs/user-manual/en/SUMMARY.md | 1 +
2 files changed, 193 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/05699039/components/camel-sap-netweaver/src/main/docs/sap-netweaver.adoc
----------------------------------------------------------------------
diff --git a/components/camel-sap-netweaver/src/main/docs/sap-netweaver.adoc b/components/camel-sap-netweaver/src/main/docs/sap-netweaver.adoc
new file mode 100644
index 0000000..c9d6620
--- /dev/null
+++ b/components/camel-sap-netweaver/src/main/docs/sap-netweaver.adoc
@@ -0,0 +1,192 @@
+[[SAPNetWeaver-SAPNetWeaverGatewaycomponent]]
+SAP NetWeaver Gateway component
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+*Available as of Camel 2.12*
+
+The *sap-netweaver* integrates with the
+http://scn.sap.com/community/developer-center/netweaver-gateway[SAP
+NetWeaver Gateway] using HTTP transports.
+
+This camel component supports only producer endpoints.
+
+Maven users will need to add the following dependency to their `pom.xml`
+for this component:
+
+[source,xml]
+------------------------------------------------------------
+<dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-sap-netweaver</artifactId>
+ <version>x.x.x</version>
+ <!-- use the same version as your Camel core version -->
+</dependency>
+------------------------------------------------------------
+
+[[SAPNetWeaver-URIformat]]
+URI format
+^^^^^^^^^^
+
+The URI scheme for a sap netweaver gateway component is as follows
+
+[source,java]
+-----------------------------------------------------------------
+sap-netweaver:https://host:8080/path?username=foo&password=secret
+-----------------------------------------------------------------
+
+You can append query options to the URI in the following format,
+`?option=value&option=value&...`
+
+[[SAPNetWeaver-Prerequisites]]
+Prerequisites
+^^^^^^^^^^^^^
+
+You would need to have an account to the SAP NetWeaver system to be able
+to leverage this component. SAP provides a
+http://scn.sap.com/docs/DOC-31221#section6[demo setup] where you can
+requires for an account.
+
+This component uses the basic authentication scheme for logging into SAP
+NetWeaver.
+
+[[SAPNetWeaver-Componentandendpointoptions]]
+SAPNetWeaver options
+^^^^^^^^^^^^^^^^^^^^
+
+
+// component options: START
+The SAP NetWeaver component has no options.
+// component options: END
+
+
+
+// endpoint options: START
+The SAP NetWeaver component supports 8 endpoint options which are listed below:
+
+{% raw %}
+[width="100%",cols="2s,1,1m,1m,5",options="header"]
+|=======================================================================
+| Name | Group | Default | Java Type | Description
+| url | producer | | String | *Required* Url to the SAP net-weaver gateway server.
+| flatternMap | producer | true | boolean | If the JSON Map contains only a single entry then flattern by storing that single entry value as the message body.
+| json | producer | true | boolean | Whether to return data in JSON format. If this option is false then XML is returned in Atom format.
+| jsonAsMap | producer | true | boolean | To transform the JSON from a String to a Map in the message body.
+| password | producer | | String | *Required* Password for account.
+| username | producer | | String | *Required* Username for account.
+| 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
+
+
+[[SAPNetWeaver-MessageHeaders]]
+Message Headers
+^^^^^^^^^^^^^^^
+
+The following headers can be used by the producer.
+
+[width="100%",cols="10%,10%,80%",options="header",]
+|=======================================================================
+|Name |Type |Description
+
+|`CamelNetWeaverCommand` |`String` |*Mandatory*: The command to execute in
+http://msdn.microsoft.com/en-us/library/cc956153.aspx[MS ADO.Net Data
+Service] format.
+|=======================================================================
+
+[[SAPNetWeaver-Examples]]
+Examples
+^^^^^^^^
+
+This example is using the flight demo example from SAP, which is
+available online over the internet
+http://scn.sap.com/docs/DOC-31221[here].
+
+In the route below we request the SAP NetWeaver demo server using the
+following url
+
+[source,java]
+----------------------------------------------------------------------
+https://sapes1.sapdevcenter.com/sap/opu/odata/IWBEP/RMTSAMPLEFLIGHT_2/
+----------------------------------------------------------------------
+
+And we want to execute the following command
+
+[source,java]
+-------------------------------------------------------------------------------------------------------
+FlightCollection(AirLineID='AA',FlightConnectionID='0017',FlightDate=datetime'2012-08-29T00%3A00%3A00')
+-------------------------------------------------------------------------------------------------------
+
+To get flight details for the given flight. The command syntax is in
+http://msdn.microsoft.com/en-us/library/cc956153.aspx[MS ADO.Net Data
+Service] format.
+
+We have the following Camel route
+
+[source,java]
+-----------------------------------------------------------------------------
+from("direct:start")
+ .toF("sap-netweaver:%s?username=%s&password=%s", url, username, password)
+ .to("log:response")
+ .to("velocity:flight-info.vm")
+-----------------------------------------------------------------------------
+
+Where url, username, and password is defined as:
+
+[source,java]
+---------------------------------------------------------------------------------------------------------------------------------------
+ private String username = "P1909969254";
+ private String password = "TODO";
+ private String url = "https://sapes1.sapdevcenter.com/sap/opu/odata/IWBEP/RMTSAMPLEFLIGHT_2/";
+ private String command = "FlightCollection(AirLineID='AA',FlightConnectionID='0017',FlightDate=datetime'2012-08-29T00%3A00%3A00')";
+---------------------------------------------------------------------------------------------------------------------------------------
+
+The password is invalid. You would need to create an account at SAP
+first to run the demo.
+
+The velocity template is used for formatting the response to a basic
+HTML page
+
+[source,xml]
+------------------------------------------------------------------------
+<html>
+ <body>
+ Flight information:
+
+ <p/>
+ <br/>Airline ID: $body["AirLineID"]
+ <br/>Aircraft Type: $body["AirCraftType"]
+ <br/>Departure city: $body["FlightDetails"]["DepartureCity"]
+ <br/>Departure airport: $body["FlightDetails"]["DepartureAirPort"]
+ <br/>Destination city: $body["FlightDetails"]["DestinationCity"]
+ <br/>Destination airport: $body["FlightDetails"]["DestinationAirPort"]
+
+ </body>
+</html>
+------------------------------------------------------------------------
+
+When running the application you get sampel output:
+
+[source,java]
+-------------------------------
+Flight information:
+Airline ID: AA
+Aircraft Type: 747-400
+Departure city: new york
+Departure airport: JFK
+Destination city: SAN FRANCISCO
+Destination airport: SFO
+-------------------------------
+
+[[SAPNetWeaver-SeeAlso]]
+See Also
+^^^^^^^^
+
+* link:configuring-camel.html[Configuring Camel]
+* link:component.html[Component]
+* link:endpoint.html[Endpoint]
+* link:getting-started.html[Getting Started]
+
+* link:http.html[HTTP]
+
http://git-wip-us.apache.org/repos/asf/camel/blob/05699039/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index f157edd..7b9145a 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -227,6 +227,7 @@
* [Routebox](routebox.adoc)
* [RSS](rss.adoc)
* [Salesforce](salesforce.adoc)
+ * [SAP NetWeaver](sap-netweaver.adoc)
* [Scp](scp.adoc)
* [SJMS](sjms.adoc)
* [SJMS Batch](sjms-batch.adoc)
[2/3] camel git commit: Added camel-salesforce docs to Gitbook
Posted by ac...@apache.org.
Added camel-salesforce docs to Gitbook
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e4366a76
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e4366a76
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e4366a76
Branch: refs/heads/master
Commit: e4366a7604c93828cbef5aea2d265b059cab3f9d
Parents: 80e6c75
Author: Andrea Cosentino <an...@gmail.com>
Authored: Thu May 19 13:51:34 2016 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Thu May 19 13:51:34 2016 +0200
----------------------------------------------------------------------
.../src/main/docs/salesforce.adoc | 303 +++++++++++++++++++
docs/user-manual/en/SUMMARY.md | 1 +
2 files changed, 304 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/e4366a76/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
new file mode 100644
index 0000000..1548a4f
--- /dev/null
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce.adoc
@@ -0,0 +1,303 @@
+[[Salesforce-Salesforcecomponent]]
+Salesforce component
+~~~~~~~~~~~~~~~~~~~~
+
+*Available as of Camel 2.12*
+
+This component supports producer and consumer endpoints to communicate
+with Salesforce using Java DTOs. +
+ There is a companion maven plugin Camel Salesforce Plugin that
+generates these DTOs (see further below).
+
+Maven users will need to add the following dependency to their `pom.xml`
+for this component:
+
+[source,xml]
+------------------------------------------------------------
+<dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-salesforce</artifactId>
+ <version>x.x.x</version>
+ <!-- use the same version as your Camel core version -->
+</dependency>
+------------------------------------------------------------
+
+[[Salesforce-URIformat]]
+URI format
+^^^^^^^^^^
+
+The URI scheme for a salesforce component is as follows
+
+[source,java]
+------------------------
+salesforce:topic?options
+------------------------
+
+You can append query options to the URI in the following format,
+`?option=value&option=value&...`
+
+[[Salesforce-SupportedSalesforceAPIs]]
+Supported Salesforce APIs
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The component supports the following Salesforce APIs
+
+Producer endpoints can use the following APIs. Most of the APIs process
+one record at a time, the Query API can retrieve multiple Records.
+
+[[Salesforce-RestAPI]]
+Rest API
+++++++++
+
+* getVersions - Gets supported Salesforce REST API versions
+* getResources - Gets available Salesforce REST Resource endpoints
+* getGlobalObjects - Gets metadata for all available SObject types
+* getBasicInfo - Gets basic metadata for a specific SObject type
+* getDescription - Gets comprehensive metadata for a specific SObject
+type
+* getSObject - Gets an SObject using its Salesforce Id
+* createSObject - Creates an SObject
+* updateSObject - Updates an SObject using Id
+* deleteSObject - Deletes an SObject using Id
+* getSObjectWithId - Gets an SObject using an external (user defined) id
+field
+* upsertSObject - Updates or inserts an SObject using an external id
+* deleteSObjectWithId - Deletes an SObject using an external id
+* query - Runs a Salesforce SOQL query
+* queryMore - Retrieves more results (in case of large number of
+results) using result link returned from the 'query' API
+* search - Runs a Salesforce SOSL query
+
+For example, the following producer endpoint uses the upsertSObject API,
+with the sObjectIdName parameter specifying 'Name' as the external id
+field.
+The request message body should be an SObject DTO generated using the
+maven plugin.
+The response message will either be `null` if an existing record was
+updated, or `CreateSObjectResult` with an id of the new record, or a
+list of errors while creating the new object.
+
+[source,java]
+-----------------------------------------------------------
+ ...to("salesforce:upsertSObject?sObjectIdName=Name")...
+-----------------------------------------------------------
+
+[[Salesforce-RestBulkAPI]]
+Rest Bulk API
++++++++++++++
+
+Producer endpoints can use the following APIs. All Job data formats,
+i.e. xml, csv, zip/xml, and zip/csv are supported. +
+ The request and response have to be marshalled/unmarshalled by the
+route. Usually the request will be some stream source like a CSV file,
+ +
+ and the response may also be saved to a file to be correlated with the
+request.
+
+* createJob - Creates a Salesforce Bulk Job
+* getJob - Gets a Job using its Salesforce Id
+* closeJob - Closes a Job
+* abortJob - Aborts a Job
+* createBatch - Submits a Batch within a Bulk Job
+* getBatch - Gets a Batch using Id
+* getAllBatches - Gets all Batches for a Bulk Job Id
+* getRequest - Gets Request data (XML/CSV) for a Batch
+* getResults - Gets the results of the Batch when its complete
+* createBatchQuery - Creates a Batch from an SOQL query
+* getQueryResultIds - Gets a list of Result Ids for a Batch Query
+* getQueryResult - Gets results for a Result Id
+
+For example, the following producer endpoint uses the createBatch API to
+create a Job Batch. The in message must contain a body that can be converted into an
+`InputStream` (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 `BatchInfo` on success, or throw a `SalesforceException` on
+error.
+
+[source,java]
+----------------------------------------
+ ...to("salesforce:createBatchJob")..
+----------------------------------------
+
+[[Salesforce-RestStreamingAPI]]
+Rest Streaming API
+++++++++++++++++++
+
+Consumer endpoints can use the following sytax for streaming endpoints
+to receive Salesforce notifications on create/update.
+
+To create and subscribe to a topic
+
+[source,java]
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ from("salesforce:CamelTestTopic?notifyForFields=ALL¬ifyForOperations=ALL&sObjectName=Merchandise__c&updateTopic=true&sObjectQuery=SELECT Id, Name FROM Merchandise__c")...
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+To subscribe to an existing topic
+
+[source,java]
+-------------------------------------------------------------------
+ from("salesforce:CamelTestTopic&sObjectName=Merchandise__c")...
+-------------------------------------------------------------------
+
+[[Salesforce-Examples]]
+Examples
+~~~~~~~~
+
+[[Salesforce-UploadingadocumenttoaContentWorkspace]]
+Uploading a document to a ContentWorkspace
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Create the ContentVersion in Java, using a Processor instance:
+
+[source,java]
+-----------------------------------------------------------------------------------
+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("test document");
+ cv.setPathOnClient("test_doc.html");
+ byte[] document = message.getBody(byte[].class);
+ ObjectMapper mapper = new ObjectMapper();
+ String enc = mapper.convertValue(document, String.class);
+ cv.setVersionDataUrl(enc);
+ message.setBody(cv);
+ }
+
+ 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
+ ....
+ }
+}
+-----------------------------------------------------------------------------------
+
+Give the output from the processor to the Salesforce component:
+
+[source,java]
+-----------------------------------------------------------------------------------------------------
+ from("file:///home/camel/library")
+ .to(new ContentProcessor()) // convert bytes from the file into a ContentVersion SObject
+ // for the salesforce component
+ .to("salesforce:createSObject");
+-----------------------------------------------------------------------------------------------------
+
+[[Salesforce-CamelSalesforceMavenPlugin]]
+Camel Salesforce Maven Plugin
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This Maven plugin generates DTOs for the Camel
+link:salesforce.html[Salesforce].
+
+[[Salesforce-Options]]
+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).
+|=======================================================================
+{% endraw %}
+// component options: END
+
+
+
+// endpoint options: START
+The Salesforce component supports 36 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
+| 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.
+| 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)
+| 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
+be executed using the following command:
+
+[source,java]
+---------------------------------------------------------------------------------------------------------------------------------
+ mvn camel-salesforce:generate -DclientId=<clientid> -DclientSecret=<clientsecret> -DuserName=<username> -Dpassword=<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.
+
+[[Salesforce-SeeAlso]]
+See Also
+^^^^^^^^
+
+* link:configuring-camel.html[Configuring Camel]
+* link:component.html[Component]
+* link:endpoint.html[Endpoint]
+* link:getting-started.html[Getting Started]
+
http://git-wip-us.apache.org/repos/asf/camel/blob/e4366a76/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index f80232b..f157edd 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -226,6 +226,7 @@
* [RMI](rmi.adoc)
* [Routebox](routebox.adoc)
* [RSS](rss.adoc)
+ * [Salesforce](salesforce.adoc)
* [Scp](scp.adoc)
* [SJMS](sjms.adoc)
* [SJMS Batch](sjms-batch.adoc)