Clean up some JavaDocs; remove deprecated API
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2020 the original author or authors.
|
||||
* Copyright 2014-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -109,32 +109,6 @@ public final class Sftp {
|
||||
return outboundAdapter(new SftpRemoteFileTemplate(sessionFactory), fileExistsMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* An {@link SftpMessageHandlerSpec} factory for an outbound channel adapter spec.
|
||||
* @param remoteFileTemplate the remote file template.
|
||||
* @return the spec.
|
||||
* @deprecated in favor of {@link #outboundAdapter(SftpRemoteFileTemplate)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static SftpMessageHandlerSpec outboundAdapter(RemoteFileTemplate<ChannelSftp.LsEntry> remoteFileTemplate) {
|
||||
return new SftpMessageHandlerSpec(remoteFileTemplate);
|
||||
}
|
||||
|
||||
/**
|
||||
* An {@link SftpMessageHandlerSpec} factory for an outbound channel adapter spec.
|
||||
* @param remoteFileTemplate the remote file template.
|
||||
* @param fileExistsMode the file exists mode.
|
||||
* @return the spec.
|
||||
* @deprecated in favor of
|
||||
* {@link #outboundAdapter(SftpRemoteFileTemplate,FileExistsMode)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static SftpMessageHandlerSpec outboundAdapter(RemoteFileTemplate<ChannelSftp.LsEntry> remoteFileTemplate,
|
||||
FileExistsMode fileExistsMode) {
|
||||
|
||||
return new SftpMessageHandlerSpec(remoteFileTemplate, fileExistsMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* An {@link SftpMessageHandlerSpec} factory for an outbound channel adapter spec.
|
||||
* @param sftpRemoteFileTemplate the remote file template.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2020 the original author or authors.
|
||||
* Copyright 2014-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -17,7 +17,6 @@
|
||||
package org.springframework.integration.sftp.dsl;
|
||||
|
||||
import org.springframework.integration.file.dsl.FileTransferringMessageHandlerSpec;
|
||||
import org.springframework.integration.file.remote.RemoteFileTemplate;
|
||||
import org.springframework.integration.file.remote.session.SessionFactory;
|
||||
import org.springframework.integration.file.support.FileExistsMode;
|
||||
import org.springframework.integration.sftp.outbound.SftpMessageHandler;
|
||||
@@ -39,26 +38,11 @@ public class SftpMessageHandlerSpec
|
||||
this.target = new SftpMessageHandler(sessionFactory);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
protected SftpMessageHandlerSpec(RemoteFileTemplate<ChannelSftp.LsEntry> remoteFileTemplate) {
|
||||
this.target = new SftpMessageHandler(remoteFileTemplate.getSessionFactory());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
protected SftpMessageHandlerSpec(RemoteFileTemplate<ChannelSftp.LsEntry> remoteFileTemplate,
|
||||
FileExistsMode fileExistsMode) {
|
||||
|
||||
this.target =
|
||||
new SftpMessageHandler(new SftpRemoteFileTemplate(remoteFileTemplate.getSessionFactory()),
|
||||
fileExistsMode);
|
||||
}
|
||||
|
||||
protected SftpMessageHandlerSpec(SftpRemoteFileTemplate sftpRemoteFileTemplate) {
|
||||
this.target = new SftpMessageHandler(sftpRemoteFileTemplate);
|
||||
}
|
||||
|
||||
protected SftpMessageHandlerSpec(SftpRemoteFileTemplate sftpRemoteFileTemplate, FileExistsMode fileExistsMode) {
|
||||
|
||||
this.target = new SftpMessageHandler(sftpRemoteFileTemplate, fileExistsMode);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,7 +27,6 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.beans.factory.BeanCreationException;
|
||||
import org.springframework.core.io.FileSystemResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.integration.JavaUtils;
|
||||
import org.springframework.integration.file.remote.session.SessionFactory;
|
||||
@@ -184,21 +183,6 @@ public class DefaultSftpSessionFactory implements SessionFactory<LsEntry>, Share
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies the filename that will be used for a host key repository.
|
||||
* The file has the same format as OpenSSH's known_hosts file.
|
||||
* <p>
|
||||
* <b>Required if {@link #setAllowUnknownKeys(boolean) allowUnknownKeys} is
|
||||
* false (default).</b>
|
||||
* @param knownHosts The known hosts.
|
||||
* @deprecated since 5.2.5 in favor of {@link #setKnownHostsResource(Resource)}
|
||||
* @see JSch#setKnownHosts(String)
|
||||
*/
|
||||
@Deprecated
|
||||
public void setKnownHosts(String knownHosts) {
|
||||
setKnownHostsResource(new FileSystemResource(knownHosts));
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies the filename that will be used for a host key repository.
|
||||
* The file has the same format as OpenSSH's known_hosts file.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,6 +26,8 @@ import com.jcraft.jsch.SftpATTRS;
|
||||
* A {@link org.springframework.integration.file.remote.FileInfo} implementation for SFTP.
|
||||
*
|
||||
* @author Gary Russell
|
||||
* @author Artem Bilan
|
||||
*
|
||||
* @since 2.1
|
||||
*/
|
||||
public class SftpFileInfo extends AbstractFileInfo<LsEntry> {
|
||||
@@ -42,7 +44,7 @@ public class SftpFileInfo extends AbstractFileInfo<LsEntry> {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see com.jcraft.jsch.SftpATTRS#isDir()
|
||||
* @see SftpATTRS#isDir()
|
||||
*/
|
||||
@Override
|
||||
public boolean isDirectory() {
|
||||
@@ -50,7 +52,7 @@ public class SftpFileInfo extends AbstractFileInfo<LsEntry> {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see com.jcraft.jsch.SftpATTRS#isLink()
|
||||
* @see SftpATTRS#isLink()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLink() {
|
||||
@@ -58,7 +60,7 @@ public class SftpFileInfo extends AbstractFileInfo<LsEntry> {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see com.jcraft.jsch.SftpATTRS#getSize()
|
||||
* @see SftpATTRS#getSize()
|
||||
*/
|
||||
@Override
|
||||
public long getSize() {
|
||||
@@ -66,7 +68,7 @@ public class SftpFileInfo extends AbstractFileInfo<LsEntry> {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see com.jcraft.jsch.SftpATTRS#getMTime()
|
||||
* @see SftpATTRS#getMTime()
|
||||
*/
|
||||
@Override
|
||||
public long getModified() {
|
||||
@@ -74,7 +76,7 @@ public class SftpFileInfo extends AbstractFileInfo<LsEntry> {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see com.jcraft.jsch.ChannelSftp.LsEntry#getFilename()
|
||||
* @see LsEntry#getFilename()
|
||||
*/
|
||||
@Override
|
||||
public String getFilename() {
|
||||
|
||||
Reference in New Issue
Block a user