This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 77939a9eeda3ebd3fe1781d4e77ba03b6aca8ed6 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Thu Aug 27 08:40:26 2020 +0200 CAMEL-15374 - Regen and fixed CS --- .../resources/org/apache/camel/component/aws2/sts/aws2-sts.json | 4 ++-- components/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc | 4 ++-- .../main/java/org/apache/camel/component/aws2/sts/STS2Producer.java | 2 +- .../java/org/apache/camel/component/aws2/sts/AmazonSTSClientMock.java | 2 +- .../java/org/apache/camel/component/aws2/sts/STS2ProducerTest.java | 2 +- .../apache/camel/builder/endpoint/dsl/STS2EndpointBuilderFactory.java | 3 ++- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/components/camel-aws2-sts/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json b/components/camel-aws2-sts/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json index a6045b6..d4c122d 100644 --- a/components/camel-aws2-sts/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json +++ b/components/camel-aws2-sts/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json @@ -24,7 +24,7 @@ "autoDiscoverClient": { "kind": "property", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the regist [...] "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.sts.STS2Configuration", "deprecated": false, "secret": false, "description": "Component configuration" }, "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the r [...] - "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.sts.STS2Operations", "enum": [ "assumeRole", "getSessionToken" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "assumeRole", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "The operation to pe [...] + "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.sts.STS2Operations", "enum": [ "assumeRole", "getSessionToken", "getFederationToken" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "assumeRole", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description" [...] "pojoRequest": { "kind": "property", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, "proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the STS client" }, "proxyPort": { "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the STS client" }, @@ -40,7 +40,7 @@ "label": { "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Logical name" }, "autoDiscoverClient": { "kind": "parameter", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the regis [...] "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the [...] - "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.sts.STS2Operations", "enum": [ "assumeRole", "getSessionToken" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "assumeRole", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "The operation to p [...] + "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.sts.STS2Operations", "enum": [ "assumeRole", "getSessionToken", "getFederationToken" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "assumeRole", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description [...] "pojoRequest": { "kind": "parameter", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" }, "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the STS client" }, "proxyPort": { "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sts.STS2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the STS client" }, diff --git a/components/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc b/components/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc index a5b47cc..872c8d3 100644 --- a/components/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc +++ b/components/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc @@ -51,7 +51,7 @@ The AWS 2 Security Token Service (STS) component supports 14 options, which are | *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean | *configuration* (producer) | Component configuration | | STS2Configuration | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...] -| *operation* (producer) | *Required* The operation to perform. The value can be one of: assumeRole, getSessionToken | assumeRole | STS2Operations +| *operation* (producer) | *Required* The operation to perform. The value can be one of: assumeRole, getSessionToken, getFederationToken | assumeRole | STS2Operations | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean | *proxyHost* (producer) | To define a proxy host when instantiating the STS client | | String | *proxyPort* (producer) | To define a proxy port when instantiating the STS client | | Integer @@ -95,7 +95,7 @@ with the following path and query parameters: | Name | Description | Default | Type | *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...] -| *operation* (producer) | *Required* The operation to perform. The value can be one of: assumeRole, getSessionToken | assumeRole | STS2Operations +| *operation* (producer) | *Required* The operation to perform. The value can be one of: assumeRole, getSessionToken, getFederationToken | assumeRole | STS2Operations | *pojoRequest* (producer) | If we want to use a POJO request as body or not | false | boolean | *proxyHost* (producer) | To define a proxy host when instantiating the STS client | | String | *proxyPort* (producer) | To define a proxy port when instantiating the STS client | | Integer diff --git a/components/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Producer.java b/components/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Producer.java index 1d888c5..8f2b783 100644 --- a/components/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Producer.java +++ b/components/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Producer.java @@ -159,7 +159,7 @@ public class STS2Producer extends DefaultProducer { message.setBody(result); } } - + private void getFederationToken(StsClient stsClient, Exchange exchange) throws InvalidPayloadException { if (getConfiguration().isPojoRequest()) { Object payload = exchange.getIn().getMandatoryBody(); diff --git a/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/AmazonSTSClientMock.java b/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/AmazonSTSClientMock.java index 1f4eab4..e083368 100644 --- a/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/AmazonSTSClientMock.java +++ b/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/AmazonSTSClientMock.java @@ -42,7 +42,7 @@ public class AmazonSTSClientMock implements StsClient { .credentials(Credentials.builder().accessKeyId("xxx").secretAccessKey("yyy").sessionToken("test").build()) .build(); } - + @Override public GetFederationTokenResponse getFederationToken(GetFederationTokenRequest getFederationTokenRequest) { return GetFederationTokenResponse.builder() diff --git a/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ProducerTest.java b/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ProducerTest.java index dd42751..fe0489c 100644 --- a/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ProducerTest.java +++ b/components/camel-aws2-sts/src/test/java/org/apache/camel/component/aws2/sts/STS2ProducerTest.java @@ -73,7 +73,7 @@ public class STS2ProducerTest extends CamelTestSupport { GetSessionTokenResponse resultGet = (GetSessionTokenResponse) exchange.getIn().getBody(); assertEquals("xxx", resultGet.credentials().accessKeyId()); } - + @Test public void stsGetFederationTokenTest() throws Exception { diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/STS2EndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/STS2EndpointBuilderFactory.java index c67bf6c..3863ac7 100644 --- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/STS2EndpointBuilderFactory.java +++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/STS2EndpointBuilderFactory.java @@ -382,7 +382,8 @@ public interface STS2EndpointBuilderFactory { */ enum STS2Operations { assumeRole, - getSessionToken; + getSessionToken, + getFederationToken; } /**