org.apache.ftpserver.usermanager.impl
Class AbstractUserManager

java.lang.Object
  extended by org.apache.ftpserver.usermanager.impl.AbstractUserManager
All Implemented Interfaces:
UserManager
Direct Known Subclasses:
DbUserManager, PropertiesUserManager

public abstract class AbstractUserManager
extends Object
implements UserManager

Internal class, do not use directly. Abstract common base type for UserManager implementations

Author:
Apache MINA Project

Field Summary
static String ATTR_ENABLE
           
static String ATTR_HOME
           
static String ATTR_LOGIN
           
static String ATTR_MAX_DOWNLOAD_RATE
           
static String ATTR_MAX_IDLE_TIME
           
static String ATTR_MAX_LOGIN_NUMBER
           
static String ATTR_MAX_LOGIN_PER_IP
           
static String ATTR_MAX_UPLOAD_RATE
           
static String ATTR_PASSWORD
           
static String ATTR_WRITE_PERM
           
 
Constructor Summary
AbstractUserManager(String adminName, PasswordEncryptor passwordEncryptor)
          Internal constructor, do not use directly
 
Method Summary
 String getAdminName()
          Get the admin name.
 PasswordEncryptor getPasswordEncryptor()
          Retrieve the password encryptor used for this user manager
 boolean isAdmin(String login)
          Check if the user is admin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.ftpserver.ftplet.UserManager
authenticate, delete, doesExist, getAllUserNames, getUserByName, save
 

Field Detail

ATTR_LOGIN

public static final String ATTR_LOGIN
See Also:
Constant Field Values

ATTR_PASSWORD

public static final String ATTR_PASSWORD
See Also:
Constant Field Values

ATTR_HOME

public static final String ATTR_HOME
See Also:
Constant Field Values

ATTR_WRITE_PERM

public static final String ATTR_WRITE_PERM
See Also:
Constant Field Values

ATTR_ENABLE

public static final String ATTR_ENABLE
See Also:
Constant Field Values

ATTR_MAX_IDLE_TIME

public static final String ATTR_MAX_IDLE_TIME
See Also:
Constant Field Values

ATTR_MAX_UPLOAD_RATE

public static final String ATTR_MAX_UPLOAD_RATE
See Also:
Constant Field Values

ATTR_MAX_DOWNLOAD_RATE

public static final String ATTR_MAX_DOWNLOAD_RATE
See Also:
Constant Field Values

ATTR_MAX_LOGIN_NUMBER

public static final String ATTR_MAX_LOGIN_NUMBER
See Also:
Constant Field Values

ATTR_MAX_LOGIN_PER_IP

public static final String ATTR_MAX_LOGIN_PER_IP
See Also:
Constant Field Values
Constructor Detail

AbstractUserManager

public AbstractUserManager(String adminName,
                           PasswordEncryptor passwordEncryptor)
Internal constructor, do not use directly

Method Detail

getAdminName

public String getAdminName()
Get the admin name.

Specified by:
getAdminName in interface UserManager
Returns:
the admin user name

isAdmin

public boolean isAdmin(String login)
                throws FtpException
Description copied from interface: UserManager
Check if the user is admin.

Specified by:
isAdmin in interface UserManager
Parameters:
login - The name of the User to check
Returns:
true if user with this login is administrator
Throws:
FtpException - when the UserManager can't fulfill the request.

getPasswordEncryptor

public PasswordEncryptor getPasswordEncryptor()
Retrieve the password encryptor used for this user manager

Returns:
The password encryptor. Default to Md5PasswordEncryptor if no other has been provided


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.