This is an automated email from the ASF dual-hosted git repository. davsclaus 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 73171d11094 CAMEL-21779: camel-smb - The path is common 73171d11094 is described below commit 73171d11094d9afcd64e9f122a81ce58459c8f85 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Sun Feb 23 10:21:26 2025 +0100 CAMEL-21779: camel-smb - The path is common --- .../org/apache/camel/catalog/components/smb.json | 8 ++-- .../org/apache/camel/component/smb/smb.json | 8 ++-- .../camel/component/smb/SmbConfiguration.java | 4 +- .../endpoint/dsl/SmbEndpointBuilderFactory.java | 56 ++++++++++++++++------ 4 files changed, 52 insertions(+), 24 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/smb.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/smb.json index a5d5c99c524..47cfa4713de 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/smb.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/smb.json @@ -56,10 +56,10 @@ "disconnect": { "index": 4, "kind": "parameter", "displayName": "Disconnect", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.smb.SmbConfiguration", "configurationField": "configuration", "description": "Whether or not to disconnect from remote SMB share right after use. Disconnect will only disconnect th [...] "doneFileName": { "index": 5, "kind": "parameter", "displayName": "Done File Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Producer: If provided, then Camel will write a 2nd done file when the original file has been written. The done file will be empty. This option configures what file name to use. Either you can specify a fixed name. Or you can use [...] "fileName": { "index": 6, "kind": "parameter", "displayName": "File Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Use Expression such as File Language to dynamically set the filename. For consumers, it's used as a filename filter. For producers, it's used to evaluate the filename to write. If an expression is set, it take precedence over the CamelFil [...] - "delete": { "index": 7, "kind": "parameter", "displayName": "Delete", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If true, the file will be deleted after it is processed successfully." }, - "moveFailed": { "index": 8, "kind": "parameter", "displayName": "Move Failed", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the move failure expression based on Simple language. For example, to move files into a .error subdirectory use: .error. Note: When moving the files to the fail location Camel will handle the error and will not pick up [...] - "noop": { "index": 9, "kind": "parameter", "displayName": "Noop", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If true, the file is not moved or deleted in any way. This option is good for readonly data, or for ETL type requirements. If noop=true, Camel will set idempotent=true as well, to avoid consuming the same files over and ov [...] - "path": { "index": 10, "kind": "parameter", "displayName": "Path", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.smb.SmbConfiguration", "configurationField": "configuration", "description": "The path, within the share, to consume the files from" }, + "path": { "index": 7, "kind": "parameter", "displayName": "Path", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.smb.SmbConfiguration", "configurationField": "configuration", "description": "The base directory within the share" }, + "delete": { "index": 8, "kind": "parameter", "displayName": "Delete", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If true, the file will be deleted after it is processed successfully." }, + "moveFailed": { "index": 9, "kind": "parameter", "displayName": "Move Failed", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the move failure expression based on Simple language. For example, to move files into a .error subdirectory use: .error. Note: When moving the files to the fail location Camel will handle the error and will not pick up [...] + "noop": { "index": 10, "kind": "parameter", "displayName": "Noop", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If true, the file is not moved or deleted in any way. This option is good for readonly data, or for ETL type requirements. If noop=true, Camel will set idempotent=true as well, to avoid consuming the same files over and o [...] "preMove": { "index": 11, "kind": "parameter", "displayName": "Pre Move", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Expression (such as File Language) used to dynamically set the filename when moving it before processing. For example to move in-progress files into the order directory set this value to order." }, "preSort": { "index": 12, "kind": "parameter", "displayName": "Pre Sort", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "When pre-sort is enabled then the consumer will sort the file and directory names during polling, that was retrieved from the file system. You may want to do this in case you need to operate on the files in a sorte [...] "recursive": { "index": 13, "kind": "parameter", "displayName": "Recursive", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If a directory, will look for files in all the sub-directories as well." }, diff --git a/components/camel-smb/src/generated/resources/META-INF/org/apache/camel/component/smb/smb.json b/components/camel-smb/src/generated/resources/META-INF/org/apache/camel/component/smb/smb.json index a5d5c99c524..47cfa4713de 100644 --- a/components/camel-smb/src/generated/resources/META-INF/org/apache/camel/component/smb/smb.json +++ b/components/camel-smb/src/generated/resources/META-INF/org/apache/camel/component/smb/smb.json @@ -56,10 +56,10 @@ "disconnect": { "index": 4, "kind": "parameter", "displayName": "Disconnect", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.smb.SmbConfiguration", "configurationField": "configuration", "description": "Whether or not to disconnect from remote SMB share right after use. Disconnect will only disconnect th [...] "doneFileName": { "index": 5, "kind": "parameter", "displayName": "Done File Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Producer: If provided, then Camel will write a 2nd done file when the original file has been written. The done file will be empty. This option configures what file name to use. Either you can specify a fixed name. Or you can use [...] "fileName": { "index": 6, "kind": "parameter", "displayName": "File Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Use Expression such as File Language to dynamically set the filename. For consumers, it's used as a filename filter. For producers, it's used to evaluate the filename to write. If an expression is set, it take precedence over the CamelFil [...] - "delete": { "index": 7, "kind": "parameter", "displayName": "Delete", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If true, the file will be deleted after it is processed successfully." }, - "moveFailed": { "index": 8, "kind": "parameter", "displayName": "Move Failed", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the move failure expression based on Simple language. For example, to move files into a .error subdirectory use: .error. Note: When moving the files to the fail location Camel will handle the error and will not pick up [...] - "noop": { "index": 9, "kind": "parameter", "displayName": "Noop", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If true, the file is not moved or deleted in any way. This option is good for readonly data, or for ETL type requirements. If noop=true, Camel will set idempotent=true as well, to avoid consuming the same files over and ov [...] - "path": { "index": 10, "kind": "parameter", "displayName": "Path", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.smb.SmbConfiguration", "configurationField": "configuration", "description": "The path, within the share, to consume the files from" }, + "path": { "index": 7, "kind": "parameter", "displayName": "Path", "group": "common", "label": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.smb.SmbConfiguration", "configurationField": "configuration", "description": "The base directory within the share" }, + "delete": { "index": 8, "kind": "parameter", "displayName": "Delete", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If true, the file will be deleted after it is processed successfully." }, + "moveFailed": { "index": 9, "kind": "parameter", "displayName": "Move Failed", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the move failure expression based on Simple language. For example, to move files into a .error subdirectory use: .error. Note: When moving the files to the fail location Camel will handle the error and will not pick up [...] + "noop": { "index": 10, "kind": "parameter", "displayName": "Noop", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If true, the file is not moved or deleted in any way. This option is good for readonly data, or for ETL type requirements. If noop=true, Camel will set idempotent=true as well, to avoid consuming the same files over and o [...] "preMove": { "index": 11, "kind": "parameter", "displayName": "Pre Move", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Expression (such as File Language) used to dynamically set the filename when moving it before processing. For example to move in-progress files into the order directory set this value to order." }, "preSort": { "index": 12, "kind": "parameter", "displayName": "Pre Sort", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "When pre-sort is enabled then the consumer will sort the file and directory names during polling, that was retrieved from the file system. You may want to do this in case you need to operate on the files in a sorte [...] "recursive": { "index": 13, "kind": "parameter", "displayName": "Recursive", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If a directory, will look for files in all the sub-directories as well." }, diff --git a/components/camel-smb/src/main/java/org/apache/camel/component/smb/SmbConfiguration.java b/components/camel-smb/src/main/java/org/apache/camel/component/smb/SmbConfiguration.java index b55480f8e4b..3821a1cc35a 100644 --- a/components/camel-smb/src/main/java/org/apache/camel/component/smb/SmbConfiguration.java +++ b/components/camel-smb/src/main/java/org/apache/camel/component/smb/SmbConfiguration.java @@ -40,14 +40,14 @@ public class SmbConfiguration extends GenericFileConfiguration { @UriPath(description = "The name of the share directory") @Metadata(required = true) private String shareName; + @UriParam(label = "common", description = "The base directory within the share") + private String path; @UriParam(label = "security", description = "The username required to access the share", secret = true) private String username; @UriParam(label = "security", description = "The password to access the share", secret = true) private String password; @UriParam(label = "security", description = "The user domain") private String domain; - @UriParam(label = "consumer", description = "The path, within the share, to consume the files from") - private String path; @UriParam(label = "consumer", description = "The search pattern used to list the files (server side on SMB). This parameter can contain the name of a file (or multiple files, if wildcards are used) within this directory. When it is null all files are included." + " Two wild card characters are supported in the search pattern. The ? (question mark) character matches a single character. If a search pattern contains one or more ? characters, then exactly that number of characters is matched by the wildcards." diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SmbEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SmbEndpointBuilderFactory.java index c22385fe66c..5858a364dbd 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SmbEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SmbEndpointBuilderFactory.java @@ -154,6 +154,20 @@ public interface SmbEndpointBuilderFactory { doSetProperty("fileName", fileName); return this; } + /** + * The base directory within the share. + * + * The option is a: <code>java.lang.String</code> type. + * + * Group: common + * + * @param path the value to set + * @return the dsl builder + */ + default SmbEndpointConsumerBuilder path(String path) { + doSetProperty("path", path); + return this; + } /** * If true, the file will be deleted after it is processed successfully. * @@ -237,20 +251,6 @@ public interface SmbEndpointBuilderFactory { doSetProperty("noop", noop); return this; } - /** - * The path, within the share, to consume the files from. - * - * The option is a: <code>java.lang.String</code> type. - * - * Group: consumer - * - * @param path the value to set - * @return the dsl builder - */ - default SmbEndpointConsumerBuilder path(String path) { - doSetProperty("path", path); - return this; - } /** * Expression (such as File Language) used to dynamically set the * filename when moving it before processing. For example to move @@ -2630,6 +2630,20 @@ public interface SmbEndpointBuilderFactory { doSetProperty("fileName", fileName); return this; } + /** + * The base directory within the share. + * + * The option is a: <code>java.lang.String</code> type. + * + * Group: common + * + * @param path the value to set + * @return the dsl builder + */ + default SmbEndpointProducerBuilder path(String path) { + doSetProperty("path", path); + return this; + } /** * If provided, then Camel will write a checksum file when the original * file has been written. The checksum file will contain the checksum @@ -3406,6 +3420,20 @@ public interface SmbEndpointBuilderFactory { doSetProperty("fileName", fileName); return this; } + /** + * The base directory within the share. + * + * The option is a: <code>java.lang.String</code> type. + * + * Group: common + * + * @param path the value to set + * @return the dsl builder + */ + default SmbEndpointBuilder path(String path) { + doSetProperty("path", path); + return this; + } /** * The user domain. *