org.apache.ftpserver.usermanager
Class PropertiesUserManagerFactory

java.lang.Object
  extended by org.apache.ftpserver.usermanager.PropertiesUserManagerFactory
All Implemented Interfaces:
UserManagerFactory

public class PropertiesUserManagerFactory
extends Object
implements UserManagerFactory

Factory for the properties file based UserManager implementation.

Author:
Apache MINA Project

Constructor Summary
PropertiesUserManagerFactory()
           
 
Method Summary
 UserManager createUserManager()
          Creates a PropertiesUserManager instance based on the provided configuration
 String getAdminName()
          Get the admin name.
 File getFile()
          Retrieve the file used to load and store users
 PasswordEncryptor getPasswordEncryptor()
          Retrieve the password encryptor used by user managers created by this factory
 URL getUrl()
          Retrieve the URL used to load and store users
 void setAdminName(String adminName)
          Set the name to use as the administrator of the server.
 void setFile(File propFile)
          Set the file used to store and read users.
 void setPasswordEncryptor(PasswordEncryptor passwordEncryptor)
          Set the password encryptor to use by user managers created by this factory
 void setUrl(URL userDataURL)
          Set the URL used to store and read users.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesUserManagerFactory

public PropertiesUserManagerFactory()
Method Detail

createUserManager

public UserManager createUserManager()
Creates a PropertiesUserManager instance based on the provided configuration

Specified by:
createUserManager in interface UserManagerFactory
Returns:
The UserManager

getAdminName

public String getAdminName()
Get the admin name.

Returns:
The admin user name

setAdminName

public void setAdminName(String adminName)
Set the name to use as the administrator of the server. The default value is "admin".

Parameters:
adminName - The administrator user name

getFile

public File getFile()
Retrieve the file used to load and store users

Returns:
The file

setFile

public void setFile(File propFile)
Set the file used to store and read users.

Parameters:
propFile - A file containing users

getUrl

public URL getUrl()
Retrieve the URL used to load and store users

Returns:
The URL

setUrl

public void setUrl(URL userDataURL)
Set the URL used to store and read users.

Parameters:
userDataURL - A URL containing users

getPasswordEncryptor

public PasswordEncryptor getPasswordEncryptor()
Retrieve the password encryptor used by user managers created by this factory

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

setPasswordEncryptor

public void setPasswordEncryptor(PasswordEncryptor passwordEncryptor)
Set the password encryptor to use by user managers created by this factory

Parameters:
passwordEncryptor - The password encryptor


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