|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.james.impl.jamesuser.AbstractUsersRepository
org.apache.james.userrepository.UsersFileRepository
public class UsersFileRepository
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.
| Field Summary | |
|---|---|
protected static boolean |
DEEP_DEBUG
Whether 'deep debugging' is turned on. |
| Fields inherited from class org.apache.james.impl.jamesuser.AbstractUsersRepository |
|---|
enableAliases, enableForwarding, ignoreCase |
| Fields inherited from interface org.apache.james.api.user.UsersRepository |
|---|
ROLE, USER |
| Fields inherited from interface org.apache.james.api.vut.VirtualUserTable |
|---|
ALIASDOMAIN_PREFIX, ERROR_PREFIX, REGEX_PREFIX, ROLE |
| Constructor Summary | |
|---|---|
UsersFileRepository()
|
|
| Method Summary | |
|---|---|
boolean |
addUser(java.lang.String username,
java.lang.String password)
Adds a user to the repository with the specified password |
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
|
boolean |
contains(java.lang.String name)
Returns whether or not this user is in the repository |
boolean |
containsCaseInsensitive(java.lang.String name)
Returns whether or not this user is in the repository. |
int |
countUsers()
Returns a count of the users in the repository. |
protected void |
doAddUser(User user)
Adds a user to the underlying Repository. |
void |
doUpdateUser(User user)
Updates a user record to match the supplied User. |
java.lang.String |
getRealName(java.lang.String name)
Returns the user name of the user matching name on an equalsIgnoreCase basis. |
java.lang.String |
getRealName(java.lang.String name,
boolean ignoreCase)
Return the real name, given the ignoreCase boolean parameter |
User |
getUserByName(java.lang.String name)
Get the user object with the specified user name. |
User |
getUserByNameCaseInsensitive(java.lang.String name)
Get the user object with the specified user name. |
void |
initialize()
|
java.util.Iterator |
list()
List users in repository. |
void |
removeUser(java.lang.String name)
Removes a user from the repository |
void |
service(org.apache.avalon.framework.service.ServiceManager componentManager)
|
void |
setStore(org.apache.avalon.cornerstone.services.store.Store store)
Set the Store |
boolean |
test(java.lang.String name,
java.lang.String password)
Test if user with name 'name' has password 'password'. |
| Methods inherited from class org.apache.james.impl.jamesuser.AbstractUsersRepository |
|---|
addUser, addUser, getMappings, setEnableAliases, setEnableForwarding, setIgnoreCase, updateUser |
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
|---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static boolean DEEP_DEBUG
| Constructor Detail |
|---|
public UsersFileRepository()
| Method Detail |
|---|
public void setStore(org.apache.avalon.cornerstone.services.store.Store store)
store - the Store
public void service(org.apache.avalon.framework.service.ServiceManager componentManager)
throws org.apache.avalon.framework.service.ServiceException
service in interface org.apache.avalon.framework.service.Serviceableorg.apache.avalon.framework.service.ServiceExceptionServiceable.service(ServiceManager)
public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableconfigure in class AbstractUsersRepositoryorg.apache.avalon.framework.configuration.ConfigurationExceptionConfigurable.configure(Configuration)
public void initialize()
throws java.lang.Exception
initialize in interface org.apache.avalon.framework.activity.Initializablejava.lang.ExceptionInitializable.initialize()public java.util.Iterator list()
UsersRepository
list in interface UsersRepositoryUsersRepository.list()protected void doAddUser(User user)
AbstractUsersRepository
doAddUser in class AbstractUsersRepositoryuser - the user to addAbstractUsersRepository.doAddUser(org.apache.james.api.user.User)
public boolean addUser(java.lang.String username,
java.lang.String password)
UsersRepository
addUser in interface UsersRepositoryusername - the username of the user to be addedpassword - the password of the user to add
UsersRepository.addUser(java.lang.String, java.lang.String)public User getUserByName(java.lang.String name)
UsersRepository
getUserByName in interface UsersRepositoryname - the name of the user to retrieve
UsersRepository.getUserByName(java.lang.String)public User getUserByNameCaseInsensitive(java.lang.String name)
UsersRepository
getUserByNameCaseInsensitive in interface UsersRepositoryname - the name of the user to retrieve
UsersRepository.getUserByNameCaseInsensitive(java.lang.String)
public java.lang.String getRealName(java.lang.String name,
boolean ignoreCase)
public java.lang.String getRealName(java.lang.String name)
UsersRepository
getRealName in interface UsersRepositoryname - the name to case-correct
UsersRepository.getRealName(java.lang.String)public void doUpdateUser(User user)
AbstractUsersRepository
doUpdateUser in class AbstractUsersRepositoryuser - the user to updateAbstractUsersRepository.doUpdateUser(org.apache.james.api.user.User)public void removeUser(java.lang.String name)
UsersRepository
removeUser in interface UsersRepositoryname - the user to remove from the repositoryUsersRepository.removeUser(java.lang.String)public boolean contains(java.lang.String name)
UsersRepository
contains in interface UsersRepositoryname - the name to check in the repository
UsersRepository.contains(java.lang.String)public boolean containsCaseInsensitive(java.lang.String name)
UsersRepository
containsCaseInsensitive in interface UsersRepositoryname - the name to check in the repository
UsersRepository.containsCaseInsensitive(java.lang.String)
public boolean test(java.lang.String name,
java.lang.String password)
UsersRepository
test in interface UsersRepositoryname - the name of the user to be testedpassword - the password to be tested
UsersRepository.test(java.lang.String, java.lang.String)public int countUsers()
UsersRepository
countUsers in interface UsersRepositoryUsersRepository.countUsers()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||