You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/08/21 05:16:43 UTC
[camel] 03/05: CAMEL-13870: Fast property configuration of Camel
endpoints. Work in progress.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch CAMEL-13870
in repository https://gitbox.apache.org/repos/asf/camel.git
commit b6553d2e16c076a1e1a89340de2f1fd717e150c2
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Aug 21 06:31:32 2019 +0200
CAMEL-13870: Fast property configuration of Camel endpoints. Work in progress.
---
.../camel-ftp/src/main/docs/ftps-component.adoc | 2 +-
.../camel/component/geocoder/GeoCoderEndpoint.java | 7 +++--
.../google/sheets/GoogleSheetsEndpoint.java | 8 ++---
.../endpoint/dsl/FtpsEndpointBuilderFactory.java | 36 +++++++++++-----------
4 files changed, 28 insertions(+), 25 deletions(-)
diff --git a/components/camel-ftp/src/main/docs/ftps-component.adoc b/components/camel-ftp/src/main/docs/ftps-component.adoc
index 43813fb..7f65dee 100644
--- a/components/camel-ftp/src/main/docs/ftps-component.adoc
+++ b/components/camel-ftp/src/main/docs/ftps-component.adoc
@@ -179,7 +179,7 @@ with the following path and query parameters:
| *execProt* (security) | The exec protection level PROT command. C - Clear S - Safe(SSL protocol only) E - Confidential(SSL protocol only) P - Private | | String
| *ftpClientKeyStore Parameters* (security) | Set the key store parameters | | Map
| *ftpClientTrustStore Parameters* (security) | Set the trust store parameters | | Map
-| *isImplicit* (security) | Set the security mode(Implicit/Explicit). true - Implicit Mode / False - Explicit Mode | false | boolean
+| *implicit* (security) | Set the security mode (Implicit/Explicit). true - Implicit Mode / False - Explicit Mode | false | boolean
| *password* (security) | Password to use for login | | String
| *securityProtocol* (security) | Set the underlying security protocol. | TLSv1.2 | String
| *sslContextParameters* (security) | Gets the JSSE configuration that overrides any settings in FtpsEndpoint#\ftpClientKeyStoreParameters, \ftpClientTrustStoreParameters, and FtpsConfiguration#getSecurityProtocol(). | | SSLContextParameters
diff --git a/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderEndpoint.java b/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderEndpoint.java
index 60ed9d5..050615e 100644
--- a/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderEndpoint.java
+++ b/components/camel-geocoder/src/main/java/org/apache/camel/component/geocoder/GeoCoderEndpoint.java
@@ -147,8 +147,7 @@ public class GeoCoderEndpoint extends DefaultEndpoint {
this.clientKey = clientKey;
}
-
- private String getApiKey() {
+ public String getApiKey() {
return apiKey;
}
@@ -159,6 +158,10 @@ public class GeoCoderEndpoint extends DefaultEndpoint {
this.apiKey = apiKey;
}
+ public String getProxyHost() {
+ return proxyHost;
+ }
+
/**
* The proxy host name
*/
diff --git a/components/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/GoogleSheetsEndpoint.java b/components/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/GoogleSheetsEndpoint.java
index 744f37b..0cb4fc3 100644
--- a/components/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/GoogleSheetsEndpoint.java
+++ b/components/camel-google-sheets/src/main/java/org/apache/camel/component/google/sheets/GoogleSheetsEndpoint.java
@@ -38,14 +38,14 @@ import org.apache.camel.support.component.ApiMethodPropertiesHelper;
@UriEndpoint(firstVersion = "2.23.0", scheme = "google-sheets", title = "Google Sheets", syntax = "google-sheets:apiName/methodName", consumerPrefix = "consumer", label = "api,cloud,sheets")
public class GoogleSheetsEndpoint extends AbstractApiEndpoint<GoogleSheetsApiName, GoogleSheetsConfiguration> {
- @UriParam(name = "configuration")
- private GoogleSheetsConfiguration endpointConfiguration;
+ @UriParam
+ private GoogleSheetsConfiguration configuration;
private Object apiProxy;
public GoogleSheetsEndpoint(String uri, GoogleSheetsComponent component, GoogleSheetsApiName apiName, String methodName, GoogleSheetsConfiguration endpointConfiguration) {
super(uri, component, apiName, methodName, GoogleSheetsApiCollection.getCollection().getHelper(apiName), endpointConfiguration);
- this.endpointConfiguration = endpointConfiguration;
+ this.configuration = endpointConfiguration;
}
@Override
@@ -90,7 +90,7 @@ public class GoogleSheetsEndpoint extends AbstractApiEndpoint<GoogleSheetsApiNam
}
public Sheets getClient() {
- return ((GoogleSheetsComponent)getComponent()).getClient(endpointConfiguration);
+ return ((GoogleSheetsComponent)getComponent()).getClient(configuration);
}
@Override
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/FtpsEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/FtpsEndpointBuilderFactory.java
index 30e2d02..5558b87 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/FtpsEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/FtpsEndpointBuilderFactory.java
@@ -1971,27 +1971,27 @@ public interface FtpsEndpointBuilderFactory {
return this;
}
/**
- * Set the security mode(Implicit/Explicit). true - Implicit Mode /
+ * Set the security mode (Implicit/Explicit). true - Implicit Mode /
* False - Explicit Mode.
*
* The option is a: <code>boolean</code> type.
*
* Group: security
*/
- default FtpsEndpointConsumerBuilder isImplicit(boolean isImplicit) {
- setProperty("isImplicit", isImplicit);
+ default FtpsEndpointConsumerBuilder implicit(boolean implicit) {
+ setProperty("implicit", implicit);
return this;
}
/**
- * Set the security mode(Implicit/Explicit). true - Implicit Mode /
+ * Set the security mode (Implicit/Explicit). true - Implicit Mode /
* False - Explicit Mode.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: security
*/
- default FtpsEndpointConsumerBuilder isImplicit(String isImplicit) {
- setProperty("isImplicit", isImplicit);
+ default FtpsEndpointConsumerBuilder implicit(String implicit) {
+ setProperty("implicit", implicit);
return this;
}
/**
@@ -3559,27 +3559,27 @@ public interface FtpsEndpointBuilderFactory {
return this;
}
/**
- * Set the security mode(Implicit/Explicit). true - Implicit Mode /
+ * Set the security mode (Implicit/Explicit). true - Implicit Mode /
* False - Explicit Mode.
*
* The option is a: <code>boolean</code> type.
*
* Group: security
*/
- default FtpsEndpointProducerBuilder isImplicit(boolean isImplicit) {
- setProperty("isImplicit", isImplicit);
+ default FtpsEndpointProducerBuilder implicit(boolean implicit) {
+ setProperty("implicit", implicit);
return this;
}
/**
- * Set the security mode(Implicit/Explicit). true - Implicit Mode /
+ * Set the security mode (Implicit/Explicit). true - Implicit Mode /
* False - Explicit Mode.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: security
*/
- default FtpsEndpointProducerBuilder isImplicit(String isImplicit) {
- setProperty("isImplicit", isImplicit);
+ default FtpsEndpointProducerBuilder implicit(String implicit) {
+ setProperty("implicit", implicit);
return this;
}
/**
@@ -4765,27 +4765,27 @@ public interface FtpsEndpointBuilderFactory {
return this;
}
/**
- * Set the security mode(Implicit/Explicit). true - Implicit Mode /
+ * Set the security mode (Implicit/Explicit). true - Implicit Mode /
* False - Explicit Mode.
*
* The option is a: <code>boolean</code> type.
*
* Group: security
*/
- default FtpsEndpointBuilder isImplicit(boolean isImplicit) {
- setProperty("isImplicit", isImplicit);
+ default FtpsEndpointBuilder implicit(boolean implicit) {
+ setProperty("implicit", implicit);
return this;
}
/**
- * Set the security mode(Implicit/Explicit). true - Implicit Mode /
+ * Set the security mode (Implicit/Explicit). true - Implicit Mode /
* False - Explicit Mode.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: security
*/
- default FtpsEndpointBuilder isImplicit(String isImplicit) {
- setProperty("isImplicit", isImplicit);
+ default FtpsEndpointBuilder implicit(String implicit) {
+ setProperty("implicit", implicit);
return this;
}
/**