This is an automated email from the ASF dual-hosted git repository. cdeppisch pushed a commit to branch camel-4.0.x in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.0.x by this push: new a5e45beb92a CAMEL-19885: Fix google-sheets-stream component OAuth a5e45beb92a is described below commit a5e45beb92ad3486662bb7d737e7cc7b1098ed1d Author: Christoph Deppisch <cdeppi...@redhat.com> AuthorDate: Tue Sep 19 10:25:22 2023 +0200 CAMEL-19885: Fix google-sheets-stream component OAuth Stream component was using default scope https://www.googleapis.com/auth/spreadsheets when connecting. Apparently the scope alone is not sufficient to perform proper OAuth authentication and some more scopes are required. Instead of using this default scope in streams component do not specify any scope at all (same as google-sheets component is doing) in order to fix authentication. In case users need to manage scopes while connecting all required scopes need to be given. --- .../catalog/components/google-sheets-stream.json | 12 +- .../camel/catalog/components/google-sheets.json | 4 +- .../GoogleSheetsStreamComponentConfigurer.java | 4 +- .../GoogleSheetsStreamEndpointConfigurer.java | 4 +- .../component/google/sheets/google-sheets.json | 4 +- .../google/sheets/stream/google-sheets-stream.json | 12 +- .../google/sheets/GoogleSheetsConfiguration.java | 3 +- .../stream/GoogleSheetsStreamConfiguration.java | 506 ++++++++++----------- 8 files changed, 274 insertions(+), 275 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-sheets-stream.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-sheets-stream.json index 4848b8c840b..e762eb6ba54 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-sheets-stream.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-sheets-stream.json @@ -23,7 +23,7 @@ "verifiers": "parameters,connectivity" }, "componentProperties": { - "applicationName": { "index": 0, "kind": "property", "displayName": "Application Name", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Google sheets application name. Example would be camel-google-sheets\/1.0" }, + "applicationName": { "index": 0, "kind": "property", "displayName": "Application Name", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Google Sheets application name. Example would be camel-google-sheets\/1.0" }, "bridgeErrorHandler": { "index": 1, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be proce [...] "clientId": { "index": 2, "kind": "property", "displayName": "Client Id", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Client ID of the sheets application" }, "configuration": { "index": 3, "kind": "property", "displayName": "Configuration", "group": "consumer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "To use the shared configuration" }, @@ -32,7 +32,7 @@ "majorDimension": { "index": 6, "kind": "property", "displayName": "Major Dimension", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "ROWS", "COLUMNS", "DIMENSION_UNSPECIFIED" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "ROWS", "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "S [...] "maxResults": { "index": 7, "kind": "property", "displayName": "Max Results", "group": "consumer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Specify the maximum number of returned results. This will limit the number of rows in a returned valu [...] "range": { "index": 8, "kind": "property", "displayName": "Range", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Specifies the range of rows and columns in a sheet to get data from." }, - "scopes": { "index": 9, "kind": "property", "displayName": "Scopes", "group": "consumer", "label": "", "required": false, "type": "array", "javaType": "java.util.List<java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Specifies the level of permissions you want a sheets application to have to a user [...] + "scopes": { "index": 9, "kind": "property", "displayName": "Scopes", "group": "consumer", "label": "", "required": false, "type": "array", "javaType": "java.util.Collection<java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Specifies the level of permissions you want a sheets application to have to a [...] "splitResults": { "index": 10, "kind": "property", "displayName": "Split Results", "group": "consumer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "True if value range result should be split into rows or columns to pr [...] "valueRenderOption": { "index": 11, "kind": "property", "displayName": "Value Render Option", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "FORMATTED_VALUE", "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configu [...] "autowiredEnabled": { "index": 12, "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 [...] @@ -41,7 +41,7 @@ "healthCheckProducerEnabled": { "index": 15, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on produce [...] "accessToken": { "index": 16, "kind": "property", "displayName": "Access Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "OAuth 2 access token. This typically expires after an hour so refreshToken is r [...] "clientSecret": { "index": 17, "kind": "property", "displayName": "Client Secret", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Client secret of the sheets application" }, - "refreshToken": { "index": 18, "kind": "property", "displayName": "Refresh Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "OAuth 2 refresh token. Using this, the Google Calendar component can obtain a [...] + "refreshToken": { "index": 18, "kind": "property", "displayName": "Refresh Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "OAuth 2 refresh token. Using this, the Google Sheets component can obtain a n [...] "serviceAccountKey": { "index": 19, "kind": "property", "displayName": "Service Account Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Sets .json file with credentials for Service account" } }, "headers": { @@ -54,14 +54,14 @@ }, "properties": { "spreadsheetId": { "index": 0, "kind": "path", "displayName": "Spreadsheet Id", "group": "consumer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Specifies the spreadsheet identifier that is used to identify the [...] - "applicationName": { "index": 1, "kind": "parameter", "displayName": "Application Name", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Google sheets application name. Example would be camel-google-sheets\/1.0" }, + "applicationName": { "index": 1, "kind": "parameter", "displayName": "Application Name", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Google Sheets application name. Example would be camel-google-sheets\/1.0" }, "clientId": { "index": 2, "kind": "parameter", "displayName": "Client Id", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Client ID of the sheets application" }, "delegate": { "index": 3, "kind": "parameter", "displayName": "Delegate", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Delegate for wide-domain service account" }, "includeGridData": { "index": 4, "kind": "parameter", "displayName": "Include Grid Data", "group": "consumer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "True if grid data should be returned." }, "majorDimension": { "index": 5, "kind": "parameter", "displayName": "Major Dimension", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "ROWS", "COLUMNS", "DIMENSION_UNSPECIFIED" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "ROWS", "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": " [...] "maxResults": { "index": 6, "kind": "parameter", "displayName": "Max Results", "group": "consumer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Specify the maximum number of returned results. This will limit the number of rows in a returned val [...] "range": { "index": 7, "kind": "parameter", "displayName": "Range", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Specifies the range of rows and columns in a sheet to get data from." }, - "scopes": { "index": 8, "kind": "parameter", "displayName": "Scopes", "group": "consumer", "label": "", "required": false, "type": "array", "javaType": "java.util.List<java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Specifies the level of permissions you want a sheets application to have to a user [...] + "scopes": { "index": 8, "kind": "parameter", "displayName": "Scopes", "group": "consumer", "label": "", "required": false, "type": "array", "javaType": "java.util.Collection<java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Specifies the level of permissions you want a sheets application to have to [...] "sendEmptyMessageWhenIdle": { "index": 9, "kind": "parameter", "displayName": "Send Empty Message When Idle", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead." }, "splitResults": { "index": 10, "kind": "parameter", "displayName": "Split Results", "group": "consumer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "True if value range result should be split into rows or columns to p [...] "valueRenderOption": { "index": 11, "kind": "parameter", "displayName": "Value Render Option", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "FORMATTED_VALUE", "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "config [...] @@ -85,7 +85,7 @@ "useFixedDelay": { "index": 29, "kind": "parameter", "displayName": "Use Fixed Delay", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details." }, "accessToken": { "index": 30, "kind": "parameter", "displayName": "Access Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "OAuth 2 access token. This typically expires after an hour so refreshToken is [...] "clientSecret": { "index": 31, "kind": "parameter", "displayName": "Client Secret", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Client secret of the sheets application" }, - "refreshToken": { "index": 32, "kind": "parameter", "displayName": "Refresh Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "OAuth 2 refresh token. Using this, the Google Calendar component can obtain [...] + "refreshToken": { "index": 32, "kind": "parameter", "displayName": "Refresh Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "OAuth 2 refresh token. Using this, the Google Sheets component can obtain a [...] "serviceAccountKey": { "index": 33, "kind": "parameter", "displayName": "Service Account Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Sets .json file with credentials for Service account" } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-sheets.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-sheets.json index da08c5efb0b..853f2600746 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-sheets.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-sheets.json @@ -28,7 +28,7 @@ "clientId": { "index": 1, "kind": "property", "displayName": "Client Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "Client ID of the sheets application" }, "configuration": { "index": 2, "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "To use the shared configuration" }, "delegate": { "index": 3, "kind": "property", "displayName": "Delegate", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "Delegate for wide-domain service account" }, - "scopes": { "index": 4, "kind": "property", "displayName": "Scopes", "group": "common", "label": "", "required": false, "type": "array", "javaType": "java.util.Collection<java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "Sheets scopes" }, + "scopes": { "index": 4, "kind": "property", "displayName": "Scopes", "group": "common", "label": "", "required": false, "type": "array", "javaType": "java.util.Collection<java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "Specifies the level of permissions you want a sheets application to have to a user account. [...] "bridgeErrorHandler": { "index": 5, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be proce [...] "splitResult": { "index": 6, "kind": "property", "displayName": "Split Result", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "When consumer return an array or collection this will generate one exchange pe [...] "lazyStartProducer": { "index": 7, "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 [...] @@ -46,7 +46,7 @@ "clientId": { "index": 3, "kind": "parameter", "displayName": "Client Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "Client ID of the sheets application" }, "delegate": { "index": 4, "kind": "parameter", "displayName": "Delegate", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "Delegate for wide-domain service account" }, "inBody": { "index": 5, "kind": "parameter", "displayName": "In Body", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the name of a parameter to be passed in the exchange In Body" }, - "scopes": { "index": 6, "kind": "parameter", "displayName": "Scopes", "group": "common", "label": "", "required": false, "type": "array", "javaType": "java.util.Collection<java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "Sheets scopes" }, + "scopes": { "index": 6, "kind": "parameter", "displayName": "Scopes", "group": "common", "label": "", "required": false, "type": "array", "javaType": "java.util.Collection<java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "Specifies the level of permissions you want a sheets application to have to a user account. [...] "sendEmptyMessageWhenIdle": { "index": 7, "kind": "parameter", "displayName": "Send Empty Message When Idle", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead." }, "splitResult": { "index": 8, "kind": "parameter", "displayName": "Split Result", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "When consumer return an array or collection this will generate one exchange p [...] "bridgeErrorHandler": { "index": 9, "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the lik [...] diff --git a/components/camel-google/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/stream/GoogleSheetsStreamComponentConfigurer.java b/components/camel-google/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/stream/GoogleSheetsStreamComponentConfigurer.java index 5f9eb99d929..e41d76dc8bb 100644 --- a/components/camel-google/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/stream/GoogleSheetsStreamComponentConfigurer.java +++ b/components/camel-google/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/stream/GoogleSheetsStreamComponentConfigurer.java @@ -57,7 +57,7 @@ public class GoogleSheetsStreamComponentConfigurer extends PropertyConfigurerSup case "range": getOrCreateConfiguration(target).setRange(property(camelContext, java.lang.String.class, value)); return true; case "refreshtoken": case "refreshToken": getOrCreateConfiguration(target).setRefreshToken(property(camelContext, java.lang.String.class, value)); return true; - case "scopes": getOrCreateConfiguration(target).setScopes(property(camelContext, java.util.List.class, value)); return true; + case "scopes": getOrCreateConfiguration(target).setScopes(property(camelContext, java.util.Collection.class, value)); return true; case "serviceaccountkey": case "serviceAccountKey": getOrCreateConfiguration(target).setServiceAccountKey(property(camelContext, java.lang.String.class, value)); return true; case "splitresults": @@ -100,7 +100,7 @@ public class GoogleSheetsStreamComponentConfigurer extends PropertyConfigurerSup case "range": return java.lang.String.class; case "refreshtoken": case "refreshToken": return java.lang.String.class; - case "scopes": return java.util.List.class; + case "scopes": return java.util.Collection.class; case "serviceaccountkey": case "serviceAccountKey": return java.lang.String.class; case "splitresults": diff --git a/components/camel-google/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/stream/GoogleSheetsStreamEndpointConfigurer.java b/components/camel-google/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/stream/GoogleSheetsStreamEndpointConfigurer.java index 58bd5c53780..0b37d6fcc24 100644 --- a/components/camel-google/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/stream/GoogleSheetsStreamEndpointConfigurer.java +++ b/components/camel-google/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/stream/GoogleSheetsStreamEndpointConfigurer.java @@ -66,7 +66,7 @@ public class GoogleSheetsStreamEndpointConfigurer extends PropertyConfigurerSupp case "scheduler": target.setScheduler(property(camelContext, java.lang.Object.class, value)); return true; case "schedulerproperties": case "schedulerProperties": target.setSchedulerProperties(property(camelContext, java.util.Map.class, value)); return true; - case "scopes": target.getConfiguration().setScopes(property(camelContext, java.util.List.class, value)); return true; + case "scopes": target.getConfiguration().setScopes(property(camelContext, java.util.Collection.class, value)); return true; case "sendemptymessagewhenidle": case "sendEmptyMessageWhenIdle": target.setSendEmptyMessageWhenIdle(property(camelContext, boolean.class, value)); return true; case "serviceaccountkey": @@ -133,7 +133,7 @@ public class GoogleSheetsStreamEndpointConfigurer extends PropertyConfigurerSupp case "scheduler": return java.lang.Object.class; case "schedulerproperties": case "schedulerProperties": return java.util.Map.class; - case "scopes": return java.util.List.class; + case "scopes": return java.util.Collection.class; case "sendemptymessagewhenidle": case "sendEmptyMessageWhenIdle": return boolean.class; case "serviceaccountkey": diff --git a/components/camel-google/camel-google-sheets/src/generated/resources/org/apache/camel/component/google/sheets/google-sheets.json b/components/camel-google/camel-google-sheets/src/generated/resources/org/apache/camel/component/google/sheets/google-sheets.json index da08c5efb0b..853f2600746 100644 --- a/components/camel-google/camel-google-sheets/src/generated/resources/org/apache/camel/component/google/sheets/google-sheets.json +++ b/components/camel-google/camel-google-sheets/src/generated/resources/org/apache/camel/component/google/sheets/google-sheets.json @@ -28,7 +28,7 @@ "clientId": { "index": 1, "kind": "property", "displayName": "Client Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "Client ID of the sheets application" }, "configuration": { "index": 2, "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "To use the shared configuration" }, "delegate": { "index": 3, "kind": "property", "displayName": "Delegate", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "Delegate for wide-domain service account" }, - "scopes": { "index": 4, "kind": "property", "displayName": "Scopes", "group": "common", "label": "", "required": false, "type": "array", "javaType": "java.util.Collection<java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "Sheets scopes" }, + "scopes": { "index": 4, "kind": "property", "displayName": "Scopes", "group": "common", "label": "", "required": false, "type": "array", "javaType": "java.util.Collection<java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "Specifies the level of permissions you want a sheets application to have to a user account. [...] "bridgeErrorHandler": { "index": 5, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be proce [...] "splitResult": { "index": 6, "kind": "property", "displayName": "Split Result", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "When consumer return an array or collection this will generate one exchange pe [...] "lazyStartProducer": { "index": 7, "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 [...] @@ -46,7 +46,7 @@ "clientId": { "index": 3, "kind": "parameter", "displayName": "Client Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "Client ID of the sheets application" }, "delegate": { "index": 4, "kind": "parameter", "displayName": "Delegate", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "Delegate for wide-domain service account" }, "inBody": { "index": 5, "kind": "parameter", "displayName": "In Body", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the name of a parameter to be passed in the exchange In Body" }, - "scopes": { "index": 6, "kind": "parameter", "displayName": "Scopes", "group": "common", "label": "", "required": false, "type": "array", "javaType": "java.util.Collection<java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "Sheets scopes" }, + "scopes": { "index": 6, "kind": "parameter", "displayName": "Scopes", "group": "common", "label": "", "required": false, "type": "array", "javaType": "java.util.Collection<java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "Specifies the level of permissions you want a sheets application to have to a user account. [...] "sendEmptyMessageWhenIdle": { "index": 7, "kind": "parameter", "displayName": "Send Empty Message When Idle", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead." }, "splitResult": { "index": 8, "kind": "parameter", "displayName": "Split Result", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.google.sheets.GoogleSheetsConfiguration", "configurationField": "configuration", "description": "When consumer return an array or collection this will generate one exchange p [...] "bridgeErrorHandler": { "index": 9, "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the lik [...] diff --git a/components/camel-google/camel-google-sheets/src/generated/resources/org/apache/camel/component/google/sheets/stream/google-sheets-stream.json b/components/camel-google/camel-google-sheets/src/generated/resources/org/apache/camel/component/google/sheets/stream/google-sheets-stream.json index 4848b8c840b..e762eb6ba54 100644 --- a/components/camel-google/camel-google-sheets/src/generated/resources/org/apache/camel/component/google/sheets/stream/google-sheets-stream.json +++ b/components/camel-google/camel-google-sheets/src/generated/resources/org/apache/camel/component/google/sheets/stream/google-sheets-stream.json @@ -23,7 +23,7 @@ "verifiers": "parameters,connectivity" }, "componentProperties": { - "applicationName": { "index": 0, "kind": "property", "displayName": "Application Name", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Google sheets application name. Example would be camel-google-sheets\/1.0" }, + "applicationName": { "index": 0, "kind": "property", "displayName": "Application Name", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Google Sheets application name. Example would be camel-google-sheets\/1.0" }, "bridgeErrorHandler": { "index": 1, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be proce [...] "clientId": { "index": 2, "kind": "property", "displayName": "Client Id", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Client ID of the sheets application" }, "configuration": { "index": 3, "kind": "property", "displayName": "Configuration", "group": "consumer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "To use the shared configuration" }, @@ -32,7 +32,7 @@ "majorDimension": { "index": 6, "kind": "property", "displayName": "Major Dimension", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "ROWS", "COLUMNS", "DIMENSION_UNSPECIFIED" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "ROWS", "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "S [...] "maxResults": { "index": 7, "kind": "property", "displayName": "Max Results", "group": "consumer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Specify the maximum number of returned results. This will limit the number of rows in a returned valu [...] "range": { "index": 8, "kind": "property", "displayName": "Range", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Specifies the range of rows and columns in a sheet to get data from." }, - "scopes": { "index": 9, "kind": "property", "displayName": "Scopes", "group": "consumer", "label": "", "required": false, "type": "array", "javaType": "java.util.List<java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Specifies the level of permissions you want a sheets application to have to a user [...] + "scopes": { "index": 9, "kind": "property", "displayName": "Scopes", "group": "consumer", "label": "", "required": false, "type": "array", "javaType": "java.util.Collection<java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Specifies the level of permissions you want a sheets application to have to a [...] "splitResults": { "index": 10, "kind": "property", "displayName": "Split Results", "group": "consumer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "True if value range result should be split into rows or columns to pr [...] "valueRenderOption": { "index": 11, "kind": "property", "displayName": "Value Render Option", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "FORMATTED_VALUE", "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configu [...] "autowiredEnabled": { "index": 12, "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 [...] @@ -41,7 +41,7 @@ "healthCheckProducerEnabled": { "index": 15, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on produce [...] "accessToken": { "index": 16, "kind": "property", "displayName": "Access Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "OAuth 2 access token. This typically expires after an hour so refreshToken is r [...] "clientSecret": { "index": 17, "kind": "property", "displayName": "Client Secret", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Client secret of the sheets application" }, - "refreshToken": { "index": 18, "kind": "property", "displayName": "Refresh Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "OAuth 2 refresh token. Using this, the Google Calendar component can obtain a [...] + "refreshToken": { "index": 18, "kind": "property", "displayName": "Refresh Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "OAuth 2 refresh token. Using this, the Google Sheets component can obtain a n [...] "serviceAccountKey": { "index": 19, "kind": "property", "displayName": "Service Account Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Sets .json file with credentials for Service account" } }, "headers": { @@ -54,14 +54,14 @@ }, "properties": { "spreadsheetId": { "index": 0, "kind": "path", "displayName": "Spreadsheet Id", "group": "consumer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Specifies the spreadsheet identifier that is used to identify the [...] - "applicationName": { "index": 1, "kind": "parameter", "displayName": "Application Name", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Google sheets application name. Example would be camel-google-sheets\/1.0" }, + "applicationName": { "index": 1, "kind": "parameter", "displayName": "Application Name", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Google Sheets application name. Example would be camel-google-sheets\/1.0" }, "clientId": { "index": 2, "kind": "parameter", "displayName": "Client Id", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Client ID of the sheets application" }, "delegate": { "index": 3, "kind": "parameter", "displayName": "Delegate", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Delegate for wide-domain service account" }, "includeGridData": { "index": 4, "kind": "parameter", "displayName": "Include Grid Data", "group": "consumer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "True if grid data should be returned." }, "majorDimension": { "index": 5, "kind": "parameter", "displayName": "Major Dimension", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "ROWS", "COLUMNS", "DIMENSION_UNSPECIFIED" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "ROWS", "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": " [...] "maxResults": { "index": 6, "kind": "parameter", "displayName": "Max Results", "group": "consumer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Specify the maximum number of returned results. This will limit the number of rows in a returned val [...] "range": { "index": 7, "kind": "parameter", "displayName": "Range", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Specifies the range of rows and columns in a sheet to get data from." }, - "scopes": { "index": 8, "kind": "parameter", "displayName": "Scopes", "group": "consumer", "label": "", "required": false, "type": "array", "javaType": "java.util.List<java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Specifies the level of permissions you want a sheets application to have to a user [...] + "scopes": { "index": 8, "kind": "parameter", "displayName": "Scopes", "group": "consumer", "label": "", "required": false, "type": "array", "javaType": "java.util.Collection<java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Specifies the level of permissions you want a sheets application to have to [...] "sendEmptyMessageWhenIdle": { "index": 9, "kind": "parameter", "displayName": "Send Empty Message When Idle", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead." }, "splitResults": { "index": 10, "kind": "parameter", "displayName": "Split Results", "group": "consumer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "True if value range result should be split into rows or columns to p [...] "valueRenderOption": { "index": 11, "kind": "parameter", "displayName": "Value Render Option", "group": "consumer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "FORMATTED_VALUE", "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "config [...] @@ -85,7 +85,7 @@ "useFixedDelay": { "index": 29, "kind": "parameter", "displayName": "Use Fixed Delay", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details." }, "accessToken": { "index": 30, "kind": "parameter", "displayName": "Access Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "OAuth 2 access token. This typically expires after an hour so refreshToken is [...] "clientSecret": { "index": 31, "kind": "parameter", "displayName": "Client Secret", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Client secret of the sheets application" }, - "refreshToken": { "index": 32, "kind": "parameter", "displayName": "Refresh Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "OAuth 2 refresh token. Using this, the Google Calendar component can obtain [...] + "refreshToken": { "index": 32, "kind": "parameter", "displayName": "Refresh Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "OAuth 2 refresh token. Using this, the Google Sheets component can obtain a [...] "serviceAccountKey": { "index": 33, "kind": "parameter", "displayName": "Service Account Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamConfiguration", "configurationField": "configuration", "description": "Sets .json file with credentials for Service account" } } } diff --git a/components/camel-google/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/GoogleSheetsConfiguration.java b/components/camel-google/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/GoogleSheetsConfiguration.java index b358a490075..4ed962c793c 100644 --- a/components/camel-google/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/GoogleSheetsConfiguration.java +++ b/components/camel-google/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/GoogleSheetsConfiguration.java @@ -140,7 +140,8 @@ public class GoogleSheetsConfiguration extends AbstractApiConfiguration { } /** - * Sheets scopes + * Specifies the level of permissions you want a sheets application to have to a user account. See + * https://developers.google.com/identity/protocols/googlescopes for more info. * * @see com.google.api.services.sheets.v4.SheetsScopes */ diff --git a/components/camel-google/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/stream/GoogleSheetsStreamConfiguration.java b/components/camel-google/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/stream/GoogleSheetsStreamConfiguration.java index 279968c4979..20af7d35cdd 100644 --- a/components/camel-google/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/stream/GoogleSheetsStreamConfiguration.java +++ b/components/camel-google/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/stream/GoogleSheetsStreamConfiguration.java @@ -1,254 +1,252 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.google.sheets.stream; - -import java.util.Collections; -import java.util.List; - -import com.google.api.services.sheets.v4.SheetsScopes; -import org.apache.camel.RuntimeCamelException; -import org.apache.camel.spi.Metadata; -import org.apache.camel.spi.UriParam; -import org.apache.camel.spi.UriParams; -import org.apache.camel.spi.UriPath; - -/** - * Component configuration for GoogleSheets stream component. - */ -@UriParams -public class GoogleSheetsStreamConfiguration implements Cloneable { - - private static final List<String> DEFAULT_SCOPES = Collections.singletonList(SheetsScopes.SPREADSHEETS); - - @UriPath - @Metadata(required = true) - private String spreadsheetId; - @UriParam - private List<String> scopes = DEFAULT_SCOPES; - @UriParam - private String clientId; - @UriParam(label = "security", secret = true) - private String clientSecret; - @UriParam(label = "security", secret = true) - private String accessToken; - @UriParam(label = "security", secret = true) - private String refreshToken; - @UriParam - private String applicationName; - @UriParam - private int maxResults; - @UriParam - private String range; - @UriParam - private boolean includeGridData; - @UriParam - private boolean splitResults; - @UriParam(enums = "ROWS,COLUMNS,DIMENSION_UNSPECIFIED", defaultValue = "ROWS") - private String majorDimension = "ROWS"; - @UriParam(enums = "FORMATTED_VALUE,UNFORMATTED_VALUE,FORMULA", defaultValue = "FORMATTED_VALUE") - private String valueRenderOption = "FORMATTED_VALUE"; - /* Service account */ - @UriParam(label = "security") - private String serviceAccountKey; - @UriParam - private String delegate; - - public String getClientId() { - return clientId; - } - - /** - * Client ID of the sheets application - */ - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public String getClientSecret() { - return clientSecret; - } - - /** - * Client secret of the sheets application - */ - public void setClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - } - - public String getAccessToken() { - return accessToken; - } - - /** - * OAuth 2 access token. This typically expires after an hour so refreshToken is recommended for long term usage. - */ - public void setAccessToken(String accessToken) { - this.accessToken = accessToken; - } - - public String getRefreshToken() { - return refreshToken; - } - - /** - * OAuth 2 refresh token. Using this, the Google Calendar component can obtain a new accessToken whenever the - * current one expires - a necessity if the application is long-lived. - */ - public void setRefreshToken(String refreshToken) { - this.refreshToken = refreshToken; - } - - public String getApplicationName() { - return applicationName; - } - - /** - * Google sheets application name. Example would be "camel-google-sheets/1.0" - */ - public void setApplicationName(String applicationName) { - this.applicationName = applicationName; - } - - public List<String> getScopes() { - return scopes; - } - - /** - * Specifies the level of permissions you want a sheets application to have to a user account. See - * https://developers.google.com/identity/protocols/googlescopes for more info. - */ - public void setScopes(List<String> scopes) { - this.scopes = scopes; - } - - public String getSpreadsheetId() { - return spreadsheetId; - } - - /** - * Specifies the spreadsheet identifier that is used to identify the target to obtain. - */ - public void setSpreadsheetId(String spreadsheetId) { - this.spreadsheetId = spreadsheetId; - } - - public int getMaxResults() { - return maxResults; - } - - /** - * Specify the maximum number of returned results. This will limit the number of rows in a returned value range data - * set or the number of returned value ranges in a batch request. - */ - public void setMaxResults(int maxResults) { - this.maxResults = maxResults; - } - - public String getRange() { - return range; - } - - /** - * Specifies the range of rows and columns in a sheet to get data from. - */ - public void setRange(String range) { - this.range = range; - } - - public String getMajorDimension() { - return majorDimension; - } - - /** - * Specifies the major dimension that results should use.. - */ - public void setMajorDimension(String majorDimension) { - this.majorDimension = majorDimension; - } - - public String getValueRenderOption() { - return valueRenderOption; - } - - /** - * Determines how values should be rendered in the output. - */ - public void setValueRenderOption(String valueRenderOption) { - this.valueRenderOption = valueRenderOption; - } - - public boolean isIncludeGridData() { - return includeGridData; - } - - /** - * True if grid data should be returned. - */ - public void setIncludeGridData(boolean includeGridData) { - this.includeGridData = includeGridData; - } - - public boolean isSplitResults() { - return splitResults; - } - - /** - * True if value range result should be split into rows or columns to process each of them individually. When true - * each row or column is represented with a separate exchange in batch processing. Otherwise value range object is - * used as exchange junk size. - */ - public void setSplitResults(boolean splitResults) { - this.splitResults = splitResults; - } - - public String getServiceAccountKey() { - return serviceAccountKey; - } - - /** - * Sets "*.json" file with credentials for Service account - * - * @param serviceAccountKey String file, classpath, or http url - */ - public void setServiceAccountKey(String serviceAccountKey) { - this.serviceAccountKey = serviceAccountKey; - } - - public String getDelegate() { - return delegate; - } - - /** - * Delegate for wide-domain service account - */ - public void setDelegate(String delegate) { - this.delegate = delegate; - } - - // ************************************************* - // - // ************************************************* - - public GoogleSheetsStreamConfiguration copy() { - try { - return (GoogleSheetsStreamConfiguration) super.clone(); - } catch (CloneNotSupportedException e) { - throw new RuntimeCamelException(e); - } - } - -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.google.sheets.stream; + +import java.util.Collection; + +import org.apache.camel.RuntimeCamelException; +import org.apache.camel.spi.Metadata; +import org.apache.camel.spi.UriParam; +import org.apache.camel.spi.UriParams; +import org.apache.camel.spi.UriPath; + +/** + * Component configuration for GoogleSheets stream component. + */ +@UriParams +public class GoogleSheetsStreamConfiguration implements Cloneable { + + @UriPath + @Metadata(required = true) + private String spreadsheetId; + @UriParam + private Collection<String> scopes; + @UriParam + private String clientId; + @UriParam(label = "security", secret = true) + private String clientSecret; + @UriParam(label = "security", secret = true) + private String accessToken; + @UriParam(label = "security", secret = true) + private String refreshToken; + @UriParam + private String applicationName; + @UriParam + private int maxResults; + @UriParam + private String range; + @UriParam + private boolean includeGridData; + @UriParam + private boolean splitResults; + @UriParam(enums = "ROWS,COLUMNS,DIMENSION_UNSPECIFIED", defaultValue = "ROWS") + private String majorDimension = "ROWS"; + @UriParam(enums = "FORMATTED_VALUE,UNFORMATTED_VALUE,FORMULA", defaultValue = "FORMATTED_VALUE") + private String valueRenderOption = "FORMATTED_VALUE"; + /* Service account */ + @UriParam(label = "security") + private String serviceAccountKey; + @UriParam + private String delegate; + + public String getClientId() { + return clientId; + } + + /** + * Client ID of the sheets application + */ + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public String getClientSecret() { + return clientSecret; + } + + /** + * Client secret of the sheets application + */ + public void setClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + } + + public String getAccessToken() { + return accessToken; + } + + /** + * OAuth 2 access token. This typically expires after an hour so refreshToken is recommended for long term usage. + */ + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + public String getRefreshToken() { + return refreshToken; + } + + /** + * OAuth 2 refresh token. Using this, the Google Sheets component can obtain a new accessToken whenever the current + * one expires - a necessity if the application is long-lived. + */ + public void setRefreshToken(String refreshToken) { + this.refreshToken = refreshToken; + } + + public String getApplicationName() { + return applicationName; + } + + /** + * Google Sheets application name. Example would be "camel-google-sheets/1.0" + */ + public void setApplicationName(String applicationName) { + this.applicationName = applicationName; + } + + public Collection<String> getScopes() { + return scopes; + } + + /** + * Specifies the level of permissions you want a sheets application to have to a user account. See + * https://developers.google.com/identity/protocols/googlescopes for more info. + * + * @see com.google.api.services.sheets.v4.SheetsScopes + */ + public void setScopes(Collection<String> scopes) { + this.scopes = scopes; + } + + public String getSpreadsheetId() { + return spreadsheetId; + } + + /** + * Specifies the spreadsheet identifier that is used to identify the target to obtain. + */ + public void setSpreadsheetId(String spreadsheetId) { + this.spreadsheetId = spreadsheetId; + } + + public int getMaxResults() { + return maxResults; + } + + /** + * Specify the maximum number of returned results. This will limit the number of rows in a returned value range data + * set or the number of returned value ranges in a batch request. + */ + public void setMaxResults(int maxResults) { + this.maxResults = maxResults; + } + + public String getRange() { + return range; + } + + /** + * Specifies the range of rows and columns in a sheet to get data from. + */ + public void setRange(String range) { + this.range = range; + } + + public String getMajorDimension() { + return majorDimension; + } + + /** + * Specifies the major dimension that results should use.. + */ + public void setMajorDimension(String majorDimension) { + this.majorDimension = majorDimension; + } + + public String getValueRenderOption() { + return valueRenderOption; + } + + /** + * Determines how values should be rendered in the output. + */ + public void setValueRenderOption(String valueRenderOption) { + this.valueRenderOption = valueRenderOption; + } + + public boolean isIncludeGridData() { + return includeGridData; + } + + /** + * True if grid data should be returned. + */ + public void setIncludeGridData(boolean includeGridData) { + this.includeGridData = includeGridData; + } + + public boolean isSplitResults() { + return splitResults; + } + + /** + * True if value range result should be split into rows or columns to process each of them individually. When true + * each row or column is represented with a separate exchange in batch processing. Otherwise value range object is + * used as exchange junk size. + */ + public void setSplitResults(boolean splitResults) { + this.splitResults = splitResults; + } + + public String getServiceAccountKey() { + return serviceAccountKey; + } + + /** + * Sets "*.json" file with credentials for Service account + * + * @param serviceAccountKey String file, classpath, or http url + */ + public void setServiceAccountKey(String serviceAccountKey) { + this.serviceAccountKey = serviceAccountKey; + } + + public String getDelegate() { + return delegate; + } + + /** + * Delegate for wide-domain service account + */ + public void setDelegate(String delegate) { + this.delegate = delegate; + } + + // ************************************************* + // + // ************************************************* + + public GoogleSheetsStreamConfiguration copy() { + try { + return (GoogleSheetsStreamConfiguration) super.clone(); + } catch (CloneNotSupportedException e) { + throw new RuntimeCamelException(e); + } + } + +}