Class FileTransferSettings


  • public class FileTransferSettings
    extends java.lang.Object
    This class contains settings for the FileTransfer object ("FileTransfer")-Tab.
    • Field Detail

      • COMPRESSION_DEFAULT

        public static final int COMPRESSION_DEFAULT
        Default file compression.
        See Also:
        Constant Field Values
      • COMPRESSION_YES

        public static final int COMPRESSION_YES
        Enabled File compression.
        See Also:
        Constant Field Values
      • FILE_EXISTS_OVERWRITE

        public static final int FILE_EXISTS_OVERWRITE
        Overwrite an existing file.
        See Also:
        Constant Field Values
      • FILE_EXISTS_CANCEL

        public static final int FILE_EXISTS_CANCEL
        Cancel the transfer if the destination file already exists.
        See Also:
        Constant Field Values
      • FILE_EXISTS_APPEND

        public static final int FILE_EXISTS_APPEND
        Append the transfered file to the existing destination file.
        See Also:
        Constant Field Values
    • Constructor Detail

      • FileTransferSettings

        protected FileTransferSettings​(com.uc4.util.XMLDocument doc)
    • Method Detail

      • store

        protected void store​(com.uc4.util.XMLDocument doc,
                             org.w3c.dom.Element request)
      • getFileExistsAction

        public int getFileExistsAction()
        Returns an integer which indicates the behavior in case of an existing destination file. Possible return values are the constants defined in this class:
        • FILE_EXISTS_OVERWRITE
        • FILE_EXISTS_CANCEL
        • FILE_EXISTS_APPEND
        Returns:
        File exist action
      • setFileExistsAction

        public void setFileExistsAction​(int fileExistsAction)
        Sets the behavior in case of an existing destination file. The parameter fileExistsAction can have the following values:
        • FILE_EXISTS_OVERWRITE
        • FILE_EXISTS_CANCEL
        • FILE_EXISTS_APPEND
        Parameters:
        fileExistsAction - File exist action
      • isKeepFileAttributes

        public boolean isKeepFileAttributes()
        Returns the setting to keep file attributes.
        Returns:
        true if the source file attributes should be kept if possible
      • isAbortAtFirstError

        public boolean isAbortAtFirstError()
        Returns false if a wild card file transfer should continue in case of errors.
        Returns:
        true if a wildcard file transfer should abort on the first error.
      • setAbortAtFirstError

        public void setAbortAtFirstError​(boolean abortAtFirstError)
        Changes the setting to cancel or continue a wildcard filetransfer in case of errors.
        Parameters:
        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.
      • setKeepFileAttributes

        public void setKeepFileAttributes​(boolean keepFileAttributes)
        Changes the setting to keep the attributes of the source file.
        Parameters:
        keepFileAttributes - true if the attributes should be kept
      • isFormatText

        public boolean isFormatText()
        Returns:
        True if the files are transported as text files, false otherwise
      • isFormatBinary

        public boolean isFormatBinary()
        Returns:
        True if the files are transported as binary files
      • setFormatText

        public void setFormatText()
        Sets the file format to text.
      • setFormatBinary

        public void setFormatBinary()
        Sets the file format to binary.
      • isEraseSource

        public boolean isEraseSource()
        Returns:
        true if source files are deleted after transfer
      • setEraseSource

        public void setEraseSource​(boolean eraseSource)
        Set this flag to true to have the file deleted after the transfer.
        Parameters:
        eraseSource - True if source files should be deleted after transfer
      • isIncludeSubDirectories

        public boolean isIncludeSubDirectories()
        Returns:
        True if subdirectories should be included, false otherwise
      • setIncludeSubDirectories

        public void setIncludeSubDirectories​(boolean includeSubDirectories)
        Set this flag to include files in subdirectories of a FileTransfer with wildcard characters. Only available if both platforms support this function and the option "Use wildcards" is selected.
        Parameters:
        includeSubDirectories - True if subdirectories should be included
      • getMaxParallelTransfers

        public int getMaxParallelTransfers()
        Returns:
        The number of files to be transferred parallel
      • setMaxParallelTransfers

        public void setMaxParallelTransfers​(int maxParallelTransfers)
        Sets the number of files to be transferred parallel to a FileTransfer with wildcard characters. The higher the number, the bigger the load on the participating computers. Only available if "Use wildcards" is selected.
        Parameters:
        maxParallelTransfers - Number of parallel transfers
      • isWildcards

        public boolean isWildcards()
        Returns true if the wildcard characters are used in this FileTransfer object.
        Returns:
        Use wildcards
      • setWildcards

        public void setWildcards​(boolean wildcards)
        Set this flag to true to execute FileTransfers with wildcards.
        Parameters:
        wildcards - Use wildcards
      • getDestinationFileAttributes

        public java.lang.String getDestinationFileAttributes()
        Returns:
        File attributes of the destination file (optional)
      • setDestinationFileAttributes

        public void setDestinationFileAttributes​(java.lang.String destinationFileAttributes)
        Sets additional file attribtues (optional) of the source file.
        Parameters:
        destinationFileAttributes - File attributes of the destination file (optional)
      • getSourceFileAttributes

        public java.lang.String getSourceFileAttributes()
        Returns:
        File attributes of the source file (optional)
      • setSourceFileAttributes

        public void setSourceFileAttributes​(java.lang.String sourceFileAttributes)
        Sets additional file attribtues (optional) of the source file.
        Parameters:
        sourceFileAttributes - File attributes of the source file (optional)
      • getSourceFile

        public java.lang.String getSourceFile()
        Returns:
        Name of the source file(s)
      • setSourceFile

        public 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. The wildcard characters "*" and "?" may be used to transfer several files. "*" stands for any characters and "?" for exactly one. Fixed parts of the file name and wildcard characters form a filter which may be used to determine the files that are to be transferred. In OS/390, the wildcard character "*" must only be used once.
        Parameters:
        sourceFile - Name of the source file(s)
      • getDestinationFile

        public java.lang.String getDestinationFile()
        Returns:
        Destination file name
      • setDestinationFile

        public void setDestinationFile​(java.lang.String destinationFile)
        Destination of the FileTransfer Specify where the file should be stored, thereby indicating the directory, folder or ID. A file name is also to be specified. It may so be renamed.
        FileTransfer with wildcard characters

        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.TXT
         
         
        Source 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
         
        Parameters:
        destinationFile - Name of the destination file
      • getCompression

        public int getCompression()
        Returns an integer containing compression setting.
        ValueDescription
        -1Default
        0None
        1Normal
        2Strong
        Returns:
        Compression level
      • setCompression

        public void setCompression​(int compress)
        Sets the compression level.
        ValueDescription
        -1Default
        0No
        1Yes
        Parameters:
        compress - Compression level
      • getSourceCodeTable

        public UC4ObjectName getSourceCodeTable()
        Returns:
        CodeTable for all source files
      • setSourceCodeTable

        public void setSourceCodeTable​(UC4ObjectName sourceCodeTable)
        Sets the CodeTable for all source files.
        Parameters:
        sourceCodeTable - Name of the CodeTable Object
      • getDestinationCodeTable

        public UC4ObjectName getDestinationCodeTable()
        Returns:
        CodeTable for all destination files
      • setDestinationCodeTable

        public void setDestinationCodeTable​(UC4ObjectName destinationCodeTable)
        Sets the CodeTable for all destination files.
        Parameters:
        destinationCodeTable - Name of the CodeTable Object
      • getSourceHost

        public UC4HostName getSourceHost()
        Returns:
        Name of the Source Agent
      • setSourceHost

        public void setSourceHost​(UC4HostName sourceHost)
        Sets the source host.
        Parameters:
        sourceHost - Name of the source Agent
      • getDestinationHost

        public UC4HostName getDestinationHost()
        Returns:
        Name of the Destination Agent
      • setDestinationHost

        public void setDestinationHost​(UC4HostName destinationHost)
        Sets the destination host.
        Parameters:
        destinationHost - Name of the Destination Agent
      • getSourceLogin

        public UC4ObjectName getSourceLogin()
        Returns:
        Name of the Login Object used by the source Agent.
      • setSourceLogin

        public void setSourceLogin​(UC4ObjectName sourceLogin)
        Sets the name fo the Login Object which should be used by source Agent.
        Parameters:
        sourceLogin - Name of the Login Objects
      • getDestinationLogin

        public UC4ObjectName getDestinationLogin()
        Returns:
        Name of the Login Object used by the destination Agent
      • setDestinationLogin

        public void setDestinationLogin​(UC4ObjectName destinationLogin)
        Sets the name fo the Login Object which should be used by source Agent.
        Parameters:
        destinationLogin - Name of the Login Objects
      • isTransferFolderStructure

        public boolean isTransferFolderStructure()
        Returns:
        True if the complete folder structure should be transfered, false otherwise
      • setTransferFolderStructure

        public void setTransferFolderStructure​(boolean transferCompleteFolderStructure)
        Set this flag to transfer the complete folder structure with a wildcard transfere. Only available if both platforms support this function and the options "Use wildcards" and "Include sub-directories" are selected.
        Parameters:
        transferCompleteFolderStructure - True if complete folder structure should be transfered