This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/main by this push:
new c8ff896 [create-pull-request] automated change
c8ff896 is described below
commit c8ff896b0d725677170409a9f1a739661ad0bcfb
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Jun 23 00:44:31 2021 +0000
[create-pull-request] automated change
---
.../apache/camel/springboot/catalog/dataformats/csv.json | 1 +
.../camel-csv-starter/src/main/docs/csv-starter.adoc | 3 ++-
.../csv/springboot/CsvDataFormatConfiguration.java | 13 +++++++++++++
docs/modules/ROOT/pages/csv-starter.adoc | 3 ++-
4 files changed, 18 insertions(+), 2 deletions(-)
diff --git
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/csv.json
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/csv.json
index d113fec..5bd046a 100644
---
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/csv.json
+++
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/csv.json
@@ -44,6 +44,7 @@
"useMaps": { "kind": "attribute", "displayName": "Use Maps", "required":
false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Whether the unmarshalling should produce maps (HashMap)for the lines values
instead of lists. It requires to have header (either defined or collected)." },
"useOrderedMaps": { "kind": "attribute", "displayName": "Use Ordered
Maps", "required": false, "type": "boolean", "javaType": "java.lang.Boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "description": "Whether the unmarshalling should produce ordered maps
(LinkedHashMap) for the lines values instead of lists. It requires to have
header (either defined or collected)." },
"recordConverterRef": { "kind": "attribute", "displayName": "Record
Converter Ref", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "Refers to a custom CsvRecordConverter to lookup from the
registry to use." },
+ "captureHeaderRecord": { "kind": "attribute", "displayName": "Capture
Header Record", "required": false, "type": "boolean", "javaType":
"java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the unmarshalling should capture
the header record and store it in the message header" },
"id": { "kind": "attribute", "displayName": "Id", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "The id of this node" }
}
}
diff --git
a/components-starter/camel-csv-starter/src/main/docs/csv-starter.adoc
b/components-starter/camel-csv-starter/src/main/docs/csv-starter.adoc
index a26b2f9..d489e6d 100644
--- a/components-starter/camel-csv-starter/src/main/docs/csv-starter.adoc
+++ b/components-starter/camel-csv-starter/src/main/docs/csv-starter.adoc
@@ -17,7 +17,7 @@ When using csv with Spring Boot make sure to use the
following Maven dependency
----
-The component supports 29 options, which are listed below.
+The component supports 30 options, which are listed below.
@@ -25,6 +25,7 @@ The component supports 29 options, which are listed below.
|===
| Name | Description | Default | Type
| *camel.dataformat.csv.allow-missing-column-names* | Whether to allow missing
column names. | false | Boolean
+| *camel.dataformat.csv.capture-header-record* | Whether the unmarshalling
should capture the header record and store it in the message header | false |
Boolean
| *camel.dataformat.csv.comment-marker* | Sets the comment marker of the
reference format. | | String
| *camel.dataformat.csv.comment-marker-disabled* | Disables the comment marker
of the reference format. | false | Boolean
| *camel.dataformat.csv.delimiter* | Sets the delimiter to use. The default
value is , (comma) | | String
diff --git
a/components-starter/camel-csv-starter/src/main/java/org/apache/camel/dataformat/csv/springboot/CsvDataFormatConfiguration.java
b/components-starter/camel-csv-starter/src/main/java/org/apache/camel/dataformat/csv/springboot/CsvDataFormatConfiguration.java
index 59b0211..dea0af5 100644
---
a/components-starter/camel-csv-starter/src/main/java/org/apache/camel/dataformat/csv/springboot/CsvDataFormatConfiguration.java
+++
b/components-starter/camel-csv-starter/src/main/java/org/apache/camel/dataformat/csv/springboot/CsvDataFormatConfiguration.java
@@ -158,6 +158,11 @@ public class CsvDataFormatConfiguration
* Refers to a custom CsvRecordConverter to lookup from the registry to
use.
*/
private String recordConverterRef;
+ /**
+ * Whether the unmarshalling should capture the header record and store it
+ * in the message header
+ */
+ private Boolean captureHeaderRecord = false;
public String getFormatRef() {
return formatRef;
@@ -382,4 +387,12 @@ public class CsvDataFormatConfiguration
public void setRecordConverterRef(String recordConverterRef) {
this.recordConverterRef = recordConverterRef;
}
+
+ public Boolean getCaptureHeaderRecord() {
+ return captureHeaderRecord;
+ }
+
+ public void setCaptureHeaderRecord(Boolean captureHeaderRecord) {
+ this.captureHeaderRecord = captureHeaderRecord;
+ }
}
\ No newline at end of file
diff --git a/docs/modules/ROOT/pages/csv-starter.adoc
b/docs/modules/ROOT/pages/csv-starter.adoc
index a26b2f9..d489e6d 100644
--- a/docs/modules/ROOT/pages/csv-starter.adoc
+++ b/docs/modules/ROOT/pages/csv-starter.adoc
@@ -17,7 +17,7 @@ When using csv with Spring Boot make sure to use the
following Maven dependency
----
-The component supports 29 options, which are listed below.
+The component supports 30 options, which are listed below.
@@ -25,6 +25,7 @@ The component supports 29 options, which are listed below.
|===
| Name | Description | Default | Type
| *camel.dataformat.csv.allow-missing-column-names* | Whether to allow missing
column names. | false | Boolean
+| *camel.dataformat.csv.capture-header-record* | Whether the unmarshalling
should capture the header record and store it in the message header | false |
Boolean
| *camel.dataformat.csv.comment-marker* | Sets the comment marker of the
reference format. | | String
| *camel.dataformat.csv.comment-marker-disabled* | Disables the comment marker
of the reference format. | false | Boolean
| *camel.dataformat.csv.delimiter* | Sets the delimiter to use. The default
value is , (comma) | | String