Skip to content

Commit

Permalink
[SSHD-1038] Refactor packages from a module into a cleaner hierarchy
Browse files Browse the repository at this point in the history
	renamed:    sshd-mina: org.apache.sshd.common.io.mina -> sshd-mina: org.apache.sshd.mina
	renamed:    sshd-openpgp: org.apache.sshd.common.config.keys.loader.openpgp -> sshd-openpgp: org.apache.sshd.openpgp
	renamed:    sshd-putty: org.apache.sshd.common.config.keys.loader.putty -> sshd-putty: org.apache.sshd.putty
	renamed:    sshd-scp: org.apache.sshd.client.scp -> sshd-scp: org.apache.sshd.scp.client
	renamed:    sshd-scp: org.apache.sshd.common.scp -> sshd-scp: org.apache.sshd.scp.common
	renamed:    sshd-scp: org.apache.sshd.common.scp.helpers -> sshd-scp: org.apache.sshd.scp.common.helpers
	renamed:    sshd-scp: org.apache.sshd.server.scp -> sshd-scp: org.apache.sshd.scp.server
	renamed:    sshd-sftp: org.apache.sshd.client.subsystem.sftp -> sshd-sftp: org.apache.sshd.sftp.client
	renamed:    sshd-sftp: org.apache.sshd.client.subsystem.sftp.extensions -> sshd-sftp: org.apache.sshd.sftp.client.extensions
	renamed:    sshd-sftp: org.apache.sshd.client.subsystem.sftp.extensions.helpers -> sshd-sftp: org.apache.sshd.sftp.client.extensions.helpers
	renamed:    sshd-sftp: org.apache.sshd.client.subsystem.sftp.extensions.openssh -> sshd-sftp: org.apache.sshd.sftp.client.extensions.openssh
	renamed:    sshd-sftp: org.apache.sshd.client.subsystem.sftp.extensions.openssh.helpers -> sshd-sftp: org.apache.sshd.sftp.client.extensions.openssh.helpers
	renamed:    sshd-sftp: org.apache.sshd.client.subsystem.sftp.fs -> sshd-sftp: org.apache.sshd.sftp.client.fs
	renamed:    sshd-sftp: org.apache.sshd.client.subsystem.sftp.impl -> sshd-sftp: org.apache.sshd.sftp.client.impl
	renamed:    sshd-sftp: org.apache.sshd.common.subsystem.sftp -> sshd-sftp: org.apache.sshd.sftp.common
	renamed:    sshd-sftp: org.apache.sshd.common.subsystem.sftp.extensions -> sshd-sftp: org.apache.sshd.sftp.common.extensions
	renamed:    sshd-sftp: org.apache.sshd.common.subsystem.sftp.extensions.openssh -> sshd-sftp: org.apache.sshd.sftp.common.extensions.openssh
	renamed:    sshd-sftp: org.apache.sshd.server.subsystem.sftp -> sshd-sftp: org.apache.sshd.sftp.server
	renamed:    sshd-spring-sftp: org.apache.sshd.spring.integration.sftp -> sshd-spring-sftp: org.apache.sshd.sftp.spring.integration
  • Loading branch information
gnodet committed Jul 21, 2020
1 parent 4f4a752 commit 5cbae28
Show file tree
Hide file tree
Showing 242 changed files with 681 additions and 671 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

* [SSHD-1034](https://issues.apache.org/jira/browse/SSHD-1034) Rename {{org.apache.sshd.common.ForwardingFilter}} to {{Forwarder}}.
* [SSHD-1035](https://issues.apache.org/jira/browse/SSHD-1035) Move property definitions to common locations.
* [SSHD-1038](https://issues.apache.org/jira/browse/SSHD-1035) Refactor packages from a module into a cleaner hierarchy.

## Minor code helpers

Expand Down
2 changes: 1 addition & 1 deletion docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This can be overridden as follows:
1. Provide a `-o SftpClientFactory=XXX` command line argument where the option specifies the fully-qualified name of
the class that implements this interface.

2. Add a `META-INF\services\org.apache.sshd.client.subsystem.sftp.SftpClientFactory` file containing the fully-qualified name of
2. Add a `META-INF\services\org.apache.sshd.sftp.client.SftpClientFactory` file containing the fully-qualified name of
the class that implements this interface. **Note:** if more than one such instance is detected an exception is thrown.

**Note:** The specified class(es) must be public and contain a public no-args constructor.
Expand Down
2 changes: 1 addition & 1 deletion docs/sftp.md
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ One can skip all the conditional code if a specific known extension is required:

* Declare the extension name in `DEFAULT_SUPPORTED_CLIENT_EXTENSIONS` (same class)

* In the `org.apache.sshd.client.subsystem.sftp.extensions.helpers` package implement an extension of `AbstractSftpClientExtension`
* In the `org.apache.sshd.sftp.client.extensions.helpers` package implement an extension of `AbstractSftpClientExtension`
for sending and receiving the newly added extension.

* Add a relevant parser for reported extension data initial report (if necessary) in `ParserUtils#BUILT_IN_PARSERS`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@
import java.util.logging.Level;

import org.apache.sshd.cli.CliSupport;
import org.apache.sshd.client.scp.ScpClient;
import org.apache.sshd.client.scp.ScpClient.Option;
import org.apache.sshd.client.scp.ScpClientCreator;
import org.apache.sshd.client.session.ClientSession;
import org.apache.sshd.common.scp.ScpLocation;
import org.apache.sshd.common.scp.ScpTransferEventListener;
import org.apache.sshd.common.session.Session;
import org.apache.sshd.common.util.GenericUtils;
import org.apache.sshd.common.util.io.NoCloseInputStream;
import org.apache.sshd.common.util.threads.ThreadUtils;
import org.apache.sshd.scp.client.ScpClient;
import org.apache.sshd.scp.client.ScpClient.Option;
import org.apache.sshd.scp.client.ScpClientCreator;
import org.apache.sshd.scp.common.ScpLocation;
import org.apache.sshd.scp.common.ScpTransferEventListener;

/**
* TODO Add javadoc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@
import org.apache.sshd.cli.client.helper.SftpFileTransferProgressOutputStream;
import org.apache.sshd.client.ClientFactoryManager;
import org.apache.sshd.client.session.ClientSession;
import org.apache.sshd.client.subsystem.sftp.SftpClient;
import org.apache.sshd.client.subsystem.sftp.SftpClient.Attributes;
import org.apache.sshd.client.subsystem.sftp.SftpClient.DirEntry;
import org.apache.sshd.client.subsystem.sftp.SftpClientFactory;
import org.apache.sshd.client.subsystem.sftp.extensions.openssh.OpenSSHStatExtensionInfo;
import org.apache.sshd.client.subsystem.sftp.extensions.openssh.OpenSSHStatPathExtension;
import org.apache.sshd.client.subsystem.sftp.fs.SftpFileSystemProvider;
import org.apache.sshd.common.NamedResource;
import org.apache.sshd.common.ServiceFactory;
import org.apache.sshd.common.channel.ChannelFactory;
Expand All @@ -65,17 +58,24 @@
import org.apache.sshd.common.mac.MacFactory;
import org.apache.sshd.common.session.Session;
import org.apache.sshd.common.signature.SignatureFactory;
import org.apache.sshd.common.subsystem.sftp.SftpConstants;
import org.apache.sshd.common.subsystem.sftp.SftpException;
import org.apache.sshd.common.subsystem.sftp.extensions.ParserUtils;
import org.apache.sshd.common.subsystem.sftp.extensions.openssh.StatVfsExtensionParser;
import org.apache.sshd.common.util.GenericUtils;
import org.apache.sshd.common.util.OsUtils;
import org.apache.sshd.common.util.ValidateUtils;
import org.apache.sshd.common.util.buffer.BufferUtils;
import org.apache.sshd.common.util.io.IoUtils;
import org.apache.sshd.common.util.io.NoCloseInputStream;
import org.apache.sshd.common.util.threads.ThreadUtils;
import org.apache.sshd.sftp.client.SftpClient;
import org.apache.sshd.sftp.client.SftpClient.Attributes;
import org.apache.sshd.sftp.client.SftpClient.DirEntry;
import org.apache.sshd.sftp.client.SftpClientFactory;
import org.apache.sshd.sftp.client.extensions.openssh.OpenSSHStatExtensionInfo;
import org.apache.sshd.sftp.client.extensions.openssh.OpenSSHStatPathExtension;
import org.apache.sshd.sftp.client.fs.SftpFileSystemProvider;
import org.apache.sshd.sftp.common.SftpConstants;
import org.apache.sshd.sftp.common.SftpException;
import org.apache.sshd.sftp.common.extensions.ParserUtils;
import org.apache.sshd.sftp.common.extensions.openssh.StatVfsExtensionParser;

/**
* TODO Add javadoc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@
import org.apache.sshd.common.util.security.SecurityUtils;
import org.apache.sshd.common.util.threads.ThreadUtils;
import org.apache.sshd.core.CoreModuleProperties;
import org.apache.sshd.scp.server.ScpCommandFactory;
import org.apache.sshd.server.ServerFactoryManager;
import org.apache.sshd.server.SshServer;
import org.apache.sshd.server.config.SshServerConfigFileReader;
import org.apache.sshd.server.forward.ForwardingFilter;
import org.apache.sshd.server.keyprovider.AbstractGeneratorHostKeyProvider;
import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider;
import org.apache.sshd.server.scp.ScpCommandFactory;
import org.apache.sshd.server.shell.InteractiveProcessShellFactory;
import org.apache.sshd.server.shell.ShellFactory;
import org.apache.sshd.server.subsystem.SubsystemFactory;
import org.apache.sshd.server.subsystem.sftp.SftpEventListener;
import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory;
import org.apache.sshd.sftp.server.SftpEventListener;
import org.apache.sshd.sftp.server.SftpSubsystemFactory;

/**
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
import org.apache.sshd.common.keyprovider.HostKeyCertificateProvider;
import org.apache.sshd.common.keyprovider.KeyPairProvider;
import org.apache.sshd.common.util.GenericUtils;
import org.apache.sshd.scp.server.ScpCommandFactory;
import org.apache.sshd.server.SshServer;
import org.apache.sshd.server.auth.pubkey.AcceptAllPublickeyAuthenticator;
import org.apache.sshd.server.command.CommandFactory;
import org.apache.sshd.server.config.SshServerConfigFileReader;
import org.apache.sshd.server.config.keys.ServerIdentity;
import org.apache.sshd.server.keyprovider.AbstractGeneratorHostKeyProvider;
import org.apache.sshd.server.scp.ScpCommandFactory;
import org.apache.sshd.server.shell.ProcessShellCommandFactory;
import org.apache.sshd.server.shell.ShellFactory;
import org.apache.sshd.server.subsystem.SubsystemFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
import java.util.Collection;
import java.util.Map;

import org.apache.sshd.common.subsystem.sftp.SftpConstants;
import org.apache.sshd.server.session.ServerSession;
import org.apache.sshd.server.subsystem.sftp.SftpEventListener;
import org.apache.sshd.sftp.common.SftpConstants;
import org.apache.sshd.sftp.server.SftpEventListener;

/**
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import org.apache.sshd.common.util.logging.AbstractLoggingBean;
import org.apache.sshd.common.util.security.SecurityUtils;
import org.apache.sshd.common.util.threads.ThreadUtils;
import org.apache.sshd.scp.server.ScpCommandFactory;
import org.apache.sshd.server.Environment;
import org.apache.sshd.server.ExitCallback;
import org.apache.sshd.server.SessionAware;
Expand All @@ -54,10 +55,9 @@
import org.apache.sshd.server.command.CommandFactory;
import org.apache.sshd.server.forward.AcceptAllForwardingFilter;
import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider;
import org.apache.sshd.server.scp.ScpCommandFactory;
import org.apache.sshd.server.session.ServerSession;
import org.apache.sshd.server.shell.ShellFactory;
import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory;
import org.apache.sshd.sftp.server.SftpSubsystemFactory;
import org.apache.sshd.util.test.CommonTestSupportUtils;
import org.apache.sshd.util.test.CoreTestSupportUtils;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import java.nio.file.attribute.PosixFilePermission;
import java.util.Set;

import org.apache.sshd.common.scp.AbstractScpTransferEventListenerAdapter;
import org.apache.sshd.common.session.Session;
import org.apache.sshd.scp.common.AbstractScpTransferEventListenerAdapter;

/**
* Provides a simple access control by making a distinction between methods that upload data and ones that download it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
import java.nio.file.FileSystemException;
import java.util.Objects;

import org.apache.sshd.common.subsystem.sftp.SftpException;
import org.apache.sshd.sftp.common.SftpException;
import org.apache.sshd.sftp.server.SftpErrorStatusDataHandler;
import org.apache.sshd.sftp.server.SftpSubsystemEnvironment;

/**
* An {@link SftpErrorStatusDataHandler} implementation that returns an elaborate message string for the thrown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
import org.apache.sshd.common.util.GenericUtils;
import org.apache.sshd.common.util.io.IoUtils;
import org.apache.sshd.server.session.ServerSession;
import org.apache.sshd.sftp.server.AbstractSftpEventListenerAdapter;
import org.apache.sshd.sftp.server.DirectoryHandle;
import org.apache.sshd.sftp.server.FileHandle;
import org.apache.sshd.sftp.server.Handle;

/**
* Provides a simple access control by making a distinction between methods that provide information - including reading
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@
import java.util.EnumSet;

import org.apache.sshd.client.SshClient;
import org.apache.sshd.client.scp.ScpClient;
import org.apache.sshd.client.scp.ScpClientCreator;
import org.apache.sshd.client.session.ClientSession;
import org.apache.sshd.common.file.FileSystemFactory;
import org.apache.sshd.common.file.virtualfs.VirtualFileSystemFactory;
import org.apache.sshd.common.scp.ScpException;
import org.apache.sshd.common.scp.ScpHelper;
import org.apache.sshd.scp.client.ScpClient;
import org.apache.sshd.scp.client.ScpClientCreator;
import org.apache.sshd.scp.common.ScpException;
import org.apache.sshd.scp.common.ScpHelper;
import org.apache.sshd.scp.server.ScpCommandFactory;
import org.apache.sshd.server.SshServer;
import org.apache.sshd.util.test.BaseTestSupport;
import org.apache.sshd.util.test.CommonTestSupportUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,17 @@

import org.apache.sshd.client.SshClient;
import org.apache.sshd.client.session.ClientSession;
import org.apache.sshd.client.subsystem.sftp.SftpClient;
import org.apache.sshd.client.subsystem.sftp.SftpClient.CloseableHandle;
import org.apache.sshd.client.subsystem.sftp.SftpClient.OpenMode;
import org.apache.sshd.client.subsystem.sftp.SftpClientFactory;
import org.apache.sshd.common.file.FileSystemFactory;
import org.apache.sshd.common.file.virtualfs.VirtualFileSystemFactory;
import org.apache.sshd.common.subsystem.sftp.SftpConstants;
import org.apache.sshd.common.subsystem.sftp.SftpException;
import org.apache.sshd.scp.server.ScpCommandFactory;
import org.apache.sshd.server.SshServer;
import org.apache.sshd.server.scp.ScpCommandFactory;
import org.apache.sshd.sftp.client.SftpClient;
import org.apache.sshd.sftp.client.SftpClient.CloseableHandle;
import org.apache.sshd.sftp.client.SftpClient.OpenMode;
import org.apache.sshd.sftp.client.SftpClientFactory;
import org.apache.sshd.sftp.common.SftpConstants;
import org.apache.sshd.sftp.common.SftpException;
import org.apache.sshd.sftp.server.SftpSubsystemFactory;
import org.apache.sshd.util.test.BaseTestSupport;
import org.apache.sshd.util.test.CommonTestSupportUtils;
import org.junit.After;
Expand Down
2 changes: 1 addition & 1 deletion sshd-git/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<reportsDirectory>${project.build.directory}/surefire-reports-mina</reportsDirectory>
<systemProperties>
<org.apache.sshd.common.io.IoServiceFactoryFactory>org.apache.sshd.common.io.mina.MinaServiceFactoryFactory</org.apache.sshd.common.io.IoServiceFactoryFactory>
<org.apache.sshd.common.io.IoServiceFactoryFactory>org.apache.sshd.mina.MinaServiceFactoryFactory</org.apache.sshd.common.io.IoServiceFactoryFactory>
</systemProperties>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.apache.sshd.git.transport.GitSshdSessionFactory;
import org.apache.sshd.server.SshServer;
import org.apache.sshd.server.auth.password.AcceptAllPasswordAuthenticator;
import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory;
import org.apache.sshd.sftp.server.SftpSubsystemFactory;
import org.apache.sshd.util.test.BaseTestSupport;
import org.apache.sshd.util.test.CommonTestSupportUtils;
import org.apache.sshd.util.test.JSchLogger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import org.apache.sshd.common.util.net.SshdSocketAddress;
import org.apache.sshd.git.GitLocationResolver;
import org.apache.sshd.server.SshServer;
import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory;
import org.apache.sshd.sftp.server.SftpSubsystemFactory;
import org.apache.sshd.util.test.BaseTestSupport;
import org.apache.sshd.util.test.CommonTestSupportUtils;
import org.eclipse.jgit.api.Git;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.sshd.common.io.mina;
package org.apache.sshd.mina;

import java.io.IOException;
import java.net.SocketAddress;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.sshd.common.io.mina;
package org.apache.sshd.mina;

import java.net.SocketAddress;
import java.util.concurrent.atomic.AtomicReference;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.sshd.common.io.mina;
package org.apache.sshd.mina;

import java.net.SocketAddress;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.sshd.common.io.mina;
package org.apache.sshd.mina;

import org.apache.mina.core.service.IoProcessor;
import org.apache.mina.core.service.SimpleIoProcessorPool;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.sshd.common.io.mina;
package org.apache.sshd.mina;

import org.apache.sshd.common.Factory;
import org.apache.sshd.common.FactoryManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.sshd.common.io.mina;
package org.apache.sshd.mina;

import java.io.IOException;
import java.lang.reflect.Field;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.sshd.common.io.mina;
package org.apache.sshd.mina;

import org.apache.mina.core.buffer.IoBuffer;
import org.apache.sshd.common.util.Readable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
## under the License.
##

org.apache.sshd.common.io.mina.MinaServiceFactoryFactory
org.apache.sshd.mina.MinaServiceFactoryFactory
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

package org.apache.sshd.common.io.mina;
package org.apache.sshd.mina;

import org.apache.sshd.util.test.JUnitTestSupport;
import org.junit.FixMethodOrder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

package org.apache.sshd.common.config.keys.loader.openpgp;
package org.apache.sshd.openpgp;

import java.io.IOException;
import java.nio.file.Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

package org.apache.sshd.common.config.keys.loader.openpgp;
package org.apache.sshd.openpgp;

import java.io.IOException;
import java.io.StreamCorruptedException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

package org.apache.sshd.common.config.keys.loader.openpgp;
package org.apache.sshd.openpgp;

import java.nio.file.LinkOption;
import java.nio.file.Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

package org.apache.sshd.common.config.keys.loader.openpgp;
package org.apache.sshd.openpgp;

import java.io.IOException;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

package org.apache.sshd.common.config.keys.loader.openpgp;
package org.apache.sshd.openpgp;

import java.io.IOException;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

package org.apache.sshd.common.config.keys.loader.openpgp;
package org.apache.sshd.openpgp;

import java.io.IOException;
import java.math.BigInteger;
Expand Down
Loading

0 comments on commit 5cbae28

Please sign in to comment.