-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add camel-apicurio-registry component #24844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
c204810
218e2c1
e4ee63f
6c5724d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| <?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> | ||
| <artifactId>components</artifactId> | ||
| <groupId>org.apache.camel</groupId> | ||
| <version>4.22.0-SNAPSHOT</version> | ||
| </parent> | ||
|
|
||
| <artifactId>camel-apicurio-registry</artifactId> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bugbot: AI-generated Bugbot inline comment on behalf of atiaomar1978-hub. |
||
| <packaging>jar</packaging> | ||
|
|
||
| <name>Camel :: Apicurio Registry</name> | ||
| <description>Camel Apicurio Registry component</description> | ||
|
|
||
| <dependencies> | ||
| <!-- camel --> | ||
| <dependency> | ||
| <groupId>org.apache.camel</groupId> | ||
| <artifactId>camel-support</artifactId> | ||
| </dependency> | ||
|
|
||
| <!-- Apicurio Registry SDK --> | ||
| <dependency> | ||
| <groupId>io.apicurio</groupId> | ||
| <artifactId>apicurio-registry-java-sdk</artifactId> | ||
| <version>${apicurio-registry-sdk-version}</version> | ||
| </dependency> | ||
|
|
||
| <!-- testing --> | ||
| <dependency> | ||
| <groupId>org.apache.camel</groupId> | ||
| <artifactId>camel-test-junit5</artifactId> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.camel</groupId> | ||
| <artifactId>camel-direct</artifactId> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.camel</groupId> | ||
| <artifactId>camel-mock</artifactId> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.mockito</groupId> | ||
| <artifactId>mockito-core</artifactId> | ||
| <version>${mockito-version}</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
|
|
||
| <!-- test infra --> | ||
| <dependency> | ||
| <groupId>org.apache.camel</groupId> | ||
| <artifactId>camel-test-infra-apicurio-registry</artifactId> | ||
| <version>${project.version}</version> | ||
| <scope>test</scope> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| </project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,139 @@ | ||
| /* Generated by camel build tools - do NOT edit this file! */ | ||
| package org.apache.camel.component.apicurioregistry; | ||
|
|
||
| import javax.annotation.processing.Generated; | ||
| import java.util.Map; | ||
|
|
||
| import org.apache.camel.CamelContext; | ||
| import org.apache.camel.spi.ExtendedPropertyConfigurerGetter; | ||
| import org.apache.camel.spi.PropertyConfigurerGetter; | ||
| import org.apache.camel.spi.ConfigurerStrategy; | ||
| import org.apache.camel.spi.GeneratedPropertyConfigurer; | ||
| import org.apache.camel.util.CaseInsensitiveMap; | ||
| import org.apache.camel.support.component.PropertyConfigurerSupport; | ||
|
|
||
| /** | ||
| * Generated by camel build tools - do NOT edit this file! | ||
| */ | ||
| @Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo") | ||
| @SuppressWarnings("unchecked") | ||
| public class ApicurioRegistryComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter { | ||
|
|
||
| private org.apache.camel.component.apicurioregistry.ApicurioRegistryConfiguration getOrCreateConfiguration(ApicurioRegistryComponent target) { | ||
| if (target.getConfiguration() == null) { | ||
| target.setConfiguration(new org.apache.camel.component.apicurioregistry.ApicurioRegistryConfiguration()); | ||
| } | ||
| return target.getConfiguration(); | ||
| } | ||
|
|
||
| @Override | ||
| public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { | ||
| ApicurioRegistryComponent target = (ApicurioRegistryComponent) obj; | ||
| switch (ignoreCase ? name.toLowerCase() : name) { | ||
| case "artifacttype": | ||
| case "artifactType": getOrCreateConfiguration(target).setArtifactType(property(camelContext, java.lang.String.class, value)); return true; | ||
| case "authtype": | ||
| case "authType": getOrCreateConfiguration(target).setAuthType(property(camelContext, java.lang.String.class, value)); return true; | ||
| case "autowiredenabled": | ||
| case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true; | ||
| case "bridgeerrorhandler": | ||
| case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true; | ||
| case "clientid": | ||
| case "clientId": getOrCreateConfiguration(target).setClientId(property(camelContext, java.lang.String.class, value)); return true; | ||
| case "clientsecret": | ||
| case "clientSecret": getOrCreateConfiguration(target).setClientSecret(property(camelContext, java.lang.String.class, value)); return true; | ||
| case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.apicurioregistry.ApicurioRegistryConfiguration.class, value)); return true; | ||
| case "failonvalidation": | ||
| case "failOnValidation": getOrCreateConfiguration(target).setFailOnValidation(property(camelContext, boolean.class, value)); return true; | ||
| case "fetchcontent": | ||
| case "fetchContent": getOrCreateConfiguration(target).setFetchContent(property(camelContext, boolean.class, value)); return true; | ||
| case "ifexists": | ||
| case "ifExists": getOrCreateConfiguration(target).setIfExists(property(camelContext, java.lang.String.class, value)); return true; | ||
| case "lazystartproducer": | ||
| case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true; | ||
| case "operation": getOrCreateConfiguration(target).setOperation(property(camelContext, java.lang.String.class, value)); return true; | ||
| case "password": getOrCreateConfiguration(target).setPassword(property(camelContext, java.lang.String.class, value)); return true; | ||
| case "registryurl": | ||
| case "registryUrl": getOrCreateConfiguration(target).setRegistryUrl(property(camelContext, java.lang.String.class, value)); return true; | ||
| case "scope": getOrCreateConfiguration(target).setScope(property(camelContext, java.lang.String.class, value)); return true; | ||
| case "tokenendpoint": | ||
| case "tokenEndpoint": getOrCreateConfiguration(target).setTokenEndpoint(property(camelContext, java.lang.String.class, value)); return true; | ||
| case "username": getOrCreateConfiguration(target).setUsername(property(camelContext, java.lang.String.class, value)); return true; | ||
| default: return false; | ||
| } | ||
| } | ||
|
|
||
| @Override | ||
| public Class<?> getOptionType(String name, boolean ignoreCase) { | ||
| switch (ignoreCase ? name.toLowerCase() : name) { | ||
| case "artifacttype": | ||
| case "artifactType": return java.lang.String.class; | ||
| case "authtype": | ||
| case "authType": return java.lang.String.class; | ||
| case "autowiredenabled": | ||
| case "autowiredEnabled": return boolean.class; | ||
| case "bridgeerrorhandler": | ||
| case "bridgeErrorHandler": return boolean.class; | ||
| case "clientid": | ||
| case "clientId": return java.lang.String.class; | ||
| case "clientsecret": | ||
| case "clientSecret": return java.lang.String.class; | ||
| case "configuration": return org.apache.camel.component.apicurioregistry.ApicurioRegistryConfiguration.class; | ||
| case "failonvalidation": | ||
| case "failOnValidation": return boolean.class; | ||
| case "fetchcontent": | ||
| case "fetchContent": return boolean.class; | ||
| case "ifexists": | ||
| case "ifExists": return java.lang.String.class; | ||
| case "lazystartproducer": | ||
| case "lazyStartProducer": return boolean.class; | ||
| case "operation": return java.lang.String.class; | ||
| case "password": return java.lang.String.class; | ||
| case "registryurl": | ||
| case "registryUrl": return java.lang.String.class; | ||
| case "scope": return java.lang.String.class; | ||
| case "tokenendpoint": | ||
| case "tokenEndpoint": return java.lang.String.class; | ||
| case "username": return java.lang.String.class; | ||
| default: return null; | ||
| } | ||
| } | ||
|
|
||
| @Override | ||
| public Object getOptionValue(Object obj, String name, boolean ignoreCase) { | ||
| ApicurioRegistryComponent target = (ApicurioRegistryComponent) obj; | ||
| switch (ignoreCase ? name.toLowerCase() : name) { | ||
| case "artifacttype": | ||
| case "artifactType": return getOrCreateConfiguration(target).getArtifactType(); | ||
| case "authtype": | ||
| case "authType": return getOrCreateConfiguration(target).getAuthType(); | ||
| case "autowiredenabled": | ||
| case "autowiredEnabled": return target.isAutowiredEnabled(); | ||
| case "bridgeerrorhandler": | ||
| case "bridgeErrorHandler": return target.isBridgeErrorHandler(); | ||
| case "clientid": | ||
| case "clientId": return getOrCreateConfiguration(target).getClientId(); | ||
| case "clientsecret": | ||
| case "clientSecret": return getOrCreateConfiguration(target).getClientSecret(); | ||
| case "configuration": return target.getConfiguration(); | ||
| case "failonvalidation": | ||
| case "failOnValidation": return getOrCreateConfiguration(target).isFailOnValidation(); | ||
| case "fetchcontent": | ||
| case "fetchContent": return getOrCreateConfiguration(target).isFetchContent(); | ||
| case "ifexists": | ||
| case "ifExists": return getOrCreateConfiguration(target).getIfExists(); | ||
| case "lazystartproducer": | ||
| case "lazyStartProducer": return target.isLazyStartProducer(); | ||
| case "operation": return getOrCreateConfiguration(target).getOperation(); | ||
| case "password": return getOrCreateConfiguration(target).getPassword(); | ||
| case "registryurl": | ||
| case "registryUrl": return getOrCreateConfiguration(target).getRegistryUrl(); | ||
| case "scope": return getOrCreateConfiguration(target).getScope(); | ||
| case "tokenendpoint": | ||
| case "tokenEndpoint": return getOrCreateConfiguration(target).getTokenEndpoint(); | ||
| case "username": return getOrCreateConfiguration(target).getUsername(); | ||
| default: return null; | ||
| } | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this need to be updated to 4.23.0-SNAPSHOT