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 aefbfec70a3 Regen
aefbfec70a3 is described below

commit aefbfec70a3a10b4c19440013ea18c9d26e887fb
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Tue Aug 6 13:55:11 2024 +0200

    Regen
---
 .../springboot/catalog/components/splunk-hec.json  | 15 +++---
 .../springboot/catalog/components/splunk.json      |  3 +-
 .../src/main/docs/splunk-hec.json                  | 13 +++++
 .../SplunkHECComponentAutoConfiguration.java       |  2 +-
 .../SplunkHECComponentConfiguration.java           | 29 ++++++++++
 .../springboot/SplunkHECComponentConverter.java    | 63 ++++++++++++++++++++++
 ...rk.boot.autoconfigure.AutoConfiguration.imports |  3 +-
 7 files changed, 119 insertions(+), 9 deletions(-)

diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/splunk-hec.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/splunk-hec.json
index 8c37c1c6ca6..50d35bf4a1d 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/splunk-hec.json
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/splunk-hec.json
@@ -24,7 +24,9 @@
   },
   "componentProperties": {
     "lazyStartProducer": { "index": 0, "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": 1, "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 [...]
+    "autowiredEnabled": { "index": 1, "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 [...]
+    "sslContextParameters": { "index": 2, "kind": "property", "displayName": 
"Ssl Context Parameters", "group": "security", "label": "security", "required": 
false, "type": "object", "javaType": 
"org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false, 
"autowired": false, "secret": false, "description": "Sets the default SSL 
configuration to use for all the endpoints. You can also configure it directly 
at the endpoint level." },
+    "useGlobalSslContextParameters": { "index": 3, "kind": "property", 
"displayName": "Use Global Ssl Context Parameters", "group": "security", 
"label": "security", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "description": "Enable usage of global SSL context 
parameters." }
   },
   "headers": {
     "CamelSplunkHECIndexTime": { "index": 0, "kind": "header", "displayName": 
"", "group": "producer", "label": "", "required": false, "javaType": "Long", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "Epoch-formatted time. Specify with the time query string 
parameter. Sets a default for all events in the request. The default time can 
be overridden.", "constantName": 
"org.apache.camel.component.splunkhec.SplunkHECConstants#INDEX_TIME" }
@@ -38,10 +40,11 @@
     "source": { "index": 5, "kind": "parameter", "displayName": "Source", 
"group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": "camel", "configurationClass": 
"org.apache.camel.component.splunkhec.SplunkHECConfiguration", 
"configurationField": "configuration", "description": "Splunk source argument" 
},
     "sourceType": { "index": 6, "kind": "parameter", "displayName": "Source 
Type", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": "camel", "configurationClass": 
"org.apache.camel.component.splunkhec.SplunkHECConfiguration", 
"configurationField": "configuration", "description": "Splunk sourcetype 
argument" },
     "splunkEndpoint": { "index": 7, "kind": "parameter", "displayName": 
"Splunk Endpoint", "group": "producer", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "\/services\/collector\/event", 
"configurationClass": 
"org.apache.camel.component.splunkhec.SplunkHECConfiguration", 
"configurationField": "configuration", "description": "Splunk endpoint Defaults 
to \/services\/collector\/e [...]
-    "time": { "index": 8, "kind": "parameter", "displayName": "Time", "group": 
"producer", "label": "", "required": false, "type": "integer", "javaType": 
"java.lang.Long", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.splunkhec.SplunkHECConfiguration", 
"configurationField": "configuration", "description": "Time this even occurred. 
By default, the time will be when this event hits the splunk server." },
-    "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 [...]
-    "https": { "index": 10, "kind": "parameter", "displayName": "Https", 
"group": "security", "label": "security", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": true, "configurationClass": 
"org.apache.camel.component.splunkhec.SplunkHECConfiguration", 
"configurationField": "configuration", "description": "Contact HEC over https." 
},
-    "skipTlsVerify": { "index": 11, "kind": "parameter", "displayName": "Skip 
Tls Verify", "group": "security", "label": "security", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.splunkhec.SplunkHECConfiguration", 
"configurationField": "configuration", "description": "Splunk HEC TLS 
verification." },
-    "token": { "index": 12, "kind": "parameter", "displayName": "Token", 
"group": "security", "label": "security", "required": true, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", 
"autowired": false, "secret": true, "configurationClass": 
"org.apache.camel.component.splunkhec.SplunkHECConfiguration", 
"configurationField": "configuration", "description": "Splunk HEC token (this 
is the token created for HEC and not the user's token)" }
+    "sslContextParameters": { "index": 8, "kind": "parameter", "displayName": 
"Ssl Context Parameters", "group": "producer", "label": "", "required": false, 
"type": "object", "javaType": 
"org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false, 
"autowired": false, "secret": false, "description": "SSL configuration" },
+    "time": { "index": 9, "kind": "parameter", "displayName": "Time", "group": 
"producer", "label": "", "required": false, "type": "integer", "javaType": 
"java.lang.Long", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.splunkhec.SplunkHECConfiguration", 
"configurationField": "configuration", "description": "Time this even occurred. 
By default, the time will be when this event hits the splunk server." },
+    "lazyStartProducer": { "index": 10, "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 produ [...]
+    "https": { "index": 11, "kind": "parameter", "displayName": "Https", 
"group": "security", "label": "security", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": true, "configurationClass": 
"org.apache.camel.component.splunkhec.SplunkHECConfiguration", 
"configurationField": "configuration", "description": "Contact HEC over https." 
},
+    "skipTlsVerify": { "index": 12, "kind": "parameter", "displayName": "Skip 
Tls Verify", "group": "security", "label": "security", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.splunkhec.SplunkHECConfiguration", 
"configurationField": "configuration", "description": "Splunk HEC TLS 
verification." },
+    "token": { "index": 13, "kind": "parameter", "displayName": "Token", 
"group": "security", "label": "security", "required": true, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", 
"autowired": false, "secret": true, "configurationClass": 
"org.apache.camel.component.splunkhec.SplunkHECConfiguration", 
"configurationField": "configuration", "description": "Splunk HEC token (this 
is the token created for HEC and not the user's token)" }
   }
 }
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/splunk.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/splunk.json
index a8ab6c5cf2b..8337cdc1e9b 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/splunk.json
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/splunk.json
@@ -76,6 +76,7 @@
     "sslProtocol": { "index": 42, "kind": "parameter", "displayName": "Ssl 
Protocol", "group": "security", "label": "security", "required": false, "type": 
"object", "javaType": "com.splunk.SSLSecurityProtocol", "enum": [ "TLSv1.2", 
"TLSv1.1", "TLSv1", "SSLv3" ], "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": "TLSv1.2", "configurationClass": 
"org.apache.camel.component.splunk.SplunkConfiguration", "configurationField": 
"configuration", "description": "Set the ss [...]
     "token": { "index": 43, "kind": "parameter", "displayName": "Token", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.splunk.SplunkConfiguration", "configurationField": 
"configuration", "description": "User's token for Splunk. This takes precedence 
over password when both are set" },
     "username": { "index": 44, "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.splunk.SplunkConfiguration", "configurationField": 
"configuration", "description": "Username for Splunk" },
-    "useSunHttpsHandler": { "index": 45, "kind": "parameter", "displayName": 
"Use Sun Https Handler", "group": "security", "label": "security", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": "org.apache.camel.component.splunk.SplunkConfiguration", 
"configurationField": "configuration", "description": "Use 
sun.net.www.protocol.https.Handler Https handler to establish the Sp [...]
+    "useSunHttpsHandler": { "index": 45, "kind": "parameter", "displayName": 
"Use Sun Https Handler", "group": "security", "label": "security", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": "org.apache.camel.component.splunk.SplunkConfiguration", 
"configurationField": "configuration", "description": "Use 
sun.net.www.protocol.https.Handler Https handler to establish the Sp [...]
+    "validateCertificates": { "index": 46, "kind": "parameter", "displayName": 
"Validate Certificates", "group": "security", "label": "security", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, 
"configurationClass": "org.apache.camel.component.splunk.SplunkConfiguration", 
"configurationField": "configuration", "description": "Sets client's 
certificate validation mode. Value false makes SSL vulner [...]
   }
 }
diff --git 
a/components-starter/camel-splunk-hec-starter/src/main/docs/splunk-hec.json 
b/components-starter/camel-splunk-hec-starter/src/main/docs/splunk-hec.json
index 132098ca53d..adabaa46953 100644
--- a/components-starter/camel-splunk-hec-starter/src/main/docs/splunk-hec.json
+++ b/components-starter/camel-splunk-hec-starter/src/main/docs/splunk-hec.json
@@ -37,6 +37,19 @@
       "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 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 starting the [...]
       "sourceType": 
"org.apache.camel.component.splunkhec.springboot.SplunkHECComponentConfiguration",
       "defaultValue": false
+    },
+    {
+      "name": "camel.component.splunk-hec.ssl-context-parameters",
+      "type": "org.apache.camel.support.jsse.SSLContextParameters",
+      "description": "Sets the default SSL configuration to use for all the 
endpoints. You can also configure it directly at the endpoint level. The option 
is a org.apache.camel.support.jsse.SSLContextParameters type.",
+      "sourceType": 
"org.apache.camel.component.splunkhec.springboot.SplunkHECComponentConfiguration"
+    },
+    {
+      "name": "camel.component.splunk-hec.use-global-ssl-context-parameters",
+      "type": "java.lang.Boolean",
+      "description": "Enable usage of global SSL context parameters.",
+      "sourceType": 
"org.apache.camel.component.splunkhec.springboot.SplunkHECComponentConfiguration",
+      "defaultValue": false
     }
   ],
   "hints": []
diff --git 
a/components-starter/camel-splunk-hec-starter/src/main/java/org/apache/camel/component/splunkhec/springboot/SplunkHECComponentAutoConfiguration.java
 
b/components-starter/camel-splunk-hec-starter/src/main/java/org/apache/camel/component/splunkhec/springboot/SplunkHECComponentAutoConfiguration.java
index 5305c6e589a..51206771aa1 100644
--- 
a/components-starter/camel-splunk-hec-starter/src/main/java/org/apache/camel/component/splunkhec/springboot/SplunkHECComponentAutoConfiguration.java
+++ 
b/components-starter/camel-splunk-hec-starter/src/main/java/org/apache/camel/component/splunkhec/springboot/SplunkHECComponentAutoConfiguration.java
@@ -42,7 +42,7 @@ import org.springframework.context.annotation.Lazy;
 @Conditional(ConditionalOnCamelContextAndAutoConfigurationBeans.class)
 
@EnableConfigurationProperties({ComponentConfigurationProperties.class,SplunkHECComponentConfiguration.class})
 @ConditionalOnHierarchicalProperties({"camel.component", 
"camel.component.splunk-hec"})
-@AutoConfigureAfter(CamelAutoConfiguration.class)
+@AutoConfigureAfter({CamelAutoConfiguration.class, 
SplunkHECComponentConverter.class})
 public class SplunkHECComponentAutoConfiguration {
 
     @Autowired
diff --git 
a/components-starter/camel-splunk-hec-starter/src/main/java/org/apache/camel/component/splunkhec/springboot/SplunkHECComponentConfiguration.java
 
b/components-starter/camel-splunk-hec-starter/src/main/java/org/apache/camel/component/splunkhec/springboot/SplunkHECComponentConfiguration.java
index 4b1165b6de8..b449b1b3f96 100644
--- 
a/components-starter/camel-splunk-hec-starter/src/main/java/org/apache/camel/component/splunkhec/springboot/SplunkHECComponentConfiguration.java
+++ 
b/components-starter/camel-splunk-hec-starter/src/main/java/org/apache/camel/component/splunkhec/springboot/SplunkHECComponentConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.splunkhec.springboot;
 
 import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
+import org.apache.camel.support.jsse.SSLContextParameters;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
@@ -55,6 +56,16 @@ public class SplunkHECComponentConfiguration
      * etc.
      */
     private Boolean autowiredEnabled = true;
+    /**
+     * Sets the default SSL configuration to use for all the endpoints. You can
+     * also configure it directly at the endpoint level. The option is a
+     * org.apache.camel.support.jsse.SSLContextParameters type.
+     */
+    private SSLContextParameters sslContextParameters;
+    /**
+     * Enable usage of global SSL context parameters.
+     */
+    private Boolean useGlobalSslContextParameters = false;
 
     public Boolean getLazyStartProducer() {
         return lazyStartProducer;
@@ -71,4 +82,22 @@ public class SplunkHECComponentConfiguration
     public void setAutowiredEnabled(Boolean autowiredEnabled) {
         this.autowiredEnabled = autowiredEnabled;
     }
+
+    public SSLContextParameters getSslContextParameters() {
+        return sslContextParameters;
+    }
+
+    public void setSslContextParameters(
+            SSLContextParameters sslContextParameters) {
+        this.sslContextParameters = sslContextParameters;
+    }
+
+    public Boolean getUseGlobalSslContextParameters() {
+        return useGlobalSslContextParameters;
+    }
+
+    public void setUseGlobalSslContextParameters(
+            Boolean useGlobalSslContextParameters) {
+        this.useGlobalSslContextParameters = useGlobalSslContextParameters;
+    }
 }
\ No newline at end of file
diff --git 
a/components-starter/camel-splunk-hec-starter/src/main/java/org/apache/camel/component/splunkhec/springboot/SplunkHECComponentConverter.java
 
b/components-starter/camel-splunk-hec-starter/src/main/java/org/apache/camel/component/splunkhec/springboot/SplunkHECComponentConverter.java
new file mode 100644
index 00000000000..0be9c7f202d
--- /dev/null
+++ 
b/components-starter/camel-splunk-hec-starter/src/main/java/org/apache/camel/component/splunkhec/springboot/SplunkHECComponentConverter.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.splunkhec.springboot;
+
+import java.util.LinkedHashSet;
+import java.util.Set;
+import org.springframework.beans.factory.annotation.Autowired;
+import 
org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.convert.TypeDescriptor;
+import org.springframework.core.convert.converter.GenericConverter;
+import org.springframework.stereotype.Component;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration(proxyBeanMethods = false)
+@ConfigurationPropertiesBinding
+@Component
+public class SplunkHECComponentConverter implements GenericConverter {
+
+    @Autowired
+    private ApplicationContext applicationContext;
+
+    public Set<ConvertiblePair> getConvertibleTypes() {
+        Set<ConvertiblePair> answer = new LinkedHashSet<>();
+        answer.add(new ConvertiblePair(String.class, 
org.apache.camel.support.jsse.SSLContextParameters.class));
+        return answer;
+    }
+
+    public Object convert(
+            Object source,
+            TypeDescriptor sourceType,
+            TypeDescriptor targetType) {
+        if (source == null) {
+            return null;
+        }
+        String ref = source.toString();
+        if (!ref.startsWith("#")) {
+            return null;
+        }
+        ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
+        switch (targetType.getName()) {
+            case "org.apache.camel.support.jsse.SSLContextParameters": return 
applicationContext.getBean(ref, 
org.apache.camel.support.jsse.SSLContextParameters.class);
+        }
+        return null;
+    }
+}
\ No newline at end of file
diff --git 
a/components-starter/camel-splunk-hec-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
 
b/components-starter/camel-splunk-hec-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
index 64ea7dd85d7..adc7434f055 100644
--- 
a/components-starter/camel-splunk-hec-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++ 
b/components-starter/camel-splunk-hec-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -15,4 +15,5 @@
 ## limitations under the License.
 ## ---------------------------------------------------------------------------
 
-org.apache.camel.component.splunkhec.springboot.SplunkHECComponentAutoConfiguration
\ No newline at end of file
+org.apache.camel.component.splunkhec.springboot.SplunkHECComponentAutoConfiguration
+org.apache.camel.component.splunkhec.springboot.SplunkHECComponentConverter

Reply via email to