This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 51270f685122d991dbbcd53828d1fdf876579226 Author: Tom Cunningham <[email protected]> AuthorDate: Tue Sep 16 10:56:04 2025 -0400 Add deprecated Headers in order to generate warnings --- .../langchain4j/chat/LangChain4jChat.java | 15 ++++++ .../embeddings/LangChain4jEmbeddings.java | 32 ++++++++++++ .../org/apache/camel/component/milvus/Milvus.java | 34 ++++++++++++ .../camel/component/neo4j/Neo4jConstants.java | 37 +++++++++++++ .../camel/component/pinecone/PineconeVectorDb.java | 61 ++++++++++++++++++++++ .../org/apache/camel/component/qdrant/Qdrant.java | 5 ++ .../camel/component/weaviate/WeaviateVectorDb.java | 58 ++++++++++++++++++++ 7 files changed, 242 insertions(+) diff --git a/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/LangChain4jChat.java b/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/LangChain4jChat.java index c4eb4dfa3b9..b8187fbccfb 100644 --- a/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/LangChain4jChat.java +++ b/components/camel-ai/camel-langchain4j-chat/src/main/java/org/apache/camel/component/langchain4j/chat/LangChain4jChat.java @@ -16,10 +16,25 @@ */ package org.apache.camel.component.langchain4j.chat; +import org.apache.camel.spi.Metadata; + public class LangChain4jChat { public static final String SCHEME = "langchain4j-chat"; private LangChain4jChat() { } + + /** + * @deprecated As of Camel 4.15, this nested Headers class has been moved to its own class. Use + * {@link org.apache.camel.component.langchain4j.chat.LangChain4jChatHeaders} instead. + */ + @Deprecated(forRemoval = true) + public static class Headers { + @Metadata(description = "The prompt Template.", javaType = "String") + public static final String PROMPT_TEMPLATE = "CamelLangChain4jChatPromptTemplate"; + + @Metadata(description = "Augmented Data for RAG", javaType = "String") + public static final String AUGMENTED_DATA = "CamelLangChain4jChatAugmentedData"; + } } diff --git a/components/camel-ai/camel-langchain4j-embeddings/src/main/java/org/apache/camel/component/langchain4j/embeddings/LangChain4jEmbeddings.java b/components/camel-ai/camel-langchain4j-embeddings/src/main/java/org/apache/camel/component/langchain4j/embeddings/LangChain4jEmbeddings.java index f9e8b1646ed..a4efbb28fcc 100644 --- a/components/camel-ai/camel-langchain4j-embeddings/src/main/java/org/apache/camel/component/langchain4j/embeddings/LangChain4jEmbeddings.java +++ b/components/camel-ai/camel-langchain4j-embeddings/src/main/java/org/apache/camel/component/langchain4j/embeddings/LangChain4jEmbeddings.java @@ -16,9 +16,41 @@ */ package org.apache.camel.component.langchain4j.embeddings; +import org.apache.camel.ai.CamelLangchain4jAttributes; +import org.apache.camel.spi.Metadata; + public final class LangChain4jEmbeddings { public static final String SCHEME = "langchain4j-embeddings"; private LangChain4jEmbeddings() { } + + /** + * @deprecated As of Camel 4.15, this nested Headers class has been moved to its own class. Use + * {@link org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsHeaders} instead. + */ + @Deprecated + public static class Headers { + @Metadata(description = "The Finish Reason.", javaType = "dev.langchain4j.model.output.FinishReason") + public static final String FINISH_REASON = "CamelLangChain4jEmbeddingsFinishReason"; + + @Metadata(description = "The Input Token Count.", javaType = "int") + public static final String INPUT_TOKEN_COUNT = "CamelLangChain4jEmbeddingsInputTokenCount"; + + @Metadata(description = "The Output Token Count.", javaType = "int") + public static final String OUTPUT_TOKEN_COUNT = "CamelLangChain4jEmbeddingsOutputTokenCount"; + + @Metadata(description = "The Total Token Count.", javaType = "int") + public static final String TOTAL_TOKEN_COUNT = "CamelLangChain4jEmbeddingsTotalTokenCount"; + + @Metadata(description = "Embedding representation of a text", javaType = "dev.langchain4j.data.embedding.Embedding") + public static final String EMBEDDING = CamelLangchain4jAttributes.CAMEL_LANGCHAIN4J_EMBEDDING; + + @Metadata(description = "A dense vector embedding of a text", javaType = "float[]") + public static final String VECTOR = CamelLangchain4jAttributes.CAMEL_LANGCHAIN4J_EMBEDDING_VECTOR; + + @Metadata(description = "A TextSegment representation of the vector embedding input text", + javaType = " dev.langchain4j.data.segment.TextSegment") + public static final String TEXT_SEGMENT = CamelLangchain4jAttributes.CAMEL_LANGCHAIN4J_TEXT_SEGMENT; + } } diff --git a/components/camel-ai/camel-milvus/src/main/java/org/apache/camel/component/milvus/Milvus.java b/components/camel-ai/camel-milvus/src/main/java/org/apache/camel/component/milvus/Milvus.java index 04d96c0ee8d..bc7d5a69b80 100644 --- a/components/camel-ai/camel-milvus/src/main/java/org/apache/camel/component/milvus/Milvus.java +++ b/components/camel-ai/camel-milvus/src/main/java/org/apache/camel/component/milvus/Milvus.java @@ -16,10 +16,44 @@ */ package org.apache.camel.component.milvus; +import org.apache.camel.spi.Metadata; + public class Milvus { public static final String SCHEME = "milvus"; private Milvus() { } + /** + * @deprecated As of Camel 4.15, this nested Headers class has been moved to its own class. Use + * {@link org.apache.camel.component.milvus.MilvusHeaders} instead. + */ + @Deprecated + public static class Headers { + @Metadata(description = "The action to be performed.", javaType = "String", + enums = "CREATE_COLLECTION,CREATE_INDEX,UPSERT,INSERT,SEARCH,QUERY,DELETE") + public static final String ACTION = "CamelMilvusAction"; + + @Metadata(description = "Operation Status.", javaType = "String") + public static final String OPERATION_STATUS = "CamelMilvusOperationStatus"; + + @Metadata(description = "Operation Status Value.", javaType = "int") + public static final String OPERATION_STATUS_VALUE = "CamelMilvusOperationStatusValue"; + + @Metadata(description = "Text Field Name for Insert/Upsert operation", javaType = "String") + public static final String TEXT_FIELD_NAME = "CamelMilvusTextFieldName"; + + @Metadata(description = "Vector Field Name for Insert/Upsert operation", javaType = "String") + public static final String VECTOR_FIELD_NAME = "CamelMilvusVectorFieldName"; + + @Metadata(description = "Collection Name for Insert/Upsert operation", javaType = "String") + public static final String COLLECTION_NAME = "CamelMilvusCollectionName"; + + @Metadata(description = "Key Name for Insert/Upsert operation", javaType = "String") + public static final String KEY_NAME = "CamelMilvusKeyName"; + + @Metadata(description = "Key Value for Insert/Upsert operation", javaType = "String") + public static final String KEY_VALUE = "CamelMilvusKeyValue"; + } + } diff --git a/components/camel-ai/camel-neo4j/src/main/java/org/apache/camel/component/neo4j/Neo4jConstants.java b/components/camel-ai/camel-neo4j/src/main/java/org/apache/camel/component/neo4j/Neo4jConstants.java index 38eb7c259d7..72fedc69ea2 100644 --- a/components/camel-ai/camel-neo4j/src/main/java/org/apache/camel/component/neo4j/Neo4jConstants.java +++ b/components/camel-ai/camel-neo4j/src/main/java/org/apache/camel/component/neo4j/Neo4jConstants.java @@ -16,10 +16,47 @@ */ package org.apache.camel.component.neo4j; +import org.apache.camel.spi.Metadata; + public class Neo4jConstants { public static final String SCHEME = "neo4j"; private Neo4jConstants() { } + + /** + * @deprecated As of Camel 4.15, this nested Headers class has been moved to its own class. Use + * {@link org.apache.camel.component.neo4j.Neo4jHeaders} instead. + */ + @Deprecated + public static class Headers { + @Metadata(description = "The operation to be performed.", javaType = "String", + enums = "CREATE_NODE,DELETE_NODE,RETRIEVE_NODES,RETRIEVE_NODES_AND_UPDATE_WITH_CYPHER_QUERY,ADD_OR_DELETE_NODE_WITH_CYPHER_QUERY,CREATE_VECTOR_INDEX,DROP_VECTOR_INDEX,CREATE_VECTOR,VECTOR_SIMILARITY_SEARCH") + public static final String OPERATION = "CamelNeo4jOperation"; + @Metadata(description = "MATCH properties for the generated MATCH query. Needed only if we are matching properties and values. Example: {name: 'Alice'} ", + javaType = "String") + public static final String MATCH_PROPERTIES = "CamelNeo4jMatchProperties"; + @Metadata(description = "Query Result", javaType = "String") + public static final String QUERY_RESULT = "CamelNeo4jQueryResult"; + @Metadata(description = "Query Number of nodes created", javaType = "Long") + public static final String QUERY_RESULT_NODES_CREATED = "CamelNeo4jQueryResultNodesCreated"; + @Metadata(description = "Query Number of nodes deleted", javaType = "Long") + public static final String QUERY_RESULT_NODES_DELETED = "CamelNeo4jQueryResultNodesDeleted"; + @Metadata(description = "Query executed contains update", javaType = "Boolean") + public static final String QUERY_RESULT_CONTAINS_UPDATES = "CamelNeo4jQueryResultContainsUpdates"; + @Metadata(description = "Query executed number of relationships created", javaType = "Long") + public static final String QUERY_RESULT_RELATIONSHIPS_CREATED = "CamelNeo4jQueryResultRelationshipsCreated"; + @Metadata(description = "Query executed number of relationships deleted", javaType = "Long") + public static final String QUERY_RESULT_RELATIONSHIPS_DELETED = "CamelNeo4jQueryResultRelationshipsDeleted"; + @Metadata(description = "Number of nodes retrieved", javaType = "Long") + public static final String QUERY_RETRIEVE_SIZE = "CamelNeo4jQueryResultRetrieveSize"; + @Metadata(description = "Query execution time in Milliseconds", javaType = "Long") + public static final String QUERY_RETRIEVE_LIST_NEO4J_NODES = "CamelNeo4jQueryResultListNeo4jNodes"; + @Metadata(description = "Vector Id for the embedding", javaType = "String") + public static final String VECTOR_ID = "CamelNeo4jVectorEmbeddingId"; + @Metadata(description = "Label for the Node - used when inserting from Embeddings", javaType = "String") + public static final String LABEL = "CamelNeo4jLabel"; + + } } diff --git a/components/camel-ai/camel-pinecone/src/main/java/org/apache/camel/component/pinecone/PineconeVectorDb.java b/components/camel-ai/camel-pinecone/src/main/java/org/apache/camel/component/pinecone/PineconeVectorDb.java index e89b86ffa0c..7cddc8eccfb 100644 --- a/components/camel-ai/camel-pinecone/src/main/java/org/apache/camel/component/pinecone/PineconeVectorDb.java +++ b/components/camel-ai/camel-pinecone/src/main/java/org/apache/camel/component/pinecone/PineconeVectorDb.java @@ -16,6 +16,8 @@ */ package org.apache.camel.component.pinecone; +import org.apache.camel.spi.Metadata; + public class PineconeVectorDb { public static final String SCHEME = "pinecone"; public static final int DEFAULT_COLLECTION_DIMENSION = 1536; @@ -23,4 +25,63 @@ public class PineconeVectorDb { private PineconeVectorDb() { } + /** + * @deprecated As of Camel 4.15, this nested Headers class has been moved to its own class. Use + * {@link org.apache.camel.component.pinecone.PineconeVectorDbHeaders} instead. + */ + @Deprecated + public static class Headers { + @Metadata(description = "The action to be performed.", javaType = "String", + enums = "CREATE_COLLECTION,CREATE_INDEX,UPSERT,INSERT,SEARCH,DELETE,UPDATE,QUERY,QUERY_BY_ID") + public static final String ACTION = "CamelPineconeAction"; + + @Metadata(description = "Text Field Name for Insert/Upsert operation", javaType = "String") + public static final String TEXT_FIELD_NAME = "CamelPineconeTextFieldName"; + + @Metadata(description = "Vector Field Name for Insert/Upsert operation", javaType = "String") + public static final String VECTOR_FIELD_NAME = "CamelPineconeVectorFieldName"; + + @Metadata(description = "Index Name", javaType = "String") + public static final String INDEX_NAME = "CamelPineconeIndexName"; + + @Metadata(description = "Index Pod Type", javaType = "String") + public static final String INDEX_POD_TYPE = "CamelPineconeIndexPodType"; + + @Metadata(description = "Index Pod Environment", javaType = "String") + public static final String INDEX_POD_ENVIRONMENT = "CamelPineconeIndexPodEnvironment"; + + @Metadata(description = "Collection Name for Insert/Upsert operation", javaType = "String") + public static final String COLLECTION_NAME = "CamelPineconeCollectionName"; + + @Metadata(description = "Collection Similarity Metric", javaType = "String", enums = "cosine,euclidean,dotproduct") + public static final String COLLECTION_SIMILARITY_METRIC = "CamelPineconeCollectionSimilarityMetric"; + + @Metadata(description = "Collection Dimension", javaType = "int") + public static final String COLLECTION_DIMENSION = "CamelPineconeCollectionDimension"; + + @Metadata(description = "Collection Cloud Vendor", javaType = "String", enums = "aws,gcp,azure") + public static final String COLLECTION_CLOUD = "CamelPineconeCollectionCloud"; + + @Metadata(description = "Collection Cloud Vendor Region", javaType = "String", enums = "aws,gcp,azure") + public static final String COLLECTION_CLOUD_REGION = "CamelPineconeCollectionCloudRegion"; + + @Metadata(description = "Index Upsert Id", javaType = "String") + public static final String INDEX_ID = "CamelPineconeIndexId"; + + @Metadata(description = "Query Top K", javaType = "Integer") + public static final String QUERY_TOP_K = "CamelPineconeQueryTopK"; + + @Metadata(description = "Namespace for actions (query/upsert/etc)", javaType = "String") + public static final String NAMESPACE = "CamelPineconeNamespace"; + + @Metadata(description = "Query Filter", javaType = "String") + public static final String QUERY_FILTER = "CamelPineconeQueryFilter"; + + @Metadata(description = "Query Include Values", javaType = "boolean") + public static final String QUERY_INCLUDE_VALUES = "CamelPineconeQueryIncludeValues"; + + @Metadata(description = "Query Include Metadata", javaType = "com.google.protobuf.Struct") + public static final String QUERY_INCLUDE_METADATA = "CamelPineconeQueryIncludeMetadata"; + + } } diff --git a/components/camel-ai/camel-qdrant/src/main/java/org/apache/camel/component/qdrant/Qdrant.java b/components/camel-ai/camel-qdrant/src/main/java/org/apache/camel/component/qdrant/Qdrant.java index 24d5d2e71a2..e94ed74e067 100644 --- a/components/camel-ai/camel-qdrant/src/main/java/org/apache/camel/component/qdrant/Qdrant.java +++ b/components/camel-ai/camel-qdrant/src/main/java/org/apache/camel/component/qdrant/Qdrant.java @@ -24,6 +24,11 @@ public class Qdrant { private Qdrant() { } + /** + * @deprecated As of Camel 4.15, this nested Headers class has been moved to its own class. Use + * {@link org.apache.camel.component.qdrant.QdrantHeaders} instead. + */ + @Deprecated public static class Headers { @Metadata(description = "The action to be performed.", javaType = "String", enums = "CREATE_COLLECTION,DELETE_COLLECTION,UPSERT,RETRIEVE,DELETE,COLLECTION_INFO,SIMILARITY_SEARCH") diff --git a/components/camel-ai/camel-weaviate/src/main/java/org/apache/camel/component/weaviate/WeaviateVectorDb.java b/components/camel-ai/camel-weaviate/src/main/java/org/apache/camel/component/weaviate/WeaviateVectorDb.java index 5a13a49f1a8..5d9b5e28d85 100644 --- a/components/camel-ai/camel-weaviate/src/main/java/org/apache/camel/component/weaviate/WeaviateVectorDb.java +++ b/components/camel-ai/camel-weaviate/src/main/java/org/apache/camel/component/weaviate/WeaviateVectorDb.java @@ -16,10 +16,68 @@ */ package org.apache.camel.component.weaviate; +import org.apache.camel.spi.Metadata; + public class WeaviateVectorDb { public static final String SCHEME = "weaviate"; private WeaviateVectorDb() { } + /** + * @deprecated As of Camel 4.15, this nested Headers class has been moved to its own class. Use + * {@link org.apache.camel.component.weaviate.WeaviateVectorDbHeaders} instead. + */ + @Deprecated + public static class Headers { + @Metadata(description = "The action to be performed.", javaType = "String", + enums = "CREATE_COLLECTION,CREATE_INDEX,UPSERT,INSERT,SEARCH,DELETE,UPDATE,QUERY,QUERY_BY_ID") + public static final String ACTION = "CamelWeaviateAction"; + + @Metadata(description = "Text Field Name for Insert/Upsert operation", javaType = "String") + public static final String TEXT_FIELD_NAME = "CamelWeaviateTextFieldName"; + + @Metadata(description = "Vector Field Name for Insert/Upsert operation", javaType = "String") + public static final String VECTOR_FIELD_NAME = "CamelweaviateVectorFieldName"; + + @Metadata(description = "Collection Name for Insert/Upsert operation", javaType = "String") + public static final String COLLECTION_NAME = "CamelWeaviateCollectionName"; + + @Metadata(description = "Collection Similarity Metric", javaType = "String", enums = "cosine,euclidean,dotproduct") + public static final String COLLECTION_SIMILARITY_METRIC = "CamelWeaviateCollectionSimilarityMetric"; + + @Metadata(description = "Collection Dimension", javaType = "int") + public static final String COLLECTION_DIMENSION = "CamelWeaviateCollectionDimension"; + + @Metadata(description = "Collection Cloud Vendor", javaType = "String", enums = "aws,gcp,azure") + public static final String COLLECTION_CLOUD = "CamelWeaviateCollectionCloud"; + + @Metadata(description = "Collection Cloud Vendor Region", javaType = "String", enums = "aws,gcp,azure") + public static final String COLLECTION_CLOUD_REGION = "CamelWeaviateCollectionCloudRegion"; + + @Metadata(description = "Index Name", javaType = "String") + public static final String INDEX_NAME = "CamelWeaviateIndexName"; + + @Metadata(description = "Weaviate Object fields", javaType = "HashMap") + public static final String FIELDS = "CamelWeaviateFields"; + + @Metadata(description = "Weaviate Object properties", javaType = "HashMap") + public static final String PROPERTIES = "CamelWeaviateProperties"; + + @Metadata(description = "Index Id", javaType = "String") + public static final String INDEX_ID = "CamelWeaviateIndexId"; + + @Metadata(description = "Query Top K", javaType = "Integer") + public static final String QUERY_TOP_K = "CamelWeaviateQueryTopK"; + + @Metadata(description = "Merges properties into the object", javaType = "Boolean", defaultValue = "true") + public static final String UPDATE_WITH_MERGE = "CamelWeaviateUpdateWithMerge"; + + @Metadata(description = "Key Name for Insert/Upsert operation", javaType = "String") + public static final String KEY_NAME = "CamelWeaviateKeyName"; + + @Metadata(description = "Key Value for Insert/Upsert operation", javaType = "String") + public static final String KEY_VALUE = "CamelWeaviateKeyValue"; + + } }
