org.apache.ftpserver.usermanager
Class PropertiesUserManagerFactory

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

public class PropertiesUserManagerFactory
extends java.lang.Object
implements UserManagerFactory

Factory for the properties file based UserManager implementation.

Version:
$Rev: 689495 $, $Date: 2008-08-27 16:58:52 +0200 (Wed, 27 Aug 2008) $
Author:
The Apache MINA Project (dev@mina.apache.org)

Constructor Summary
PropertiesUserManagerFactory()
           
 
Method Summary
 UserManager createUserManager()
          Creates a PropertiesUserManager instance based on the provided configuration
 java.lang.String getAdminName()
          Get the admin name.
 java.io.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
 java.net.URL getUrl()
          Retrieve the URL used to load and store users
 void setAdminName(java.lang.String adminName)
          Set the name to use as the administrator of the server.
 void setFile(java.io.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(java.net.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 java.lang.String getAdminName()
Get the admin name.

Returns:
The admin user name

setAdminName

public void setAdminName(java.lang.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 java.io.File getFile()
Retrieve the file used to load and store users

Returns:
The file

setFile

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

Parameters:
propFile - A file containing users

getUrl

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

Returns:
The URL

setUrl

public void setUrl(java.net.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.