public class FileTransferSettings
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
COMPRESSION_DEFAULT
Default file compression.
|
static int |
COMPRESSION_NO
No compression.
|
static int |
COMPRESSION_YES
Enabled File compression.
|
static int |
FILE_EXISTS_APPEND
Append the transfered file to the existing destination file.
|
static int |
FILE_EXISTS_CANCEL
Cancel the transfer if the destination file already exists.
|
static int |
FILE_EXISTS_OVERWRITE
Overwrite an existing file.
|
Modifier | Constructor and Description |
---|---|
protected |
FileTransferSettings(com.uc4.util.XMLDocument doc) |
Modifier and Type | Method and Description |
---|---|
int |
getCompression()
Returns an integer containing compression setting.
|
UC4ObjectName |
getDestinationCodeTable() |
java.lang.String |
getDestinationFile() |
java.lang.String |
getDestinationFileAttributes() |
UC4HostName |
getDestinationHost() |
UC4ObjectName |
getDestinationLogin() |
int |
getFileExistsAction()
Returns an integer which indicates the behavior in case of an existing destination file.
|
int |
getMaxParallelTransfers() |
UC4ObjectName |
getSourceCodeTable() |
java.lang.String |
getSourceFile() |
java.lang.String |
getSourceFileAttributes() |
UC4HostName |
getSourceHost() |
UC4ObjectName |
getSourceLogin() |
boolean |
isAbortAtFirstError()
Returns
false if a wild card file transfer should continue in case of errors. |
boolean |
isEraseSource() |
boolean |
isFormatBinary() |
boolean |
isFormatText() |
boolean |
isIncludeSubDirectories() |
boolean |
isKeepFileAttributes()
Returns the setting to keep file attributes.
|
boolean |
isTransferFolderStructure() |
boolean |
isWildcards()
Returns
true if the wildcard characters are used in this FileTransfer object. |
void |
setAbortAtFirstError(boolean abortAtFirstError)
Changes the setting to cancel or continue a wildcard filetransfer in case of errors.
|
void |
setCompression(int compress)
Sets the compression level.
|
void |
setDestinationCodeTable(UC4ObjectName destinationCodeTable)
Sets the CodeTable for all destination files.
|
void |
setDestinationFile(java.lang.String destinationFile)
Destination of the FileTransfer
Specify where the file should be stored, thereby indicating the
directory, folder or ID.
|
void |
setDestinationFileAttributes(java.lang.String destinationFileAttributes)
Sets additional file attribtues (optional) of the source file.
|
void |
setDestinationHost(UC4HostName destinationHost)
Sets the destination host.
|
void |
setDestinationLogin(UC4ObjectName destinationLogin)
Sets the name fo the Login Object which should be used by source Agent.
|
void |
setEraseSource(boolean eraseSource)
Set this flag to
true to have the file deleted after the transfer. |
void |
setFileExistsAction(int fileExistsAction)
Sets the behavior in case of an existing destination file.
|
void |
setFormatBinary()
Sets the file format to binary.
|
void |
setFormatText()
Sets the file format to text.
|
void |
setIncludeSubDirectories(boolean includeSubDirectories)
Set this flag to include files in subdirectories of a FileTransfer with wildcard characters.
|
void |
setKeepFileAttributes(boolean keepFileAttributes)
Changes the setting to keep the attributes of the source file.
|
void |
setMaxParallelTransfers(int maxParallelTransfers)
Sets the number of files to be transferred parallel to
a FileTransfer with wildcard characters.
|
void |
setSourceCodeTable(UC4ObjectName sourceCodeTable)
Sets the CodeTable for all source files.
|
void |
setSourceFile(java.lang.String sourceFile)
Sets the name of the source file(s), thereby using the directory, folder or ID
FileTransfer with wildcard characters.
|
void |
setSourceFileAttributes(java.lang.String sourceFileAttributes)
Sets additional file attribtues (optional) of the source file.
|
void |
setSourceHost(UC4HostName sourceHost)
Sets the source host.
|
void |
setSourceLogin(UC4ObjectName sourceLogin)
Sets the name fo the Login Object which should be used by source Agent.
|
void |
setTransferFolderStructure(boolean transferCompleteFolderStructure)
Set this flag to transfer the complete folder structure with a wildcard transfere.
|
void |
setWildcards(boolean wildcards)
Set this flag to true to execute FileTransfers with wildcards.
|
protected void |
store(com.uc4.util.XMLDocument doc,
org.w3c.dom.Element request) |
public static final int COMPRESSION_DEFAULT
public static final int COMPRESSION_NO
public static final int COMPRESSION_YES
public static final int FILE_EXISTS_OVERWRITE
public static final int FILE_EXISTS_CANCEL
public static final int FILE_EXISTS_APPEND
protected FileTransferSettings(com.uc4.util.XMLDocument doc)
protected void store(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request)
public int getFileExistsAction()
public void setFileExistsAction(int fileExistsAction)
fileExistsAction
can have the following values:
fileExistsAction
- File exist actionpublic boolean isKeepFileAttributes()
public boolean isAbortAtFirstError()
false
if a wild card file transfer should continue in case of errors.public void setAbortAtFirstError(boolean abortAtFirstError)
abortAtFirstError
- true if a wildcard filetransfer should abort in case of error.
If set to false the other files are transfered even one of them could not be transfered.public void setKeepFileAttributes(boolean keepFileAttributes)
keepFileAttributes
- true if the attributes should be keptpublic boolean isFormatText()
public boolean isFormatBinary()
public void setFormatText()
public void setFormatBinary()
public boolean isEraseSource()
public void setEraseSource(boolean eraseSource)
true
to have the file deleted after the transfer.eraseSource
- True if source files should be deleted after transferpublic boolean isIncludeSubDirectories()
public void setIncludeSubDirectories(boolean includeSubDirectories)
includeSubDirectories
- True if subdirectories should be includedpublic int getMaxParallelTransfers()
public void setMaxParallelTransfers(int maxParallelTransfers)
maxParallelTransfers
- Number of parallel transferspublic boolean isWildcards()
true
if the wildcard characters are used in this FileTransfer object.public void setWildcards(boolean wildcards)
wildcards
- Use wildcardspublic java.lang.String getDestinationFileAttributes()
public void setDestinationFileAttributes(java.lang.String destinationFileAttributes)
destinationFileAttributes
- File attributes of the destination file (optional)public java.lang.String getSourceFileAttributes()
public void setSourceFileAttributes(java.lang.String sourceFileAttributes)
sourceFileAttributes
- File attributes of the source file (optional)public java.lang.String getSourceFile()
public void setSourceFile(java.lang.String sourceFile)
sourceFile
- Name of the source file(s)public java.lang.String getDestinationFile()
public void setDestinationFile(java.lang.String destinationFile)
The file name specification must include the wildcard character "*" once. The name for the file to be transferred is structured as shown below:
Source file specification with one wildcard character: In the file name, this wildcard character is replaced by the retrieved characters.Examples:
Source specification: UC4*.TXT File corresponding to the filter: UC4_LOGG_01.TXT Destination specification: UC4*.TXT Name of the destination file: UC4_LOGG_01.TXT Source specification: UC4*.TXT File corresponding to the filter: UC4_LOGG_01.TXT Destination specification: TEST*23.TXT Name of the destination file: TEST_LOGG_0123.TXTSource file specification with several wildcard characters: The wildcard character in the file name is also replaced by the retrieved characters. As the source specification includes several wildcard characters. The FileTransfer uses the string that starts with the first wildcard and ends with the last wildcard character.
Example:
Source specification: ?C_SERVER_*_01.TXT File corresponding to the filter: UC_SERVER_LOGG_01.TXT Destination specification: TEST_*_A.TXT Name of the destination file: TEST_UC_SERVER_LOGG_A.TXT
destinationFile
- Name of the destination filepublic int getCompression()
Value | Description |
---|---|
-1 | Default |
0 | None |
1 | Normal |
2 | Strong |
public void setCompression(int compress)
Value | Description |
---|---|
-1 | Default |
0 | No |
1 | Yes |
compress
- Compression levelpublic UC4ObjectName getSourceCodeTable()
public void setSourceCodeTable(UC4ObjectName sourceCodeTable)
sourceCodeTable
- Name of the CodeTable Objectpublic UC4ObjectName getDestinationCodeTable()
public void setDestinationCodeTable(UC4ObjectName destinationCodeTable)
destinationCodeTable
- Name of the CodeTable Objectpublic UC4HostName getSourceHost()
public void setSourceHost(UC4HostName sourceHost)
sourceHost
- Name of the source Agentpublic UC4HostName getDestinationHost()
public void setDestinationHost(UC4HostName destinationHost)
destinationHost
- Name of the Destination Agentpublic UC4ObjectName getSourceLogin()
public void setSourceLogin(UC4ObjectName sourceLogin)
sourceLogin
- Name of the Login Objectspublic UC4ObjectName getDestinationLogin()
public void setDestinationLogin(UC4ObjectName destinationLogin)
destinationLogin
- Name of the Login Objectspublic boolean isTransferFolderStructure()
True
if the complete folder structure should be transfered, false otherwisepublic void setTransferFolderStructure(boolean transferCompleteFolderStructure)
transferCompleteFolderStructure
- True if complete folder structure should be transfered