@Deprecated public class UsersFileRepository extends AbstractJamesUsersRepository
Implementation of a Repository to store users on the File System.
Requires a configuration element in the .conf.xml file of the form:
<repository destinationURL="file://path-to-root-dir-for-repository" type="USERS" model="SYNCHRONOUS"/>Requires a logger called UsersRepository.
RecipientRewriteTable.ErrorMappingException
Modifier and Type | Field and Description |
---|---|
protected static boolean |
DEEP_DEBUG
Deprecated.
Whether 'deep debugging' is turned on.
|
enableAliases, enableForwarding, ignoreCase
ALIASDOMAIN_PREFIX, ERROR_PREFIX, REGEX_PREFIX, WILDCARD
Constructor and Description |
---|
UsersFileRepository()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(String name)
Deprecated.
Returns whether or not this user is in the repository
|
int |
countUsers()
Deprecated.
Returns a count of the users in the repository.
|
protected void |
doAddUser(User user)
Deprecated.
Adds a user to the underlying Repository.
|
protected void |
doConfigure(org.apache.commons.configuration.HierarchicalConfiguration configuration)
Deprecated.
|
protected void |
doUpdateUser(User user)
Deprecated.
Updates a user record to match the supplied User.
|
User |
getUserByName(String name)
Deprecated.
Get the user object with the specified user name.
|
void |
init()
Deprecated.
|
Iterator<String> |
list()
Deprecated.
List users in repository.
|
void |
removeUser(String name)
Deprecated.
Removes a user from the repository
|
void |
setFileSystem(FileSystem fs)
Deprecated.
|
boolean |
test(String name,
String password)
Deprecated.
Test if user with name 'name' has password 'password'.
|
addAddressMapping, addAliasDomainMapping, addErrorMapping, addMapping, addRegexMapping, configure, doAddUser, getAllMappings, getMappings, getUserDomainMappings, removeAddressMapping, removeAliasDomainMapping, removeErrorMapping, removeMapping, removeRegexMapping, setEnableAliases, setEnableForwarding, setIgnoreCase, updateUser
addUser, getLogger, isValidUsername, setDomainList, setEnableVirtualHosting, setLog, supportVirtualHosting
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addUser, supportVirtualHosting
protected static boolean DEEP_DEBUG
public void setFileSystem(FileSystem fs)
protected void doConfigure(org.apache.commons.configuration.HierarchicalConfiguration configuration) throws org.apache.commons.configuration.ConfigurationException
doConfigure
in class AbstractUsersRepository
org.apache.commons.configuration.ConfigurationException
AbstractUsersRepository.doConfigure(org.apache.commons.configuration.HierarchicalConfiguration)
@PostConstruct public void init() throws Exception
Exception
public Iterator<String> list()
UsersRepository
UsersRepository.list()
protected void doAddUser(User user) throws UsersRepositoryException
AbstractJamesUsersRepository
doAddUser
in class AbstractJamesUsersRepository
user
- the user to addUsersRepositoryException
AbstractJamesUsersRepository.doAddUser(org.apache.james.user.api.model.User)
public User getUserByName(String name) throws UsersRepositoryException
UsersRepository
name
- the name of the user to retrieveUsersRepositoryException
UsersRepository.getUserByName(java.lang.String)
protected void doUpdateUser(User user) throws UsersRepositoryException
AbstractJamesUsersRepository
doUpdateUser
in class AbstractJamesUsersRepository
user
- the user to updateUsersRepositoryException
AbstractJamesUsersRepository.doUpdateUser(org.apache.james.user.api.model.User)
public void removeUser(String name) throws UsersRepositoryException
UsersRepository
name
- the user to remove from the repositoryUsersRepositoryException
- if errorUsersRepository.removeUser(java.lang.String)
public boolean contains(String name) throws UsersRepositoryException
UsersRepository
name
- the name to check in the repositoryUsersRepositoryException
- if errorUsersRepository.contains(java.lang.String)
public boolean test(String name, String password) throws UsersRepositoryException
UsersRepository
name
- the name of the user to be testedpassword
- the password to be testedUsersRepositoryException
- if errorUsersRepository.test(java.lang.String,
java.lang.String)
public int countUsers() throws UsersRepositoryException
UsersRepository
UsersRepositoryException
- if errorUsersRepository.countUsers()
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.