diff --git a/datamover/source/java/ch/systemsx/cisd/datamover/filesystem/intf/AbstractFileStore.java b/datamover/source/java/ch/systemsx/cisd/datamover/filesystem/intf/AbstractFileStore.java index 648f8ba23cdb247751e2a4bdf39e68324d315503..cff12010527c391dcc2214f10fe50b30b4a65a20 100644 --- a/datamover/source/java/ch/systemsx/cisd/datamover/filesystem/intf/AbstractFileStore.java +++ b/datamover/source/java/ch/systemsx/cisd/datamover/filesystem/intf/AbstractFileStore.java @@ -47,15 +47,18 @@ public abstract class AbstractFileStore implements IFileStore protected final IFileSysOperationsFactory factory; + protected final boolean skipAccessibilityTest; + protected AbstractFileStore( final HostAwareFileWithHighwaterMark hostAwareFileWithHighwaterMark, final String kind, - final IFileSysOperationsFactory factory) + final IFileSysOperationsFactory factory, final boolean skipAccessibilityTest) { assert hostAwareFileWithHighwaterMark != null; assert kind != null; this.hostAwareFileWithHighwaterMark = hostAwareFileWithHighwaterMark; this.kind = kind; this.factory = factory; + this.skipAccessibilityTest = skipAccessibilityTest; } private final String getCanonicalPath(final File file) @@ -134,18 +137,22 @@ public abstract class AbstractFileStore implements IFileStore public void check() throws ConfigurationFailureException { + if (skipAccessibilityTest) + { + return; + } if (srcHostOrNull != null) { - String executable = factory.tryGetIncomingRsyncExecutable(); - FileUtilities.checkPathCopier(copier, srcHostOrNull, executable, + final String executableOrNull = factory.tryGetIncomingRsyncExecutable(); + FileUtilities.checkPathCopier(copier, srcHostOrNull, executableOrNull, tryGetRsyncModuleName(), DatamoverConstants.RSYNC_PASSWORD_FILE_INCOMING, DatamoverConstants.TIMEOUT_REMOTE_CONNECTION_MILLIS); } if (destHostOrNull != null) { - String executable = factory.tryGetOutgoingRsyncExecutable(); - FileUtilities.checkPathCopier(copier, destHostOrNull, executable, + final String executableOrNull = factory.tryGetOutgoingRsyncExecutable(); + FileUtilities.checkPathCopier(copier, destHostOrNull, executableOrNull, destinationStore.tryGetRsyncModuleName(), DatamoverConstants.RSYNC_PASSWORD_FILE_OUTGOING, DatamoverConstants.TIMEOUT_REMOTE_CONNECTION_MILLIS); diff --git a/datamover/source/java/ch/systemsx/cisd/datamover/filesystem/store/FileStoreLocal.java b/datamover/source/java/ch/systemsx/cisd/datamover/filesystem/store/FileStoreLocal.java index cf94813506535d575331911a236be79f0c8f63c4..fe97a6a3051c558156dd0450c92842115e71630e 100644 --- a/datamover/source/java/ch/systemsx/cisd/datamover/filesystem/store/FileStoreLocal.java +++ b/datamover/source/java/ch/systemsx/cisd/datamover/filesystem/store/FileStoreLocal.java @@ -60,16 +60,13 @@ public class FileStoreLocal extends AbstractFileStore implements IExtendedFileSt private final HighwaterMarkWatcher highwaterMarkWatcher; - private final boolean skipAccessibilityTest; - private final LastModificationChecker lastModificationChecker; public FileStoreLocal(final HostAwareFileWithHighwaterMark hostAwareFileWithHighwaterMark, final String description, final IFileSysOperationsFactory factory, final boolean skipAccessibilityTest) { - super(hostAwareFileWithHighwaterMark, description, factory); - this.skipAccessibilityTest = skipAccessibilityTest; + super(hostAwareFileWithHighwaterMark, description, factory, skipAccessibilityTest); this.remover = factory.getRemover(); this.mover = factory.getMover(); this.highwaterMarkWatcher = createHighwaterMarkWatcher(hostAwareFileWithHighwaterMark); diff --git a/datamover/source/java/ch/systemsx/cisd/datamover/filesystem/store/FileStoreRemote.java b/datamover/source/java/ch/systemsx/cisd/datamover/filesystem/store/FileStoreRemote.java index 0612a721a71789289d06f6846f9ff26f3cb9afab..65ef2d8008651ae28644cb275b022835c11dfbb1 100644 --- a/datamover/source/java/ch/systemsx/cisd/datamover/filesystem/store/FileStoreRemote.java +++ b/datamover/source/java/ch/systemsx/cisd/datamover/filesystem/store/FileStoreRemote.java @@ -112,8 +112,6 @@ public class FileStoreRemote extends AbstractFileStore private final HighwaterMarkWatcher highwaterMarkWatcher; - private final boolean skipAccessibilityTest; - private String remoteLastchangedExecutableOrNull; private String remoteFindExecutableOrNull; @@ -140,9 +138,8 @@ public class FileStoreRemote extends AbstractFileStore final IFileSysOperationsFactory factory, final boolean skipAccessibilityTest, final String remoteFindExecutableOrNull, final String remoteLastchangedExecutableOrNull) { - super(hostAwareFileWithHighwaterMark, kind, factory); + super(hostAwareFileWithHighwaterMark, kind, factory, skipAccessibilityTest); assert hostAwareFileWithHighwaterMark.tryGetHost() != null : "Unspecified host"; - this.skipAccessibilityTest = skipAccessibilityTest; this.sshCommandExecutor = new SshCommandExecutor(sshCommandBuilder, hostAwareFileWithHighwaterMark.tryGetHost()); diff --git a/datamover/source/java/ch/systemsx/cisd/datamover/filesystem/store/FileStoreRemoteMounted.java b/datamover/source/java/ch/systemsx/cisd/datamover/filesystem/store/FileStoreRemoteMounted.java index 47ad94ac88f50257d516d1f5ca2d52abae7754d0..bb859d27e49c104f58f69eb518b05ed0fca5f5aa 100644 --- a/datamover/source/java/ch/systemsx/cisd/datamover/filesystem/store/FileStoreRemoteMounted.java +++ b/datamover/source/java/ch/systemsx/cisd/datamover/filesystem/store/FileStoreRemoteMounted.java @@ -57,7 +57,7 @@ public final class FileStoreRemoteMounted extends AbstractFileStore final String description, final IFileSysOperationsFactory factory, final boolean skipAccessibilityTest, final long lastChangedTimeoutMillis) { - super(file, description, factory); + super(file, description, factory, skipAccessibilityTest); this.localImpl = new FileStoreLocal(file, description, factory, skipAccessibilityTest); this.localImplMonitored = MonitoringProxy.create(IFileStore.class, localImpl).timing(