This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch docs/yaml-dsl-tabs-alignment in repository https://gitbox.apache.org/repos/asf/camel.git
commit 88ca3090ab9d9db3567384dc099a73065aca5268 Author: Claus Ibsen <[email protected]> AuthorDate: Sun Jun 14 22:32:36 2026 +0200 docs: add YAML DSL tabs to architecture and simplescheduledroutepolicy Wrap existing Java/XML/YAML route examples in [tabs] blocks in architecture.adoc, and add YAML DSL tab to simplescheduledroutepolicy.adoc route example. Co-Authored-By: Claude <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../modules/ROOT/pages/architecture.adoc | 18 ++++++++---- .../ROOT/pages/simplescheduledroutepolicy.adoc | 34 +++++++++++++++++----- 2 files changed, 40 insertions(+), 12 deletions(-) diff --git a/docs/user-manual/modules/ROOT/pages/architecture.adoc b/docs/user-manual/modules/ROOT/pages/architecture.adoc index 9470534bcdfe..6d1bee157821 100644 --- a/docs/user-manual/modules/ROOT/pages/architecture.adoc +++ b/docs/user-manual/modules/ROOT/pages/architecture.adoc @@ -24,8 +24,15 @@ A route has exactly one input xref:endpoint.adoc[endpoint], and 0, 1 or more output xref:endpoint.adoc[endpoints]. You use Camel xref:dsl.adoc[DSL] to _code_ the xref:routes.adoc[routes]. -For example the route below is coded in xref:java-dsl.adoc[Java DSL]: +For example the route below can be coded in xref:java-dsl.adoc[Java DSL], +xref:components:others:java-xml-io-dsl.adoc[XML DSL], +or xref:components:others:yaml-dsl.adoc[YAML DSL]: +[tabs] +==== + +Java:: ++ [source,java] ---- public class MyRoute extends RouteBuilder { @@ -37,8 +44,8 @@ public class MyRoute extends RouteBuilder { } ---- -You can also use xref:components:others:java-xml-io-dsl.adoc[XML DSL] to _code_ the xref:routes.adoc[routes]. - +XML:: ++ [source,xml] ---- <route> @@ -47,8 +54,8 @@ You can also use xref:components:others:java-xml-io-dsl.adoc[XML DSL] to _code_ </route> ---- -For low-code users then xref:components:others:yaml-dsl.adoc[YAML DSL] is also possible: - +YAML:: ++ [source,yaml] ---- - route: @@ -58,3 +65,4 @@ For low-code users then xref:components:others:yaml-dsl.adoc[YAML DSL] is also p - to: uri: activemq:queue:cheese ---- +==== diff --git a/docs/user-manual/modules/ROOT/pages/simplescheduledroutepolicy.adoc b/docs/user-manual/modules/ROOT/pages/simplescheduledroutepolicy.adoc index 17b484cad501..d337fac3133d 100644 --- a/docs/user-manual/modules/ROOT/pages/simplescheduledroutepolicy.adoc +++ b/docs/user-manual/modules/ROOT/pages/simplescheduledroutepolicy.adoc @@ -88,8 +88,13 @@ created it can be wired into the camel route as follows. == Using the SimpleScheduledRoutePolicy -The `SimpleScheduledRoutePolicy` can be used in Java DSL as show: +The `SimpleScheduledRoutePolicy` can be used as shown: +[tabs] +==== + +Java:: ++ [source,java] ---- SimpleScheduledRoutePolicy policy = new SimpleScheduledRoutePolicy(); @@ -97,15 +102,15 @@ long startTime = System.currentTimeMillis() + 3000L; policy.setRouteStartDate(new Date(startTime)); policy.setRouteStartRepeatCount(1); policy.setRouteStartRepeatInterval(3000); - + from("direct:start") .routeId("test") .routePolicy(policy) .to("mock:success"); ---- -And in Spring XML: - +XML:: ++ [source,xml] ---- <bean id="date" class="org.apache.camel.routepolicy.quartz.SimpleDate"/> @@ -113,9 +118,9 @@ And in Spring XML: <bean id="startPolicy" class="org.apache.camel.routepolicy.quartz.SimpleScheduledRoutePolicy"> <property name="routeStartDate" ref="date"/> <property name="routeStartRepeatCount" value="1"/> - <property name="routeStartRepeatInterval" value="3000"/> -</bean> - + <property name="routeStartRepeatInterval" value="3000"/> +</bean> + <camelContext xmlns="http://camel.apache.org/schema/spring"> <route id="myroute" routePolicyRef="startPolicy"> <from uri="direct:start"/> @@ -124,6 +129,21 @@ And in Spring XML: </camelContext> ---- +YAML:: ++ +[source,yaml] +---- +- route: + id: myroute + routePolicyRef: startPolicy + from: + uri: direct:start + steps: + - to: + uri: mock:success +---- +==== + == Dependency Maven users will need to add a `camel-quartz` dependency to their
