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 2023/08/10 17:00:43 UTC

[camel] branch camel-3.x updated: docs: remove duplication in DHIS2 component docs (#11074)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-3.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-3.x by this push:
     new b5f7e3493ac docs: remove duplication in DHIS2 component docs (#11074)
b5f7e3493ac is described below

commit b5f7e3493acc0844a51a899ec1174f1445960017
Author: Claude Mamo <82...@users.noreply.github.com>
AuthorDate: Thu Aug 10 19:00:36 2023 +0200

    docs: remove duplication in DHIS2 component docs (#11074)
---
 .../src/main/docs/dhis2-component.adoc             | 169 ++-------------------
 1 file changed, 10 insertions(+), 159 deletions(-)

diff --git a/components/camel-dhis2/camel-dhis2-component/src/main/docs/dhis2-component.adoc b/components/camel-dhis2/camel-dhis2-component/src/main/docs/dhis2-component.adoc
index 7a9041d39d9..8a4fbb25123 100644
--- a/components/camel-dhis2/camel-dhis2-component/src/main/docs/dhis2-component.adoc
+++ b/components/camel-dhis2/camel-dhis2-component/src/main/docs/dhis2-component.adoc
@@ -47,7 +47,7 @@ include::partial$component-endpoint-options.adoc[]
 == Examples
 
 * Fetch an organisation unit by ID:
-
++
 [source,java]
 ----
 package org.camel.dhis2.example;
@@ -68,7 +68,7 @@ public class MyRouteBuilder extends RouteBuilder {
 ----
 
 * Fetch an organisation unit code by ID:
-
++
 [source,java]
 ----
 package org.camel.dhis2.example;
@@ -87,29 +87,8 @@ public class MyRouteBuilder extends RouteBuilder {
 }
 ----
 
-== METHOD collection
-
-Signatures:
-
-* java.util.Iterator collection(java.lang.String path, java.lang.Boolean paging, java.lang.String fields, java.lang.String filter, java.util.Map<String, Object> queryParams)
-
-The get/collection API method has the parameters listed in the table below:
-
-[width="100%",cols="17%,72%,11%",options="header",]
-|===
-| Parameter | Description | Type
-| path | Resource URL path | String
-| arrayName | JSON property name holding the array to read | String
-| paging | Turn paging on/off | Boolean
-| fields | Comma-delimited list of fields to fetch | String
-| filter | Search criteria | String
-| queryParams |Custom query parameters | Map
-|===
-
-Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelDhis2.parameter. The inBody parameter overrides message header, i.e. the endpoint parameter inBody=myParameterNameHere would override a CamelDhis2.myParameterNameHere header.
-
 * Fetch all organisation units:
-
++
 [source,java]
 ----
 package org.camel.dhis2.example;
@@ -127,7 +106,7 @@ public class MyRouteBuilder extends RouteBuilder {
 ----
 
 * Fetch all organisation unit codes:
-
++
 [source,java]
 ----
 package org.camel.dhis2.example;
@@ -147,7 +126,7 @@ public class MyRouteBuilder extends RouteBuilder {
 ----
 
 * Fetch users with a phone number:
-
++
 [source,java]
 ----
 package org.camel.dhis2.example;
@@ -166,39 +145,8 @@ public class MyRouteBuilder extends RouteBuilder {
 }
 ----
 
-== API: post
-
-*Both producer and consumer are supported*
-
-The post API is defined in the syntax as follows:
-
-....
-dhis2:post/methodName?[parameters]
-....
-
-== METHOD resource
-
-Signatures:
-
-* java.io.InputStream resource(java.lang.String path, java.lang.Object resource, java.util.Map<String, Object queryParams)
-
-The post/resource API method has the parameters listed in the table
-below:
-
-[cols=",,",options="header",]
-|===
-| Parameter | Description | Type
-| path | Resource URL path | String
-| resource | New resource | Object
-| queryParams | Custom query parameters | Map
-|===
-
-Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelDhis2.parameter. The inBody parameter overrides message header, i.e. the endpoint parameter inBody=myParameterNameHere would override a CamelDhis2.myParameterNameHere header.
-
-== Examples
-
 * Save a data value set
-
++
 [source,java]
 ----
 package org.camel.dhis2.example;
@@ -237,37 +185,6 @@ public class MyRouteBuilder extends RouteBuilder {
 }
 ----
 
-== API: put
-
-*Both producer and consumer are supported*
-
-The post API is defined in the syntax as follows:
-
-....
-dhis2:put/methodName?[parameters]
-....
-
-== METHOD resource
-
-Signatures:
-
-* java.io.InputStream resource(java.lang.String path, java.lang.Object resource, java.util.Map<String, Object queryParams)
-
-The put/resource API method has the parameters listed in the table
-below:
-
-[cols=",,",options="header",]
-|===
-| Parameter | Description | Type
-| path | Resource URL path | String
-| resource | Updated resource | Object
-| queryParams | Custom query parameters | Map
-|===
-
-In addition to the parameters above, the put/resource API can also use any of the query parameters.
-
-Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelDhis2.parameter. The inBody parameter overrides message header, i.e. the endpoint parameter inBody=myParameterNameHere would override a CamelDhis2.myParameterNameHere header.
-
 * Update an organisation unit
 +
 [source,java]
@@ -302,39 +219,8 @@ public class MyRouteBuilder extends RouteBuilder {
 }
 ----
 
-== API: delete
-
-*Both producer and consumer are supported*
-
-The delete API is defined in the syntax as follows:
-
-....
-dhis2:delete/methodName?[parameters]
-....
-
-== METHOD resource
-
-Signatures:
-
-* java.io.InputStream resource(java.lang.String path, java.lang.Object resource, java.util.Map<String, Object queryParams)
-
-The delete/resource API method has the parameters listed in the table
-below:
-
-[cols=",,",options="header",]
-|===
-| Parameter | Description | Type
-| path | Resource URL path | String
-| resource | Deleted resource | Object
-| queryParams | Custom query parameters | Map
-|===
-
-In addition to the parameters above, the delete/resource API can also use any of the query parameters.
-
-Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelDhis2.parameter. The inBody parameter overrides message header, i.e. the endpoint parameter inBody=myParameterNameHere would override a CamelDhis2.myParameterNameHere header.
-
 * Delete an organisation unit
-
++
 [source,java]
 ----
 package org.camel.dhis2.example;
@@ -365,41 +251,8 @@ public class MyRouteBuilder extends RouteBuilder {
 }
 ----
 
-== API: resourceTables
-
-*Both producer and consumer are supported*
-
-The resourceTables API is defined in the syntax as follows:
-
-....
-dhis2:resourceTables/methodName?[parameters]
-....
-
-== METHOD analytics
-
-Signatures:
-
-* void analytics(java.lang.Boolean skipAggregate, java.lang.Boolean skipEvents, java.lang.Integer lastYears, java.lang.Integer, interval)
-
-The post/resource API method has the parameters listed in the table below:
-
-The resourceTables/analytics API method has the parameters listed in the table below:
-
-[width="100%",cols="19%,70%,11%",options="header",]
-|===
-| Parameter | Description | Type
-| skipAggregate | Skip generation of aggregate data and completeness data| Boolean
-| skipEvents | Skip generation of event data | Boolean
-| lastYears | Number of last years of data to include | Integer
-| interval | Duration in milliseconds between completeness checks | Integer
-|===
-
-In addition to the parameters above, the resourceTables/analytics API can also use any of the query parameters.
-
-Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelDhis2.parameter. The inBody parameter overrides message header, i.e. the endpoint parameter inBody=myParameterNameHere would override a CamelDhis2.myParameterNameHere header.
-
 * Run analytics
-
++
 [source,java]
 ----
 package org.camel.dhis2.example;
@@ -415,10 +268,8 @@ public class MyRouteBuilder extends RouteBuilder {
 }
 ----
 
-== Usage Examples
-
 * Reference DHIS2 client
-
++
 [source,java]
 ----
 package org.camel.dhis2.example;
@@ -440,7 +291,7 @@ public class MyRouteBuilder extends RouteBuilder {
 ----
 
 * Set custom query parameters
-
++
 [source,java]
 ----
 package org.camel.dhis2.example;