Skip to content

Commit

Permalink
Add cics and sap starters
Browse files Browse the repository at this point in the history
  • Loading branch information
cunningt committed Sep 18, 2024
1 parent 85097ea commit 83ab0c2
Show file tree
Hide file tree
Showing 42 changed files with 3,845 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ caffeine-cache
caffeine-loadcache
chatscript
chunk
cics
class
cm-sms
coap
Expand Down Expand Up @@ -349,4 +350,4 @@ xslt-saxon
zeebe
zendesk
zookeeper
zookeeper-master
zookeeper-master

Large diffs are not rendered by default.

91 changes: 91 additions & 0 deletions cics/camel-cics-starter/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-cics-starter-parent</artifactId>
<version>4.8.0-SNAPSHOT</version>
</parent>
<groupId>org.fusesource</groupId>
<artifactId>camel-cics-starter</artifactId>
<packaging>jar</packaging>
<name>JBoss Fuse :: Components :: IBM CICS :: Spring-Boot Starter</name>
<description>CICS Camel Componet Spring Boot Starter</description>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>${spring-boot-version}</version>
</dependency>
<dependency>
<groupId>org.fusesource</groupId>
<artifactId>camel-cics</artifactId>
<version>${camel-cics.version}</version>
</dependency>
<!--START OF GENERATED CODE-->
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-core-starter</artifactId>
</dependency>
<!--END OF GENERATED CODE-->
</dependencies>
<profiles>
<profile>
<id>regen</id>
<build>
<plugins>
<plugin>
<!-- This is copy-pasted from the components-starter pom. Ideally this should be inherited like the other
starters.
-->
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-spring-boot-generator-maven-plugin</artifactId>
<version>4.4.0.redhat-00008</version>
<configuration>
<!-- set to true to make build fail fast if missing documentation in docs files -->
<failFast>false</failFast>
<!-- set to true to make build fail if an option has no description -->
<failOnMissingDescription>false</failOnMissingDescription>
</configuration>
<executions>
<execution>
<id>generate</id>
<goals>
<goal>prepare-spring-boot-starter</goal>
<goal>prepare-spring-boot-auto-configuration</goal>
<goal>prepare-catalog-springboot</goal>
</goals>
<phase>generate-resources</phase>
</execution>
<execution>
<id>readme</id>
<goals>
<goal>update-spring-boot-auto-configuration-readme</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
139 changes: 139 additions & 0 deletions cics/camel-cics-starter/src/main/docs/cics.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
"groups": [
{
"name": "camel.component.cics",
"type": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration"
},
{
"name": "camel.component.cics.customizer",
"type": "org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon$CustomizerProperties",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration",
"sourceMethod": "getCustomizer()"
}
],
"properties": [
{
"name": "camel.component.cics.autowired-enabled",
"type": "java.lang.Boolean",
"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 type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration",
"defaultValue": true
},
{
"name": "camel.component.cics.binding",
"type": "com.redhat.camel.component.cics.CICSEciBinding",
"description": "The Binding instance to transform a Camel Exchange to EciRequest and vice versa. The option is a com.redhat.camel.component.cics.CICSEciBinding type.",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration"
},
{
"name": "camel.component.cics.configuration",
"type": "com.redhat.camel.component.cics.CICSConfiguration",
"description": "Configuration. The option is a com.redhat.camel.component.cics.CICSConfiguration type.",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration"
},
{
"name": "camel.component.cics.ctg-debug",
"type": "java.lang.Boolean",
"description": "Enable debug mode on the underlying IBM CGT client.",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration",
"defaultValue": false
},
{
"name": "camel.component.cics.customizer.enabled",
"type": "java.lang.Boolean",
"sourceType": "org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon$CustomizerProperties"
},
{
"name": "camel.component.cics.eci-timeout",
"type": "java.lang.Short",
"description": "The ECI timeout value associated with this ECIRequest object. An ECI timeout value of zero indicates that this ECIRequest will not be timed out by CICS Transaction Gateway. An ECI timeout value greater than zero indicates that the ECIRequest may be timed out by CICS Transaction Gateway. ECI timeout can expire before a response is received from CICS. This means that the client does not receive the confirmation from CICS that a unit of work has been backed out or committed.",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration",
"defaultValue": 0
},
{
"name": "camel.component.cics.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable auto configuration of the cics component. This is enabled by default.",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration"
},
{
"name": "camel.component.cics.encoding",
"type": "java.lang.String",
"description": "The transfer encoding of the message.",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration",
"defaultValue": "Cp1145"
},
{
"name": "camel.component.cics.gateway-factory",
"type": "com.redhat.camel.component.cics.pool.CICSGatewayFactory",
"description": "The connection factory to be use. The option is a com.redhat.camel.component.cics.pool.CICSGatewayFactory type.",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration"
},
{
"name": "camel.component.cics.host",
"type": "java.lang.String",
"description": "The address of the CICS Transaction Gateway that this instance connects to",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration"
},
{
"name": "camel.component.cics.lazy-start-producer",
"type": "java.lang.Boolean",
"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 producer may take a little time and prolong the total processing time of the processing.",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration",
"defaultValue": false
},
{
"name": "camel.component.cics.password",
"type": "java.lang.String",
"description": "Password to use for authentication",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration"
},
{
"name": "camel.component.cics.port",
"type": "java.lang.Integer",
"description": "The port of the CICS Transaction Gateway that this instance connects to.",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration",
"defaultValue": 2006
},
{
"name": "camel.component.cics.protocol",
"type": "java.lang.String",
"description": "the protocol that this component will use to connect to the CICS Transaction Gateway.",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration",
"defaultValue": "tcp"
},
{
"name": "camel.component.cics.server",
"type": "java.lang.String",
"description": "The address of the CICS server that this instance connects to",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration"
},
{
"name": "camel.component.cics.socket-connection-timeout",
"type": "java.lang.Integer",
"description": "The socket connection timeout",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration",
"defaultValue": 0
},
{
"name": "camel.component.cics.ssl-keyring",
"type": "java.lang.String",
"description": "The full classname of the SSL key ring class or keystore file to be used for the client encrypted connection",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration"
},
{
"name": "camel.component.cics.ssl-password",
"type": "java.lang.String",
"description": "The password for the encrypted key ring class or keystore",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration"
},
{
"name": "camel.component.cics.user-id",
"type": "java.lang.String",
"description": "User ID to use for authentication",
"sourceType": "com.redhat.camel.component.cics.springboot.CICSComponentConfiguration"
}
],
"hints": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*
* 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 com.redhat.camel.component.cics.springboot;

import com.redhat.camel.component.cics.CICSComponent;
import org.apache.camel.CamelContext;
import org.apache.camel.Component;
import org.apache.camel.spi.ComponentCustomizer;
import org.apache.camel.spring.boot.CamelAutoConfiguration;
import org.apache.camel.spring.boot.ComponentConfigurationProperties;
import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
import org.apache.camel.spring.boot.util.ConditionalOnCamelContextAndAutoConfigurationBeans;
import org.apache.camel.spring.boot.util.ConditionalOnHierarchicalProperties;
import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;

/**
* Generated by camel-package-maven-plugin - do not edit this file!
*/
@Configuration(proxyBeanMethods = false)
@Conditional(ConditionalOnCamelContextAndAutoConfigurationBeans.class)
@EnableConfigurationProperties({ComponentConfigurationProperties.class,CICSComponentConfiguration.class})
@ConditionalOnHierarchicalProperties({"camel.component", "camel.component.cics"})
@AutoConfigureAfter({CamelAutoConfiguration.class, CICSComponentConverter.class})
public class CICSComponentAutoConfiguration {

@Autowired
private ApplicationContext applicationContext;
private final CamelContext camelContext;
@Autowired
private CICSComponentConfiguration configuration;

public CICSComponentAutoConfiguration(
org.apache.camel.CamelContext camelContext) {
this.camelContext = camelContext;
}

@Lazy
@Bean
public ComponentCustomizer configureCICSComponent() {
return new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
CamelPropertiesHelper.copyProperties(camelContext, configuration, target);
}
@Override
public boolean isEnabled(String name, Component target) {
return HierarchicalPropertiesEvaluator.evaluate(
applicationContext,
"camel.component.customizer",
"camel.component.cics.customizer")
&& target instanceof CICSComponent;
}
};
}
}
Loading

0 comments on commit 83ab0c2

Please sign in to comment.