Package org.apache.ftpserver.ftplet

Examples of org.apache.ftpserver.ftplet.FtpException


                names.add(rs.getString(ATTR_LOGIN));
            }
            return names.toArray(new String[0]);
        } catch (SQLException ex) {
            LOG.error("DbUserManager.getAllUserNames()", ex);
            throw new FtpException("DbUserManager.getAllUserNames()", ex);
        } finally {
            closeQuitely(rs);
            closeQuitely(stmt);
        }
    }
View Full Code Here


    public FileSystemView createFileSystemView(User user) throws FtpException {
        if (user instanceof SlingUser) {
            return new SlingFileSystemView(((SlingUser) user));
        }

        throw new FtpException("User " + user.getName() + " of type " + user.getClass() + " not supported");
    }
View Full Code Here

                    while (ai.hasNext()) {
                        list.add(ai.next().getID());
                    }
                    return list.toArray(new String[list.size()]);
                } catch (RepositoryException e) {
                    throw new FtpException(e);
                }
            }
        } finally {
            admin.close();
        }

        // no user managemnent or problem accessing them
        throw new FtpException("Cannot get users");
    }
View Full Code Here

            Authorizable a;
            try {
                a = um.getAuthorizable(name);
                return (a != null && !a.isGroup()) ? (org.apache.jackrabbit.api.security.user.User) a : null;
            } catch (RepositoryException e) {
                throw new FtpException(e);
            }
        }
        throw new FtpException("Missing internal user manager; cannot find user");
    }
View Full Code Here

     */
    private ResourceResolver getAdminResolver() throws FtpException {
        try {
            return this.rrFactory.getAdministrativeResourceResolver(null);
        } catch (LoginException e) {
            throw new FtpException("Cannot create administrative ResourceResolver", e);
        }
    }
View Full Code Here

*
*/
public class FtpLetThrowFtpExceptionTest extends FtpLetReturnDisconnectTest {

    protected void throwException() throws FtpException, IOException {
        throw new FtpException();
    }
View Full Code Here

            stmt = createConnection().createStatement();
            rs = stmt.executeQuery(sql);
            return rs.next();
        } catch (SQLException ex) {
            LOG.error("DbUserManager.isAdmin()", ex);
            throw new FtpException("DbUserManager.isAdmin()", ex);
        } finally {
            closeQuitely(rs);
            closeQuitely(stmt);
        }
    }
View Full Code Here

        try {
            stmt = createConnection().createStatement();
            stmt.executeUpdate(sql);
        } catch (SQLException ex) {
            LOG.error("DbUserManager.delete()", ex);
            throw new FtpException("DbUserManager.delete()", ex);
        } finally {
            closeQuitely(stmt);
        }
    }
View Full Code Here

            // execute query
            stmt = createConnection().createStatement();
            stmt.executeUpdate(sql);
        } catch (SQLException ex) {
            LOG.error("DbUserManager.save()", ex);
            throw new FtpException("DbUserManager.save()", ex);
        } finally {
            closeQuitely(stmt);
        }
    }
View Full Code Here

            return user;


        } catch (SQLException ex) {
            LOG.error("DbUserManager.getUserByName()", ex);
            throw new FtpException("DbUserManager.getUserByName()", ex);
        } finally {
            closeQuitely(rs);
            closeQuitely(stmt);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.ftpserver.ftplet.FtpException

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.