You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/04/18 09:25:03 UTC

camel git commit: CAMEL-11160: Component docs - ascii doc warns

Repository: camel
Updated Branches:
  refs/heads/master d73893ffc -> a49af7f1d


CAMEL-11160: Component docs - ascii doc warns


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

Branch: refs/heads/master
Commit: a49af7f1d899080d0e3ddcc200a0b89c9c1320a1
Parents: d73893f
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Apr 18 11:24:47 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Apr 18 11:24:47 2017 +0200

----------------------------------------------------------------------
 .../src/main/docs/ignite-component.adoc         | 123 ++++++++-----------
 .../src/main/docs/test-spring.adoc              |  73 +++++------
 2 files changed, 79 insertions(+), 117 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a49af7f1/components/camel-ignite/src/main/docs/ignite-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-ignite/src/main/docs/ignite-component.adoc b/components/camel-ignite/src/main/docs/ignite-component.adoc
index a721719..36b1e39 100644
--- a/components/camel-ignite/src/main/docs/ignite-component.adoc
+++ b/components/camel-ignite/src/main/docs/ignite-component.adoc
@@ -1,4 +1,3 @@
-[[Ignite-Component]]
 ## Ignite Component
 
 *Available as of Camel version 2.17*
@@ -40,9 +39,8 @@ If running in an OSGi container, please don't miss the <<Ignite-OsgiSupport,OSGi
 // endpoint options: END
 
 
-[[Ignite-Cache]]
-CACHE: Ignite Cache Endpoint
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+### CACHE: Ignite Cache Endpoint
+
 This endpoint allows you to interact with an https://apacheignite.readme.io/docs/data-grid[Ignite Cache]:
 
 [source,text]
@@ -56,8 +54,8 @@ The cache value is always the body of the message, whereas the cache key is alwa
 
 Even if you configure a fixed operation in the endpoint URI, you can vary it per-exchange by setting the `IgniteConstants.IGNITE_CACHE_OPERATION` message header.
 
-Options
-++++++
+#### Options
+
 [width="100%",cols="1,1,1,4,1,1",options="header"]
 |=======================================================================
 | Option | Type | Default value | Description | Compulsory | Consumer/producer
@@ -102,8 +100,8 @@ N | Consumer
 Time interval in millis on the Continuous Query (see Ignite docs). | N | Consumer
 |=======================================================================
 
-Headers used
-+++++++++++
+#### Headers used
+
 This endpoint uses the following headers:
 [width="100%",cols="1,1,1,4",options="header"]
 |=======================================================================
@@ -132,10 +130,9 @@ This header carries the old cache value when passed in the incoming cache event
 |=======================================================================
 
 
-[[Ignite-Compute]]
-COMPUTE: Ignite Compute Endpoint
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-This endpoint allows you to run https://apacheignite.readme.io/docs/compute-grid[compute operations] on the cluster by passing in an IgniteCallable, an IgniteRunnable, an IgniteClosure, or collections of them, along with their parameters if necessary. 
+### COMPUTE: Ignite Compute Endpoint
+
+This endpoint allows you to run https://apacheignite.readme.io/docs/compute-grid[compute operations] on the cluster by passing in an IgniteCallable, an IgniteRunnable, an IgniteClosure, or collections of them, along with their parameters if necessary.
 
 [source,text]
 ----
@@ -148,8 +145,8 @@ The host part of the endpoint URI is a symbolic endpoint ID, it is not used for
 
 The endpoint tries to run the object passed in the body of the IN message as the compute job. It expects different payload types depending on the execution type.
 
-Expected payload types
-+++++++++++++++++++++
+#### Expected payload types
+
 Each operation expects the indicated types:
 [width="100%",cols="1,4",options="header"]
 |=======================================================================
@@ -163,8 +160,8 @@ Each operation expects the indicated types:
 | AFFINITY_RUN | IgniteRunnable.
 |=======================================================================
 
-Options
-++++++
+#### Options
+
 [width="100%",cols="1,1,1,4,1,1",options="header"]
 |=======================================================================
 | Option | Type | Default value | Description | Compulsory | Consumer/producer
@@ -186,8 +183,8 @@ N | Producer
 | timeoutMillis | Long | --- | The timeout for the compute job. | N | Producer
 |=======================================================================
 
-Headers used
-+++++++++++
+#### Headers used
+
 This endpoint uses the following headers:
 [width="100%",cols="1,1,1,4",options="header"]
 |=======================================================================
@@ -209,9 +206,8 @@ Affinity key for the AFFINITY_CALL and AFFINITY_RUN operations.
 |=======================================================================
 
 
-[[Ignite-Messaging]]
-MESSAGING: Ignite Messaging Endpoint
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+### MESSAGING: Ignite Messaging Endpoint
+
 The Ignite Messaging endpoint allows you to send and consume messages from an https://apacheignite.readme.io/docs/messaging[Ignite topic].
 
 [source,text]
@@ -221,8 +217,8 @@ ignite:messaging:topicName?option1=value1&option2=value2...
 
 This endpoint supports producers (to send messages) and consumers (to receive messages).
 
-Options
-++++++
+#### Options
+
 [width="100%",cols="1,1,1,4,1,1",options="header"]
 |=======================================================================
 | Option | Type | Default value | Description | Compulsory | Consumer/producer
@@ -239,8 +235,8 @@ N | Producer
 N | Producer
 |=======================================================================
 
-Headers used
-+++++++++++
+#### Headers used
+
 This endpoint uses the following headers:
 [width="100%",cols="1,1,1,4",options="header"]
 |=======================================================================
@@ -254,9 +250,8 @@ This header is filled in with the UUID of the subscription when a message arrive
 |=======================================================================
 
 
-[[Ignite-Events]]
-EVENTS: Ignite Events Endpoint
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+### EVENTS: Ignite Events Endpoint
+
 The Ignite Events endpoint allows you to https://apacheignite.readme.io/docs/events[receive events] from the Ignite cluster by creating a local event listener.
 
 [source,text]
@@ -267,8 +262,8 @@ ignite:events:endpointId?option1=value1&option2=value2...
 This endpoint only supports consumers.
 The Exchanges created by this consumer put the received Event object into the body of the IN message.
 
-Options
-++++++
+#### Options
+
 [width="100%",cols="1,1,1,4,1,1",options="header"]
 |=======================================================================
 | Option | Type | Default value | Description | Compulsory | Consumer/producer
@@ -283,9 +278,8 @@ N | Consumer
 
 
 
-[[Ignite-Sets]]
-SETS: Ignite Sets Endpoint
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
+### SETS: Ignite Sets Endpoint
+
 The Ignite Sets endpoint allows you to interact with https://apacheignite.readme.io/docs/queue-and-set[Ignite Set data structures].
 
 [source,text]
@@ -295,8 +289,8 @@ ignite:sets:setName?option1=value1&option2=value2...
 
 This endpoint only supports producers.
 
-Options
-++++++
+#### Options
+
 [width="100%",cols="1,1,1,4,1,1",options="header"]
 |=======================================================================
 | Option | Type | Default value | Description | Compulsory | Consumer/producer
@@ -312,8 +306,8 @@ For example: ?config.backups=4 |
 N | Producer
 |=======================================================================
 
-Headers used
-+++++++++++
+#### Headers used
+
 This endpoint uses the following headers:
 [width="100%",cols="1,1,1,4",options="header"]
 |=======================================================================
@@ -323,9 +317,8 @@ Allows you to dynamically change the set operation.
 |=======================================================================
 
 
-[[Ignite-Queues]]
-QUEUES: Ignite Queue Endpoint
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+### QUEUES: Ignite Queue Endpoint
+
 The Ignite Queue endpoint allows you to interact with https://apacheignite.readme.io/docs/queue-and-set[Ignite Queue data structures].
 
 [source,text]
@@ -335,8 +328,8 @@ ignite:queue:queueName?option1=value1&option2=value2...
 
 This endpoint only supports producers.
 
-Options
-++++++
+#### Options
+
 [width="100%",cols="1,1,1,4,1,1",options="header"]
 |=======================================================================
 | Option | Type | Default value | Description | Compulsory | Consumer/producer
@@ -360,8 +353,8 @@ The queue capacity if you'd like to use a bounded queue. |
 N | Producer
 |=======================================================================
 
-Headers used
-+++++++++++
+#### Headers used
+
 This endpoint uses the following headers:
 [width="100%",cols="1,1,1,4",options="header"]
 |=======================================================================
@@ -380,9 +373,8 @@ Dynamically sets the timeout in milliseconds to use when invoking the OFFER or P
 |=======================================================================
 
 
-[[Ignite-IDGenerator]]
-IDGEN: Ignite ID Generator Endpoint
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+### IDGEN: Ignite ID Generator Endpoint
+
 The Ignite ID Generator endpoint allows you to interact with https://apacheignite.readme.io/docs/id-generator[Ignite Atomic Sequences and ID Generators].
 
 [source,text]
@@ -392,8 +384,8 @@ ignite:idgen:sequenceName?option1=value1&option2=value2...
 
 This endpoint only supports producers.
 
-Options
-++++++
+#### Options
+
 [width="100%",cols="1,1,1,4,1,1",options="header"]
 |=======================================================================
 | Option | Type | Default value | Description | Compulsory | Consumer/producer
@@ -411,9 +403,8 @@ N | Producer
 
 
 
-[[Ignite-InitializeComponent]]
-Initializing the Ignite component
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+### Initializing the Ignite component
+
 Each instance of the Ignite component is associated with an underlying org.apache.ignite.Ignite instance. You can interact with two Ignite clusters by initializing two instances of the Ignite component and binding them to different IgniteConfigurations. There are 3 ways to initialize the Ignite component:
 
 * By passing in an existing org.apache.ignite.Ignite instance. Here's an example using Spring config:
@@ -457,8 +448,7 @@ Additionally, if using Camel programmatically, there are several convenience sta
 
 You may use those methods to quickly create an IgniteComponent with your chosen configuration technique.
 
-General options
-^^^^^^^^^^^^^^
+### General options
 
 All endpoints share the following options:
 [width="100%",cols="1,1,1,4,1,1",options="header"]
@@ -471,28 +461,13 @@ If the underlying Ignite operation returns void (no return type), this flag dete
 Some Ignite operations can deal with multiple elements at once, if passed a Collection. Enabling this option will treat Collections as a single object, invoking the operation variant for cardinality 1.
 |=======================================================================
 
-OSGi Support
-^^^^^^^^^^^
+### OSGi Support
 
-[TIP]
-====
-Apache Ignite supports OSGi from version 1.5.0.final onwards.
-====
+TIP: Apache Ignite supports OSGi from version 1.5.0.final onwards.
 
+When installing on Apache Karaf:
 
-[NOTE,title=when installing on Apache Karaf]
-====
 1. Installing the camel-ignite feature will require the Ignite feature repository to be present.
-1. You must have exported from the JRE (system bundle) some low-level, non-standard packages that Ignite requires.
-====
-Please refer to the OSGi section in the Ignite documentation for more information.
-
+2. You must have exported from the JRE (system bundle) some low-level, non-standard packages that Ignite requires.
 
-
-See Also
-^^^^^^^
-
-* http://camel.apache.org/configuring-camel.html[Configuring Camel]
-* http://camel.apache.org/component.html[Component]
-* http://camel.apache.org/endpoint.html[Endpoint]
-* http://camel.apache.org/getting-started.html[Getting Started]
\ No newline at end of file
+Please refer to the OSGi section in the Ignite documentation for more information.

http://git-wip-us.apache.org/repos/asf/camel/blob/a49af7f1/components/camel-test-spring/src/main/docs/test-spring.adoc
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/main/docs/test-spring.adoc b/components/camel-test-spring/src/main/docs/test-spring.adoc
index 305c3e6..9cd8659 100644
--- a/components/camel-test-spring/src/main/docs/test-spring.adoc
+++ b/components/camel-test-spring/src/main/docs/test-spring.adoc
@@ -77,9 +77,8 @@ a|
 
 
 
-[[SpringTesting-CamelSpringTestSupport]]
-CamelSpringTestSupport
-^^^^^^^^^^^^^^^^^^^^^
+### CamelSpringTestSupport
+
 The following Spring test support classes:
 
 * `org.apache.camel.test.CamelSpringTestSupport`
@@ -103,13 +102,12 @@ You are responsible for the instantiation of the Spring context in the method im
 
 
 
-[[SpringTesting-PlainSpringTest]]
-Plain Spring Test
-^^^^^^^^^^^^^^^^^^
+### Plain Spring Test
+
 In this approach, your test classes directly inherit from the Spring Test abstract test classes or use the JUnit 4.x test runner provided in Spring Test.  This approach supports dependency injection into your test class and the full suite of Spring Test annotations. However, it does not support the features provided by the `CamelSpringTestSupport` classes.
 
-Plain Spring Test using JUnit 3.x with XML Config Example
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+#### Plain Spring Test using JUnit 3.x with XML Config Example
+
 Here is a simple unit test using JUnit 3.x support from Spring Test using http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/patterns/FilterTest.java[XML Config].
 [source,java]
 ----
@@ -183,8 +181,8 @@ src/test/java/org/apache/camel/spring/patterns/FilterTest.java
 src/test/resources/org/apache/camel/spring/patterns/FilterTest-context.xml
 ----
 
-Plain Spring Test Using JUnit 4.x With Java Config Example
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+#### Plain Spring Test Using JUnit 4.x With Java Config Example
+
 You can completely avoid using an XML configuration file by using http://camel.apache.org/spring-java-config.html[Spring Java Config].  Here is a unit test using JUnit 4.x support from Spring Test using http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/patterns/FilterTest.java[Java Config].
 [source,text]
 ----
@@ -238,13 +236,12 @@ public class FilterTest extends AbstractJUnit4SpringContextTests {
 
 This is similar to the XML Config example above except that there is no XML file and instead the nested `ContextConfig` class does all of the configuration; so your entire test case is contained in a single Java class. We currently have to reference by class name this class in the `@ContextConfiguration` which is a bit ugly. Please vote for http://jira.springframework.org/browse/SJC-238[SJC-238] to address this and make Spring Test work more cleanly with Spring JavaConfig.
 
-Plain Spring Test Using JUnit 4.0.x Runner With XML Config
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+#### Plain Spring Test Using JUnit 4.0.x Runner With XML Config
+
 You can avoid extending Spring classes by using the `SpringJUnit4ClassRunner` provided by Spring Test.  This custom JUnit runner means you are free to choose your own class hierarchy while retaining all the capabilities of Spring Test.
-[INFO]
-====
-This is for Spring 4.0.x. If you use Spring 4.1 or newer, then see the next section.
-====
+
+TIP: This is for Spring 4.0.x. If you use Spring 4.1 or newer, then see the next section.
+
 [source,java]
 ----
 @RunWith(SpringJUnit4ClassRunner.class)
@@ -267,13 +264,12 @@ public class MyCamelTest {
 }
 ----
 
-Plain Spring Test Using JUnit 4.1.x Runner With XML Config
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+#### Plain Spring Test Using JUnit 4.1.x Runner With XML Config
+
 You can avoid extending Spring classes by using the `SpringJUnit4ClassRunner` provided by Spring Test.  This custom JUnit runner means you are free to choose your own class hierarchy while retaining all the capabilities of Spring Test.
-[INFO]
-====
-From *Spring 4.1*, you need to use the `@BootstrapWith` annotation to configure it to use Camel testing, as shown below.
-====
+
+TIP: From *Spring 4.1*, you need to use the `@BootstrapWith` annotation to configure it to use Camel testing, as shown below.
+
 [source,java]
 ----
 @RunWith(CamelSpringJUnit4ClassRunner.class)
@@ -298,16 +294,14 @@ public class MyCamelTest {
 ----
 
 
+### Camel Enhanced Spring Test
 
-[[SpringTesting-CamelEnhancedSpringTest]]
-Camel Enhanced Spring Test
-^^^^^^^^^^^^^^^^^^^^^^^^^^
 Using the `org.apache.camel.test.junit4.CamelSpringJUnit4ClassRunner` runner with the `@RunWith` annotation or extending `org.apache.camel.testng.AbstractCamelTestNGSpringContextTests` provides the full feature set of Spring Test with support for the feature set provided in the `CamelTestSupport` classes.
 
 A number of Camel specific annotations have been developed in order to provide for declarative manipulation of the Camel context(s) involved in the test.  These annotations free your test classes from having to inherit from the `CamelSpringTestSupport` classes and also reduce the amount of code required to customize the tests.
 [width="100%",cols="1,1,4,1,1",options="header",]
 |=======================================================================
-|Annotation Class |Applies To |Description |Default Behavioir If Not Present |Default Behavior If Present
+|Annotation Class |Applies To |Description |Default Behaviour If Not Present |Default Behavior If Present
 |org.apache.camel.test.spring.DisableJmx a|Class a|
 Indicates if JMX should be globally disabled in the CamelContexts that are bootstrapped  during the test through the use of Spring Test loaded application contexts. a|
 JMX is disabled a|JMX is disabled
@@ -352,10 +346,9 @@ a|Override properties
 |=======================================================================
 
 The following example illustrates the use of the `@MockEndpoints` annotation in order to setup mock endpoints as interceptors on all endpoints using the Camel Log component and the `@DisableJmx` annotation to enable JMX which is disabled during tests by default.
-[INFO]
-====
-Note: we still use the `@DirtiesContext` annotation to ensure that the CamelContext, routes, and mock endpoints are reinitialized between test methods.
-====
+
+TIP: We still use the `@DirtiesContext` annotation to ensure that the CamelContext, routes, and mock endpoints are reinitialized between test methods.
+
 [source,java]
 ----
 @RunWith(CamelSpringJUnit4ClassRunner.class)
@@ -391,9 +384,9 @@ public class CamelSpringJUnit4ClassRunnerPlainTest {
 ----
 
 
-Adding More Mock Expectations
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-If you wish to programmatically add any new assertions to your test you can easily do so with the following. Notice how we use `@EndpointInject` to inject a Camel endpoint into our code then the http://camel.apache.org/mock.html[Mock] API to add an expectation on a specific message.
+### Adding More Mock Expectations
+
+If you wish to add any new assertions to your test you can easily do so with the following. Notice how we use `@EndpointInject` to inject a Camel endpoint into our code then the http://camel.apache.org/mock.html[Mock] API to add an expectation on a specific message.
 [source,java]
 ----
 @ContextConfiguration
@@ -414,8 +407,8 @@ public class MyCamelTest extends AbstractJUnit38SpringContextTests {
 ----
 
 
-Further Processing the Received Messages
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+### Further Processing the Received Messages
+
 Sometimes once a http://camel.apache.org/mock.html[Mock] endpoint has received some messages you want to then process them further to add further assertions that your test case worked as you expect.
 
 So you can then process the received message exchanges if you like...
@@ -444,8 +437,8 @@ public class MyCamelTest extends AbstractJUnit38SpringContextTests {
 }
 ----
 
-Sending and Receiving Messages
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+### Sending and Receiving Messages
+
 It might be that the http://camel.apache.org/enterprise-integration-patterns.html[Enterprise Integration Patterns] you have defined in either http://camel.apache.org/spring.html[Spring] XML or using the Java http://camel.apache.org/dsl.html[DSL] do all of the sending and receiving and you might just work with the http://camel.apache.org/mock.html[Mock] endpoints as described above. However sometimes in a test case its useful to explicitly send or receive messages directly.
 
 To send or receive messages you should use the http://camel.apache.org/bean-integration.html[Bean Integration] mechanism. For example to send messages inject a `ProducerTemplate` using the `@EndpointInject` annotation then call the various send methods on this object to send a message to an endpoint. To consume messages use the `@MessageDriven` annotation on a method to have the method invoked when a message is received.
@@ -468,10 +461,4 @@ public class Foo {
 }
 ----
 
-See Also
-^^^^^^^^
 
-* A https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/mock/InterceptSendToMockEndpointStrategyTest.java[real example test case using Mock and Spring] along with its https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/mock/InterceptSendToMockEndpointStrategyTest.xml[Spring XML]
-* http://camel.apache.org/bean-integration.html[Bean Integration]
-* http://camel.apache.org/mock.html[Mock] endpoint
-* http://camel.apache.org/test.html[Test] endpoint