EnsLib.FTP.OutboundAdapter
class EnsLib.FTP.OutboundAdapter extends Ens.OutboundAdapter, EnsLib.FTP.Common, EnsLib.File.Common
Property Inventory
Method Inventory
Parameters
parameter SETTINGS = RegistryID:Basic:selector?context={Ens.ServiceRegistry.External.ContextSearch/Services?Protocols_1=FTP},Overwrite,SFTPAppendMode:SFTP;
These properties can be configured or set by the associated Business Operation
Properties
property Charset as %String [ InitialExpression = "Binary" ];
FTP Only - Use the named Character encoding to translate characters from the file.
A * prepended to any of the charset names will cause a binary FTP transfer with the resulting data then translated using the specified encoding.
Note that Binary should be chosen for binary files and other cases when special characters such as line terminators must be preserved.
Other settings may be useful when transferring text documents via FTP. Choices include:
Binary - binary transfer
Ascii - Ascii mode FTP transfer but no character encoding translation
Native - the default character encoding of the installed locale of the InterSystems IRIS server
latin1 - the ISO Latin1 8-bit encoding
ISO-8859-1 - the ISO Latin1 8-bit encoding
UTF-8 - the Unicode 8-bit encoding
Unicode - the Unicode 16-bit encoding (Little-Endian)
UnicodeBig - the Unicode 16-bit encoding (Big-Endian)
@<ttable> - <ttable> means a raw InterSystems character translation table name. A prefix of '@' means to use the named table.
A * prepended to any of the charset names will cause a binary FTP transfer with the resulting data then translated using the specified encoding.
Note that Binary should be chosen for binary files and other cases when special characters such as line terminators must be preserved.
Other settings may be useful when transferring text documents via FTP. Choices include:
Binary - binary transfer
Ascii - Ascii mode FTP transfer but no character encoding translation
Native - the default character encoding of the installed locale of the InterSystems IRIS server
latin1 - the ISO Latin1 8-bit encoding
ISO-8859-1 - the ISO Latin1 8-bit encoding
UTF-8 - the Unicode 8-bit encoding
Unicode - the Unicode 16-bit encoding (Little-Endian)
UnicodeBig - the Unicode 16-bit encoding (Big-Endian)
@<ttable> - <ttable> means a raw InterSystems character translation table name. A prefix of '@' means to use the named table.
Property methods: CharsetDisplayToLogical(), CharsetGet(), CharsetIsValid(), CharsetLogicalToDisplay(), CharsetLogicalToOdbc(), CharsetNormalize()
property FilePath as %String (MAXLEN = 1000) [ Required ];
Directory on the FTP server in which to effect FTP operations.
Property methods: FilePathDisplayToLogical(), FilePathGet(), FilePathIsValid(), FilePathLogicalToDisplay(), FilePathLogicalToOdbc(), FilePathNormalize()
property Overwrite as %Boolean [ InitialExpression = 1 ];
Overwrite output file if it exists instead of appending
Property methods: OverwriteDisplayToLogical(), OverwriteGet(), OverwriteIsValid(), OverwriteLogicalToDisplay(), OverwriteNormalize(), OverwriteSet()
property SFTPAppendMode as %String (VALUELIST = ",Client,Server") [ InitialExpression = "Client" ];
If the protocol is SFTP and Overwrite=false then you should configure SFTP Append Mode also.
If the SFTP server supports appending then you should select 'Server' append mode.
Some SFTP servers do not support appending. When connecting to such a server you should select 'Client' append mode.
Click here to test server side appendOpens in a new tab In 'Client' mode the FTP adapter will retrieve the remote file (if it exists) from the server, append the new data locally, and then put the combined data back to the SFTP server. There is a chance that some other process will remove the file from the server or modify the file on the server before the adapter puts the combined data back to the server. In this case the changes made by the other process could be lost. The logic the SFTP adapter uses for local appending is:
Click here to test server side appendOpens in a new tab In 'Client' mode the FTP adapter will retrieve the remote file (if it exists) from the server, append the new data locally, and then put the combined data back to the SFTP server. There is a chance that some other process will remove the file from the server or modify the file on the server before the adapter puts the combined data back to the server. In this case the changes made by the other process could be lost. The logic the SFTP adapter uses for local appending is:
- Check if the remote file exists
- If it exists it renames by adding .ToBeAppendedTo to the end of the name
- If it does not exist it looks for a prior name ending .ToBeAppendedTo
- If either of these existing files are found it is downloaded and the new data appended
- The combined file is put back and the prior file ending with .ToBeAppendedTo is removed
- If there is a network failure before putting the combined file on the server the adapter will use the .ToBeAppendedTo file on the next connection
Property methods: SFTPAppendModeDisplayToLogical(), SFTPAppendModeGet(), SFTPAppendModeIsValid(), SFTPAppendModeLogicalToDisplay(), SFTPAppendModeLogicalToOdbc(), SFTPAppendModeNormalize(), SFTPAppendModeSet()
Methods
method CreateFilename(pFilename As %String, pSpec As %String, pIsVMS As %Boolean, pDirectory As %String, pLocal As %Boolean) as %String
Passthrough method for the use of BatchStandardOperation classes. Non-trivial parallel version is defined in File adapter
Delete a named file from an FTP server.
Server,Username,Password, and FilePath are configured as Settings for this Adapter.
Returns a status value indicating the success of the FTP operation.
method GetStream(pFilename As %String, ByRef pStream As %Stream.Object = $$$NULLOREF) as %Status
Retrieve a named file from an FTP server and return it as a stream.
Server,Username,Password,FilePath and Transfer mode (Charset) are configured as Settings
for this Adapter. Returns a status value indicating the success of the FTP operation.
If the caller provides a stream, it must be the appropriate type of stream for the
transfer (Ascii, Binary). This method will create the stream if none is provided.
method NameList(Output pFileList As %ListOfDataTypes) as %Status
Get a list of files on an FTP server.
Server,Username,Password, and FilePath are configured as Settings for this Adapter.
The filenames are returned in a %ListOfDataTypes object.
Returns a status value indicating the success of the FTP operation.
method PutStream(pFilename As %String, pStream As %Stream.Object) as %Status
Store a Stream to an FTP server as a named file.
Server,Username,Password,FilePath and Transfer mode (Charset) are configured as Settings
for this Adapter. Returns a status value indicating the success of the FTP operation.
Rename a file on an FTP server.
Server,Username,Password, and FilePath are configured as Settings for this Adapter.
Returns a status value indicating the success of the FTP operation.
Inherited Members
Inherited Properties
- %CredentialsObj
- %SFTPPassphraseCredentialsObj
- %WarnedLatest
- %logTransfers
- BusinessHost
- CommandTranslateTable
- ConnectTimeout
- Credentials
- FTPPort
- FTPServer
- KeepaliveInterval
- Protocol
- RegistryID
- SFTPAuthenticationMethods
- SFTPFileAccessMode
- SFTPInteractiveDTL
- SFTPKexAlgorithm
- SFTPLocalCharset
- SFTPPassphraseCredentials
- SFTPPrivateKeyFile
- SFTPPublicKeyFile
- SFTPRemoteCharset
- SFTPSetFileAccessModeByClient
- SSLCheckServerIdentity
- SSLConfig
- SSLUseSessionResumption
- StayConnected
- TranslateTable
- UsePASV
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()
- AssignOneSetting()
- AuthenticateSSH()
- ClearAllAppData()
- ClearRuntimeAppData()
- ClearStaticAppData()
- Connect()
- ConnectSSH()
- CorrespondingSemaphoreExists()
- CreateTimestamp()
- DeepListClose()
- DeepListExecute()
- DeepListFetch()
- Disconnect()
- EnumerateSettingsClose()
- EnumerateSettingsExecute()
- EnumerateSettingsFetch()
- FileLikePattern()
- FileListClose()
- FileListExecute()
- FileListFetch()
- FileListSSHClose()
- FileListSSHExecute()
- FileListSSHFetch()
- GenerateSemaphoreFilename()
- GetSettings()
- LinkFileStream()
- NormalizeDirectory()
- OnKeepalive()
- SFTPPassphraseCredentialsSet()
- SemaphoreFileExists()
- System()
- TestConnection()
- TestConnectionSSH()
- fixPath()