This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit dde2d46e1f7ec17f50c471e6b958bbf372f01154 Author: Otavio Rodolfo Piske <angusyo...@gmail.com> AuthorDate: Tue Aug 6 14:14:43 2024 +0200 CAMEL-21040: use more consistent terminology Prefer using examples, instead of samples, as examples is more widely used --- .../src/main/docs/milvus-component.adoc | 8 +++++--- .../src/main/docs/qdrant-component.adoc | 18 ++++++++-------- .../src/main/docs/box-component.adoc | 2 +- .../src/main/docs/browse-component.adoc | 2 +- .../camel-chunk/src/main/docs/chunk-component.adoc | 4 ++-- .../src/main/docs/cm-sms-component.adoc | 2 +- .../src/main/docs/cometd-component.adoc | 2 +- .../src/main/docs/couchdb-component.adoc | 2 +- .../src/main/docs/dataformat-component.adoc | 2 +- .../src/main/docs/debezium-db2-component.adoc | 2 +- .../src/main/docs/debezium-mongodb-component.adoc | 2 +- .../src/main/docs/debezium-mysql-component.adoc | 2 +- .../src/main/docs/debezium-oracle-component.adoc | 2 +- .../src/main/docs/debezium-postgres-component.adoc | 2 +- .../main/docs/debezium-sqlserver-component.adoc | 2 +- .../src/main/docs/direct-component.adoc | 2 +- .../src/main/docs/disruptor-component.adoc | 2 +- .../src/main/docs/dropbox-component.adoc | 10 ++++----- .../camel-file/src/main/docs/file-component.adoc | 2 +- .../src/main/docs/freemarker-component.adoc | 4 ++-- .../camel-ftp/src/main/docs/ftp-component.adoc | 2 +- .../src/main/docs/geocoder-component.adoc | 2 +- .../main/docs/hazelcast-atomicvalue-component.adoc | 10 ++++----- .../src/main/docs/hazelcast-list-component.adoc | 8 ++++---- .../src/main/docs/hazelcast-map-component.adoc | 10 ++++----- .../main/docs/hazelcast-multimap-component.adoc | 8 ++++---- .../src/main/docs/hazelcast-queue-component.adoc | 24 +++++++++++----------- .../docs/hazelcast-replicatedmap-component.adoc | 6 +++--- .../main/docs/hazelcast-ringbuffer-component.adoc | 4 ++-- .../src/main/docs/hazelcast-topic-component.adoc | 2 +- .../camel-http/src/main/docs/http-component.adoc | 2 +- .../camel-jdbc/src/main/docs/jdbc-component.adoc | 2 +- .../camel-jms/src/main/docs/jms-component.adoc | 6 +++--- .../camel-jolt/src/main/docs/jolt-component.adoc | 2 +- .../camel-jslt/src/main/docs/jslt-component.adoc | 2 +- .../src/main/docs/jsonata-component.adoc | 2 +- .../camel-jte/src/main/docs/jte-component.adoc | 2 +- .../camel-kafka/src/main/docs/kafka-component.adoc | 2 +- .../src/main/docs/kamelet-component.adoc | 2 +- .../camel-ldap/src/main/docs/ldap-component.adoc | 2 +- .../camel-ldif/src/main/docs/ldif-component.adoc | 2 +- .../camel-log/src/main/docs/log-component.adoc | 8 ++++---- .../src/main/docs/lucene-component.adoc | 4 +++- .../src/main/docs/lumberjack-component.adoc | 4 +++- .../src/main/docs/mail-microsoft-oauth.adoc | 3 ++- .../camel-mail/src/main/docs/mail-component.adoc | 10 ++++----- .../camel-mina/src/main/docs/mina-component.adoc | 6 +++--- .../src/main/docs/mongodb-gridfs-component.adoc | 2 +- .../src/main/docs/mongodb-component.adoc | 2 +- .../src/main/docs/mustache-component.adoc | 4 ++-- .../src/main/docs/mybatis-bean-component.adoc | 2 +- .../src/main/docs/mybatis-component.adoc | 2 +- .../src/main/docs/olingo2-component.adoc | 2 +- .../src/main/docs/olingo4-component.adoc | 2 +- .../src/main/docs/optaplanner-component.adoc | 2 +- .../src/main/docs/paho-mqtt5-component.adoc | 2 +- .../camel-paho/src/main/docs/paho-component.adoc | 2 +- .../camel-printer/src/main/docs/lpr-component.adoc | 4 +++- .../camel-ref/src/main/docs/ref-component.adoc | 2 +- .../src/main/docs/robotframework-component.adoc | 2 +- .../src/main/docs/scheduler-component.adoc | 2 +- .../src/main/docs/schematron-component.adoc | 2 +- .../camel-seda/src/main/docs/seda-component.adoc | 2 +- .../camel-smpp/src/main/docs/smpp-component.adoc | 2 +- .../camel-stomp/src/main/docs/stomp-component.adoc | 2 +- .../src/main/docs/stream-component.adoc | 2 +- .../src/main/docs/string-template-component.adoc | 4 ++-- .../src/main/docs/thymeleaf-component.adoc | 4 ++-- .../camel-timer/src/main/docs/timer-component.adoc | 2 +- .../src/main/docs/velocity-component.adoc | 4 ++-- .../src/main/docs/weather-component.adoc | 2 +- .../camel-web3j/src/main/docs/web3j-component.adoc | 2 +- .../src/main/docs/xchange-component.adoc | 2 +- .../modules/languages/pages/file-language.adoc | 2 +- 74 files changed, 143 insertions(+), 132 deletions(-) diff --git a/components/camel-ai/camel-milvus/src/main/docs/milvus-component.adoc b/components/camel-ai/camel-milvus/src/main/docs/milvus-component.adoc index a15f49b4421..03e3b3da59f 100644 --- a/components/camel-ai/camel-milvus/src/main/docs/milvus-component.adoc +++ b/components/camel-ai/camel-milvus/src/main/docs/milvus-component.adoc @@ -43,7 +43,9 @@ include::partial$component-endpoint-options.adoc[] include::partial$component-endpoint-headers.adoc[] // component headers: END -== Collection Samples +== Examples + +=== Collection Examples In the route below, we use the milvus component to create a collection named _test_ with the given parameters: @@ -92,9 +94,9 @@ from("direct:in") ---- ==== -== Points Samples +=== Points Examples -=== Upsert +==== Upsert In the route below we use the milvus component to perform insert on points in the collection named _test_: diff --git a/components/camel-ai/camel-qdrant/src/main/docs/qdrant-component.adoc b/components/camel-ai/camel-qdrant/src/main/docs/qdrant-component.adoc index b1ecf7f53fa..d445fc8575f 100644 --- a/components/camel-ai/camel-qdrant/src/main/docs/qdrant-component.adoc +++ b/components/camel-ai/camel-qdrant/src/main/docs/qdrant-component.adoc @@ -43,11 +43,13 @@ include::partial$component-endpoint-options.adoc[] include::partial$component-endpoint-headers.adoc[] // component headers: END -== Collection Samples +== Examples + +=== Collection Examples In the route below, we use the qdrant component to create a collection named _myCollection_ with the given parameters: -=== Create Collection +==== Create Collection [tabs] ==== @@ -67,7 +69,7 @@ from("direct:in") ---- ==== -=== Delete Collection +==== Delete Collection In the route below, we use the qdrant component to delete a collection named _myCollection_: @@ -85,7 +87,7 @@ from("direct:in") ==== -=== Collection Info +==== Collection Info In the route below, we use the qdrant component to get information about the collection named `myCollection`: @@ -108,9 +110,9 @@ If there is not, the exchange will contain an exception of type `QdrantActionExc `StatusRuntimeException statusRuntimeException` and status `Status.NOT_FOUND`. -== Points Samples +=== Points Examples -=== Upsert +==== Upsert In the route below we use the qdrant component to perform insert + updates (upsert) on points in the collection named _myCollection_: @@ -137,7 +139,7 @@ from("direct:in") ==== -=== Retrieve +==== Retrieve In the route below, we use the qdrant component to retrieve information of a single point by id from the collection named _myCollection_: @@ -158,7 +160,7 @@ from("direct:in") -=== Delete +==== Delete In the route below, we use the qdrant component to delete points from the collection named `myCollection` according to a criteria: diff --git a/components/camel-box/camel-box-component/src/main/docs/box-component.adoc b/components/camel-box/camel-box-component/src/main/docs/box-component.adoc index a940181c2f7..fd538521b1b 100644 --- a/components/camel-box/camel-box-component/src/main/docs/box-component.adoc +++ b/components/camel-box/camel-box-component/src/main/docs/box-component.adoc @@ -69,7 +69,7 @@ include::partial$component-endpoint-options.adoc[] // endpoint options: END -== Samples +== Examples The following route uploads new files to the user's root folder: diff --git a/components/camel-browse/src/main/docs/browse-component.adoc b/components/camel-browse/src/main/docs/browse-component.adoc index 6ad6502c6ec..d2c1baf128c 100644 --- a/components/camel-browse/src/main/docs/browse-component.adoc +++ b/components/camel-browse/src/main/docs/browse-component.adoc @@ -41,7 +41,7 @@ include::partial$component-endpoint-options.adoc[] // endpoint options: END -== Sample +== Example In the route below, we insert a `browse:` component to be able to browse the Exchanges that are passing through: diff --git a/components/camel-chunk/src/main/docs/chunk-component.adoc b/components/camel-chunk/src/main/docs/chunk-component.adoc index 62da250d401..f6c938fb6ee 100644 --- a/components/camel-chunk/src/main/docs/chunk-component.adoc +++ b/components/camel-chunk/src/main/docs/chunk-component.adoc @@ -89,7 +89,7 @@ resource. This allows you to provide a dynamic template at runtime. include::partial$component-endpoint-headers.adoc[] // component headers: END -== Samples +== Examples For example, you could use something like: @@ -133,7 +133,7 @@ to("chunk:file_example?themeFolder=template&themeSubfolder=subfolder&extension=c In this example, the Chunk component will look for the file `file_example.chunk` in the folder `template/subfolder`. -== The Email Sample +== The Email Example In this sample, we want to use Chunk templating for an order confirmation email. The email template is laid out in Chunk as: diff --git a/components/camel-cm-sms/src/main/docs/cm-sms-component.adoc b/components/camel-cm-sms/src/main/docs/cm-sms-component.adoc index 273cefdfec5..f56b560ae00 100644 --- a/components/camel-cm-sms/src/main/docs/cm-sms-component.adoc +++ b/components/camel-cm-sms/src/main/docs/cm-sms-component.adoc @@ -36,7 +36,7 @@ include::partial$component-endpoint-options.adoc[] // endpoint options: END -== Sample +== Example ---- cm-sms://sgw01.cm.nl/gateway.ashx?defaultFrom=DefaultSender&defaultMaxNumberOfParts=8&productToken=xxxxx diff --git a/components/camel-cometd/src/main/docs/cometd-component.adoc b/components/camel-cometd/src/main/docs/cometd-component.adoc index 88e3167234f..00366f71656 100644 --- a/components/camel-cometd/src/main/docs/cometd-component.adoc +++ b/components/camel-cometd/src/main/docs/cometd-component.adoc @@ -69,7 +69,7 @@ include::partial$component-endpoint-options.adoc[] include::partial$component-endpoint-headers.adoc[] // component headers: END -== Samples +== Examples Below, you can find some examples of how to pass the parameters. diff --git a/components/camel-couchdb/src/main/docs/couchdb-component.adoc b/components/camel-couchdb/src/main/docs/couchdb-component.adoc index c1de7acc630..947db3e73ba 100644 --- a/components/camel-couchdb/src/main/docs/couchdb-component.adoc +++ b/components/camel-couchdb/src/main/docs/couchdb-component.adoc @@ -96,7 +96,7 @@ the producer will throw an unsupported body type exception. To update a CouchDB document, its `id` and `rev` field must be part of the json payload routed to CouchDB by Camel. ==== -== Samples +== Examples For example, if you wish to consume all inserts, updates and deletes from a CouchDB instance running locally, on port 9999, then you could use the diff --git a/components/camel-dataformat/src/main/docs/dataformat-component.adoc b/components/camel-dataformat/src/main/docs/dataformat-component.adoc index 45d775dd196..c50dd3d356f 100644 --- a/components/camel-dataformat/src/main/docs/dataformat-component.adoc +++ b/components/camel-dataformat/src/main/docs/dataformat-component.adoc @@ -48,7 +48,7 @@ include::partial$component-endpoint-options.adoc[] // endpoint options: END -== Samples +== Examples For example, to use the xref:dataformats:jaxb-dataformat.adoc[JAXB] xref:manual::data-format.adoc[Data Format], we can do as follows: diff --git a/components/camel-debezium/camel-debezium-db2/src/main/docs/debezium-db2-component.adoc b/components/camel-debezium/camel-debezium-db2/src/main/docs/debezium-db2-component.adoc index 63c36dd9a91..bafc9b10fea 100644 --- a/components/camel-debezium/camel-debezium-db2/src/main/docs/debezium-db2-component.adoc +++ b/components/camel-debezium/camel-debezium-db2/src/main/docs/debezium-db2-component.adoc @@ -76,7 +76,7 @@ include::partial$component-endpoint-headers.adoc[] == Message body The message body if is not `null` (in case of tombstones), it contains the state of the row after the event occurred as `Struct` format or `Map` format if you use the included Type Converter from `Struct` to `Map` (please look below for more explanation). -== Samples +== Examples === Consuming events diff --git a/components/camel-debezium/camel-debezium-mongodb/src/main/docs/debezium-mongodb-component.adoc b/components/camel-debezium/camel-debezium-mongodb/src/main/docs/debezium-mongodb-component.adoc index d89b1f08379..31cc12a6a9e 100644 --- a/components/camel-debezium/camel-debezium-mongodb/src/main/docs/debezium-mongodb-component.adoc +++ b/components/camel-debezium/camel-debezium-mongodb/src/main/docs/debezium-mongodb-component.adoc @@ -82,7 +82,7 @@ include::partial$component-endpoint-headers.adoc[] == Message body The message body if is not `null` (in case of tombstones), it contains the state of the row after the event occurred as `String` JSON format, and you can unmarshal using Camel JSON Data Format. -== Samples +== Examples === Consuming events diff --git a/components/camel-debezium/camel-debezium-mysql/src/main/docs/debezium-mysql-component.adoc b/components/camel-debezium/camel-debezium-mysql/src/main/docs/debezium-mysql-component.adoc index 12c61ab029e..0783751840b 100644 --- a/components/camel-debezium/camel-debezium-mysql/src/main/docs/debezium-mysql-component.adoc +++ b/components/camel-debezium/camel-debezium-mysql/src/main/docs/debezium-mysql-component.adoc @@ -93,7 +93,7 @@ The message body if is not `null` (in case of tombstones), it contains the state Check below for more details. ==== -== Samples +== Examples === Consuming events diff --git a/components/camel-debezium/camel-debezium-oracle/src/main/docs/debezium-oracle-component.adoc b/components/camel-debezium/camel-debezium-oracle/src/main/docs/debezium-oracle-component.adoc index f7241a4acc0..75d3c10dbdc 100644 --- a/components/camel-debezium/camel-debezium-oracle/src/main/docs/debezium-oracle-component.adoc +++ b/components/camel-debezium/camel-debezium-oracle/src/main/docs/debezium-oracle-component.adoc @@ -79,7 +79,7 @@ The message body if is not `null` (in case of tombstones), it contains the state Check below for more details. ==== -== Samples +== Examples === Consuming events diff --git a/components/camel-debezium/camel-debezium-postgres/src/main/docs/debezium-postgres-component.adoc b/components/camel-debezium/camel-debezium-postgres/src/main/docs/debezium-postgres-component.adoc index a09148a2153..89e976cfad9 100644 --- a/components/camel-debezium/camel-debezium-postgres/src/main/docs/debezium-postgres-component.adoc +++ b/components/camel-debezium/camel-debezium-postgres/src/main/docs/debezium-postgres-component.adoc @@ -79,7 +79,7 @@ The message body if is not `null` (in case of tombstones), it contains the state Check below for more details. ==== -== Samples +== Examples === Consuming events diff --git a/components/camel-debezium/camel-debezium-sqlserver/src/main/docs/debezium-sqlserver-component.adoc b/components/camel-debezium/camel-debezium-sqlserver/src/main/docs/debezium-sqlserver-component.adoc index a3a7ae59fb8..b90695b1720 100644 --- a/components/camel-debezium/camel-debezium-sqlserver/src/main/docs/debezium-sqlserver-component.adoc +++ b/components/camel-debezium/camel-debezium-sqlserver/src/main/docs/debezium-sqlserver-component.adoc @@ -78,7 +78,7 @@ The message body if is not `null` (in case of tombstones), it contains the state Check below for more details. ==== -== Samples +== Examples === Consuming events diff --git a/components/camel-direct/src/main/docs/direct-component.adoc b/components/camel-direct/src/main/docs/direct-component.adoc index e494e7a741a..889f35cee1f 100644 --- a/components/camel-direct/src/main/docs/direct-component.adoc +++ b/components/camel-direct/src/main/docs/direct-component.adoc @@ -51,7 +51,7 @@ include::partial$component-endpoint-options.adoc[] // endpoint options: END -== Samples +== Examples In the route below, we use the direct component to link the two routes together: diff --git a/components/camel-disruptor/src/main/docs/disruptor-component.adoc b/components/camel-disruptor/src/main/docs/disruptor-component.adoc index 2d80873d689..c039ade687d 100644 --- a/components/camel-disruptor/src/main/docs/disruptor-component.adoc +++ b/components/camel-disruptor/src/main/docs/disruptor-component.adoc @@ -170,7 +170,7 @@ of the performance gains achieved by using the Disruptor. Instead, it is advices to directly configure the number of threads that process messages on a Disruptor endpoint using the concurrentConsumers option. -== Sample +== Example In the route below, we use the Disruptor to send the request to this async queue. diff --git a/components/camel-dropbox/src/main/docs/dropbox-component.adoc b/components/camel-dropbox/src/main/docs/dropbox-component.adoc index af0452629df..77cb24e2b20 100644 --- a/components/camel-dropbox/src/main/docs/dropbox-component.adoc +++ b/components/camel-dropbox/src/main/docs/dropbox-component.adoc @@ -106,7 +106,7 @@ Below are listed the options for this operation: |`remotePath` |`true` |Folder or file to delete on Dropbox |=== -=== Samples +=== Examples [source,java] ---- @@ -147,7 +147,7 @@ Below are listed the options for this operation: |`remotePath` |`true` |Folder or file to download from Dropbox |=== -=== Samples +=== Examples [source,java] ---- @@ -198,7 +198,7 @@ Below are listed the options for this operation: |`newRemotePath` |`true` |Destination file or folder |=== -=== Samples +=== Examples [source,java] ---- @@ -250,7 +250,7 @@ Caused by: java.lang.IllegalArgumentException: 'path': bad path: must start with |=== -=== Samples +=== Examples [source,java] ---- @@ -313,7 +313,7 @@ will be matched. The query is required to be provided in either the endpoint con or as a header `CamelDropboxQuery` on the Camel message. |=== -=== Samples +=== Examples [source,java] ---- diff --git a/components/camel-file/src/main/docs/file-component.adoc b/components/camel-file/src/main/docs/file-component.adoc index fc22b67a4f3..b1cc3af5d48 100644 --- a/components/camel-file/src/main/docs/file-component.adoc +++ b/components/camel-file/src/main/docs/file-component.adoc @@ -904,7 +904,7 @@ prior actions such as interceptors, onCompletion to take action. This component has log level *TRACE* that can be helpful if you have problems. -== Samples +== Examples [[File2-ReadingFromADirectoryAndTheDefaultMoveOperation]] === Reading from a directory and the default move operation diff --git a/components/camel-freemarker/src/main/docs/freemarker-component.adoc b/components/camel-freemarker/src/main/docs/freemarker-component.adoc index 625b2f3c285..7f64f8bd20e 100644 --- a/components/camel-freemarker/src/main/docs/freemarker-component.adoc +++ b/components/camel-freemarker/src/main/docs/freemarker-component.adoc @@ -126,7 +126,7 @@ resource. This allows you to provide a dynamic template at runtime. include::partial$component-endpoint-headers.adoc[] // component headers: END -== Samples +== Examples For example, you could use something like: @@ -178,7 +178,7 @@ from("direct:in"). to("freemarker:dummy?allowTemplateFromHeader=true"); --------------------------------------------------------------------------------------------- -== The Email Sample +== The Email Example In this sample, we want to use FreeMarker templating for an order confirmation email. The email template is laid out in FreeMarker as: diff --git a/components/camel-ftp/src/main/docs/ftp-component.adoc b/components/camel-ftp/src/main/docs/ftp-component.adoc index 123cada4bee..326dc60a3a1 100644 --- a/components/camel-ftp/src/main/docs/ftp-component.adoc +++ b/components/camel-ftp/src/main/docs/ftp-component.adoc @@ -552,7 +552,7 @@ String data = template.retrieveBodyNoWait("ftp://admin@localhost:21/nolist/?pass This component has log level *TRACE* that can be helpful if you have problems. -== Samples +== Examples In the sample below, we set up Camel to download all the reports from the FTP server once every hour (60 min) as BINARY content and store it as diff --git a/components/camel-geocoder/src/main/docs/geocoder-component.adoc b/components/camel-geocoder/src/main/docs/geocoder-component.adoc index 7270bcaa111..f8d2b39ff37 100644 --- a/components/camel-geocoder/src/main/docs/geocoder-component.adoc +++ b/components/camel-geocoder/src/main/docs/geocoder-component.adoc @@ -78,7 +78,7 @@ If the option `headersOnly` is set to `true` then the message body is left as-is, and only headers will be added to the Exchange. -== Samples +== Examples In the example below, we get the latitude and longitude for Paris, France diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-atomicvalue-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-atomicvalue-component.adoc index 4fa4e49e432..245429d612b 100644 --- a/components/camel-hazelcast/src/main/docs/hazelcast-atomicvalue-component.adoc +++ b/components/camel-hazelcast/src/main/docs/hazelcast-atomicvalue-component.adoc @@ -49,7 +49,7 @@ The operations for this producer are: include::partial$component-endpoint-headers.adoc[] // component headers: END -=== Sample for *set*: +=== Example for *set*: [tabs] ==== @@ -81,7 +81,7 @@ Spring XML:: Provide the value to set inside the message body (here the value is 10): `template.sendBody("direct:set", 10);` -=== Sample for *get*: +=== Example for *get*: [tabs] ==== @@ -113,7 +113,7 @@ Spring XML:: You can get the number with `long body = template.requestBody("direct:get", null, Long.class);`. -=== Sample for *increment*: +=== Example for *increment*: [tabs] ==== @@ -146,7 +146,7 @@ Spring XML:: The actual value (after increment) will be provided inside the message body. -=== Sample for *decrement*: +=== Example for *decrement*: [tabs] ==== @@ -179,7 +179,7 @@ Spring XML:: The actual value (after decrement) will be provided inside the message body. -=== Sample for *destroy* +=== Example for *destroy* [tabs] ==== diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-list-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-list-component.adoc index 67fffbe245c..e3c2c56747e 100644 --- a/components/camel-hazelcast/src/main/docs/hazelcast-list-component.adoc +++ b/components/camel-hazelcast/src/main/docs/hazelcast-list-component.adoc @@ -50,7 +50,7 @@ The list producer provides eight operations: include::partial$component-endpoint-headers.adoc[] // component headers: END -=== Sample for *add*: +=== Example for *add*: [source,java] ------------------------------------------------------------------------------------ @@ -59,7 +59,7 @@ from("direct:add") .toF("hazelcast-%sbar", HazelcastConstants.LIST_PREFIX); ------------------------------------------------------------------------------------ -=== Sample for *get*: +=== Example for *get*: [source,java] ------------------------------------------------------------------------------------ @@ -69,7 +69,7 @@ from("direct:get") .to("seda:out"); ------------------------------------------------------------------------------------ -=== Sample for *setvalue*: +=== Example for *setvalue*: [source,java] ----------------------------------------------------------------------------------------- @@ -78,7 +78,7 @@ from("direct:set") .toF("hazelcast-%sbar", HazelcastConstants.LIST_PREFIX); ----------------------------------------------------------------------------------------- -=== Sample for *removevalue*: +=== Example for *removevalue*: [source,java] -------------------------------------------------------------------------------------------- diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-map-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-map-component.adoc index 287604bfa97..bb8fc56eaae 100644 --- a/components/camel-hazelcast/src/main/docs/hazelcast-map-component.adoc +++ b/components/camel-hazelcast/src/main/docs/hazelcast-map-component.adoc @@ -66,7 +66,7 @@ You can call the samples with: template.sendBodyAndHeader("direct:[put|get|update|delete|query|evict]", "my-foo", HazelcastConstants.OBJECT_ID, "4711"); ------------------------------------------------------------------------------------------------------------------- -=== Sample for *put*: +=== Example for *put*: [tabs] ==== @@ -133,7 +133,7 @@ Spring XML:: ==== -=== Sample for *get*: +=== Example for *get*: [tabs] ==== @@ -164,7 +164,7 @@ Spring XML:: ==== -=== Sample for *update*: +=== Example for *update*: [tabs] ==== @@ -193,7 +193,7 @@ Spring XML:: ==== -=== Sample for *delete*: +=== Example for *delete*: [tabs] ==== @@ -223,7 +223,7 @@ Spring XML:: ==== -=== Sample for *query* +=== Example for *query* [tabs] ==== diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-multimap-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-multimap-component.adoc index 7f294f6543c..3b90a12d85d 100644 --- a/components/camel-hazelcast/src/main/docs/hazelcast-multimap-component.adoc +++ b/components/camel-hazelcast/src/main/docs/hazelcast-multimap-component.adoc @@ -53,7 +53,7 @@ The multimap producer provides eight operations: include::partial$component-endpoint-headers.adoc[] // component headers: END -=== Sample for *put*: +=== Example for *put*: [tabs] ==== @@ -83,7 +83,7 @@ Spring XML:: ==== -=== Sample for *removevalue*: +=== Example for *removevalue*: [tabs] ==== @@ -119,7 +119,7 @@ inside the message body. If you have a multimap object `\{`key: "4711" values: { "my-foo", "my-bar"`}}` you have to put `my-foo` inside the message body to remove the `my-foo` value. -=== Sample for *get*: +=== Example for *get*: [tabs] ==== @@ -151,7 +151,7 @@ Spring XML:: ==== -=== Sample for *delete*: +=== Example for *delete*: [tabs] ==== diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-queue-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-queue-component.adoc index 78ce518d615..c05ab23e23c 100644 --- a/components/camel-hazelcast/src/main/docs/hazelcast-queue-component.adoc +++ b/components/camel-hazelcast/src/main/docs/hazelcast-queue-component.adoc @@ -54,7 +54,7 @@ The queue producer provides 12 operations: include::partial$component-endpoint-headers.adoc[] // component headers: END -=== Sample for *add*: +=== Example for *add*: [source,java] ------------------------------------------------------------------------------------ @@ -63,7 +63,7 @@ from("direct:add") .toF("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX); ------------------------------------------------------------------------------------ -=== Sample for *put*: +=== Example for *put*: [source,java] ------------------------------------------------------------------------------------ @@ -72,7 +72,7 @@ from("direct:put") .toF("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX); ------------------------------------------------------------------------------------ -=== Sample for *poll*: +=== Example for *poll*: [source,java] ------------------------------------------------------------------------------------- @@ -81,7 +81,7 @@ from("direct:poll") .toF("hazelcast:%sbar", HazelcastConstants.QUEUE_PREFIX); ------------------------------------------------------------------------------------- -=== Sample for *peek*: +=== Example for *peek*: [source,java] ------------------------------------------------------------------------------------- @@ -90,7 +90,7 @@ from("direct:peek") .toF("hazelcast:%sbar", HazelcastConstants.QUEUE_PREFIX); ------------------------------------------------------------------------------------- -=== Sample for *offer*: +=== Example for *offer*: [source,java] -------------------------------------------------------------------------------------- @@ -99,7 +99,7 @@ from("direct:offer") .toF("hazelcast:%sbar", HazelcastConstants.QUEUE_PREFIX); -------------------------------------------------------------------------------------- -=== Sample for *removevalue*: +=== Example for *removevalue*: [source,java] -------------------------------------------------------------------------------------------- @@ -108,7 +108,7 @@ from("direct:removevalue") .toF("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX); -------------------------------------------------------------------------------------------- -=== Sample for *remaining capacity*: +=== Example for *remaining capacity*: [source,java] -------------------------------------------------------------------------------------------- @@ -116,7 +116,7 @@ from("direct:remaining-capacity").setHeader(HazelcastConstants.OPERATION, consta String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX)); -------------------------------------------------------------------------------------------- -=== Sample for *remove all*: +=== Example for *remove all*: [source,java] -------------------------------------------------------------------------------------------- @@ -124,7 +124,7 @@ from("direct:removeAll").setHeader(HazelcastConstants.OPERATION, constant(Hazelc String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX)); -------------------------------------------------------------------------------------------- -=== Sample for *remove if*: +=== Example for *remove if*: [source,java] -------------------------------------------------------------------------------------------- @@ -132,7 +132,7 @@ from("direct:removeIf").setHeader(HazelcastConstants.OPERATION, constant(Hazelca String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX)); -------------------------------------------------------------------------------------------- -=== Sample for *drain to*: +=== Example for *drain to*: [source,java] -------------------------------------------------------------------------------------------- @@ -140,7 +140,7 @@ from("direct:drainTo").setHeader(HazelcastConstants.OPERATION, constant(Hazelcas String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX)); -------------------------------------------------------------------------------------------- -=== Sample for *take*: +=== Example for *take*: [source,java] -------------------------------------------------------------------------------------------- @@ -148,7 +148,7 @@ from("direct:take").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOp String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX)); -------------------------------------------------------------------------------------------- -=== Sample for *retain all*: +=== Example for *retain all*: [source,java] -------------------------------------------------------------------------------------------- diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-replicatedmap-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-replicatedmap-component.adoc index b7413e842db..a718ae1112d 100644 --- a/components/camel-hazelcast/src/main/docs/hazelcast-replicatedmap-component.adoc +++ b/components/camel-hazelcast/src/main/docs/hazelcast-replicatedmap-component.adoc @@ -48,7 +48,7 @@ The replicatedmap producer provides 6 operations: include::partial$component-endpoint-headers.adoc[] // component headers: END -=== Sample for *put*: +=== Example for *put*: [tabs] ==== @@ -78,7 +78,7 @@ Spring XML:: ==== -=== Sample for *get*: +=== Example for *get*: [tabs] ==== @@ -110,7 +110,7 @@ Spring XML:: ==== -=== Sample for *delete*: +=== Example for *delete*: [tabs] ==== diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-ringbuffer-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-ringbuffer-component.adoc index a940136c970..e183d0fe18d 100644 --- a/components/camel-hazelcast/src/main/docs/hazelcast-ringbuffer-component.adoc +++ b/components/camel-hazelcast/src/main/docs/hazelcast-ringbuffer-component.adoc @@ -47,7 +47,7 @@ The ringbuffer producer provides 5 operations: include::partial$component-endpoint-headers.adoc[] // component headers: END -=== Sample for *put*: +=== Example for *put*: [tabs] ==== @@ -77,7 +77,7 @@ Spring XML:: ==== -=== Sample for *readonce from head*: +=== Example for *readonce from head*: Java DSL: diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-topic-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-topic-component.adoc index 5189582fda9..1bacfdb4158 100644 --- a/components/camel-hazelcast/src/main/docs/hazelcast-topic-component.adoc +++ b/components/camel-hazelcast/src/main/docs/hazelcast-topic-component.adoc @@ -42,7 +42,7 @@ The topic producer provides only one operation (publish). include::partial$component-endpoint-headers.adoc[] // component headers: END -=== Sample for *publish*: +=== Example for *publish*: [source,java] ---------------------------------------------------------------------------------------- diff --git a/components/camel-http/src/main/docs/http-component.adoc b/components/camel-http/src/main/docs/http-component.adoc index 05921295ea5..0527caf5b5d 100644 --- a/components/camel-http/src/main/docs/http-component.adoc +++ b/components/camel-http/src/main/docs/http-component.adoc @@ -276,7 +276,7 @@ using the `Exchange` property: exchange.setProperty(Exchange.CHARSET_NAME, "ISO-8859-1"); ---------------------------------------------------------- -=== Sample with scheduled poll +=== Example with scheduled poll This sample polls the Google homepage every 10 seconds and write the page to the file `message.html`: diff --git a/components/camel-jdbc/src/main/docs/jdbc-component.adoc b/components/camel-jdbc/src/main/docs/jdbc-component.adoc index 3cfe19c6faa..7dbf6814b71 100644 --- a/components/camel-jdbc/src/main/docs/jdbc-component.adoc +++ b/components/camel-jdbc/src/main/docs/jdbc-component.adoc @@ -107,7 +107,7 @@ Notice in the example above we set two headers with constant value You can also store the header values in a `java.util.Map` and store the map on the headers with the key `CamelJdbcParameters`. -== Samples +== Examples In the following example, we set up the DataSource that camel-jdbc requires. First we register our datasource in the Camel registry as `testdb`: diff --git a/components/camel-jms/src/main/docs/jms-component.adoc b/components/camel-jms/src/main/docs/jms-component.adoc index 48232ba3095..109d8217410 100644 --- a/components/camel-jms/src/main/docs/jms-component.adoc +++ b/components/camel-jms/src/main/docs/jms-component.adoc @@ -209,7 +209,7 @@ include::partial$component-endpoint-options.adoc[] include::partial$component-endpoint-headers.adoc[] // component headers: END -== Samples +== Examples JMS is used in many examples for other components as well. But we provide a few samples below to get started. @@ -253,7 +253,7 @@ from("file://orders"). Camel also has annotations, so you can use xref:manual::pojo-consuming.adoc[POJO Consuming] and xref:manual::pojo-producing.adoc[POJO Producing]. -=== Spring DSL sample +=== Spring DSL Example The preceding examples use the Java DSL. Camel also supports Spring XML DSL. Here is the big spender sample using Spring DSL: @@ -269,7 +269,7 @@ DSL. Here is the big spender sample using Spring DSL: </route> --------------------------------------------------- -=== Other samples +=== Other Examples JMS appears in many of the examples for other components and EIP patterns, as well in this Camel documentation. So feel free to browse diff --git a/components/camel-jolt/src/main/docs/jolt-component.adoc b/components/camel-jolt/src/main/docs/jolt-component.adoc index b61708857ca..d1b7925f0b9 100644 --- a/components/camel-jolt/src/main/docs/jolt-component.adoc +++ b/components/camel-jolt/src/main/docs/jolt-component.adoc @@ -59,7 +59,7 @@ include::partial$component-endpoint-options.adoc[] include::partial$component-endpoint-headers.adoc[] // component headers: END -== Samples +== Examples For example, you could use something like diff --git a/components/camel-jslt/src/main/docs/jslt-component.adoc b/components/camel-jslt/src/main/docs/jslt-component.adoc index 1a54fb55310..9080ed47ea1 100644 --- a/components/camel-jslt/src/main/docs/jslt-component.adoc +++ b/components/camel-jslt/src/main/docs/jslt-component.adoc @@ -83,7 +83,7 @@ For example, the header named `type` and the exchange property `instance` can be } -------------------------------------- -== Samples +== Examples For example, you could use something like: diff --git a/components/camel-jsonata/src/main/docs/jsonata-component.adoc b/components/camel-jsonata/src/main/docs/jsonata-component.adoc index 10af5b7b474..dee5a05e197 100644 --- a/components/camel-jsonata/src/main/docs/jsonata-component.adoc +++ b/components/camel-jsonata/src/main/docs/jsonata-component.adoc @@ -56,7 +56,7 @@ include::partial$component-endpoint-options.adoc[] // endpoint options: END -== Samples +== Examples === Basic diff --git a/components/camel-jte/src/main/docs/jte-component.adoc b/components/camel-jte/src/main/docs/jte-component.adoc index 7c8770f9f31..c0c1d571b0a 100644 --- a/components/camel-jte/src/main/docs/jte-component.adoc +++ b/components/camel-jte/src/main/docs/jte-component.adoc @@ -97,7 +97,7 @@ resource. This allows you to provide a dynamic template at runtime. include::partial$component-endpoint-headers.adoc[] // component headers: END -== Samples +== Examples For example, you could use something like: diff --git a/components/camel-kafka/src/main/docs/kafka-component.adoc b/components/camel-kafka/src/main/docs/kafka-component.adoc index 96b485cbc58..5514f8c860e 100644 --- a/components/camel-kafka/src/main/docs/kafka-component.adoc +++ b/components/camel-kafka/src/main/docs/kafka-component.adoc @@ -103,7 +103,7 @@ camelContext.addComponent("kafka", kafka); It is recommended that you read the section below "Using manual commit with Kafka consumer" to understand how `breakOnFirstError` will work based on the `CommitManager` that is configured. -== Samples +== Examples === Consuming messages from Kafka diff --git a/components/camel-kamelet/src/main/docs/kamelet-component.adoc b/components/camel-kamelet/src/main/docs/kamelet-component.adoc index 898792e04c7..5b713d31031 100644 --- a/components/camel-kamelet/src/main/docs/kamelet-component.adoc +++ b/components/camel-kamelet/src/main/docs/kamelet-component.adoc @@ -46,7 +46,7 @@ The *kamelet* endpoint is *lenient*, which means that the endpoint accepts addit If a xref:manual::route-template.adoc[Route Template] is not found, the *kamelet* endpoint tries to load the related *kamelet* definition from the file system (by default `classpath:kamelets`). The default resolution mechanism expects _Kamelets_ files to have the extension `.kamelet.yaml`. -== Samples +== Examples _Kamelets_ can be used as if they were standard Camel components. diff --git a/components/camel-ldap/src/main/docs/ldap-component.adoc b/components/camel-ldap/src/main/docs/ldap-component.adoc index 37bd4157ec4..14203efdcd9 100644 --- a/components/camel-ldap/src/main/docs/ldap-component.adoc +++ b/components/camel-ldap/src/main/docs/ldap-component.adoc @@ -125,7 +125,7 @@ to escape string values to be LDAP injection safe. See the following link for information about https://cheatsheetseries.owasp.org/cheatsheets/LDAP_Injection_Prevention_Cheat_Sheet.html[LDAP Injection]. -== Samples +== Examples Following on from the configuration above, the code sample below sends an LDAP request to filter search a group for a member. The Common diff --git a/components/camel-ldif/src/main/docs/ldif-component.adoc b/components/camel-ldif/src/main/docs/ldif-component.adoc index b91aff70265..667b4e75e66 100644 --- a/components/camel-ldif/src/main/docs/ldif-component.adoc +++ b/components/camel-ldif/src/main/docs/ldif-component.adoc @@ -134,7 +134,7 @@ or in a OSGi blueprint.xml: ---- -== Samples +== Examples Following on from the Spring configuration above, the code sample below sends an LDAP request to filter search a group for a member. The Common diff --git a/components/camel-log/src/main/docs/log-component.adoc b/components/camel-log/src/main/docs/log-component.adoc index 451bc896382..fe929f5a2a2 100644 --- a/components/camel-log/src/main/docs/log-component.adoc +++ b/components/camel-log/src/main/docs/log-component.adoc @@ -81,7 +81,7 @@ include::partial$component-endpoint-options.adoc[] // endpoint options: END -== Regular logger sample +== Regular logger example In the route below we log the incoming orders at `DEBUG` level before the order is processed: @@ -102,7 +102,7 @@ Or using Spring XML to define the route: </route> ---- -== Regular logger with formatter sample +== Regular logger with formatter example In the route below we log the incoming orders at `INFO` level before the order is processed. @@ -113,7 +113,7 @@ from("activemq:orders"). to("log:com.mycompany.order?showAll=true&multiline=true").to("bean:processOrder"); ---- -== Throughput logger with groupSize sample +== Throughput logger with groupSize example In the route below we log the throughput of the incoming orders at `DEBUG` level grouped by 10 messages. @@ -124,7 +124,7 @@ from("activemq:orders"). to("log:com.mycompany.order?level=DEBUG&groupSize=10").to("bean:processOrder"); ---- -== Throughput logger with groupInterval sample +== Throughput logger with groupInterval example This route will result in message stats logged every 10s, with an initial 60s delay, and stats should be displayed even if there isn't any diff --git a/components/camel-lucene/src/main/docs/lucene-component.adoc b/components/camel-lucene/src/main/docs/lucene-component.adoc index 247c0e33ad5..02828d65106 100644 --- a/components/camel-lucene/src/main/docs/lucene-component.adoc +++ b/components/camel-lucene/src/main/docs/lucene-component.adoc @@ -88,7 +88,9 @@ check out https://lucene.apache.org/core/8_4_1/queryparser/org/apache/lucene/que There is a processor called LuceneQueryProcessor available to perform queries against lucene without the need to create a producer. -== Lucene Usage Samples +== Examples + +Lucene usage samples. === Example 1: Creating a Lucene index diff --git a/components/camel-lumberjack/src/main/docs/lumberjack-component.adoc b/components/camel-lumberjack/src/main/docs/lumberjack-component.adoc index 5f852f58c23..fa346bcdbe4 100644 --- a/components/camel-lumberjack/src/main/docs/lumberjack-component.adoc +++ b/components/camel-lumberjack/src/main/docs/lumberjack-component.adoc @@ -55,7 +55,9 @@ include::partial$component-endpoint-options.adoc[] The result body is a `Map<String, Object>` object. -== Lumberjack Usage Samples +== Examples + +Lumberjack usage samples. === Example 1: Streaming the log messages diff --git a/components/camel-mail-microsoft-oauth/src/main/docs/mail-microsoft-oauth.adoc b/components/camel-mail-microsoft-oauth/src/main/docs/mail-microsoft-oauth.adoc index 93491d4f42c..627d396f0e0 100644 --- a/components/camel-mail-microsoft-oauth/src/main/docs/mail-microsoft-oauth.adoc +++ b/components/camel-mail-microsoft-oauth/src/main/docs/mail-microsoft-oauth.adoc @@ -31,7 +31,8 @@ for this component: Importing `camel-mail-microsoft-oauth` it will automatically import the camel-mail component. -== Microsoft Exchange Online OAuth2 Mail Authenticator IMAP sample +== Microsoft Exchange Online OAuth2 Mail Authenticator IMAP example + To use OAuth, an application must be registered with Azure Active Directory. Follow the instructions listed in https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app[Register an application with the Microsoft identity platform] guide to register a new application. + Enable application to access Exchange mailboxes via client credentials flow. Instructions https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth[here] + diff --git a/components/camel-mail/src/main/docs/mail-component.adoc b/components/camel-mail/src/main/docs/mail-component.adoc index 63e86eba68a..378877b5612 100644 --- a/components/camel-mail/src/main/docs/mail-component.adoc +++ b/components/camel-mail/src/main/docs/mail-component.adoc @@ -89,7 +89,7 @@ include::partial$component-endpoint-options.adoc[] include::partial$component-endpoint-headers.adoc[] // component headers: END -=== Sample endpoints +=== Example endpoints Typically, you specify a URI with login credentials as follows: @@ -310,7 +310,7 @@ IMAP API] https://javamail.java.net/nonav/docs/api/javax/mail/Flags.html[MAIL Flags] -== Samples +== Examples We start with a simple route that sends the messages received from a JMS queue as emails. The email account is the `admin` account on @@ -329,7 +329,7 @@ from("imap://ad...@mymailserver.com?password=secret&unseen=true&delay=60000") .to("seda://mails"); ------------------------------------------------------- -== Sending mail with attachment sample +=== Sending mail with attachment [WARNING] @@ -370,7 +370,7 @@ producer.start(); producer.process(exchange); ------------------------------------------------------- -== SSL sample +=== SSL example In this sample, we want to poll our Google Mail inbox for mails. To download mail onto a local mail client, Google Mail requires you to @@ -399,7 +399,7 @@ progress in the logs: 2008-05-08 06:32:12,187 INFO newmail - Exchange[MailMessage: messageNumber=[332], from=[James Bond <0...@mi5.co.uk>], to=your_usern...@gmail.com], subject=[... ------------------------------------------------------------------------------------------------------------------------------------------------------------------ -== Consuming mails with attachment sample +=== Consuming mails with attachment In this sample, we poll a mailbox and store all attachments from the mails as files. First, we define a route to poll the mailbox. As this diff --git a/components/camel-mina/src/main/docs/mina-component.adoc b/components/camel-mina/src/main/docs/mina-component.adoc index 4c29aaece85..3bd64b3942c 100644 --- a/components/camel-mina/src/main/docs/mina-component.adoc +++ b/components/camel-mina/src/main/docs/mina-component.adoc @@ -93,7 +93,7 @@ Registry; for example, by creating a bean in the Spring XML file. Then use the `codec` option to specify the bean ID of your codec. See xref:dataformats:hl7-dataformat.adoc[HL7] that has a custom codec. -=== Sample with sync=false +=== Example with sync=false In this sample, Camel exposes a service that listens for TCP connections on port 6200. We use the *textline* codec. In our route, we create a @@ -117,7 +117,7 @@ template.sendBody("mina:tcp://localhost:" + port1 + "?textline=true&sync=false", MockEndpoint.assertIsSatisfied(context); ------------------------------------------------------------------------------------------------- -=== Sample with sync=true +=== Example with sync=true In the next sample, we have a more common use case where we expose a TCP service on port 6201 also use the textline codec. However, this time we @@ -145,7 +145,7 @@ String response = (String)template.requestBody("mina:tcp://localhost:" + port2 + assertEquals("Bye World", response); ----------------------------------------------------------------------------------------------------------------------- -== Sample with Spring DSL +== Example with Spring DSL Spring DSL can also be used for xref:mina-component.adoc[MINA]. In the sample below, we expose a TCP server on port 5555: diff --git a/components/camel-mongodb-gridfs/src/main/docs/mongodb-gridfs-component.adoc b/components/camel-mongodb-gridfs/src/main/docs/mongodb-gridfs-component.adoc index a23694fa50c..28011222e1b 100644 --- a/components/camel-mongodb-gridfs/src/main/docs/mongodb-gridfs-component.adoc +++ b/components/camel-mongodb-gridfs/src/main/docs/mongodb-gridfs-component.adoc @@ -66,7 +66,7 @@ MongoDB instance. </beans> ---------------------------------------------------------------------------------------------------------------------------------- -== Sample route +== Example route The following route defined in Spring XML executes the operation xref:mongodb-gridfs-component.adoc[*findOne*] on a collection. diff --git a/components/camel-mongodb/src/main/docs/mongodb-component.adoc b/components/camel-mongodb/src/main/docs/mongodb-component.adoc index f993836f74e..7f059d9b51a 100644 --- a/components/camel-mongodb/src/main/docs/mongodb-component.adoc +++ b/components/camel-mongodb/src/main/docs/mongodb-component.adoc @@ -108,7 +108,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/context </beans> ---------------------------------------------------------------------------------------------------------------------------------- -== Sample route +== Example route The following route defined in Spring XML executes the operation <<getDbStats>> on a collection. diff --git a/components/camel-mustache/src/main/docs/mustache-component.adoc b/components/camel-mustache/src/main/docs/mustache-component.adoc index b7bbea54768..ad4f3fd4144 100644 --- a/components/camel-mustache/src/main/docs/mustache-component.adoc +++ b/components/camel-mustache/src/main/docs/mustache-component.adoc @@ -93,7 +93,7 @@ resource. This allows you to provide a dynamic template at runtime. include::partial$component-endpoint-headers.adoc[] // component headers: END -== Samples +== Examples For example, you could use something like: @@ -126,7 +126,7 @@ setHeader(MustacheConstants.MUSTACHE_RESOURCE_URI).constant("path/to/my/template to("mustache:dummy?allowTemplateFromHeader=true"); -------------------------------------------------------------------------------------------- -== The Email Sample +== The Email Example In this sample, we want to use Mustache templating for an order confirmation email. The email template is laid out in Mustache as: diff --git a/components/camel-mybatis/src/main/docs/mybatis-bean-component.adoc b/components/camel-mybatis/src/main/docs/mybatis-bean-component.adoc index b4af144b624..9cf2c707693 100644 --- a/components/camel-mybatis/src/main/docs/mybatis-bean-component.adoc +++ b/components/camel-mybatis/src/main/docs/mybatis-bean-component.adoc @@ -64,7 +64,7 @@ Camel will not replace the body. This allows you to continue routing and keep the original body. The response from MyBatis is always stored in the header with the key `CamelMyBatisResult`. -== Samples +== Examples For example, if you wish to consume beans from a JMS queue and insert them into a database, you could do the following: diff --git a/components/camel-mybatis/src/main/docs/mybatis-component.adoc b/components/camel-mybatis/src/main/docs/mybatis-component.adoc index f504dd98e1a..02ea4ef0438 100644 --- a/components/camel-mybatis/src/main/docs/mybatis-component.adoc +++ b/components/camel-mybatis/src/main/docs/mybatis-component.adoc @@ -77,7 +77,7 @@ Camel will not replace the body. This allows you to continue routing and keep the original body. The response from MyBatis is always stored in the header with the key `CamelMyBatisResult`. -== Samples +== Examples For example, if you wish to consume beans from a JMS queue and insert them into a database, you could do the following: diff --git a/components/camel-olingo2/camel-olingo2-component/src/main/docs/olingo2-component.adoc b/components/camel-olingo2/camel-olingo2-component/src/main/docs/olingo2-component.adoc index 0f1bc6e447c..84234635c5b 100644 --- a/components/camel-olingo2/camel-olingo2-component/src/main/docs/olingo2-component.adoc +++ b/components/camel-olingo2/camel-olingo2-component/src/main/docs/olingo2-component.adoc @@ -114,7 +114,7 @@ the OData resource being queried, created or modified. |Count |<resource-uri>/$count |java.lang.Long |======================================================================= -== Samples +== Examples The following route reads top 5 entries from the Manufacturer feed ordered by ascending Name property. diff --git a/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc b/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc index 2bc98d2df18..42649edb6c1 100644 --- a/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc +++ b/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc @@ -102,7 +102,7 @@ the OData resource being queried, created or modified. |Count |<resource-uri>/$count |`java.lang.Long` |======================================================================= -== Samples +== Examples The following route reads top 5 entries from the People entity ordered by ascending FirstName property. diff --git a/components/camel-optaplanner/src/main/docs/optaplanner-component.adoc b/components/camel-optaplanner/src/main/docs/optaplanner-component.adoc index 1205c3a47c9..9211e7f98eb 100644 --- a/components/camel-optaplanner/src/main/docs/optaplanner-component.adoc +++ b/components/camel-optaplanner/src/main/docs/optaplanner-component.adoc @@ -73,7 +73,7 @@ solver identified by solverId and either synchronously or asynchronously. the best result from the solver identified by `solverId`. -=== Samples +=== Examples Solve a planning problem on the ActiveMQ queue with OptaPlanner, passing the SolverManager: diff --git a/components/camel-paho-mqtt5/src/main/docs/paho-mqtt5-component.adoc b/components/camel-paho-mqtt5/src/main/docs/paho-mqtt5-component.adoc index 8e74398b3b7..a1a7d0b148d 100644 --- a/components/camel-paho-mqtt5/src/main/docs/paho-mqtt5-component.adoc +++ b/components/camel-paho-mqtt5/src/main/docs/paho-mqtt5-component.adoc @@ -89,7 +89,7 @@ producerTemplate.sendBody("paho-mqtt5:topic", payload); ---- -== Samples +== Examples For example, the following snippet reads messages from the MQTT broker installed on the same host as the Camel router: diff --git a/components/camel-paho/src/main/docs/paho-component.adoc b/components/camel-paho/src/main/docs/paho-component.adoc index 8f34d62ae77..19ff10be895 100644 --- a/components/camel-paho/src/main/docs/paho-component.adoc +++ b/components/camel-paho/src/main/docs/paho-component.adoc @@ -87,7 +87,7 @@ producerTemplate.sendBody("paho:topic", payload); ---- -== Samples +== Examples For example, the following snippet reads messages from the MQTT broker installed on the same host as the Camel router: diff --git a/components/camel-printer/src/main/docs/lpr-component.adoc b/components/camel-printer/src/main/docs/lpr-component.adoc index 064af213f2f..b21986d8332 100644 --- a/components/camel-printer/src/main/docs/lpr-component.adoc +++ b/components/camel-printer/src/main/docs/lpr-component.adoc @@ -72,7 +72,9 @@ Sending data to the printer is very straightforward and involves creating a producer endpoint that can be sent message exchanges on in route. -== Usage Samples +== Examples + +Usage samples. === Example 1: Printing text-based payloads on a Default printer using letter stationary and one-sided mode diff --git a/components/camel-ref/src/main/docs/ref-component.adoc b/components/camel-ref/src/main/docs/ref-component.adoc index 0de759fad61..461f80874ac 100644 --- a/components/camel-ref/src/main/docs/ref-component.adoc +++ b/components/camel-ref/src/main/docs/ref-component.adoc @@ -73,7 +73,7 @@ Registry such as: </camelContext> ---- -== Sample +== Example Bind endpoints to the Camel registry: [source,java] diff --git a/components/camel-robotframework/src/main/docs/robotframework-component.adoc b/components/camel-robotframework/src/main/docs/robotframework-component.adoc index 508aa039da8..c6a69fe0d8a 100644 --- a/components/camel-robotframework/src/main/docs/robotframework-component.adoc +++ b/components/camel-robotframework/src/main/docs/robotframework-component.adoc @@ -64,7 +64,7 @@ include::partial$component-endpoint-options.adoc[] include::partial$component-endpoint-headers.adoc[] // component headers: END -== Samples +== Examples For example, you could use something like: diff --git a/components/camel-scheduler/src/main/docs/scheduler-component.adoc b/components/camel-scheduler/src/main/docs/scheduler-component.adoc index 507b2f85190..f613b3b7c69 100644 --- a/components/camel-scheduler/src/main/docs/scheduler-component.adoc +++ b/components/camel-scheduler/src/main/docs/scheduler-component.adoc @@ -77,7 +77,7 @@ to the `Exchange`: |`Exchange.TIMER_FIRED_TIME` |`Date` |The time when the consumer fired. |=== -== Sample +== Example To set up a route that generates an event every 60 seconds: diff --git a/components/camel-schematron/src/main/docs/schematron-component.adoc b/components/camel-schematron/src/main/docs/schematron-component.adoc index 3fb838b84bb..9b03b04951c 100644 --- a/components/camel-schematron/src/main/docs/schematron-component.adoc +++ b/components/camel-schematron/src/main/docs/schematron-component.adoc @@ -114,7 +114,7 @@ harm in storing these rules in the class path though, but you will have to build and deploy the component to pick up the changes. ==== -== Schematron rules and report samples +== Schematron rules and report examples Here is an example of schematron rules diff --git a/components/camel-seda/src/main/docs/seda-component.adoc b/components/camel-seda/src/main/docs/seda-component.adoc index c824925c3f5..260223e462a 100644 --- a/components/camel-seda/src/main/docs/seda-component.adoc +++ b/components/camel-seda/src/main/docs/seda-component.adoc @@ -157,7 +157,7 @@ from("direct:stageName").thread(5).process(...) You can also directly configure number of threads that process messages on a SEDA endpoint using the `concurrentConsumers` option. -== Sample +== Example In the route below, we use the SEDA queue to send the request to this async queue. diff --git a/components/camel-smpp/src/main/docs/smpp-component.adoc b/components/camel-smpp/src/main/docs/smpp-component.adoc index 5e71a77e616..62ee7a07b2b 100644 --- a/components/camel-smpp/src/main/docs/smpp-component.adoc +++ b/components/camel-smpp/src/main/docs/smpp-component.adoc @@ -221,7 +221,7 @@ from("smpp://smppclient@localhost:2775?password=password&enquireLinkTimer=3000&t Please refer to the http://smsforum.net/SMPP_v3_4_Issue1_2.zip[SMPP specification] for the complete list of error codes and their meanings. -== Samples +== Examples A route which sends an SMS using the Java DSL: diff --git a/components/camel-stomp/src/main/docs/stomp-component.adoc b/components/camel-stomp/src/main/docs/stomp-component.adoc index 22cc8c0b288..7d6fca0b1f9 100644 --- a/components/camel-stomp/src/main/docs/stomp-component.adoc +++ b/components/camel-stomp/src/main/docs/stomp-component.adoc @@ -62,7 +62,7 @@ include::partial$component-endpoint-options.adoc[] -== Samples +== Examples Sending messages: diff --git a/components/camel-stream/src/main/docs/stream-component.adoc b/components/camel-stream/src/main/docs/stream-component.adoc index 0e9743f4505..71134b67937 100644 --- a/components/camel-stream/src/main/docs/stream-component.adoc +++ b/components/camel-stream/src/main/docs/stream-component.adoc @@ -76,7 +76,7 @@ add a `java.io.OutputStream` object to `message.in.header` in the key `header`. + See samples for an example. -== Samples +== Examples In the following sample we route messages from the `direct:in` endpoint to the `System.out` stream: diff --git a/components/camel-stringtemplate/src/main/docs/string-template-component.adoc b/components/camel-stringtemplate/src/main/docs/string-template-component.adoc index ef42df3f5ab..2d5a1eba416 100644 --- a/components/camel-stringtemplate/src/main/docs/string-template-component.adoc +++ b/components/camel-stringtemplate/src/main/docs/string-template-component.adoc @@ -122,7 +122,7 @@ variableMap.put("exchange", exchange); exchange.getIn().setHeader("CamelStringTemplateVariableMap", variableMap); -------------------------------------------------------------------------- -== Samples +== Examples For example, you could use a string template as follows in order to formulate a response to a message: @@ -133,7 +133,7 @@ from("activemq:My.Queue"). to("string-template:com/acme/MyResponse.tm"); ----------------------------------------------- -== The Email Sample +== The Email Example In this sample, we want to use a string template to send an order confirmation email. The email template is laid out in `StringTemplate` diff --git a/components/camel-thymeleaf/src/main/docs/thymeleaf-component.adoc b/components/camel-thymeleaf/src/main/docs/thymeleaf-component.adoc index de430943a27..8971d388664 100644 --- a/components/camel-thymeleaf/src/main/docs/thymeleaf-component.adoc +++ b/components/camel-thymeleaf/src/main/docs/thymeleaf-component.adoc @@ -137,7 +137,7 @@ endpoint configured. |CamelThymeleafTemplate |String |The template to use instead of the endpoint configured. |======================================================================= -== Samples +== Examples For a simple use case, you could use something like: @@ -199,7 +199,7 @@ from("direct:in") .to("thymeleaf:dummy?allowTemplateFromHeader=true""); --------------------------------------------------------------------------------------------------------------- -== The Email Sample +== The Email Example In this sample, we want to use Thymeleaf templating for an order confirmation email. The email template is laid out in Thymeleaf as: diff --git a/components/camel-timer/src/main/docs/timer-component.adoc b/components/camel-timer/src/main/docs/timer-component.adoc index 9cf52dae51c..c4ba453dc44 100644 --- a/components/camel-timer/src/main/docs/timer-component.adoc +++ b/components/camel-timer/src/main/docs/timer-component.adoc @@ -75,7 +75,7 @@ to the `Exchange`: |`Exchange.TIMER_COUNTER` |`Long` |The current fire counter. Starts from 1. |=== -== Sample +== Example To set up a route that generates an event every 60 seconds: diff --git a/components/camel-velocity/src/main/docs/velocity-component.adoc b/components/camel-velocity/src/main/docs/velocity-component.adoc index f4e83f96668..29ef11673fa 100644 --- a/components/camel-velocity/src/main/docs/velocity-component.adoc +++ b/components/camel-velocity/src/main/docs/velocity-component.adoc @@ -140,7 +140,7 @@ endpoint configured. |CamelVelocityTemplate |String |The template to use instead of the endpoint configured. |======================================================================= -== Samples +== Examples For example, you could use something like @@ -202,7 +202,7 @@ from("direct:in"). to("velocity:dummy?allowTemplateFromHeader=true""); --------------------------------------------------------------------------------------------------------------- -== The Email Sample +== The Email Example In this sample, we want to use Velocity templating for an order confirmation email. The email template is laid out in Velocity as: diff --git a/components/camel-weather/src/main/docs/weather-component.adoc b/components/camel-weather/src/main/docs/weather-component.adoc index 2bb84605cf2..58823042ab1 100644 --- a/components/camel-weather/src/main/docs/weather-component.adoc +++ b/components/camel-weather/src/main/docs/weather-component.adoc @@ -66,7 +66,7 @@ include::partial$component-endpoint-headers.adoc[] Camel will deliver the body as a json formatted `java.lang.String` (see the `mode` option above). -== Samples +== Examples In this sample we find the 7-day weather forecast for Madrid, Spain: diff --git a/components/camel-web3j/src/main/docs/web3j-component.adoc b/components/camel-web3j/src/main/docs/web3j-component.adoc index 20d59a44fcb..8cfb2f7bb42 100644 --- a/components/camel-web3j/src/main/docs/web3j-component.adoc +++ b/components/camel-web3j/src/main/docs/web3j-component.adoc @@ -63,7 +63,7 @@ include::partial$component-endpoint-headers.adoc[] All URI options can also be set as exchange headers. -== Samples +== Examples Listen for new mined blocks and send the block hash to a jms queue: diff --git a/components/camel-xchange/src/main/docs/xchange-component.adoc b/components/camel-xchange/src/main/docs/xchange-component.adoc index 826faad1c67..8d4cba894ca 100644 --- a/components/camel-xchange/src/main/docs/xchange-component.adoc +++ b/components/camel-xchange/src/main/docs/xchange-component.adoc @@ -77,7 +77,7 @@ apiKey = GuRW0********* secretKey = nKLki************ ---- -== Samples +== Examples In this sample we find the current Bitcoin market price in USDT: diff --git a/core/camel-core-languages/src/main/docs/modules/languages/pages/file-language.adoc b/core/camel-core-languages/src/main/docs/modules/languages/pages/file-language.adoc index def85a093fd..bab3431944f 100644 --- a/core/camel-core-languages/src/main/docs/modules/languages/pages/file-language.adoc +++ b/core/camel-core-languages/src/main/docs/modules/languages/pages/file-language.adoc @@ -163,7 +163,7 @@ return as: |file:absolute.path |/workspace/camel/camel-core/target/filelanguage/test/hello.txt |=== -== Samples +== Examples You can enter a fixed file name such as `myfile.txt`: