222 lines
13 KiB
JSON
222 lines
13 KiB
JSON
|
|
{
|
||
|
|
"apiVersion": "camel.apache.org/v1",
|
||
|
|
"kind": "Kamelet",
|
||
|
|
"metadata": {
|
||
|
|
"name": "ftp-source",
|
||
|
|
"annotations": {
|
||
|
|
"camel.apache.org/kamelet.support.level": "Stable",
|
||
|
|
"camel.apache.org/catalog.version": "4.22.1",
|
||
|
|
"camel.apache.org/kamelet.icon": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAyMjEuMSAzMDAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDIyMS4xIDMwMDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4NCgkuc3Qwe2ZpbGw6IzgzMkVBQjt9DQoJLnN0MXtmaWxsOiNCQUJBQkE7fQ0KCS5zdDJ7ZmlsbDpub25lO30NCgkuc3Qze2ZpbGw6IzhEQzYzRjt9DQoJLnN0NHtmaWxsOiMwRjlCRDc7fQ0KCS5zdDV7ZmlsbDojRkZGRkZGO30NCgkuc3Q2e2ZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO2ZpbGw6I0ZGRkZGRjt9DQoJLnN0N3tmaWxsOiMxREExRjI7fQ0KCS5zdDh7ZmlsbDojM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MsNy40LTI4LjcsMTMuNS00NS42LDE3LjVjLTEuMS0xLjgtM
|
||
|
|
"camel.apache.org/provider": "Apache Software Foundation",
|
||
|
|
"camel.apache.org/kamelet.group": "FTP",
|
||
|
|
"camel.apache.org/kamelet.namespace": "File"
|
||
|
|
},
|
||
|
|
"labels": {
|
||
|
|
"camel.apache.org/kamelet.type": "source"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"spec": {
|
||
|
|
"definition": {
|
||
|
|
"title": "FTP Source",
|
||
|
|
"description": "Receive data from an FTP server.",
|
||
|
|
"required": [
|
||
|
|
"connectionHost",
|
||
|
|
"connectionPort",
|
||
|
|
"username",
|
||
|
|
"password",
|
||
|
|
"directoryName"
|
||
|
|
],
|
||
|
|
"type": "object",
|
||
|
|
"properties": {
|
||
|
|
"connectionHost": {
|
||
|
|
"title": "Connection Host",
|
||
|
|
"description": "The hostname of the FTP server.",
|
||
|
|
"type": "string"
|
||
|
|
},
|
||
|
|
"connectionPort": {
|
||
|
|
"title": "Connection Port",
|
||
|
|
"description": "The port of the FTP server.",
|
||
|
|
"type": "string",
|
||
|
|
"default": 21
|
||
|
|
},
|
||
|
|
"username": {
|
||
|
|
"title": "Username",
|
||
|
|
"description": "The username to access the FTP server.",
|
||
|
|
"type": "string",
|
||
|
|
"x-descriptors": [
|
||
|
|
"urn:camel:group:credentials"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"password": {
|
||
|
|
"title": "Password",
|
||
|
|
"description": "The password to access the FTP server.",
|
||
|
|
"type": "string",
|
||
|
|
"format": "password",
|
||
|
|
"x-descriptors": [
|
||
|
|
"urn:camel:group:credentials"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"directoryName": {
|
||
|
|
"title": "Directory Name",
|
||
|
|
"description": "The starting directory",
|
||
|
|
"type": "string"
|
||
|
|
},
|
||
|
|
"passiveMode": {
|
||
|
|
"title": "Passive Mode",
|
||
|
|
"description": "Specifes to use passive mode connection.",
|
||
|
|
"type": "boolean",
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"recursive": {
|
||
|
|
"title": "Recursive",
|
||
|
|
"description": "If a directory, look for files in all the sub-directories as well.",
|
||
|
|
"type": "boolean",
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"idempotent": {
|
||
|
|
"title": "Idempotency",
|
||
|
|
"description": "Skip already-processed files.",
|
||
|
|
"type": "boolean",
|
||
|
|
"default": true
|
||
|
|
},
|
||
|
|
"binary": {
|
||
|
|
"title": "Binary",
|
||
|
|
"description": "Specifies the file transfer mode, BINARY or ASCII. Default is ASCII (false).",
|
||
|
|
"type": "boolean",
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"autoCreate": {
|
||
|
|
"title": "Autocreate Missing Directories",
|
||
|
|
"description": "Automatically create starting directory.",
|
||
|
|
"type": "boolean",
|
||
|
|
"default": true
|
||
|
|
},
|
||
|
|
"delete": {
|
||
|
|
"title": "Delete",
|
||
|
|
"description": "If true, the file is deleted after it is processed successfully.",
|
||
|
|
"type": "boolean",
|
||
|
|
"default": false
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"dependencies": [
|
||
|
|
"camel:ftp",
|
||
|
|
"camel:core",
|
||
|
|
"camel:kamelet"
|
||
|
|
],
|
||
|
|
"template": {
|
||
|
|
"from": {
|
||
|
|
"uri": "ftp:{{username}}@{{connectionHost}}:{{connectionPort}}/{{directoryName}}",
|
||
|
|
"parameters": {
|
||
|
|
"password": "{{password}}",
|
||
|
|
"passiveMode": "{{passiveMode}}",
|
||
|
|
"recursive": "{{recursive}}",
|
||
|
|
"idempotent": "{{idempotent}}",
|
||
|
|
"binary": "{{binary}}",
|
||
|
|
"autoCreate": "{{autoCreate}}",
|
||
|
|
"delete": "{{delete}}"
|
||
|
|
},
|
||
|
|
"steps": [
|
||
|
|
{
|
||
|
|
"setHeader": {
|
||
|
|
"name": "file",
|
||
|
|
"simple": "${header[CamelFileName]}"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"setHeader": {
|
||
|
|
"name": "ce-file",
|
||
|
|
"simple": "${header[CamelFileName]}"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"convertBodyTo": {
|
||
|
|
"type": "java.io.InputStream"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"to": "kamelet:sink"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"propertiesSchema": {
|
||
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||
|
|
"type": "object",
|
||
|
|
"title": "FTP Source",
|
||
|
|
"description": "Receive data from an FTP server.",
|
||
|
|
"required": [
|
||
|
|
"connectionHost",
|
||
|
|
"connectionPort",
|
||
|
|
"username",
|
||
|
|
"password",
|
||
|
|
"directoryName"
|
||
|
|
],
|
||
|
|
"properties": {
|
||
|
|
"connectionHost": {
|
||
|
|
"type": "string",
|
||
|
|
"title": "Connection Host",
|
||
|
|
"description": "The hostname of the FTP server."
|
||
|
|
},
|
||
|
|
"connectionPort": {
|
||
|
|
"type": "string",
|
||
|
|
"title": "Connection Port",
|
||
|
|
"description": "The port of the FTP server.",
|
||
|
|
"default": 21
|
||
|
|
},
|
||
|
|
"username": {
|
||
|
|
"type": "string",
|
||
|
|
"title": "Username",
|
||
|
|
"description": "The username to access the FTP server."
|
||
|
|
},
|
||
|
|
"password": {
|
||
|
|
"type": "string",
|
||
|
|
"title": "Password",
|
||
|
|
"description": "The password to access the FTP server.",
|
||
|
|
"format": "password"
|
||
|
|
},
|
||
|
|
"directoryName": {
|
||
|
|
"type": "string",
|
||
|
|
"title": "Directory Name",
|
||
|
|
"description": "The starting directory"
|
||
|
|
},
|
||
|
|
"passiveMode": {
|
||
|
|
"type": "boolean",
|
||
|
|
"title": "Passive Mode",
|
||
|
|
"description": "Specifes to use passive mode connection.",
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"recursive": {
|
||
|
|
"type": "boolean",
|
||
|
|
"title": "Recursive",
|
||
|
|
"description": "If a directory, look for files in all the sub-directories as well.",
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"idempotent": {
|
||
|
|
"type": "boolean",
|
||
|
|
"title": "Idempotency",
|
||
|
|
"description": "Skip already-processed files.",
|
||
|
|
"default": true
|
||
|
|
},
|
||
|
|
"binary": {
|
||
|
|
"type": "boolean",
|
||
|
|
"title": "Binary",
|
||
|
|
"description": "Specifies the file transfer mode, BINARY or ASCII. Default is ASCII (false).",
|
||
|
|
"default": false
|
||
|
|
},
|
||
|
|
"autoCreate": {
|
||
|
|
"type": "boolean",
|
||
|
|
"title": "Autocreate Missing Directories",
|
||
|
|
"description": "Automatically create starting directory.",
|
||
|
|
"default": true
|
||
|
|
},
|
||
|
|
"delete": {
|
||
|
|
"type": "boolean",
|
||
|
|
"title": "Delete",
|
||
|
|
"description": "If true, the file is deleted after it is processed successfully.",
|
||
|
|
"default": false
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|