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/12/12 12:55:08 UTC
[camel] branch master updated: CAMEL-14284: Configuring endpoint
should set properties on endpoint and not configuration object - servicenow
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 13b9efa CAMEL-14284: Configuring endpoint should set properties on endpoint and not configuration object - servicenow
13b9efa is described below
commit 13b9efaa205c11412796d90ba6ca3eda39b3ebf0
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Dec 12 13:54:44 2019 +0100
CAMEL-14284: Configuring endpoint should set properties on endpoint and not configuration object - servicenow
---
.../camel/component/servicenow/ServiceNowComponent.java | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/components/camel-servicenow/camel-servicenow-component/src/main/java/org/apache/camel/component/servicenow/ServiceNowComponent.java b/components/camel-servicenow/camel-servicenow-component/src/main/java/org/apache/camel/component/servicenow/ServiceNowComponent.java
index 20a1124..f0b7958 100644
--- a/components/camel-servicenow/camel-servicenow-component/src/main/java/org/apache/camel/component/servicenow/ServiceNowComponent.java
+++ b/components/camel-servicenow/camel-servicenow-component/src/main/java/org/apache/camel/component/servicenow/ServiceNowComponent.java
@@ -158,7 +158,6 @@ public class ServiceNowComponent extends DefaultComponent implements SSLContextP
/**
* The proxy host name
- * @param proxyHost
*/
@Metadata(label = "advanced")
public void setProxyHost(String proxyHost) {
@@ -171,7 +170,6 @@ public class ServiceNowComponent extends DefaultComponent implements SSLContextP
/**
* The proxy port number
- * @param proxyPort
*/
@Metadata(label = "advanced")
public void setProxyPort(Integer proxyPort) {
@@ -184,7 +182,6 @@ public class ServiceNowComponent extends DefaultComponent implements SSLContextP
/**
* Username for proxy authentication
- * @param proxyUserName
*/
@Metadata(label = "advanced,security", secret = true)
public void setProxyUserName(String proxyUserName) {
@@ -197,7 +194,6 @@ public class ServiceNowComponent extends DefaultComponent implements SSLContextP
/**
* Password for proxy authentication
- * @param proxyPassword
*/
@Metadata(label = "advanced,security", secret = true)
public void setProxyPassword(String proxyPassword) {
@@ -251,26 +247,26 @@ public class ServiceNowComponent extends DefaultComponent implements SSLContextP
EndpointHelper.resolveParameter(context, (String)entry.getValue(), Class.class));
}
- setProperties(configuration, parameters);
-
if (ObjectHelper.isEmpty(remaining)) {
- // If an instance is not set on the endpoint uri, use the one set on
- // component.
+ // If an instance is not set on the endpoint uri, use the one set on component.
remaining = instanceName;
}
String instanceName = getCamelContext().resolvePropertyPlaceholders(remaining);
+ ServiceNowEndpoint endpoint = new ServiceNowEndpoint(uri, this, configuration, instanceName);
+ setProperties(endpoint, parameters);
+
if (!configuration.hasApiUrl()) {
configuration.setApiUrl(String.format("https://%s.service-now.com/api", instanceName));
}
if (!configuration.hasOauthTokenUrl()) {
configuration.setOauthTokenUrl(String.format("https://%s.service-now.com/oauth_token.do", instanceName));
}
-
if (configuration.getSslContextParameters() == null) {
configuration.setSslContextParameters(retrieveGlobalSslContextParameters());
}
- return new ServiceNowEndpoint(uri, this, configuration, instanceName);
+ return endpoint;
}
+
}