This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/master by this push: new 16adbce CAMEL-15442: ArangoDb - backport new parameters to camel-spring-boot starter 16adbce is described below commit 16adbce7f4158bcf45be83f8397955726fe35e90 Author: Zineb Bendhiba <bendhiba.zi...@gmail.com> AuthorDate: Fri Aug 21 11:15:10 2020 +0200 CAMEL-15442: ArangoDb - backport new parameters to camel-spring-boot starter --- .../src/main/docs/arangodb-starter.adoc | 19 ++--- .../springboot/ArangoDbComponentConfiguration.java | 87 +++++++++++++++++----- 2 files changed, 79 insertions(+), 27 deletions(-) diff --git a/components-starter/camel-arangodb-starter/src/main/docs/arangodb-starter.adoc b/components-starter/camel-arangodb-starter/src/main/docs/arangodb-starter.adoc index 3a63655..a77605d 100644 --- a/components-starter/camel-arangodb-starter/src/main/docs/arangodb-starter.adoc +++ b/components-starter/camel-arangodb-starter/src/main/docs/arangodb-starter.adoc @@ -17,7 +17,7 @@ When using arangodb with Spring Boot make sure to use the following Maven depend ---- -The component supports 10 options, which are listed below. +The component supports 13 options, which are listed below. @@ -25,16 +25,17 @@ The component supports 10 options, which are listed below. |=== | Name | Description | Default | Type | *camel.component.arangodb.basic-property-binding* | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | Boolean -| *camel.component.arangodb.collection* | collection in the database | | String | *camel.component.arangodb.configuration* | Component configuration. The option is a org.apache.camel.component.arangodb.ArangoDbConfiguration type. | | String +| *camel.component.arangodb.document-collection* | Collection name, when using ArangoDb as a Document Database. Set the documentCollection name when using the CRUD operation on the document database collections (SAVE_DOCUMENT , FIND_DOCUMENT_BY_KEY, UPDATE_DOCUMENT, DELETE_DOCUMENT). | | String +| *camel.component.arangodb.edge-collection* | Collection name of vertices, when using ArangoDb as a Graph Database. Set the edgeCollection name to perform CRUD operation on edges using these operations : SAVE_VERTEX, FIND_VERTEX_BY_KEY, UPDATE_VERTEX, DELETE_VERTEX. The graph attribute is mandatory. | | String | *camel.component.arangodb.enabled* | Whether to enable auto configuration of the arangodb component. This is enabled by default. | | Boolean -| *camel.component.arangodb.host* | host if host and/or port different from default | | String +| *camel.component.arangodb.graph* | Graph name, when using ArangoDb as a Graph Database. Combine this attribute with one of the two attributes vertexCollection and edgeCollection. | | String +| *camel.component.arangodb.host* | ArangoDB host. If host and port are default, this field is Optional. | | String | *camel.component.arangodb.lazy-start-producer* | 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 t [...] -| *camel.component.arangodb.operation* | operation to perform | | ArangoDbOperation -| *camel.component.arangodb.password* | password if user and/or password different from default | | String -| *camel.component.arangodb.port* | port if host and/or port different from default | | Integer -| *camel.component.arangodb.user* | user if user and/or password different from default | | String +| *camel.component.arangodb.operation* | Operations to perform on ArangoDb. For the operation AQL_QUERY, no need to specify a collection or graph. | | ArangoDbOperation +| *camel.component.arangodb.password* | ArangoDB password. If user and password are default, this field is Optional. | | String +| *camel.component.arangodb.port* | ArangoDB exposed port. If host and port are default, this field is Optional. | | Integer +| *camel.component.arangodb.user* | ArangoDB user. If user and password are default, this field is Optional. | | String +| *camel.component.arangodb.vertex-collection* | Collection name of vertices, when using ArangoDb as a Graph Database. Set the vertexCollection name to perform CRUD operation on vertices using these operations : SAVE_EDGE, FIND_EDGE_BY_KEY, UPDATE_EDGE, DELETE_EDGE. The graph attribute is mandatory. | | String |=== - - // spring-boot-auto-configure options: END diff --git a/components-starter/camel-arangodb-starter/src/main/java/org/apache/camel/component/arangodb/springboot/ArangoDbComponentConfiguration.java b/components-starter/camel-arangodb-starter/src/main/java/org/apache/camel/component/arangodb/springboot/ArangoDbComponentConfiguration.java index 0d749a6..6289fee 100644 --- a/components-starter/camel-arangodb-starter/src/main/java/org/apache/camel/component/arangodb/springboot/ArangoDbComponentConfiguration.java +++ b/components-starter/camel-arangodb-starter/src/main/java/org/apache/camel/component/arangodb/springboot/ArangoDbComponentConfiguration.java @@ -22,7 +22,8 @@ import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon; import org.springframework.boot.context.properties.ConfigurationProperties; /** - * Perform operations on ArangoDb documents, collections and graphs. + * Perform operations on ArangoDb when used as a Document Database, or as a + * Graph Database * * Generated by camel-package-maven-plugin - do not edit this file! */ @@ -38,16 +39,32 @@ public class ArangoDbComponentConfiguration */ private Boolean enabled; /** - * collection in the database - */ - private String collection; - /** * Component configuration. The option is a * org.apache.camel.component.arangodb.ArangoDbConfiguration type. */ private String configuration; /** - * host if host and/or port different from default + * Collection name, when using ArangoDb as a Document Database. Set the + * documentCollection name when using the CRUD operation on the document + * database collections (SAVE_DOCUMENT , FIND_DOCUMENT_BY_KEY, + * UPDATE_DOCUMENT, DELETE_DOCUMENT). + */ + private String documentCollection; + /** + * Collection name of vertices, when using ArangoDb as a Graph Database. Set + * the edgeCollection name to perform CRUD operation on edges using these + * operations : SAVE_VERTEX, FIND_VERTEX_BY_KEY, UPDATE_VERTEX, + * DELETE_VERTEX. The graph attribute is mandatory. + */ + private String edgeCollection; + /** + * Graph name, when using ArangoDb as a Graph Database. Combine this + * attribute with one of the two attributes vertexCollection and + * edgeCollection. + */ + private String graph; + /** + * ArangoDB host. If host and port are default, this field is Optional. */ private String host; /** @@ -62,35 +79,37 @@ public class ArangoDbComponentConfiguration */ private Boolean lazyStartProducer = false; /** - * operation to perform + * Operations to perform on ArangoDb. For the operation AQL_QUERY, no need + * to specify a collection or graph. */ private ArangoDbOperation operation; /** - * port if host and/or port different from default + * ArangoDB exposed port. If host and port are default, this field is + * Optional. */ private Integer port; /** + * Collection name of vertices, when using ArangoDb as a Graph Database. Set + * the vertexCollection name to perform CRUD operation on vertices using + * these operations : SAVE_EDGE, FIND_EDGE_BY_KEY, UPDATE_EDGE, DELETE_EDGE. + * The graph attribute is mandatory. + */ + private String vertexCollection; + /** * Whether the component should use basic property binding (Camel 2.x) or * the newer property binding with additional capabilities */ private Boolean basicPropertyBinding = false; /** - * password if user and/or password different from default + * ArangoDB password. If user and password are default, this field is + * Optional. */ private String password; /** - * user if user and/or password different from default + * ArangoDB user. If user and password are default, this field is Optional. */ private String user; - public String getCollection() { - return collection; - } - - public void setCollection(String collection) { - this.collection = collection; - } - public String getConfiguration() { return configuration; } @@ -99,6 +118,30 @@ public class ArangoDbComponentConfiguration this.configuration = configuration; } + public String getDocumentCollection() { + return documentCollection; + } + + public void setDocumentCollection(String documentCollection) { + this.documentCollection = documentCollection; + } + + public String getEdgeCollection() { + return edgeCollection; + } + + public void setEdgeCollection(String edgeCollection) { + this.edgeCollection = edgeCollection; + } + + public String getGraph() { + return graph; + } + + public void setGraph(String graph) { + this.graph = graph; + } + public String getHost() { return host; } @@ -131,6 +174,14 @@ public class ArangoDbComponentConfiguration this.port = port; } + public String getVertexCollection() { + return vertexCollection; + } + + public void setVertexCollection(String vertexCollection) { + this.vertexCollection = vertexCollection; + } + public Boolean getBasicPropertyBinding() { return basicPropertyBinding; }