Search in sources :

Example 1 with PropertiesUserManager

use of org.apache.ftpserver.usermanager.impl.PropertiesUserManager in project camel by apache.

the class FtpAndHttpRecipientListInterceptSendToEndpointIssueTest method initFtpServer.

protected void initFtpServer() throws Exception {
    FtpServerFactory serverFactory = new FtpServerFactory();
    // setup user management to read our users.properties and use clear text passwords
    File file = new File("src/test/resources/users.properties");
    UserManager uman = new PropertiesUserManager(new ClearTextPasswordEncryptor(), file, "admin");
    serverFactory.setUserManager(uman);
    NativeFileSystemFactory fsf = new NativeFileSystemFactory();
    fsf.setCreateHome(true);
    serverFactory.setFileSystem(fsf);
    ListenerFactory factory = new ListenerFactory();
    factory.setPort(ftpPort);
    serverFactory.addListener("default", factory.createListener());
    ftpServer = serverFactory.createServer();
}
Also used : FtpServerFactory(org.apache.ftpserver.FtpServerFactory) PropertiesUserManager(org.apache.ftpserver.usermanager.impl.PropertiesUserManager) UserManager(org.apache.ftpserver.ftplet.UserManager) NativeFileSystemFactory(org.apache.ftpserver.filesystem.nativefs.NativeFileSystemFactory) File(java.io.File) PropertiesUserManager(org.apache.ftpserver.usermanager.impl.PropertiesUserManager) ClearTextPasswordEncryptor(org.apache.ftpserver.usermanager.ClearTextPasswordEncryptor) ListenerFactory(org.apache.ftpserver.listener.ListenerFactory)

Example 2 with PropertiesUserManager

use of org.apache.ftpserver.usermanager.impl.PropertiesUserManager in project camel by apache.

the class FtpXQueryTest method initFtpServer.

protected void initFtpServer() throws Exception {
    FtpServerFactory serverFactory = new FtpServerFactory();
    // setup user management to read our users.properties and use clear text passwords
    File file = new File("src/test/resources/users.properties");
    UserManager uman = new PropertiesUserManager(new ClearTextPasswordEncryptor(), file, "admin");
    serverFactory.setUserManager(uman);
    NativeFileSystemFactory fsf = new NativeFileSystemFactory();
    fsf.setCreateHome(true);
    serverFactory.setFileSystem(fsf);
    ListenerFactory factory = new ListenerFactory();
    factory.setPort(ftpPort);
    serverFactory.addListener("default", factory.createListener());
    ftpServer = serverFactory.createServer();
}
Also used : FtpServerFactory(org.apache.ftpserver.FtpServerFactory) PropertiesUserManager(org.apache.ftpserver.usermanager.impl.PropertiesUserManager) UserManager(org.apache.ftpserver.ftplet.UserManager) NativeFileSystemFactory(org.apache.ftpserver.filesystem.nativefs.NativeFileSystemFactory) File(java.io.File) PropertiesUserManager(org.apache.ftpserver.usermanager.impl.PropertiesUserManager) ClearTextPasswordEncryptor(org.apache.ftpserver.usermanager.ClearTextPasswordEncryptor) ListenerFactory(org.apache.ftpserver.listener.ListenerFactory)

Example 3 with PropertiesUserManager

use of org.apache.ftpserver.usermanager.impl.PropertiesUserManager in project camel by apache.

the class SpringFileAntPathMatcherRemoteFileFilterTest method initFtpServer.

protected void initFtpServer() throws Exception {
    FtpServerFactory serverFactory = new FtpServerFactory();
    // setup user management to read our users.properties and use clear text passwords
    File file = new File("src/test/resources/users.properties");
    UserManager uman = new PropertiesUserManager(new ClearTextPasswordEncryptor(), file, "admin");
    serverFactory.setUserManager(uman);
    NativeFileSystemFactory fsf = new NativeFileSystemFactory();
    fsf.setCreateHome(true);
    serverFactory.setFileSystem(fsf);
    ListenerFactory factory = new ListenerFactory();
    factory.setPort(ftpPort);
    serverFactory.addListener("default", factory.createListener());
    ftpServer = serverFactory.createServer();
}
Also used : FtpServerFactory(org.apache.ftpserver.FtpServerFactory) PropertiesUserManager(org.apache.ftpserver.usermanager.impl.PropertiesUserManager) UserManager(org.apache.ftpserver.ftplet.UserManager) NativeFileSystemFactory(org.apache.ftpserver.filesystem.nativefs.NativeFileSystemFactory) File(java.io.File) PropertiesUserManager(org.apache.ftpserver.usermanager.impl.PropertiesUserManager) ClearTextPasswordEncryptor(org.apache.ftpserver.usermanager.ClearTextPasswordEncryptor) ListenerFactory(org.apache.ftpserver.listener.ListenerFactory)

Example 4 with PropertiesUserManager

use of org.apache.ftpserver.usermanager.impl.PropertiesUserManager in project camel by apache.

the class FtpCronScheduledRoutePolicyTest method initFtpServer.

protected void initFtpServer() throws Exception {
    FtpServerFactory serverFactory = new FtpServerFactory();
    // setup user management to read our users.properties and use clear text passwords
    File file = new File("src/test/resources/users.properties");
    UserManager uman = new PropertiesUserManager(new ClearTextPasswordEncryptor(), file, "admin");
    serverFactory.setUserManager(uman);
    NativeFileSystemFactory fsf = new NativeFileSystemFactory();
    fsf.setCreateHome(true);
    serverFactory.setFileSystem(fsf);
    ListenerFactory factory = new ListenerFactory();
    factory.setPort(20128);
    serverFactory.addListener("default", factory.createListener());
    ftpServer = serverFactory.createServer();
}
Also used : FtpServerFactory(org.apache.ftpserver.FtpServerFactory) PropertiesUserManager(org.apache.ftpserver.usermanager.impl.PropertiesUserManager) UserManager(org.apache.ftpserver.ftplet.UserManager) NativeFileSystemFactory(org.apache.ftpserver.filesystem.nativefs.NativeFileSystemFactory) File(java.io.File) PropertiesUserManager(org.apache.ftpserver.usermanager.impl.PropertiesUserManager) ClearTextPasswordEncryptor(org.apache.ftpserver.usermanager.ClearTextPasswordEncryptor) ListenerFactory(org.apache.ftpserver.listener.ListenerFactory)

Example 5 with PropertiesUserManager

use of org.apache.ftpserver.usermanager.impl.PropertiesUserManager in project camel by apache.

the class SpringFtpEndpointTest method initFtpServer.

protected void initFtpServer() throws Exception {
    FtpServerFactory serverFactory = new FtpServerFactory();
    // setup user management to read our users.properties and use clear text passwords
    File file = new File("src/test/resources/users.properties");
    UserManager uman = new PropertiesUserManager(new ClearTextPasswordEncryptor(), file, "admin");
    serverFactory.setUserManager(uman);
    NativeFileSystemFactory fsf = new NativeFileSystemFactory();
    fsf.setCreateHome(true);
    serverFactory.setFileSystem(fsf);
    ListenerFactory factory = new ListenerFactory();
    factory.setPort(ftpPort);
    serverFactory.addListener("default", factory.createListener());
    ftpServer = serverFactory.createServer();
}
Also used : FtpServerFactory(org.apache.ftpserver.FtpServerFactory) PropertiesUserManager(org.apache.ftpserver.usermanager.impl.PropertiesUserManager) UserManager(org.apache.ftpserver.ftplet.UserManager) NativeFileSystemFactory(org.apache.ftpserver.filesystem.nativefs.NativeFileSystemFactory) File(java.io.File) PropertiesUserManager(org.apache.ftpserver.usermanager.impl.PropertiesUserManager) ClearTextPasswordEncryptor(org.apache.ftpserver.usermanager.ClearTextPasswordEncryptor) ListenerFactory(org.apache.ftpserver.listener.ListenerFactory)

Aggregations

File (java.io.File)5 FtpServerFactory (org.apache.ftpserver.FtpServerFactory)5 NativeFileSystemFactory (org.apache.ftpserver.filesystem.nativefs.NativeFileSystemFactory)5 UserManager (org.apache.ftpserver.ftplet.UserManager)5 ListenerFactory (org.apache.ftpserver.listener.ListenerFactory)5 ClearTextPasswordEncryptor (org.apache.ftpserver.usermanager.ClearTextPasswordEncryptor)5 PropertiesUserManager (org.apache.ftpserver.usermanager.impl.PropertiesUserManager)5