The following list provides an explanation of various nodes in the BatchSFTP OTD, including primary functions:
BatchSFTP: Represents the OTD’s root node.
The BatchSFTP sub-nodes under the Configuration node correspond to the BatchSFTP Adapter’s Connectivity Map and Environment configuration parameters.
The BatchSFTP OTD’s Client node includes the following methods:
cd(String dir): changes the remote current directory to the specified path.
connect(): connects to the remote SSH server and does authentication as configured.
delete(): deletes remote files specified by configuration parameters RemoteDirectory and RemoteFile.
delete(String file): deletes remote files specified by file.
disconnect(): disconnects the client from the remote SSH server.
get(): copies data from a remote SSH server (specified by configuration parameters RemoteDirectory and RemoteFile) to the local machine. Depending on the current status of the configuration, the remote data can be stored into the payload (in memory buffer) or a local file specified by configuration parameters LocalDirectory and LocalFile.
Note that the remote could be a folder. In this case, if the configuration parameter Recursive is "Yes", the folder hierarchy is copied to the local destination.
getEntry(int index): gets the index entry in the current entry list.
getEntryCount(): returns the number of entries in the current entry list.
getPayload(): returns the payload.
If you call getPayload() when using the BatchSFTP OTD, and the Local Directory and Local Filename are set, getPayload()returns null, even if a file has been retrieved.
getResolvedLocalDirectory(): returns the resolved local directory name.
getResolvedLocalFile(): returns the resolved local file name.
getResolvedRemoteDirectory(): returns the resolved remote directory name.
getResolvedRemoteFile(): returns the resolved remote file name.
hasEntry(): returns whether the current entry list has entries.
isConnected(): determines if the Java Integration Suite is connected to the SSH server.
lcd(String dir): changes the local current directory.
listDir(): lists all the entries under remote current directory.
lpwd(): returns the local current path.
mkdir(): creates a directory on the remote. The name of the directory is specified in the properties.
mkdir(String dir): creates a directory on the remote using the name specified in the configuration parameters, Remote Directory and Remote File.
nextEntry(): returns the next entry in the current entry list.
put(): copies local data (specified by configuration parameters LocalDirectory and LocalFile) to the remote SSH server (specified by configuration parameters RemoteDirectory and RemoteFile). Depending on the current status of the configuration, the local data can be from either a payload or local file.
Note that the local could be a folder. In this case, if the configuration parameter Recursive is "Yes", the folder hierarchy is copied to the remote destination.
pwd(): returns the remote current path.
rename(String newPath): renames the file or directory specified by the old name (first argument), to new name (second argument).
rename(String oldPath, String newPath): renames the file or directory specified by configuration parameters, Remote Directory and Remote File, to new name (argument).
reset(): resets the internal life cycle methods, such as discard payload buffer.
resetEntries(): resets the current entry list so that next call to nextEntry() will return the first entry in the list.
resolveLocalAsDestination(): resolves the local directory name and local file name if they are patterns (used to generate real directory and file name for data transfer destination), upon the success of the resolution.
resolveLocalAsSource(): resolves the local directory and file if they are regular expressions (filters for data transfer source); upon the success of the resolution.
resolveRemoteAsDestination(): resolves the remote directory name and remote file name if they are patterns (used to generate real directory and file name for data transfer destination), upon the success of the resolution.
resolveRemoteAsSource(): resolves the remote directory and file if they are regular expressions (filters for data transfer source); upon the success of the resolution.
setpayload(byte[] newPayload): sets the payload.
setResolvedLocalDirectory(String s): sets the current resolved local directory name.
setResolvedLocalFile(String s): sets the current local file name to s, should not be invoked directly from user Collaboration.
setResolvedRemoteDirectory(String s): sets the current resolved remote directory name.
setResolvedRemoteFile(String s): sets the current resolved remote file name.
See the Batch Adapter Javadoc for a list of all exposed SFTPClient methods.