INT-1614 'auto-delete-remote-files-on-sync' is now 'delete-remote-files'

This commit is contained in:
Mark Fisher
2010-11-21 18:05:18 -05:00
parent 21b2a232ea
commit f448ec93b2
11 changed files with 27 additions and 20 deletions

View File

@@ -68,10 +68,10 @@ public abstract class AbstractInboundFileSynchronizer<F> implements InboundFileS
private volatile FileListFilter<F> filter;
/**
* Should we <emphasis>delete</emphasis> the <b>source</b> file? For an FTP
* server, for example, this would delete the original FTPFile instance.
* Should we <emphasis>delete</emphasis> the remote <b>source</b> files
* after copying to the local directory? By default this is false.
*/
protected boolean shouldDeleteSourceFile;
private boolean deleteRemoteFiles;
/**
@@ -94,8 +94,8 @@ public abstract class AbstractInboundFileSynchronizer<F> implements InboundFileS
this.filter = filter;
}
public void setShouldDeleteSourceFile(boolean shouldDeleteSourceFile) {
this.shouldDeleteSourceFile = shouldDeleteSourceFile;
public void setDeleteRemoteFiles(boolean deleteRemoteFiles) {
this.deleteRemoteFiles = deleteRemoteFiles;
}
public final void afterPropertiesSet() {
@@ -182,7 +182,7 @@ public abstract class AbstractInboundFileSynchronizer<F> implements InboundFileS
}
}
if (tempFile.renameTo(localFile)) {
if (this.shouldDeleteSourceFile) {
if (this.deleteRemoteFiles) {
session.rm(remoteFilePath);
if (logger.isDebugEnabled()) {
logger.debug("deleted " + remoteFilePath);