Package org.apache.ftpserver.usermanager.impl

Examples of org.apache.ftpserver.usermanager.impl.WriteRequest


        assertEquals(0, getMaxDownloadRate(actualUser));
        assertEquals(0, actualUser.getMaxIdleTime());
        assertEquals(0, getMaxLoginNumber(actualUser));
        assertEquals(0, getMaxLoginPerIP(actualUser));
        assertEquals(0, getMaxUploadRate(actualUser));
        assertNull(user.authorize(new WriteRequest()));
        assertTrue(actualUser.getEnabled());
    }
View Full Code Here


        assertEquals(user.getName(), actualUser.getName());
        assertNull(actualUser.getPassword());
        assertEquals("/", actualUser.getHomeDirectory());
        assertEquals(true, actualUser.getEnabled());
        assertNull(user.authorize(new WriteRequest()));
        assertEquals(0, getMaxDownloadRate(actualUser));
        assertEquals(0, actualUser.getMaxIdleTime());
        assertEquals(0, getMaxLoginNumber(actualUser));
        assertEquals(0, getMaxLoginPerIP(actualUser));
        assertEquals(0, getMaxUploadRate(actualUser));
View Full Code Here

    /**
     * Check file write permission.
     */
    public boolean isWritable() {
        LOG.debug("Checking authorization for " + getAbsolutePath());
        if (user.authorize(new WriteRequest(getAbsolutePath())) == null) {
            LOG.debug("Not authorized");
            return false;
        }

        LOG.debug("Checking if file exists");
View Full Code Here

         * be deleted when their parent directory is writable.
        */
        String fullName = getAbsolutePath();

        // we check FTPServer's write permission for this file.
        if (user.authorize(new WriteRequest(fullName)) == null) {
            return false;
        }
        // In order to maintain consistency, when possible we delete the last '/' character in the String
        int indexOfSlash = fullName.lastIndexOf('/');
        String parentFullName;
View Full Code Here

        sb.append("userid          : ").append(user.getName()).append("\n");
        sb.append("userpassword    : ********\n");
        sb.append("homedirectory   : ").append(user.getHomeDirectory()).append(
                "\n");
        sb.append("writepermission : ").append(
                user.authorize(new WriteRequest()) != null).append("\n");
        sb.append("enableflag      : ").append(user.getEnabled()).append("\n");
        sb.append("idletime        : ").append(user.getMaxIdleTime()).append(
                "\n");

        TransferRateRequest transferRateRequest = new TransferRateRequest();
View Full Code Here

    /**
     * Check file write permission.
     */
    public boolean isWritable() {
        LOG.debug("Checking authorization for " + getAbsolutePath());
        if (user.authorize(new WriteRequest(getAbsolutePath())) == null) {
            LOG.debug("Not authorized");
            return false;
        }

        LOG.debug("Checking if file exists");
View Full Code Here

         * be deleted when their parent directory is writable.
        */
        String fullName = getAbsolutePath();

        // we check FTPServer's write permission for this file.
        if (user.authorize(new WriteRequest(fullName)) == null) {
            return false;
        }
        // In order to maintain consistency, when possible we delete the last '/' character in the String
        int indexOfSlash = fullName.lastIndexOf('/');
        String parentFullName;
View Full Code Here

    /**
     * Check file write permission.
     */
    public boolean isWritable() {
        LOG.debug("Checking authorization for " + getAbsolutePath());
        if (user.authorize(new WriteRequest(getAbsolutePath())) == null) {
            LOG.debug("Not authorized");
            return false;
        }

        LOG.debug("Checking if file exists");
View Full Code Here

         * be deleted when their parent directory is writable.
        */
        String fullName=getAbsolutePath();
       
        // we check FTPServer's write permission for this file.
        if (user.authorize(new WriteRequest(fullName)) == null) {
            return false;
        }
        // In order to maintain consistency, when possible we delete the last '/' character in the String
        int indexOfSlash=fullName.lastIndexOf('/');
        String parentFullName;
View Full Code Here

        sb.append("userid          : ").append(user.getName()).append("\n");
        sb.append("userpassword    : ********\n");
        sb.append("homedirectory   : ").append(user.getHomeDirectory()).append(
                "\n");
        sb.append("writepermission : ").append(
                user.authorize(new WriteRequest()) != null).append("\n");
        sb.append("enableflag      : ").append(user.getEnabled()).append("\n");
        sb.append("idletime        : ").append(user.getMaxIdleTime()).append(
                "\n");

        TransferRateRequest transferRateRequest = new TransferRateRequest();
View Full Code Here

TOP

Related Classes of org.apache.ftpserver.usermanager.impl.WriteRequest

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.