Build new Camel Olingo4 component
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ea11a624 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ea11a624 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ea11a624 Branch: refs/heads/master Commit: ea11a62418d0d9e86daa41bf4d43119f755b6135 Parents: 71c8bdd Author: Andrea Cosentino <anco...@gmail.com> Authored: Fri Mar 24 09:58:05 2017 +0100 Committer: Andrea Cosentino <anco...@gmail.com> Committed: Fri Mar 24 09:58:05 2017 +0100 ---------------------------------------------------------------------- .../src/main/docs/olingo4-component.adoc | 66 +++++++++++--------- .../Olingo4ComponentConfiguration.java | 19 +++++- 2 files changed, 55 insertions(+), 30 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/ea11a624/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc b/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc index cab1e53..980372c 100644 --- a/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc +++ b/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc @@ -1,6 +1,6 @@ ## Olingo4 Component -*Available as of Camel version 2.19.0* +*Available as of Camel version 2.19* The Olingo4 component utilizes http://olingo.apache.org/[Apache Olingo] version 4.0 APIs to interact with OData 4.0 compliant service. @@ -43,17 +43,16 @@ for this component: // component options: START -The Olingo4 component supports 1 options which are listed below. +The Olingo4 component supports 2 options which are listed below. -{% raw %} -[width="100%",cols="2,1,1m,1m,5",options="header"] +[width="100%",cols="2,5,^1,2",options="header"] |======================================================================= -| Name | Group | Default | Java Type | Description -| configuration | common | | Olingo4Configuration | To use the shared configuration +| Name | Description | Default | Type +| **configuration** (common) | To use the shared configuration | | Olingo4Configuration +| **resolveProperty Placeholders** (advanced) | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. | true | boolean |======================================================================= -{% endraw %} // component options: END @@ -62,30 +61,41 @@ The Olingo4 component supports 1 options which are listed below. // endpoint options: START -The Olingo4 component supports 16 endpoint options which are listed below: +The Olingo4 endpoint is configured using URI syntax: -{% raw %} -[width="100%",cols="2,1,1m,1m,5",options="header"] + olingo4:apiName/methodName + +with the following path and query parameters: + +#### Path Parameters (2 parameters): + +[width="100%",cols="2,5,^1,2",options="header"] +|======================================================================= +| Name | Description | Default | Type +| **apiName** | *Required* What kind of operation to perform | | Olingo4ApiName +| **methodName** | *Required* What sub operation to use for the selected operation | | String +|======================================================================= + +#### Query Parameters (14 parameters): + +[width="100%",cols="2,5,^1,2",options="header"] |======================================================================= -| Name | Group | Default | Java Type | Description -| apiName | common | | Olingo4ApiName | *Required* What kind of operation to perform -| methodName | common | | String | *Required* What sub operation to use for the selected operation -| connectTimeout | common | 30000 | int | HTTP connection creation timeout in milliseconds defaults to 30000 (30 seconds) -| contentType | common | application/json;charset=utf-8 | String | Content-Type header value can be used to specify JSON or XML message format defaults to application/json;charset=utf-8 -| httpAsyncClientBuilder | common | | HttpAsyncClientBuilder | Custom HTTP async client builder for more complex HTTP client configuration overrides connectionTimeout socketTimeout proxy and sslContext. Note that a socketTimeout MUST be specified in the builder otherwise OData requests could block indefinitely -| httpClientBuilder | common | | HttpClientBuilder | Custom HTTP client builder for more complex HTTP client configuration overrides connectionTimeout socketTimeout proxy and sslContext. Note that a socketTimeout MUST be specified in the builder otherwise OData requests could block indefinitely -| httpHeaders | common | | Map | Custom HTTP headers to inject into every request this could include OAuth tokens etc. -| inBody | common | | String | Sets the name of a parameter to be passed in the exchange In Body -| proxy | common | | HttpHost | HTTP proxy server configuration -| serviceUri | common | | String | Target OData service base URI e.g. http://services.odata.org/TripPinRESTierService/ -| socketTimeout | common | 30000 | int | HTTP request timeout in milliseconds defaults to 30000 (30 seconds) -| sslContextParameters | common | | SSLContextParameters | To configure security using SSLContextParameters -| bridgeErrorHandler | consumer | false | boolean | 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 processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN or ERROR level and ignored. -| exceptionHandler | consumer (advanced) | | ExceptionHandler | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN or ERROR level and ignored. -| exchangePattern | consumer (advanced) | | ExchangePattern | Sets the exchange pattern when the consumer creates an exchange. -| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). +| Name | Description | Default | Type +| **connectTimeout** (common) | HTTP connection creation timeout in milliseconds defaults to 30000 (30 seconds) | 30000 | int +| **contentType** (common) | Content-Type header value can be used to specify JSON or XML message format defaults to application/json;charset=utf-8 | application/json;charset=utf-8 | String +| **httpAsyncClientBuilder** (common) | Custom HTTP async client builder for more complex HTTP client configuration overrides connectionTimeout socketTimeout proxy and sslContext. Note that a socketTimeout MUST be specified in the builder otherwise OData requests could block indefinitely | | HttpAsyncClientBuilder +| **httpClientBuilder** (common) | Custom HTTP client builder for more complex HTTP client configuration overrides connectionTimeout socketTimeout proxy and sslContext. Note that a socketTimeout MUST be specified in the builder otherwise OData requests could block indefinitely | | HttpClientBuilder +| **httpHeaders** (common) | Custom HTTP headers to inject into every request this could include OAuth tokens etc. | | Map +| **inBody** (common) | Sets the name of a parameter to be passed in the exchange In Body | | String +| **proxy** (common) | HTTP proxy server configuration | | HttpHost +| **serviceUri** (common) | Target OData service base URI e.g. http://services.odata.org/OData/OData.svc | | String +| **socketTimeout** (common) | HTTP request timeout in milliseconds defaults to 30000 (30 seconds) | 30000 | int +| **sslContextParameters** (common) | To configure security using SSLContextParameters | | SSLContextParameters +| **bridgeErrorHandler** (consumer) | 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 processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN or ERROR level and ignored. | false | boolean +| **exceptionHandler** (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN or ERROR level and ignored. | | ExceptionHandler +| **exchangePattern** (consumer) | Sets the exchange pattern when the consumer creates an exchange. | | ExchangePattern +| **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean |======================================================================= -{% endraw %} // endpoint options: END http://git-wip-us.apache.org/repos/asf/camel/blob/ea11a624/platforms/spring-boot/components-starter/camel-olingo4-starter/src/main/java/org/apache/camel/component/olingo4/springboot/Olingo4ComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/platforms/spring-boot/components-starter/camel-olingo4-starter/src/main/java/org/apache/camel/component/olingo4/springboot/Olingo4ComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-olingo4-starter/src/main/java/org/apache/camel/component/olingo4/springboot/Olingo4ComponentConfiguration.java index 35da6ed..ef18577 100644 --- a/platforms/spring-boot/components-starter/camel-olingo4-starter/src/main/java/org/apache/camel/component/olingo4/springboot/Olingo4ComponentConfiguration.java +++ b/platforms/spring-boot/components-starter/camel-olingo4-starter/src/main/java/org/apache/camel/component/olingo4/springboot/Olingo4ComponentConfiguration.java @@ -37,6 +37,12 @@ public class Olingo4ComponentConfiguration { * To use the shared configuration */ private Olingo4ConfigurationNestedConfiguration configuration; + /** + * Whether the component should resolve property placeholders on itself when + * starting. Only properties which are of String type can use property + * placeholders. + */ + private Boolean resolvePropertyPlaceholders = true; public Olingo4ConfigurationNestedConfiguration getConfiguration() { return configuration; @@ -47,6 +53,15 @@ public class Olingo4ComponentConfiguration { this.configuration = configuration; } + public Boolean getResolvePropertyPlaceholders() { + return resolvePropertyPlaceholders; + } + + public void setResolvePropertyPlaceholders( + Boolean resolvePropertyPlaceholders) { + this.resolvePropertyPlaceholders = resolvePropertyPlaceholders; + } + public static class Olingo4ConfigurationNestedConfiguration { public static final Class CAMEL_NESTED_CLASS = org.apache.camel.component.olingo4.Olingo4Configuration.class; /** @@ -76,11 +91,11 @@ public class Olingo4ComponentConfiguration { * HTTP connection creation timeout in milliseconds, defaults to 30,000 * (30 seconds) */ - private Integer connectTimeout; + private Integer connectTimeout = 30000; /** * HTTP request timeout in milliseconds, defaults to 30,000 (30 seconds) */ - private Integer socketTimeout; + private Integer socketTimeout = 30000; /** * HTTP proxy server configuration */