public interface UploadFileHandler
| Modifier and Type | Field and Description |
|---|---|
static String |
WORK_FILE_DIRECTORY
constant for workFileDirectory, needed by method
getUploadFileName(String, String) |
| Modifier and Type | Method and Description |
|---|---|
String |
doExceptionHandling(com.jcraft.jsch.ChannelSftp channel,
String uploadFileName,
String targetFile,
boolean isUploadSuccessful)
do specialized ExceptionHandling depending on uploading strategy.
|
void |
doRenameToTargetFile(com.jcraft.jsch.ChannelSftp channel,
String uploadFileName,
String targetFileName)
rename uploadFileName to targetFileName, if uploadFile is a temporary file.
|
String |
getUploadFileName(String path,
String fileName)
return the temporary or not temporary uploadFileName
|
static final String WORK_FILE_DIRECTORY
getUploadFileName(String, String)String getUploadFileName(String path, String fileName)
path - PathfileName - target FileNamevoid doRenameToTargetFile(com.jcraft.jsch.ChannelSftp channel,
String uploadFileName,
String targetFileName)
throws com.jcraft.jsch.SftpException
channel - ChannelSftpuploadFileName - temporary fileNametargetFileName - final target File Namecom.jcraft.jsch.SftpException - if renaming failsString doExceptionHandling(com.jcraft.jsch.ChannelSftp channel, String uploadFileName, String targetFile, boolean isUploadSuccessful)
channel - ChannelSftpuploadFileName - (temporary) fileNametargetFile - target FilenameisUploadSuccessful - true if upLoad of temporary file was successful and only the renaming to final target file failsCopyright © 2017–2020. All rights reserved.