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;
}