This is an automated email from the ASF dual-hosted git repository. davsclaus 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 dff6505a45f Regen dff6505a45f is described below commit dff6505a45f555fcb4e58d39c266c532de1871cd Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Mon Feb 5 17:04:29 2024 +0100 Regen --- .../camel/springboot/catalog/components/dhis2.json | 22 ++++++++++++---------- .../camel-dhis2-starter/src/main/docs/dhis2.json | 12 +++++++++--- .../springboot/Dhis2ComponentConfiguration.java | 21 ++++++++++++++++++--- 3 files changed, 39 insertions(+), 16 deletions(-) diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/dhis2.json b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/dhis2.json index f0d36c29656..e8924206b10 100644 --- a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/dhis2.json +++ b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/dhis2.json @@ -28,10 +28,11 @@ "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 (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the like [...] "lazyStartProducer": { "index": 2, "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 [...] "autowiredEnabled": { "index": 3, "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 t [...] - "client": { "index": 4, "kind": "property", "displayName": "Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.hisp.dhis.integration.sdk.api.Dhis2Client", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.dhis2.Dhis2Configuration", "configurationField": "configuration", "description": "References a user-defined org.hisp.dhis.integration.sdk.api.Dhis2Client" }, + "client": { "index": 4, "kind": "property", "displayName": "Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.hisp.dhis.integration.sdk.api.Dhis2Client", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.dhis2.Dhis2Configuration", "configurationField": "configuration", "description": "References a user-defined org.hisp.dhis.integration.sdk.api.Dhis2Client. This option is m [...] "configuration": { "index": 5, "kind": "property", "displayName": "Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.dhis2.Dhis2Configuration", "deprecated": false, "autowired": false, "secret": false, "description": "To use the shared configuration" }, - "password": { "index": 6, "kind": "property", "displayName": "Password", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.dhis2.Dhis2Configuration", "configurationField": "configuration", "description": "DHIS2 account password for accessing the DHIS2 API" }, - "username": { "index": 7, "kind": "property", "displayName": "Username", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.dhis2.Dhis2Configuration", "configurationField": "configuration", "description": "DHIS2 account username for accessing the DHIS2 API" } + "password": { "index": 6, "kind": "property", "displayName": "Password", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.dhis2.Dhis2Configuration", "configurationField": "configuration", "description": "Password of the DHIS2 username" }, + "personalAccessToken": { "index": 7, "kind": "property", "displayName": "Personal 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.dhis2.Dhis2Configuration", "configurationField": "configuration", "description": "Personal access token to authenticate with DHIS2. This option is mutually exclusive to user [...] + "username": { "index": 8, "kind": "property", "displayName": "Username", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.dhis2.Dhis2Configuration", "configurationField": "configuration", "description": "Username of the DHIS2 user to operate as" } }, "properties": { "apiName": { "index": 0, "kind": "path", "displayName": "Api Name", "group": "common", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.dhis2.internal.Dhis2ApiName", "enum": [ "POST", "RESOURCE_TABLES", "GET", "DELETE", "PUT" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.dhis2.Dhis2Configuration", "configurationField": "configuration", "description": "API op [...] @@ -44,7 +45,7 @@ "exchangePattern": { "index": 7, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." }, "pollStrategy": { "index": 8, "kind": "parameter", "displayName": "Poll Strategy", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.PollingConsumerPollStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the pol [...] "lazyStartProducer": { "index": 9, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "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 produc [...] - "client": { "index": 10, "kind": "parameter", "displayName": "Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.hisp.dhis.integration.sdk.api.Dhis2Client", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.dhis2.Dhis2Configuration", "configurationField": "configuration", "description": "References a user-defined org.hisp.dhis.integration.sdk.api.Dhis2Client" }, + "client": { "index": 10, "kind": "parameter", "displayName": "Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.hisp.dhis.integration.sdk.api.Dhis2Client", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.dhis2.Dhis2Configuration", "configurationField": "configuration", "description": "References a user-defined org.hisp.dhis.integration.sdk.api.Dhis2Client. This option is [...] "backoffErrorThreshold": { "index": 11, "kind": "parameter", "displayName": "Backoff Error Threshold", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in." }, "backoffIdleThreshold": { "index": 12, "kind": "parameter", "displayName": "Backoff Idle Threshold", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "The number of subsequent idle polls that should happen before the backoffMultipler should kick-in." }, "backoffMultiplier": { "index": 13, "kind": "parameter", "displayName": "Backoff Multiplier", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "To let the scheduled polling consumer backoff if there has been a number of subsequent idles\/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is h [...] @@ -59,21 +60,22 @@ "startScheduler": { "index": 22, "kind": "parameter", "displayName": "Start Scheduler", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether the scheduler should be auto started." }, "timeUnit": { "index": 23, "kind": "parameter", "displayName": "Time Unit", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "object", "javaType": "java.util.concurrent.TimeUnit", "enum": [ "NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "MILLISECONDS", "description": "Time unit for initialDelay and delay options." }, "useFixedDelay": { "index": 24, "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." }, - "password": { "index": 25, "kind": "parameter", "displayName": "Password", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.dhis2.Dhis2Configuration", "configurationField": "configuration", "description": "DHIS2 account password for accessing the DHIS2 API" }, - "username": { "index": 26, "kind": "parameter", "displayName": "Username", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.dhis2.Dhis2Configuration", "configurationField": "configuration", "description": "DHIS2 account username for accessing the DHIS2 API" } + "password": { "index": 25, "kind": "parameter", "displayName": "Password", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.dhis2.Dhis2Configuration", "configurationField": "configuration", "description": "Password of the DHIS2 username" }, + "personalAccessToken": { "index": 26, "kind": "parameter", "displayName": "Personal 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.dhis2.Dhis2Configuration", "configurationField": "configuration", "description": "Personal access token to authenticate with DHIS2. This option is mutually exclusive to us [...] + "username": { "index": 27, "kind": "parameter", "displayName": "Username", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.dhis2.Dhis2Configuration", "configurationField": "configuration", "description": "Username of the DHIS2 user to operate as" } }, "apis": { "delete": { "consumerOnly": false, "producerOnly": false, "description": "", "methods": { "resource": { "description": "", "signatures": [ "java.io.InputStream resource(String path, Object resource, java.util.Map<String, Object> queryParams)" ] } } }, - "get": { "consumerOnly": false, "producerOnly": false, "description": "", "methods": { "collection": { "description": "", "signatures": [ "java.util.Iterator<org.apache.camel.component.dhis2.api.Dhis2Resource> collection(String path, String arrayName, Boolean paging, String fields, String filter, org.apache.camel.component.dhis2.api.RootJunctionEnum rootJunction, java.util.Map<String, Object> queryParams)" ] }, "resource": { "description": "", "signatures": [ "java.io.InputStream res [...] + "get": { "consumerOnly": false, "producerOnly": false, "description": "", "methods": { "collection": { "description": "", "signatures": [ "java.util.Iterator<org.apache.camel.component.dhis2.api.Dhis2Resource> collection(String path, String arrayName, Boolean paging, String fields, java.util.List<String> filter, org.apache.camel.component.dhis2.api.RootJunctionEnum rootJunction, java.util.Map<String, Object> queryParams)" ] }, "resource": { "description": "", "signatures": [ "java.io [...] "post": { "consumerOnly": false, "producerOnly": false, "description": "", "methods": { "resource": { "description": "", "signatures": [ "java.io.InputStream resource(String path, Object resource, java.util.Map<String, Object> queryParams)" ] } } }, "put": { "consumerOnly": false, "producerOnly": false, "description": "", "methods": { "resource": { "description": "", "signatures": [ "java.io.InputStream resource(String path, Object resource, java.util.Map<String, Object> queryParams)" ] } } }, - "resourceTables": { "consumerOnly": false, "producerOnly": false, "description": "", "methods": { "analytics": { "description": "", "signatures": [ "void analytics(Boolean skipAggregate, Boolean skipEvents, Integer lastYears, Integer interval)" ] } } } + "resourceTables": { "consumerOnly": false, "producerOnly": false, "description": "", "methods": { "analytics": { "description": "", "signatures": [ "void analytics(Boolean skipAggregate, Boolean skipEvents, Integer lastYears, Integer interval, Boolean async)" ] } } } }, "apiProperties": { "delete": { "methods": { "resource": { "properties": { "path": { "index": 0, "kind": "parameter", "displayName": "Path", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "", "optional": false }, "queryParams": { "index": 1, "kind": "parameter", "displayName": "Query Params", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java. [...] - "get": { "methods": { "collection": { "properties": { "arrayName": { "index": 0, "kind": "parameter", "displayName": "Array Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "", "optional": false }, "fields": { "index": 1, "kind": "parameter", "displayName": "Fields", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.l [...] + "get": { "methods": { "collection": { "properties": { "arrayName": { "index": 0, "kind": "parameter", "displayName": "Array Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "", "optional": false }, "fields": { "index": 1, "kind": "parameter", "displayName": "Fields", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.l [...] "post": { "methods": { "resource": { "properties": { "path": { "index": 0, "kind": "parameter", "displayName": "Path", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "", "optional": false }, "queryParams": { "index": 1, "kind": "parameter", "displayName": "Query Params", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.ut [...] "put": { "methods": { "resource": { "properties": { "path": { "index": 0, "kind": "parameter", "displayName": "Path", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "", "optional": false }, "queryParams": { "index": 1, "kind": "parameter", "displayName": "Query Params", "group": "common", "label": "", "required": false, "type": "object", "javaType": "java.uti [...] - "resourceTables": { "methods": { "analytics": { "properties": { "interval": { "index": 0, "kind": "parameter", "displayName": "Interval", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "description": "", "optional": true }, "lastYears": { "index": 1, "kind": "parameter", "displayName": "Last Years", "group": "common", "label": "", "required": false, "type": "integer", "ja [...] + "resourceTables": { "methods": { "analytics": { "properties": { "async": { "index": 0, "kind": "parameter", "displayName": "Async", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "description": "", "optional": true }, "interval": { "index": 1, "kind": "parameter", "displayName": "Interval", "group": "common", "label": "", "required": false, "type": "integer", "javaType": [...] } } diff --git a/components-starter/camel-dhis2-starter/src/main/docs/dhis2.json b/components-starter/camel-dhis2-starter/src/main/docs/dhis2.json index 84a20579eb8..41fc0a307ea 100644 --- a/components-starter/camel-dhis2-starter/src/main/docs/dhis2.json +++ b/components-starter/camel-dhis2-starter/src/main/docs/dhis2.json @@ -36,7 +36,7 @@ { "name": "camel.component.dhis2.client", "type": "org.hisp.dhis.integration.sdk.api.Dhis2Client", - "description": "References a user-defined org.hisp.dhis.integration.sdk.api.Dhis2Client. The option is a org.hisp.dhis.integration.sdk.api.Dhis2Client type.", + "description": "References a user-defined org.hisp.dhis.integration.sdk.api.Dhis2Client. This option is mutually exclusive to the baseApiUrl, username, password, and personalAccessToken options. The option is a org.hisp.dhis.integration.sdk.api.Dhis2Client type.", "sourceType": "org.apache.camel.component.dhis2.springboot.Dhis2ComponentConfiguration" }, { @@ -66,13 +66,19 @@ { "name": "camel.component.dhis2.password", "type": "java.lang.String", - "description": "DHIS2 account password for accessing the DHIS2 API", + "description": "Password of the DHIS2 username", + "sourceType": "org.apache.camel.component.dhis2.springboot.Dhis2ComponentConfiguration" + }, + { + "name": "camel.component.dhis2.personal-access-token", + "type": "java.lang.String", + "description": "Personal access token to authenticate with DHIS2. This option is mutually exclusive to username and password", "sourceType": "org.apache.camel.component.dhis2.springboot.Dhis2ComponentConfiguration" }, { "name": "camel.component.dhis2.username", "type": "java.lang.String", - "description": "DHIS2 account username for accessing the DHIS2 API", + "description": "Username of the DHIS2 user to operate as", "sourceType": "org.apache.camel.component.dhis2.springboot.Dhis2ComponentConfiguration" } ], diff --git a/components-starter/camel-dhis2-starter/src/main/java/org/apache/camel/component/dhis2/springboot/Dhis2ComponentConfiguration.java b/components-starter/camel-dhis2-starter/src/main/java/org/apache/camel/component/dhis2/springboot/Dhis2ComponentConfiguration.java index 1f8076db1d4..0065b3569ce 100644 --- a/components-starter/camel-dhis2-starter/src/main/java/org/apache/camel/component/dhis2/springboot/Dhis2ComponentConfiguration.java +++ b/components-starter/camel-dhis2-starter/src/main/java/org/apache/camel/component/dhis2/springboot/Dhis2ComponentConfiguration.java @@ -77,7 +77,9 @@ public class Dhis2ComponentConfiguration private Boolean autowiredEnabled = true; /** * References a user-defined org.hisp.dhis.integration.sdk.api.Dhis2Client. - * The option is a org.hisp.dhis.integration.sdk.api.Dhis2Client type. + * This option is mutually exclusive to the baseApiUrl, username, password, + * and personalAccessToken options. The option is a + * org.hisp.dhis.integration.sdk.api.Dhis2Client type. */ private Dhis2Client client; /** @@ -86,11 +88,16 @@ public class Dhis2ComponentConfiguration */ private Dhis2Configuration configuration; /** - * DHIS2 account password for accessing the DHIS2 API + * Password of the DHIS2 username */ private String password; /** - * DHIS2 account username for accessing the DHIS2 API + * Personal access token to authenticate with DHIS2. This option is mutually + * exclusive to username and password + */ + private String personalAccessToken; + /** + * Username of the DHIS2 user to operate as */ private String username; @@ -150,6 +157,14 @@ public class Dhis2ComponentConfiguration this.password = password; } + public String getPersonalAccessToken() { + return personalAccessToken; + } + + public void setPersonalAccessToken(String personalAccessToken) { + this.personalAccessToken = personalAccessToken; + } + public String getUsername() { return username; }