This is an automated email from the ASF dual-hosted git repository. jeremyross pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new 029c2f0 Polish claim check docs. 029c2f0 is described below commit 029c2f083d6d4fb33b444d2bcbd74c0a44a3e3a8 Author: Jeremy Ross <jeremy.g.r...@gmail.com> AuthorDate: Wed Jan 12 12:14:31 2022 -0600 Polish claim check docs. --- .../docs/modules/eips/pages/claimCheck-eip.adoc | 42 +++++++++++----------- .../org/apache/camel/model/claimCheck.json | 4 +-- .../apache/camel/model/ClaimCheckDefinition.java | 22 ++++++------ 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/claimCheck-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/claimCheck-eip.adoc index b24d2e6..48498e3 100644 --- a/core/camel-core-engine/src/main/docs/modules/eips/pages/claimCheck-eip.adoc +++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/claimCheck-eip.adoc @@ -27,7 +27,7 @@ include::partial$eip-options.adoc[] When using this EIP you must specify the operation to use which can be of the following: * *Get* - Gets (does not remove) the claim check by the given key. -* *GetAndRemove* - Gets and remove the claim check by the given key. +* *GetAndRemove* - Gets and removes the claim check by the given key. * *Set* - Sets a new (will override if key already exists) claim check with the given key. * *Push* - Sets a new claim check on the stack (does not use key). * *Pop* - Gets the latest claim check from the stack (does not use key). @@ -41,19 +41,19 @@ The `Push` and `Pop` operations do *not* use a key but stores the data in a stac == Merging data using get or pop operation The `Get`, `GetAndRemove` and `Pop` operations will claim data back from the claim check repository. -The data is then merged with the current data on the exchange, this is done with an `AggregationStrategy`. +The data is then merged with the current data on the exchange. This is done with an `AggregationStrategy`. The default strategy uses the `filter` option to easily specify what data to merge back. The `filter` option takes a `String` value with the following syntax: -* `body` = to aggregate the message body -* `attachments` = to aggregate all the message attachments -* `headers` = to aggregate all the message headers -* `header:pattern` = to aggregate all the message headers that matches the pattern. +* `body` - to aggregate the message body. +* `attachments` - to aggregate all the message attachments. +* `headers` - to aggregate all the message headers. +* `header:pattern` - to aggregate all the message headers that matches the pattern. -The pattern rule supports wildcard and regular expression: +The pattern rule supports wildcards and regular expressions: -* wildcard match (pattern ends with a `*, and the name starts with the pattern) +* wildcard match (pattern ends with a `*`, and the name starts with the pattern) * regular expression match You can specify multiple rules separated by comma. @@ -97,15 +97,15 @@ header:foo If the filter rule is specified as empty or as wildcard then everything is merged. -Notice that when merging back data, then any existing data is overwritten, and any other existing data is preserved. +Notice that when merging back data, any data in the Message that is not overwritten is preserved. === Filtering with include and exclude patterns -The syntax also supports the following prefixes which can be used to specify include,exclude, or remove +The syntax also supports the following prefixes which can be used to specify include, exclude, or remove -* `+` = to include (which is the default mode) -* `-` = to exclude (exclude takes precedence over include) -* `--` = to remove (remove takes precedence) +* `+` to include (which is the default mode) +* `-` to exclude (exclude takes precedence over include) +* `--` to remove (remove takes precedence) For example to skip the message body, and merge back everything else @@ -114,14 +114,14 @@ For example to skip the message body, and merge back everything else -body ---- -Or to skip the message header foo, and merge back everything else +Or to skip the message header foo and merge back everything else [source,text] ---- -header:foo ---- -You can also instruct removing headers when merging data back, for example to remove all headers starting with _bar_: +You can also remove headers when merging data back. For example, to remove all headers starting with _bar_: [source,text] ---- @@ -132,8 +132,8 @@ Note you cannot have both include (`+`) and exclude (`-`) `header:pattern` at th == Dynamic keys -The claim check key are static, but you can use the `simple` language syntax to define dynamic keys, -for example to use a header from the message named `myKey`: +The claim check keys are static, but you can use the `simple` language syntax to define dynamic keys. +For example, to use a header from the message named `myKey`: [source,java] ---- @@ -152,7 +152,7 @@ from("direct:start") == Example -The following example shows the `Push` and `Pop` operations in action; +The following example shows the `Push` and `Pop` operations in action: [source,java] ---- @@ -165,9 +165,9 @@ from("direct:start") .to("mock:c"); ---- -For example if the message body from the beginning is `Hello World` then that data is pushed on the stack of the Claim Check EIP. -And then the message body is transformed to `Bye World`, which is what `mock:b` endpoint receives. When we `Pop` from the Claim Check EIP -then the original message body is retrieved and merged back so `mock:c` will retrieve the message body with `Hello World`. +In the above example, imagine message body from the beginning is `Hello World`. That data is pushed on the stack of the Claim Check EIP. +Then the message body is transformed to `Bye World`, which is what `mock:b` endpoint receives. When we `Pop` from the Claim Check EIP, +the original message body is retrieved and merged back, so `mock:c` will retrieve the message body with `Hello World`. Here is an example using `Get` and `Set` operations, which uses the key `foo`: diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/claimCheck.json b/core/camel-core-model/src/generated/resources/org/apache/camel/model/claimCheck.json index b3d6662..97c8c01 100644 --- a/core/camel-core-model/src/generated/resources/org/apache/camel/model/claimCheck.json +++ b/core/camel-core-model/src/generated/resources/org/apache/camel/model/claimCheck.json @@ -12,9 +12,9 @@ "output": false }, "properties": { - "operation": { "kind": "attribute", "displayName": "Operation", "required": false, "type": "enum", "javaType": "org.apache.camel.model.ClaimCheckOperation", "enum": [ "Get", "GetAndRemove", "Set", "Push", "Pop" ], "deprecated": false, "autowired": false, "secret": false, "description": "The claim check operation to use. The following operations is supported: Get - Gets (does not remove) the claim check by the given key. GetAndRemove - Gets and remove the claim check by the given key. [...] + "operation": { "kind": "attribute", "displayName": "Operation", "required": false, "type": "enum", "javaType": "org.apache.camel.model.ClaimCheckOperation", "enum": [ "Get", "GetAndRemove", "Set", "Push", "Pop" ], "deprecated": false, "autowired": false, "secret": false, "description": "The claim check operation to use. The following operations are supported: Get - Gets (does not remove) the claim check by the given key. GetAndRemove - Gets and removes the claim check by the given ke [...] "key": { "kind": "attribute", "displayName": "Key", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use a specific key for claim check id (for dynamic keys use simple language syntax as the key)." }, - "filter": { "kind": "attribute", "displayName": "Filter", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Specified a filter to control what data gets merging data back from the claim check repository. The following syntax is supported: body - to aggregate the message body attachments - to aggregate all the message attachments headers - to aggregate all the message headers header:pattern - [...] + "filter": { "kind": "attribute", "displayName": "Filter", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Specify a filter to control what data gets merged data back from the claim check repository. The following syntax is supported: body - to aggregate the message body attachments - to aggregate all the message attachments headers - to aggregate all the message headers header:pattern - to [...] "strategyRef": { "kind": "attribute", "displayName": "Strategy Ref", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom AggregationStrategy instead of the default implementation. Notice you cannot use both custom aggregation strategy and configure data at the same time. The value can either refer to a bean to lookup, or to lookup a singleton bean by its type, or to create a new [...] "strategyMethodName": { "kind": "attribute", "displayName": "Strategy Method Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "This option can be used to explicit declare the method name to use, when using POJOs as the AggregationStrategy." }, "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" }, diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/ClaimCheckDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/ClaimCheckDefinition.java index f8727d5..4b7a7fd 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/ClaimCheckDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/ClaimCheckDefinition.java @@ -78,10 +78,10 @@ public class ClaimCheckDefinition extends NoOutputDefinition<ClaimCheckDefinitio // ------------------------------------------------------------------------- /** - * The claim check operation to use. The following operations is supported: + * The claim check operation to use. The following operations are supported: * <ul> * <li>Get</li> - Gets (does not remove) the claim check by the given key. - * <li>GetAndRemove</li> - Gets and remove the claim check by the given key. + * <li>GetAndRemove</li> - Gets and removes the claim check by the given key. * <li>Set</li> - Sets a new (will override if key already exists) claim check with the given key. * <li>Push</li> - Sets a new claim check on the stack (does not use key). * <li>Pop</li> - Gets the latest claim check from the stack (does not use key). @@ -92,10 +92,10 @@ public class ClaimCheckDefinition extends NoOutputDefinition<ClaimCheckDefinitio } /** - * The claim check operation to use. The following operations is supported: + * The claim check operation to use. The following operations are supported: * <ul> * <li>Get</li> - Gets (does not remove) the claim check by the given key. - * <li>GetAndRemove</li> - Gets and remove the claim check by the given key. + * <li>GetAndRemove</li> - Gets and removes the claim check by the given key. * <li>Set</li> - Sets a new (will override if key already exists) claim check with the given key. * <li>Push</li> - Sets a new claim check on the stack (does not use key). * <li>Pop</li> - Gets the latest claim check from the stack (does not use key). @@ -115,15 +115,15 @@ public class ClaimCheckDefinition extends NoOutputDefinition<ClaimCheckDefinitio } /** - * Specified a filter to control what data gets merging data back from the claim check repository. The following - * syntax is supported: + * Specify a filter to control what data gets merged data back from the claim check repository. The following syntax + * is supported: * <ul> * <li>body</li> - to aggregate the message body * <li>attachments</li> - to aggregate all the message attachments * <li>headers</li> - to aggregate all the message headers * <li>header:pattern</li> - to aggregate all the message headers that matches the pattern. * </ul> - * The pattern uses the following rules are applied in this order: + * The following pattern rules are applied in this order: * <ul> * <li>exact match, returns true</li> * <li>wildcard match (pattern ends with a * and the name starts with the pattern), returns true</li> @@ -131,15 +131,15 @@ public class ClaimCheckDefinition extends NoOutputDefinition<ClaimCheckDefinitio * <li>otherwise returns false</li> * </ul> * <p> - * You can specify multiple rules separated by comma. For example to include the message body and all headers - * starting with foo <tt>body,header:foo*</tt>. The syntax supports the following prefixes which can be used to - * specify include,exclude, or remove + * You can specify multiple rules separated by comma. For example, the following includes the message body and all + * headers starting with foo: <tt>body,header:foo*</tt>. The syntax supports the following prefixes which can be + * used to specify include,exclude, or remove * <ul> * <li>+</li> - to include (which is the default mode) * <li>-</li> - to exclude (exclude takes precedence over include) * <li>--</li> - to remove (remove takes precedence) * </ul> - * For example to exclude a header name foo, and remove all headers starting with bar + * For example to exclude a header name foo, and remove all headers starting with bar, * <tt>-header:foo,--headers:bar*</tt> Note you cannot have both include and exclude <tt>header:pattern</tt> at the * same time. */