This is an automated email from the ASF dual-hosted git repository.
davsclaus 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 071f439 CAMEL-14565: Add docs for missing option
071f439 is described below
commit 071f439e5059da2239f792da172c312587681e67
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Feb 17 10:52:16 2020 +0100
CAMEL-14565: Add docs for missing option
---
.../camel/springboot/catalog/components/corda.json | 7 ++
.../src/main/docs/corda-starter.adoc | 19 +++--
.../springboot/CordaComponentConfiguration.java | 83 ++++++++++++++--------
3 files changed, 69 insertions(+), 40 deletions(-)
diff --git
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/corda.json
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/corda.json
index 5416623..99cbc7a 100644
---
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/corda.json
+++
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/corda.json
@@ -27,8 +27,15 @@
"properties": {
"node": { "kind": "path", "displayName": "Node", "group": "common",
"label": "", "required": true, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "deprecationNote": "", "secret":
false, "configurationClass":
"org.apache.camel.component.corda.CordaConfiguration", "configurationField":
"configuration", "description": "The url for the corda node" },
"bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error
Handler", "group": "consumer", "label": "consumer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "secret": false,
"defaultValue": false, "description": "Allows for bridging the consumer to the
Camel routing Error Handler, which mean any exceptions occurred while the
consumer is trying to pickup incoming messages, or the likes, will now be
processed as a message and handled b [...]
+ "pageSpecification": { "kind": "parameter", "displayName": "Page
Specification", "group": "consumer", "label": "consumer", "required": false,
"type": "object", "javaType":
"net.corda.core.node.services.vault.PageSpecification", "deprecated": false,
"secret": false, "defaultValue": "200", "configurationClass":
"org.apache.camel.component.corda.CordaConfiguration", "configurationField":
"configuration", "description": "PageSpecification allows specification of a
page number (starting f [...]
+ "processSnapshot": { "kind": "parameter", "displayName": "Process
Snapshot", "group": "consumer", "label": "consumer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "secret": false,
"defaultValue": "true", "configurationClass":
"org.apache.camel.component.corda.CordaConfiguration", "configurationField":
"configuration", "description": "Whether to process snapshots or not" },
+ "sort": { "kind": "parameter", "displayName": "Sort", "group": "consumer",
"label": "consumer", "required": false, "type": "object", "javaType":
"net.corda.core.node.services.vault.Sort", "enum": [ "ASC", "DESC" ],
"deprecated": false, "secret": false, "configurationClass":
"org.apache.camel.component.corda.CordaConfiguration", "configurationField":
"configuration", "description": "Sort allows specification of a set of entity
attribute names and their associated directionality and nu [...]
+ "contractStateClass": { "kind": "parameter", "displayName": "Contract
State Class", "group": "consumer (advanced)", "label": "consumer,advanced",
"required": false, "type": "string", "javaType":
"java.lang.Class<net.corda.core.contracts.ContractState>", "deprecated": false,
"secret": false, "configurationClass":
"org.apache.camel.component.corda.CordaConfiguration", "configurationField":
"configuration", "description": "A contract state (or just state) contains
opaque data used by a [...]
"exceptionHandler": { "kind": "parameter", "displayName": "Exception
Handler", "group": "consumer (advanced)", "label": "consumer,advanced",
"required": false, "type": "object", "javaType":
"org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.",
"deprecated": false, "secret": false, "description": "To let the consumer use a
custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled
then this option is not in use. By default the consumer will deal with [...]
"exchangePattern": { "kind": "parameter", "displayName": "Exchange
Pattern", "group": "consumer (advanced)", "label": "consumer,advanced",
"required": false, "type": "object", "javaType":
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut",
"InOptionalOut" ], "deprecated": false, "secret": false, "description": "Sets
the exchange pattern when the consumer creates an exchange." },
+ "flowLogicArguments": { "kind": "parameter", "displayName": "Flow Logic
Arguments", "group": "consumer (advanced)", "label": "consumer,advanced",
"required": false, "type": "array", "javaType": "java.lang.Object[]",
"deprecated": false, "secret": false, "configurationClass":
"org.apache.camel.component.corda.CordaConfiguration", "configurationField":
"configuration", "description": "Start the given flow with the given arguments,
returning an Observable with a single observation of th [...]
+ "flowLogicClass": { "kind": "parameter", "displayName": "Flow Logic
Class", "group": "consumer (advanced)", "label": "consumer,advanced",
"required": false, "type": "string", "javaType":
"java.lang.Class<net.corda.core.flows.FlowLogic<java.lang.Object>>",
"deprecated": false, "secret": false, "configurationClass":
"org.apache.camel.component.corda.CordaConfiguration", "configurationField":
"configuration", "description": "Start the given flow with the given arguments,
returning an Ob [...]
+ "queryCriteria": { "kind": "parameter", "displayName": "Query Criteria",
"group": "consumer (advanced)", "label": "consumer,advanced", "required":
false, "type": "object", "javaType":
"net.corda.core.node.services.vault.QueryCriteria", "deprecated": false,
"secret": false, "configurationClass":
"org.apache.camel.component.corda.CordaConfiguration", "configurationField":
"configuration", "description": "QueryCriteria assumes underlying schema tables
are correctly indexed for performance." },
"lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start
Producer", "group": "producer", "label": "producer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "secret": false,
"defaultValue": false, "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 [...]
"operation": { "kind": "parameter", "displayName": "Operation", "group":
"producer", "label": "producer", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "secret": false,
"configurationClass": "org.apache.camel.component.corda.CordaConfiguration",
"configurationField": "configuration", "description": "Operation to use" },
"basicPropertyBinding": { "kind": "parameter", "displayName": "Basic
Property Binding", "group": "advanced", "label": "advanced", "required": false,
"type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false,
"defaultValue": false, "description": "Whether the endpoint should use basic
property binding (Camel 2.x) or the newer property binding with additional
capabilities" },
diff --git
a/components-starter/camel-corda-starter/src/main/docs/corda-starter.adoc
b/components-starter/camel-corda-starter/src/main/docs/corda-starter.adoc
index c18cbff..e20fe39 100644
--- a/components-starter/camel-corda-starter/src/main/docs/corda-starter.adoc
+++ b/components-starter/camel-corda-starter/src/main/docs/corda-starter.adoc
@@ -17,7 +17,7 @@ When using corda with Spring Boot make sure to use the
following Maven dependenc
----
-The component supports 17 options, which are listed below.
+The component supports 15 options, which are listed below.
@@ -26,21 +26,18 @@ The component supports 17 options, which are listed below.
| Name | Description | Default | Type
| *camel.component.corda.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.corda.bridge-error-handler* | Allows for bridging the
consumer to the Camel routing Error Handler, which mean any exceptions occurred
while the consumer is trying to pickup incoming messages, or the likes, will
now be processed as a message and handled by the routing Error Handler. 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. |
false | Boolean
-| *camel.component.corda.configuration.arguments* | | | Object[]
-| *camel.component.corda.configuration.contract-state-class* | | | Class
-| *camel.component.corda.configuration.flow-loci-class* | | | Class
-| *camel.component.corda.configuration.host* | | | String
+| *camel.component.corda.configuration.contract-state-class* | A contract
state (or just state) contains opaque data used by a contract program. It can
be thought of as a disk file that the program can use to persist data across
transactions. States are immutable: once created they are never updated,
instead, any changes must generate a new successor state. States can be updated
(consumed) only once: the notary is responsible for ensuring there is no
"double spending" by only signing a t [...]
+| *camel.component.corda.configuration.flow-logic-arguments* | Start the given
flow with the given arguments, returning an Observable with a single
observation of the result of running the flow. The flowLogicClass must be
annotated with net.corda.core.flows.StartableByRPC. | | Object[]
+| *camel.component.corda.configuration.flow-logic-class* | Start the given
flow with the given arguments, returning an Observable with a single
observation of the result of running the flow. The flowLogicClass must be
annotated with net.corda.core.flows.StartableByRPC. | | Class
| *camel.component.corda.configuration.node* | The url for the corda node | |
String
| *camel.component.corda.configuration.operation* | Operation to use | |
String
-| *camel.component.corda.configuration.page-specification* | | |
PageSpecification
+| *camel.component.corda.configuration.page-specification* | PageSpecification
allows specification of a page number (starting from 1) and page size
(defaulting to 200 with a maximum page size of (Integer.MAX_INT) Note: we
default the page number to 200 to enable queries without requiring a page
specification but enabling detection of large results sets that fall out of the
200 requirement. Max page size should be used with extreme caution as results
may exceed your JVM memory footprint. [...]
| *camel.component.corda.configuration.password* | Password for login | |
String
-| *camel.component.corda.configuration.port* | | | Integer
-| *camel.component.corda.configuration.process-snapshot* | | | Boolean
-| *camel.component.corda.configuration.query-criteria* | | | QueryCriteria
-| *camel.component.corda.configuration.sort* | | | Sort
+| *camel.component.corda.configuration.process-snapshot* | Whether to process
snapshots or not | true | Boolean
+| *camel.component.corda.configuration.query-criteria* | QueryCriteria assumes
underlying schema tables are correctly indexed for performance. | |
QueryCriteria
+| *camel.component.corda.configuration.sort* | Sort allows specification of a
set of entity attribute names and their associated directionality and null
handling, to be applied upon processing a query specification. | | Sort
| *camel.component.corda.configuration.username* | Username for login | |
String
| *camel.component.corda.enabled* | Whether to enable auto configuration of
the corda component. This is enabled by default. | | Boolean
| *camel.component.corda.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 then [...]
|===
-
// spring-boot-auto-configure options: END
diff --git
a/components-starter/camel-corda-starter/src/main/java/org/apache/camel/component/corda/springboot/CordaComponentConfiguration.java
b/components-starter/camel-corda-starter/src/main/java/org/apache/camel/component/corda/springboot/CordaComponentConfiguration.java
index 3cf32a5..774ad86 100644
---
a/components-starter/camel-corda-starter/src/main/java/org/apache/camel/component/corda/springboot/CordaComponentConfiguration.java
+++
b/components-starter/camel-corda-starter/src/main/java/org/apache/camel/component/corda/springboot/CordaComponentConfiguration.java
@@ -104,10 +104,31 @@ public class CordaComponentConfiguration
public static class CordaConfigurationNestedConfiguration {
public static final Class CAMEL_NESTED_CLASS =
org.apache.camel.component.corda.CordaConfiguration.class;
- private Object[] arguments;
+ /**
+ * A contract state (or just state) contains opaque data used by a
+ * contract program. It can be thought of as a disk file that the
+ * program can use to persist data across transactions. States are
+ * immutable: once created they are never updated, instead, any changes
+ * must generate a new successor state. States can be updated
(consumed)
+ * only once: the notary is responsible for ensuring there is no
"double
+ * spending" by only signing a transaction if the input states are all
+ * free.
+ */
private Class contractStateClass;
- private Class flowLociClass;
- private String host;
+ /**
+ * Start the given flow with the given arguments, returning an
+ * Observable with a single observation of the result of running the
+ * flow. The flowLogicClass must be annotated with
+ * net.corda.core.flows.StartableByRPC.
+ */
+ private Object[] flowLogicArguments;
+ /**
+ * Start the given flow with the given arguments, returning an
+ * Observable with a single observation of the result of running the
+ * flow. The flowLogicClass must be annotated with
+ * net.corda.core.flows.StartableByRPC.
+ */
+ private Class flowLogicClass;
/**
* The url for the corda node
*/
@@ -116,28 +137,40 @@ public class CordaComponentConfiguration
* Operation to use
*/
private String operation;
+ /**
+ * PageSpecification allows specification of a page number (starting
+ * from 1) and page size (defaulting to 200 with a maximum page size of
+ * (Integer.MAX_INT) Note: we default the page number to 200 to enable
+ * queries without requiring a page specification but enabling
detection
+ * of large results sets that fall out of the 200 requirement. Max page
+ * size should be used with extreme caution as results may exceed your
+ * JVM memory footprint.
+ */
private PageSpecification pageSpecification;
/**
* Password for login
*/
private String password;
- private Integer port;
- private Boolean processSnapshot;
+ /**
+ * Whether to process snapshots or not
+ */
+ private Boolean processSnapshot = true;
+ /**
+ * QueryCriteria assumes underlying schema tables are correctly indexed
+ * for performance.
+ */
private QueryCriteria queryCriteria;
+ /**
+ * Sort allows specification of a set of entity attribute names and
+ * their associated directionality and null handling, to be applied
upon
+ * processing a query specification.
+ */
private Sort sort;
/**
* Username for login
*/
private String username;
- public Object[] getArguments() {
- return arguments;
- }
-
- public void setArguments(Object[] arguments) {
- this.arguments = arguments;
- }
-
public Class getContractStateClass() {
return contractStateClass;
}
@@ -146,20 +179,20 @@ public class CordaComponentConfiguration
this.contractStateClass = contractStateClass;
}
- public Class getFlowLociClass() {
- return flowLociClass;
+ public Object[] getFlowLogicArguments() {
+ return flowLogicArguments;
}
- public void setFlowLociClass(Class flowLociClass) {
- this.flowLociClass = flowLociClass;
+ public void setFlowLogicArguments(Object[] flowLogicArguments) {
+ this.flowLogicArguments = flowLogicArguments;
}
- public String getHost() {
- return host;
+ public Class getFlowLogicClass() {
+ return flowLogicClass;
}
- public void setHost(String host) {
- this.host = host;
+ public void setFlowLogicClass(Class flowLogicClass) {
+ this.flowLogicClass = flowLogicClass;
}
public String getNode() {
@@ -194,14 +227,6 @@ public class CordaComponentConfiguration
this.password = password;
}
- public Integer getPort() {
- return port;
- }
-
- public void setPort(Integer port) {
- this.port = port;
- }
-
public Boolean getProcessSnapshot() {
return processSnapshot;
}