Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ google-bigquery-sql
google-calendar
google-calendar-stream
google-drive
google-firestore
google-functions
google-mail
google-mail-stream
Expand Down

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions components-starter/camel-google-firestore-starter/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?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>components-starter</artifactId>
<version>4.18.0-SNAPSHOT</version>
</parent>
<artifactId>camel-google-firestore-starter</artifactId>
<packaging>jar</packaging>
<name>Camel SB Starters :: google-firestore</name>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>${spring-boot-version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-google-firestore</artifactId>
<version>${camel-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>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"groups": [
{
"name": "camel.component.google-firestore",
"type": "org.apache.camel.component.google.firestore.springboot.GoogleFirestoreComponentConfiguration",
"sourceType": "org.apache.camel.component.google.firestore.springboot.GoogleFirestoreComponentConfiguration"
},
{
"name": "camel.component.google-firestore.customizer",
"type": "org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon$CustomizerProperties",
"sourceType": "org.apache.camel.component.google.firestore.springboot.GoogleFirestoreComponentConfiguration",
"sourceMethod": "getCustomizer()"
}
],
"properties": [
{
"name": "camel.component.google-firestore.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": "org.apache.camel.component.google.firestore.springboot.GoogleFirestoreComponentConfiguration",
"defaultValue": true
},
{
"name": "camel.component.google-firestore.bridge-error-handler",
"type": "java.lang.Boolean",
"description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored.",
"sourceType": "org.apache.camel.component.google.firestore.springboot.GoogleFirestoreComponentConfiguration",
"defaultValue": false
},
{
"name": "camel.component.google-firestore.configuration",
"type": "org.apache.camel.component.google.firestore.GoogleFirestoreConfiguration",
"description": "The component configuration. The option is a org.apache.camel.component.google.firestore.GoogleFirestoreConfiguration type.",
"sourceType": "org.apache.camel.component.google.firestore.springboot.GoogleFirestoreComponentConfiguration"
},
{
"name": "camel.component.google-firestore.customizer.enabled",
"type": "java.lang.Boolean",
"sourceType": "org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon$CustomizerProperties"
},
{
"name": "camel.component.google-firestore.database-id",
"type": "java.lang.String",
"description": "The Firestore database ID. If not specified, the default database '(default)' will be used.",
"sourceType": "org.apache.camel.component.google.firestore.springboot.GoogleFirestoreComponentConfiguration"
},
{
"name": "camel.component.google-firestore.document-id",
"type": "java.lang.String",
"description": "The document ID to use for document-specific operations",
"sourceType": "org.apache.camel.component.google.firestore.springboot.GoogleFirestoreComponentConfiguration"
},
{
"name": "camel.component.google-firestore.enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable auto configuration of the google-firestore component. This is enabled by default.",
"sourceType": "org.apache.camel.component.google.firestore.springboot.GoogleFirestoreComponentConfiguration"
},
{
"name": "camel.component.google-firestore.firestore-client",
"type": "com.google.cloud.firestore.Firestore",
"description": "The Firestore client to use for operations. The option is a com.google.cloud.firestore.Firestore type.",
"sourceType": "org.apache.camel.component.google.firestore.springboot.GoogleFirestoreComponentConfiguration"
},
{
"name": "camel.component.google-firestore.health-check-consumer-enabled",
"type": "java.lang.Boolean",
"description": "Used for enabling or disabling all consumer based health checks from this component",
"sourceType": "org.apache.camel.component.google.firestore.springboot.GoogleFirestoreComponentConfiguration",
"defaultValue": true
},
{
"name": "camel.component.google-firestore.health-check-producer-enabled",
"type": "java.lang.Boolean",
"description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer checks globally by setting camel.health.producersEnabled=true.",
"sourceType": "org.apache.camel.component.google.firestore.springboot.GoogleFirestoreComponentConfiguration",
"defaultValue": true
},
{
"name": "camel.component.google-firestore.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": "org.apache.camel.component.google.firestore.springboot.GoogleFirestoreComponentConfiguration",
"defaultValue": false
},
{
"name": "camel.component.google-firestore.operation",
"type": "org.apache.camel.component.google.firestore.GoogleFirestoreOperations",
"description": "Set the operation for the producer.",
"sourceType": "org.apache.camel.component.google.firestore.springboot.GoogleFirestoreComponentConfiguration"
},
{
"name": "camel.component.google-firestore.project-id",
"type": "java.lang.String",
"description": "The Google Cloud project ID. If not specified, it will be determined from the service account key or environment.",
"sourceType": "org.apache.camel.component.google.firestore.springboot.GoogleFirestoreComponentConfiguration"
},
{
"name": "camel.component.google-firestore.realtime-updates",
"type": "java.lang.Boolean",
"description": "When true, the consumer will listen for real-time updates on the collection",
"sourceType": "org.apache.camel.component.google.firestore.springboot.GoogleFirestoreComponentConfiguration",
"defaultValue": false
},
{
"name": "camel.component.google-firestore.service-account-key",
"type": "java.lang.String",
"description": "The Service account key that can be used as credentials for the Firestore client. It can be loaded by default from classpath, but you can prefix with classpath:, file:, or http: to load the resource from different systems.",
"sourceType": "org.apache.camel.component.google.firestore.springboot.GoogleFirestoreComponentConfiguration"
}
],
"hints": [],
"ignored": {
"properties": []
}
}
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 org.apache.camel.component.google.firestore.springboot;

import org.apache.camel.CamelContext;
import org.apache.camel.Component;
import org.apache.camel.component.google.firestore.GoogleFirestoreComponent;
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,GoogleFirestoreComponentConfiguration.class})
@ConditionalOnHierarchicalProperties({"camel.component", "camel.component.google-firestore"})
@AutoConfigureAfter({CamelAutoConfiguration.class, GoogleFirestoreComponentConverter.class})
public class GoogleFirestoreComponentAutoConfiguration {

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

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

@Lazy
@Bean
public ComponentCustomizer configureGoogleFirestoreComponent() {
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.google-firestore.customizer")
&& target instanceof GoogleFirestoreComponent;
}
};
}
}
Loading
Loading