Package org.apache.ftpserver.usermanager

Examples of org.apache.ftpserver.usermanager.DbUserManagerFactory


    }


    @Override
    protected UserManagerFactory createUserManagerFactory() throws FtpException {
        DbUserManagerFactory manager = (DbUserManagerFactory) super.createUserManagerFactory();
        manager.setPasswordEncryptor(new ClearTextPasswordEncryptor());
        return manager;

    }
View Full Code Here


        stm.execute(ddl);
    }

    @Override
    protected UserManagerFactory createUserManagerFactory() throws FtpException {
        DbUserManagerFactory manager = new DbUserManagerFactory();

        manager.setDataSource(ds);
        manager
                .setSqlUserInsert("INSERT INTO FTP_USER (userid, userpassword, homedirectory, enableflag, writepermission, idletime, uploadrate, downloadrate, maxloginnumber, maxloginperip) VALUES ('{userid}', '{userpassword}', '{homedirectory}', {enableflag}, {writepermission}, {idletime}, {uploadrate}, {downloadrate}, {maxloginnumber}, {maxloginperip})");
        manager
                .setSqlUserUpdate("UPDATE FTP_USER SET userpassword='{userpassword}',homedirectory='{homedirectory}',enableflag={enableflag},writepermission={writepermission},idletime={idletime},uploadrate={uploadrate},downloadrate={downloadrate},maxloginnumber={maxloginnumber}, maxloginperip={maxloginperip} WHERE userid='{userid}'");
        manager
                .setSqlUserDelete("DELETE FROM FTP_USER WHERE userid = '{userid}'");
        manager
                .setSqlUserSelect("SELECT * FROM FTP_USER WHERE userid = '{userid}'");
        manager
                .setSqlUserSelectAll("SELECT userid FROM FTP_USER ORDER BY userid");
        manager
                .setSqlUserAuthenticate("SELECT userid, userpassword FROM FTP_USER WHERE userid='{userid}'");
        manager
                .setSqlUserAdmin("SELECT userid FROM FTP_USER WHERE userid='{userid}' AND userid='admin'");

        return manager;

    }
View Full Code Here

            "src/test/resources/dbusermanagertest-cleartext-hsql.sql")
    }


    protected UserManagerFactory createUserManagerFactory() throws FtpException {
        DbUserManagerFactory manager = (DbUserManagerFactory) super.createUserManagerFactory();
        manager.setPasswordEncryptor(new ClearTextPasswordEncryptor());
        return manager;

    }
View Full Code Here

        Statement stm = conn.createStatement();
        stm.execute(ddl);
    }

    protected UserManagerFactory createUserManagerFactory() throws FtpException {
        DbUserManagerFactory manager = new DbUserManagerFactory();

        manager.setDataSource(ds);
        manager
                .setSqlUserInsert("INSERT INTO FTP_USER (userid, userpassword, homedirectory, enableflag, writepermission, idletime, uploadrate, downloadrate, maxloginnumber, maxloginperip) VALUES ('{userid}', '{userpassword}', '{homedirectory}', {enableflag}, {writepermission}, {idletime}, {uploadrate}, {downloadrate}, {maxloginnumber}, {maxloginperip})");
        manager
                .setSqlUserUpdate("UPDATE FTP_USER SET userpassword='{userpassword}',homedirectory='{homedirectory}',enableflag={enableflag},writepermission={writepermission},idletime={idletime},uploadrate={uploadrate},downloadrate={downloadrate},maxloginnumber={maxloginnumber}, maxloginperip={maxloginperip} WHERE userid='{userid}'");
        manager
                .setSqlUserDelete("DELETE FROM FTP_USER WHERE userid = '{userid}'");
        manager
                .setSqlUserSelect("SELECT * FROM FTP_USER WHERE userid = '{userid}'");
        manager
                .setSqlUserSelectAll("SELECT userid FROM FTP_USER ORDER BY userid");
        manager
                .setSqlUserAuthenticate("SELECT userid, userpassword FROM FTP_USER WHERE userid='{userid}'");
        manager
                .setSqlUserAdmin("SELECT userid FROM FTP_USER WHERE userid='{userid}' AND userid='admin'");

        return manager;

    }
View Full Code Here

            "src/test/resources/dbusermanagertest-cleartext-hsql.sql")
    }


    protected UserManagerFactory createUserManagerFactory() throws FtpException {
        DbUserManagerFactory manager = (DbUserManagerFactory) super.createUserManagerFactory();
        manager.setPasswordEncryptor(new ClearTextPasswordEncryptor());
        return manager;

    }
View Full Code Here

        Statement stm = conn.createStatement();
        stm.execute(ddl);
    }

    protected UserManagerFactory createUserManagerFactory() throws FtpException {
        DbUserManagerFactory manager = new DbUserManagerFactory();

        manager.setDataSource(ds);
        manager
                .setSqlUserInsert("INSERT INTO FTP_USER (userid, userpassword, homedirectory, enableflag, writepermission, idletime, uploadrate, downloadrate, maxloginnumber, maxloginperip) VALUES ('{userid}', '{userpassword}', '{homedirectory}', {enableflag}, {writepermission}, {idletime}, {uploadrate}, {downloadrate}, {maxloginnumber}, {maxloginperip})");
        manager
                .setSqlUserUpdate("UPDATE FTP_USER SET userpassword='{userpassword}',homedirectory='{homedirectory}',enableflag={enableflag},writepermission={writepermission},idletime={idletime},uploadrate={uploadrate},downloadrate={downloadrate},maxloginnumber={maxloginnumber}, maxloginperip={maxloginperip} WHERE userid='{userid}'");
        manager
                .setSqlUserDelete("DELETE FROM FTP_USER WHERE userid = '{userid}'");
        manager
                .setSqlUserSelect("SELECT * FROM FTP_USER WHERE userid = '{userid}'");
        manager
                .setSqlUserSelectAll("SELECT userid FROM FTP_USER ORDER BY userid");
        manager
                .setSqlUserAuthenticate("SELECT userid, userpassword FROM FTP_USER WHERE userid='{userid}'");
        manager
                .setSqlUserAdmin("SELECT userid FROM FTP_USER WHERE userid='{userid}' AND userid='admin'");

        return manager;

    }
View Full Code Here

        Statement stm = conn.createStatement();
        stm.execute(ddl);
    }

    protected UserManagerFactory createUserManagerFactory() throws FtpException {
        DbUserManagerFactory manager = new DbUserManagerFactory();

        manager.setDataSource(ds);
        manager
                .setSqlUserInsert("INSERT INTO FTP_USER (userid, userpassword, homedirectory, enableflag, writepermission, idletime, uploadrate, downloadrate, maxloginnumber, maxloginperip) VALUES ('{userid}', '{userpassword}', '{homedirectory}', '{enableflag}', '{writepermission}', {idletime}, {uploadrate}, {downloadrate}, {maxloginnumber}, {maxloginperip})");
        manager
                .setSqlUserUpdate("UPDATE FTP_USER SET userpassword='{userpassword}',homedirectory='{homedirectory}',enableflag='{enableflag}',writepermission='{writepermission}',idletime={idletime},uploadrate={uploadrate},downloadrate={downloadrate},maxloginnumber={maxloginnumber}, maxloginperip={maxloginperip} WHERE userid='{userid}'");
        manager
                .setSqlUserDelete("DELETE FROM FTP_USER WHERE userid = '{userid}'");
        manager
                .setSqlUserSelect("SELECT * FROM FTP_USER WHERE userid = '{userid}'");
        manager
                .setSqlUserSelectAll("SELECT userid FROM FTP_USER ORDER BY userid");
        manager
                .setSqlUserAuthenticate("SELECT userid, userpassword FROM FTP_USER WHERE userid='{userid}'");
        manager
                .setSqlUserAdmin("SELECT userid FROM FTP_USER WHERE userid='{userid}' AND userid='admin'");

        return manager;

    }
View Full Code Here

TOP

Related Classes of org.apache.ftpserver.usermanager.DbUserManagerFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.