This is an automated email from the ASF dual-hosted git repository. nfilotto pushed a commit to branch CAMEL-17792/doc-message-headers in repository https://gitbox.apache.org/repos/asf/camel.git
commit fe5073479e8b6555645001020d27c860228ff567 Author: Nicolas Filotto <[email protected]> AuthorDate: Tue Mar 29 17:57:11 2022 +0200 CAMEL-17792: Add doc about the message headers of camel-influxdb --- .../resources/org/apache/camel/component/influxdb/influxdb.json | 5 +++++ components/camel-influxdb/src/main/docs/influxdb-component.adoc | 3 +++ .../java/org/apache/camel/component/influxdb/InfluxDbConstants.java | 6 ++++++ .../java/org/apache/camel/component/influxdb/InfluxDbEndpoint.java | 2 +- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/components/camel-influxdb/src/generated/resources/org/apache/camel/component/influxdb/influxdb.json b/components/camel-influxdb/src/generated/resources/org/apache/camel/component/influxdb/influxdb.json index 10035d7..ae77ba6 100644 --- a/components/camel-influxdb/src/generated/resources/org/apache/camel/component/influxdb/influxdb.json +++ b/components/camel-influxdb/src/generated/resources/org/apache/camel/component/influxdb/influxdb.json @@ -26,6 +26,11 @@ "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during star [...] "autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which t [...] }, + "headers": { + "camelInfluxDB.RetentionPolicy": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The string that defines the retention policy to the data created by the endpoint" }, + "camelInfluxDB.databaseName": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the database where the time series will be stored" }, + "camelInfluxDB.query": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Define the query in case of operation query" } + }, "properties": { "connectionBean": { "kind": "path", "displayName": "Connection Bean", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Connection to the influx database, of class InfluxDB.class" }, "autoCreateDatabase": { "kind": "parameter", "displayName": "Auto Create Database", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Define if we want to auto create the database if it's not present" }, diff --git a/components/camel-influxdb/src/main/docs/influxdb-component.adoc b/components/camel-influxdb/src/main/docs/influxdb-component.adoc index 2f999e7..d826c27 100644 --- a/components/camel-influxdb/src/main/docs/influxdb-component.adoc +++ b/components/camel-influxdb/src/main/docs/influxdb-component.adoc @@ -55,6 +55,9 @@ include::partial$component-endpoint-options.adoc[] // endpoint options: END +// component headers: START +include::partial$component-endpoint-headers.adoc[] +// component headers: END == Example diff --git a/components/camel-influxdb/src/main/java/org/apache/camel/component/influxdb/InfluxDbConstants.java b/components/camel-influxdb/src/main/java/org/apache/camel/component/influxdb/InfluxDbConstants.java index 803ec74..b81b8cf 100644 --- a/components/camel-influxdb/src/main/java/org/apache/camel/component/influxdb/InfluxDbConstants.java +++ b/components/camel-influxdb/src/main/java/org/apache/camel/component/influxdb/InfluxDbConstants.java @@ -16,11 +16,17 @@ */ package org.apache.camel.component.influxdb; +import org.apache.camel.spi.Metadata; + public final class InfluxDbConstants { public static final String MEASUREMENT_NAME = "camelInfluxDB.MeasurementName"; + @Metadata(description = "The string that defines the retention policy to the data created by the endpoint", + javaType = "String") public static final String RETENTION_POLICY_HEADER = "camelInfluxDB.RetentionPolicy"; + @Metadata(description = "The name of the database where the time series will be stored", javaType = "String") public static final String DBNAME_HEADER = "camelInfluxDB.databaseName"; + @Metadata(description = "Define the query in case of operation query", javaType = "String") public static final String INFLUXDB_QUERY = "camelInfluxDB.query"; private InfluxDbConstants() { diff --git a/components/camel-influxdb/src/main/java/org/apache/camel/component/influxdb/InfluxDbEndpoint.java b/components/camel-influxdb/src/main/java/org/apache/camel/component/influxdb/InfluxDbEndpoint.java index f2f19a7..148fe5b 100644 --- a/components/camel-influxdb/src/main/java/org/apache/camel/component/influxdb/InfluxDbEndpoint.java +++ b/components/camel-influxdb/src/main/java/org/apache/camel/component/influxdb/InfluxDbEndpoint.java @@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory; * Interact with <a href="https://influxdata.com/time-series-platform/influxdb/">InfluxDB</a>, a time series database. */ @UriEndpoint(firstVersion = "2.18.0", scheme = "influxdb", title = "InfluxDB", syntax = "influxdb:connectionBean", - category = { Category.DATABASE }, producerOnly = true) + category = { Category.DATABASE }, producerOnly = true, headersClass = InfluxDbConstants.class) public class InfluxDbEndpoint extends DefaultEndpoint { private static final Logger LOG = LoggerFactory.getLogger(InfluxDbEndpoint.class);
