Skip to content

Commit 1a37238

Browse files
committed
CAMEL-22222: Add component for Apache Iggy
1 parent a685041 commit 1a37238

File tree

40 files changed

+2500
-0
lines changed

40 files changed

+2500
-0
lines changed

bom/camel-bom/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,11 @@
10271027
<artifactId>camel-iec60870</artifactId>
10281028
<version>4.14.0-SNAPSHOT</version>
10291029
</dependency>
1030+
<dependency>
1031+
<groupId>org.apache.camel</groupId>
1032+
<artifactId>camel-iggy</artifactId>
1033+
<version>4.14.0-SNAPSHOT</version>
1034+
</dependency>
10301035
<dependency>
10311036
<groupId>org.apache.camel</groupId>
10321037
<artifactId>camel-ignite</artifactId>

catalog/camel-allcomponents/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,11 @@
891891
<artifactId>camel-iec60870</artifactId>
892892
<version>${project.version}</version>
893893
</dependency>
894+
<dependency>
895+
<groupId>org.apache.camel</groupId>
896+
<artifactId>camel-iggy</artifactId>
897+
<version>${project.version}</version>
898+
</dependency>
894899
<dependency>
895900
<groupId>org.apache.camel</groupId>
896901
<artifactId>camel-ignite</artifactId>

catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ hwcloud-smn
155155
ibm-secrets-manager
156156
iec60870-client
157157
iec60870-server
158+
iggy
158159
ignite-cache
159160
ignite-compute
160161
ignite-events

catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/iggy.json

Lines changed: 81 additions & 0 deletions
Large diffs are not rendered by default.

components/camel-iggy/pom.xml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Licensed to the Apache Software Foundation (ASF) under one or more
5+
contributor license agreements. See the NOTICE file distributed with
6+
this work for additional information regarding copyright ownership.
7+
The ASF licenses this file to You under the Apache License, Version 2.0
8+
(the "License"); you may not use this file except in compliance with
9+
the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.
18+
19+
-->
20+
<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/xsd/maven-4.0.0.xsd">
21+
<modelVersion>4.0.0</modelVersion>
22+
23+
<parent>
24+
<groupId>org.apache.camel</groupId>
25+
<artifactId>components</artifactId>
26+
<version>4.14.0-SNAPSHOT</version>
27+
</parent>
28+
29+
<artifactId>camel-iggy</artifactId>
30+
<packaging>jar</packaging>
31+
<name>Camel :: Iggy</name>
32+
<description>Camel Iggy component</description>
33+
34+
<dependencies>
35+
<dependency>
36+
<groupId>org.apache.camel</groupId>
37+
<artifactId>camel-support</artifactId>
38+
</dependency>
39+
<dependency>
40+
<groupId>org.apache.iggy</groupId>
41+
<artifactId>iggy-java-sdk</artifactId>
42+
<version>${iggy-version}</version>
43+
</dependency>
44+
45+
<!-- testing -->
46+
<dependency>
47+
<groupId>org.apache.camel</groupId>
48+
<artifactId>camel-test-junit5</artifactId>
49+
<scope>test</scope>
50+
</dependency>
51+
<dependency>
52+
<groupId>org.apache.camel</groupId>
53+
<artifactId>camel-test-infra-core</artifactId>
54+
<version>${project.version}</version>
55+
<scope>test</scope>
56+
<type>test-jar</type>
57+
</dependency>
58+
<dependency>
59+
<groupId>org.apache.camel</groupId>
60+
<artifactId>camel-test-infra-iggy</artifactId>
61+
<version>${project.version}</version>
62+
<scope>test</scope>
63+
<type>test-jar</type>
64+
</dependency>
65+
<dependency>
66+
<groupId>org.junit.jupiter</groupId>
67+
<artifactId>junit-jupiter-api</artifactId>
68+
<scope>test</scope>
69+
</dependency>
70+
<dependency>
71+
<groupId>org.junit.jupiter</groupId>
72+
<artifactId>junit-jupiter-engine</artifactId>
73+
<scope>test</scope>
74+
</dependency>
75+
<dependency>
76+
<groupId>org.assertj</groupId>
77+
<artifactId>assertj-core</artifactId>
78+
</dependency>
79+
</dependencies>
80+
81+
</project>
Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
/* Generated by camel build tools - do NOT edit this file! */
2+
package org.apache.camel.component.iggy;
3+
4+
import javax.annotation.processing.Generated;
5+
import java.util.Map;
6+
7+
import org.apache.camel.CamelContext;
8+
import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
9+
import org.apache.camel.spi.PropertyConfigurerGetter;
10+
import org.apache.camel.spi.ConfigurerStrategy;
11+
import org.apache.camel.spi.GeneratedPropertyConfigurer;
12+
import org.apache.camel.util.CaseInsensitiveMap;
13+
import org.apache.camel.support.component.PropertyConfigurerSupport;
14+
15+
/**
16+
* Generated by camel build tools - do NOT edit this file!
17+
*/
18+
@Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo")
19+
@SuppressWarnings("unchecked")
20+
public class IggyComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
21+
22+
private org.apache.camel.component.iggy.IggyConfiguration getOrCreateConfiguration(IggyComponent target) {
23+
if (target.getConfiguration() == null) {
24+
target.setConfiguration(new org.apache.camel.component.iggy.IggyConfiguration());
25+
}
26+
return target.getConfiguration();
27+
}
28+
29+
@Override
30+
public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
31+
IggyComponent target = (IggyComponent) obj;
32+
switch (ignoreCase ? name.toLowerCase() : name) {
33+
case "autocreatestream":
34+
case "autoCreateStream": getOrCreateConfiguration(target).setAutoCreateStream(property(camelContext, boolean.class, value)); return true;
35+
case "autocreatetopic":
36+
case "autoCreateTopic": getOrCreateConfiguration(target).setAutoCreateTopic(property(camelContext, boolean.class, value)); return true;
37+
case "autowiredenabled":
38+
case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
39+
case "bridgeerrorhandler":
40+
case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
41+
case "clienttransport":
42+
case "clientTransport": getOrCreateConfiguration(target).setClientTransport(property(camelContext, java.lang.String.class, value)); return true;
43+
case "compressionalgorithm":
44+
case "compressionAlgorithm": getOrCreateConfiguration(target).setCompressionAlgorithm(property(camelContext, org.apache.iggy.topic.CompressionAlgorithm.class, value)); return true;
45+
case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.iggy.IggyConfiguration.class, value)); return true;
46+
case "consumergroupname":
47+
case "consumerGroupName": getOrCreateConfiguration(target).setConsumerGroupName(property(camelContext, java.lang.String.class, value)); return true;
48+
case "consumerscount":
49+
case "consumersCount": getOrCreateConfiguration(target).setConsumersCount(property(camelContext, int.class, value)); return true;
50+
case "host": getOrCreateConfiguration(target).setHost(property(camelContext, java.lang.String.class, value)); return true;
51+
case "lazystartproducer":
52+
case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
53+
case "maxtopicsize":
54+
case "maxTopicSize": getOrCreateConfiguration(target).setMaxTopicSize(property(camelContext, java.lang.Long.class, value)); return true;
55+
case "messageexpiry":
56+
case "messageExpiry": getOrCreateConfiguration(target).setMessageExpiry(property(camelContext, java.lang.Long.class, value)); return true;
57+
case "partitionid":
58+
case "partitionId": getOrCreateConfiguration(target).setPartitionId(property(camelContext, java.lang.Long.class, value)); return true;
59+
case "partitioning": getOrCreateConfiguration(target).setPartitioning(property(camelContext, org.apache.iggy.message.Partitioning.class, value)); return true;
60+
case "partitionscount":
61+
case "partitionsCount": getOrCreateConfiguration(target).setPartitionsCount(property(camelContext, java.lang.Long.class, value)); return true;
62+
case "password": getOrCreateConfiguration(target).setPassword(property(camelContext, java.lang.String.class, value)); return true;
63+
case "pollbatchsize":
64+
case "pollBatchSize": getOrCreateConfiguration(target).setPollBatchSize(property(camelContext, java.lang.Long.class, value)); return true;
65+
case "pollingstrategy":
66+
case "pollingStrategy": getOrCreateConfiguration(target).setPollingStrategy(property(camelContext, java.lang.String.class, value)); return true;
67+
case "port": getOrCreateConfiguration(target).setPort(property(camelContext, int.class, value)); return true;
68+
case "replicationfactor":
69+
case "replicationFactor": getOrCreateConfiguration(target).setReplicationFactor(property(camelContext, java.lang.Short.class, value)); return true;
70+
case "shutdowntimeout":
71+
case "shutdownTimeout": getOrCreateConfiguration(target).setShutdownTimeout(property(camelContext, int.class, value)); return true;
72+
case "streamid":
73+
case "streamId": getOrCreateConfiguration(target).setStreamId(property(camelContext, java.lang.Long.class, value)); return true;
74+
case "streamname":
75+
case "streamName": getOrCreateConfiguration(target).setStreamName(property(camelContext, java.lang.String.class, value)); return true;
76+
case "username": getOrCreateConfiguration(target).setUsername(property(camelContext, java.lang.String.class, value)); return true;
77+
default: return false;
78+
}
79+
}
80+
81+
@Override
82+
public Class<?> getOptionType(String name, boolean ignoreCase) {
83+
switch (ignoreCase ? name.toLowerCase() : name) {
84+
case "autocreatestream":
85+
case "autoCreateStream": return boolean.class;
86+
case "autocreatetopic":
87+
case "autoCreateTopic": return boolean.class;
88+
case "autowiredenabled":
89+
case "autowiredEnabled": return boolean.class;
90+
case "bridgeerrorhandler":
91+
case "bridgeErrorHandler": return boolean.class;
92+
case "clienttransport":
93+
case "clientTransport": return java.lang.String.class;
94+
case "compressionalgorithm":
95+
case "compressionAlgorithm": return org.apache.iggy.topic.CompressionAlgorithm.class;
96+
case "configuration": return org.apache.camel.component.iggy.IggyConfiguration.class;
97+
case "consumergroupname":
98+
case "consumerGroupName": return java.lang.String.class;
99+
case "consumerscount":
100+
case "consumersCount": return int.class;
101+
case "host": return java.lang.String.class;
102+
case "lazystartproducer":
103+
case "lazyStartProducer": return boolean.class;
104+
case "maxtopicsize":
105+
case "maxTopicSize": return java.lang.Long.class;
106+
case "messageexpiry":
107+
case "messageExpiry": return java.lang.Long.class;
108+
case "partitionid":
109+
case "partitionId": return java.lang.Long.class;
110+
case "partitioning": return org.apache.iggy.message.Partitioning.class;
111+
case "partitionscount":
112+
case "partitionsCount": return java.lang.Long.class;
113+
case "password": return java.lang.String.class;
114+
case "pollbatchsize":
115+
case "pollBatchSize": return java.lang.Long.class;
116+
case "pollingstrategy":
117+
case "pollingStrategy": return java.lang.String.class;
118+
case "port": return int.class;
119+
case "replicationfactor":
120+
case "replicationFactor": return java.lang.Short.class;
121+
case "shutdowntimeout":
122+
case "shutdownTimeout": return int.class;
123+
case "streamid":
124+
case "streamId": return java.lang.Long.class;
125+
case "streamname":
126+
case "streamName": return java.lang.String.class;
127+
case "username": return java.lang.String.class;
128+
default: return null;
129+
}
130+
}
131+
132+
@Override
133+
public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
134+
IggyComponent target = (IggyComponent) obj;
135+
switch (ignoreCase ? name.toLowerCase() : name) {
136+
case "autocreatestream":
137+
case "autoCreateStream": return getOrCreateConfiguration(target).isAutoCreateStream();
138+
case "autocreatetopic":
139+
case "autoCreateTopic": return getOrCreateConfiguration(target).isAutoCreateTopic();
140+
case "autowiredenabled":
141+
case "autowiredEnabled": return target.isAutowiredEnabled();
142+
case "bridgeerrorhandler":
143+
case "bridgeErrorHandler": return target.isBridgeErrorHandler();
144+
case "clienttransport":
145+
case "clientTransport": return getOrCreateConfiguration(target).getClientTransport();
146+
case "compressionalgorithm":
147+
case "compressionAlgorithm": return getOrCreateConfiguration(target).getCompressionAlgorithm();
148+
case "configuration": return target.getConfiguration();
149+
case "consumergroupname":
150+
case "consumerGroupName": return getOrCreateConfiguration(target).getConsumerGroupName();
151+
case "consumerscount":
152+
case "consumersCount": return getOrCreateConfiguration(target).getConsumersCount();
153+
case "host": return getOrCreateConfiguration(target).getHost();
154+
case "lazystartproducer":
155+
case "lazyStartProducer": return target.isLazyStartProducer();
156+
case "maxtopicsize":
157+
case "maxTopicSize": return getOrCreateConfiguration(target).getMaxTopicSize();
158+
case "messageexpiry":
159+
case "messageExpiry": return getOrCreateConfiguration(target).getMessageExpiry();
160+
case "partitionid":
161+
case "partitionId": return getOrCreateConfiguration(target).getPartitionId();
162+
case "partitioning": return getOrCreateConfiguration(target).getPartitioning();
163+
case "partitionscount":
164+
case "partitionsCount": return getOrCreateConfiguration(target).getPartitionsCount();
165+
case "password": return getOrCreateConfiguration(target).getPassword();
166+
case "pollbatchsize":
167+
case "pollBatchSize": return getOrCreateConfiguration(target).getPollBatchSize();
168+
case "pollingstrategy":
169+
case "pollingStrategy": return getOrCreateConfiguration(target).getPollingStrategy();
170+
case "port": return getOrCreateConfiguration(target).getPort();
171+
case "replicationfactor":
172+
case "replicationFactor": return getOrCreateConfiguration(target).getReplicationFactor();
173+
case "shutdowntimeout":
174+
case "shutdownTimeout": return getOrCreateConfiguration(target).getShutdownTimeout();
175+
case "streamid":
176+
case "streamId": return getOrCreateConfiguration(target).getStreamId();
177+
case "streamname":
178+
case "streamName": return getOrCreateConfiguration(target).getStreamName();
179+
case "username": return getOrCreateConfiguration(target).getUsername();
180+
default: return null;
181+
}
182+
}
183+
}
184+

0 commit comments

Comments
 (0)